diff options
author | Olivier Crête <tester@gentoo.org> | 2006-11-03 19:49:44 +0000 |
---|---|---|
committer | Olivier Crête <tester@gentoo.org> | 2006-11-03 19:49:44 +0000 |
commit | 2b493b7da52686991e7245573fd7c04e522837af (patch) | |
tree | a63b5e3d2f668c00cdad540fd798ed4d42a381bb | |
parent | Handling gettext PIC issue is not needed since external gettext package will ... (diff) | |
download | historical-2b493b7da52686991e7245573fd7c04e522837af.tar.gz historical-2b493b7da52686991e7245573fd7c04e522837af.tar.bz2 historical-2b493b7da52686991e7245573fd7c04e522837af.zip |
Added code to install into /boot in pkg_postinst from grub ebuild, see bug #153956
Package-Manager: portage-2.1.1-r1
-rw-r--r-- | sys-boot/grub-static/ChangeLog | 6 | ||||
-rw-r--r-- | sys-boot/grub-static/Manifest | 26 | ||||
-rw-r--r-- | sys-boot/grub-static/grub-static-0.97.ebuild | 57 |
3 files changed, 79 insertions, 10 deletions
diff --git a/sys-boot/grub-static/ChangeLog b/sys-boot/grub-static/ChangeLog index ebda1b9aad3b..a9357bd92be0 100644 --- a/sys-boot/grub-static/ChangeLog +++ b/sys-boot/grub-static/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-boot/grub-static # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/ChangeLog,v 1.10 2006/10/23 23:11:36 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/ChangeLog,v 1.11 2006/11/03 19:49:44 tester Exp $ + + 03 Nov 2006; Olivier Crête <tester@gentoo.org> grub-static-0.97.ebuild: + Added code to install into /boot in pkg_postinst from grub ebuild, see bug + #153956 *grub-static-0.97 (23 Oct 2006) diff --git a/sys-boot/grub-static/Manifest b/sys-boot/grub-static/Manifest index 898f68bf4913..da1b73ff8c08 100644 --- a/sys-boot/grub-static/Manifest +++ b/sys-boot/grub-static/Manifest @@ -1,17 +1,20 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + DIST grub-static-0.96.tar.bz2 859179 RMD160 799759e6e4771527e5daf6dfbe7de647482229d4 SHA1 e334fe0429b215ce726b0c42c5ca12e13c858157 SHA256 3ece8910e7954ca2c2cbebc4d05cfb22e73455f826508661a5b1a60481dcbd76 DIST grub-static-0.97.tar.bz2 954051 RMD160 3b4d3951df5ab0255321631dd383803bb2302977 SHA1 aaddbe5f31788cd6e46a0e76219b76ae14ac062a SHA256 468ac48823880bd7cb2dd6bf60673adef1313c44a5e3131a0a4a37d2cc1145bc EBUILD grub-static-0.96-r1.ebuild 525 RMD160 1db51afc5990529daec430447c1a0f0a1d8bf9b7 SHA1 621aca72148f7a701bea3ced135961c2c29ce5bd SHA256 f7a3c6a239fed5b54b1ea246700576731b016f525e2204c5c2b196bc312780ef MD5 4e9a56adec3df47622385c710e8724ee grub-static-0.96-r1.ebuild 525 RMD160 1db51afc5990529daec430447c1a0f0a1d8bf9b7 grub-static-0.96-r1.ebuild 525 SHA256 f7a3c6a239fed5b54b1ea246700576731b016f525e2204c5c2b196bc312780ef grub-static-0.96-r1.ebuild 525 -EBUILD grub-static-0.97.ebuild 521 RMD160 a2b74e41a703142580317049b2d194a8285be142 SHA1 a7ac05a64853b9a2969668fbf3749f0946a77f30 SHA256 ae8b998cfa0bd7072246d0957bdd4b890eb3b598ae1f1ecb984f877c07e86d41 -MD5 a7722f51de87b7f25a559f8600f1ae52 grub-static-0.97.ebuild 521 -RMD160 a2b74e41a703142580317049b2d194a8285be142 grub-static-0.97.ebuild 521 -SHA256 ae8b998cfa0bd7072246d0957bdd4b890eb3b598ae1f1ecb984f877c07e86d41 grub-static-0.97.ebuild 521 -MISC ChangeLog 1523 RMD160 dc03ade548f1647e5d5c3a28ace37b21530f439e SHA1 2b786ff7bee3e71ab6c34fb27c65c177ae9a307d SHA256 6d02a853591f5cf5fb4cd800be22ec4057e85e3d045f858db131c873eaf7df4d -MD5 5389d3450ffd78992de3de5107e3b6f3 ChangeLog 1523 -RMD160 dc03ade548f1647e5d5c3a28ace37b21530f439e ChangeLog 1523 -SHA256 6d02a853591f5cf5fb4cd800be22ec4057e85e3d045f858db131c873eaf7df4d ChangeLog 1523 +EBUILD grub-static-0.97.ebuild 1957 RMD160 8f1e0fd21ad49fb8bd5b1186ce4a290a7adbc7f5 SHA1 ac2df671502fb346c5160b3aa3b80ee939d9d17a SHA256 ef3e636915725d5d9827230c87b10a3f97b9014fa9e5ef9b5578bb1a6da4e81c +MD5 0b64fde1bf25581758d96ba92f0fce62 grub-static-0.97.ebuild 1957 +RMD160 8f1e0fd21ad49fb8bd5b1186ce4a290a7adbc7f5 grub-static-0.97.ebuild 1957 +SHA256 ef3e636915725d5d9827230c87b10a3f97b9014fa9e5ef9b5578bb1a6da4e81c grub-static-0.97.ebuild 1957 +MISC ChangeLog 1689 RMD160 3d75ab90576031a329b18f6b523f5e173c987e5b SHA1 b5d3f8fef19d08da01ea4d8d0b30c6ca73ef272a SHA256 e2737c6146ba502d07a8f08219b1da75b02b0a00881cf5e08c29b49e736cdb73 +MD5 e1b12c77a3a1cc03b7070da5b2a311dc ChangeLog 1689 +RMD160 3d75ab90576031a329b18f6b523f5e173c987e5b ChangeLog 1689 +SHA256 e2737c6146ba502d07a8f08219b1da75b02b0a00881cf5e08c29b49e736cdb73 ChangeLog 1689 MISC metadata.xml 158 RMD160 d823c6f24034325d607a095ce2851034d70fd2f2 SHA1 7e7b3c2aedeb5fa2761c27cf8f56b5240ae9678e SHA256 0df9eb61f6a4e4a3f8fc16386b0204e22e85940533d769d4a0418a4ecec50d90 MD5 dcd48367f6d71a7375334b19c0ab5736 metadata.xml 158 RMD160 d823c6f24034325d607a095ce2851034d70fd2f2 metadata.xml 158 @@ -22,3 +25,10 @@ SHA256 1ebaf1d1da63c3a7c4c7d3de022a561955049de43939876f67a939e5744bdacb files/di MD5 b67b3bfcd312200140c6418d04f814ef files/digest-grub-static-0.97 253 RMD160 9ae46cb325e1bcfbcd44cf2e05a582569e1ee907 files/digest-grub-static-0.97 253 SHA256 13c67e0f0e484895c3ef369ad59af0a9cb91f5e5ff74b4518bfbb4b1501ad637 files/digest-grub-static-0.97 253 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.5 (GNU/Linux) + +iD8DBQFFS513mOfEJZHYOKcRAtKWAJ9exRVSuKsLsZnoHFWm4QReBNiCJwCdEjag +SGT1y+gHogXIPuoUqsvLqTE= +=iXaI +-----END PGP SIGNATURE----- diff --git a/sys-boot/grub-static/grub-static-0.97.ebuild b/sys-boot/grub-static/grub-static-0.97.ebuild index cd90f2dc5ffc..25a7f4ee3a44 100644 --- a/sys-boot/grub-static/grub-static-0.97.ebuild +++ b/sys-boot/grub-static/grub-static-0.97.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97.ebuild,v 1.1 2006/10/23 23:11:36 dsd Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub-static/grub-static-0.97.ebuild,v 1.2 2006/11/03 19:49:44 tester Exp $ DESCRIPTION="Static GNU GRUB boot loader" @@ -16,3 +16,58 @@ PROVIDE="virtual/bootloader" src_install() { cp -a ${WORKDIR}/* ${D}/ } + +# +# Everything below is directly copied from the grub ebuild +# please try to keep it in sync +# + +setup_boot_dir() { + local dir="${1}" + + [[ ! -e ${dir} ]] && die "${dir} does not exist!" + [[ ! -e ${dir}/grub ]] && mkdir "${dir}/grub" + + # change menu.lst to grub.conf + if [[ ! -e ${dir}/grub/grub.conf ]] && [[ -e ${dir}/grub/menu.lst ]] ; then + mv -f "${dir}"/grub/menu.lst "${dir}"/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + + if [[ ! -e ${dir}/grub/menu.lst ]]; then + einfo "Linking from new grub.conf name to menu.lst" + ln -snf grub.conf "${dir}"/grub/menu.lst + fi + + [[ -e ${dir}/grub/stage2 ]] && mv "${dir}"/grub/stage2{,.old} + + einfo "Copying files from /lib/grub and /usr/lib/grub to "${dir}"" + for x in /lib*/grub/*/* /usr/lib*/grub/*/* ; do + [[ -f ${x} ]] && cp -p ${x} "${dir}"/grub/ + done + + if [[ -e ${dir}/grub/grub.conf ]] ; then + egrep \ + -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \ + "${dir}"/grub/grub.conf | \ + /sbin/grub --batch \ + --device-map="${dir}"/grub/device.map \ + > /dev/null + fi +} + +pkg_postinst() { + [[ ${ROOT} != "/" ]] && return 0 + setup_boot_dir /boot + einfo "To install grub files to another device (like a usb stick), just run:" + einfo " emerge --config =${PF}" +} + +pkg_config() { + local dir + einfo "Enter the directory where you want to setup grub:" + read dir + setup_boot_dir ${dir} +} |