From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id BA48B1384B4 for ; Tue, 3 Nov 2015 12:43:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2FE9221C04A; Tue, 3 Nov 2015 12:43:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B377E21C04A for ; Tue, 3 Nov 2015 12:43:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7238E3406C0 for ; Tue, 3 Nov 2015 12:43:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8ACC01F69 for ; Tue, 3 Nov 2015 12:43:42 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1446406105.1e65133983f404ea64079df0933dd820619a9b44.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/systemrescuecd-x86-grub/, sys-boot/systemrescuecd-x86-grub/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub sys-boot/systemrescuecd-x86-grub/metadata.xml sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild X-VCS-Directories: sys-boot/systemrescuecd-x86-grub/ sys-boot/systemrescuecd-x86-grub/files/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 1e65133983f404ea64079df0933dd820619a9b44 X-VCS-Branch: master Date: Tue, 3 Nov 2015 12:43:42 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3312fa1a-6e4e-4377-96f7-a0fc1dfb0867 X-Archives-Hash: 82bcc34fb9baf446b67cb215bc5c8c26 commit: 1e65133983f404ea64079df0933dd820619a9b44 Author: vitalogy milaw biz> AuthorDate: Sun Nov 1 19:28:25 2015 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Nov 1 19:28:25 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e651339 sys-boot/systemrescuecd-x86-grub: new ebuild .../files/systemrescuecd.default | 21 +++++++ .../files/systemrescuecd.grub | 65 ++++++++++++++++++++++ sys-boot/systemrescuecd-x86-grub/metadata.xml | 17 ++++++ .../systemrescuecd-x86-grub-0.1.ebuild | 33 +++++++++++ 4 files changed, 136 insertions(+) diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default new file mode 100644 index 0000000..d9b2d0b --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.default @@ -0,0 +1,21 @@ +# Here you can set custom bootoptions for the SystemRescueCD +# +# You can add for example in a space separated list: +# setkmap=xx: which defines the keymap to load (example: setkmap=de) +# dostartx: load the X.Org graphical environment and launch Xfce +# docache: causes the iso file to be fully loaded into memory +# this requires 400MB of memory to cache everything +# doload=xxx: loads needed kernel modules (example: doload=3c59x,e1000) +# noload=xxx: prevents loading kernel modules +# nomodeset: do not load the Kernel-Mode-Setting video driver +# +# Example: +# SRCD_BOOTOPTIONS="setkmap=de docache dostartx" +# +# For all available bootoptions see: +# http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM +# +# Note: +# After changing this, you must update your grub configuration file, to take effect + +SRCD_BOOTOPTIONS="" diff --git a/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub new file mode 100644 index 0000000..b69f298 --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/files/systemrescuecd.grub @@ -0,0 +1,65 @@ +#!/bin/sh +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +. /usr/share/grub/grub-mkconfig_lib + +if [ -r /etc/default/systemrescuecd ] ; then + . /etc/default/systemrescuecd +fi + +# srcd = path of newest link to iso of systemrescuecd, created by the ebuild +# of systemrescuecd-x86 +srcd="/usr/share/systemrescuecd/systemrescuecd-x86-newest.iso" + +longname="SystemRescueCD" +bootops=")" + +if [ ! -z "${SRCD_BOOTOPTIONS}" ]; then + bootops=" with bootoptions)" +fi + +if [ -f "${srcd}" ]; then + + device=$(${grub_probe} --target=device "${srcd}") + path=$(make_system_path_relative_to_its_root "${srcd}") + grub_string=$(prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab) + + gettext_printf "Found %s on %s\n" "${longname}" "${device}" >&2 + onstr=$(gettext_printf "(on %s)" "${device}") + + cat << EOF +submenu "${longname}" --class submenu { + menuentry "${longname} (32bit standard${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/rescue32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } + menuentry "${longname} (64bit standard${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/rescue64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } + menuentry "${longname} (32bit alternative${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/altker32 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } + menuentry "${longname} (64bit alternative${bootops}" --class rescue { +${grub_string} + set isofile=${srcd} + loopback loop \${isofile} + linux (loop)/isolinux/altker64 ${SRCD_BOOTOPTIONS} isoloop=\${isofile} + initrd (loop)/isolinux/initram.igz + } +} +EOF + +fi diff --git a/sys-boot/systemrescuecd-x86-grub/metadata.xml b/sys-boot/systemrescuecd-x86-grub/metadata.xml new file mode 100644 index 0000000..608603e --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/metadata.xml @@ -0,0 +1,17 @@ + + + + + Michael Lange + gentoobugs@milaw.biz + Accepts only mails from Gentoo's Bugzilla + + + Michał Górny + mgorny@gentoo.org + + + This package adds menu entries in GRUB for the SystemRescueCD. You can + add custom bootoptions for SystemRescueCD in a special config file. + + diff --git a/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild new file mode 100644 index 0000000..32f5706 --- /dev/null +++ b/sys-boot/systemrescuecd-x86-grub/systemrescuecd-x86-grub-0.1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="Grub menu entries for the .iso image of systemrescuecd-x86" +HOMEPAGE="http://www.sysresccd.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT=0 +KEYWORDS="~amd64 ~x86" +IUSE="" + +S=${WORKDIR} + +RDEPEND="app-admin/systemrescuecd-x86 + sys-boot/grub" + +src_install() { + exeinto /etc/grub.d + newexe "${FILESDIR}"/systemrescuecd.grub 39_systemrescuecd + + insinto /etc/default + newins "${FILESDIR}"/systemrescuecd.default systemrescuecd +} + +pkg_postinst() { + elog "To add the menu entries for systemrescuecd to grub, you should now run" + elog " grub-mkconfig -o /boot/grub/grub.cfg" + elog "You can set custom bootoptions in /etc/default/systemrescuecd" +}