diff options
author | Robert Moss <robmoss@gentoo.org> | 2004-08-22 17:50:22 +0000 |
---|---|---|
committer | Robert Moss <robmoss@gentoo.org> | 2004-08-22 17:50:22 +0000 |
commit | a6520571c1355345e2ae262dbb1833c16b76759f (patch) | |
tree | 8350a9367a9a01efd4bd6840d8be53a54536f3d0 /sys-boot | |
parent | Changed to use separate GOTY map pack and patch downloads and closing bug #57... (diff) | |
download | gentoo-2-a6520571c1355345e2ae262dbb1833c16b76759f.tar.gz gentoo-2-a6520571c1355345e2ae262dbb1833c16b76759f.tar.bz2 gentoo-2-a6520571c1355345e2ae262dbb1833c16b76759f.zip |
Trying to get rid of the need for that filthy menu.lst -> grub.conf symlink.
Diffstat (limited to 'sys-boot')
-rw-r--r-- | sys-boot/grub/ChangeLog | 8 | ||||
-rw-r--r-- | sys-boot/grub/Manifest | 3 | ||||
-rw-r--r-- | sys-boot/grub/files/digest-grub-0.94-r2 | 2 | ||||
-rw-r--r-- | sys-boot/grub/files/grub-0.94-grub.conf.patch | 176 | ||||
-rw-r--r-- | sys-boot/grub/grub-0.94-r2.ebuild | 123 |
5 files changed, 311 insertions, 1 deletions
diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog index 92643fb29e30..097f256dcf0b 100644 --- a/sys-boot/grub/ChangeLog +++ b/sys-boot/grub/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-boot/grub # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.19 2004/06/24 22:34:51 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.20 2004/08/22 17:50:22 robmoss Exp $ + +*grub-0.94-r2 (22 Aug 2004) + + 22 Aug 2004; <rmoss@gentoo.org> +files/grub-0.94-grub.conf.patch, + +grub-0.94-r2.ebuild: + Trying to get rid of the need for that filthy menu.lst -> grub.conf symlink. 10 Jun 2004; Travis Tilley <lv@gentoo.org> grub-0.94-r1.ebuild: fixed multilib check diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index fe37ee5f1b87..4b02c299efb0 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,11 +1,14 @@ MD5 b33a30955cdcfd9e2f0fbc11ef8c1945 grub-0.94-r1.ebuild 3388 MD5 d2c5f3ba084defee6f806a4eab5d3e36 grub-0.92-r1.ebuild 2526 +MD5 bf207d735eeca14a634d97c11c17d3a6 grub-0.94-r2.ebuild 3414 MD5 c84677ff43292be0d976cdd861bae0f4 ChangeLog 9320 MD5 fc967cbfa21d5efadccfe2146dfa03df grub-0.93.20030118.ebuild 2512 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 cdd6c89d48982ecd544c0b4774755afd files/splash.xpm.gz 33856 MD5 e9e73f57d9f9d5c550792980b2635f94 files/grub-0.94-gcc3.4.patch 479 +MD5 7357395b0d223c0bbf0675a9af31f9c3 files/grub-0.94-grub.conf.patch 7574 MD5 b302edf756d9f8996d9e1ae6d3a49768 files/digest-grub-0.93.20030118 1764 MD5 16039704cf1e6b6f46b4413532af082c files/digest-grub-0.92-r1 133 MD5 0b52e1b3a6a9f3c9b86742580eabf28d files/digest-grub-0.94-r1 131 +MD5 0b52e1b3a6a9f3c9b86742580eabf28d files/digest-grub-0.94-r2 131 MD5 8d898cd9d1928916596cc3f9883eac67 files/grub-0.93-gcc3.3.diff 639 diff --git a/sys-boot/grub/files/digest-grub-0.94-r2 b/sys-boot/grub/files/digest-grub-0.94-r2 new file mode 100644 index 000000000000..6e16be87c678 --- /dev/null +++ b/sys-boot/grub/files/digest-grub-0.94-r2 @@ -0,0 +1,2 @@ +MD5 299672a99cf59656e653d8ffd7851b56 grub-0.94.tar.gz 923518 +MD5 be1a9091b936e179990372201a3fdff6 grub-0.94-splash.patch.bz2 40177 diff --git a/sys-boot/grub/files/grub-0.94-grub.conf.patch b/sys-boot/grub/files/grub-0.94-grub.conf.patch new file mode 100644 index 000000000000..12d82f26b3b4 --- /dev/null +++ b/sys-boot/grub/files/grub-0.94-grub.conf.patch @@ -0,0 +1,176 @@ +diff -Nur grub-0.94/docs/Makefile.am grub-0.94-new/docs/Makefile.am +--- grub-0.94/docs/Makefile.am 2003-07-09 12:45:35.000000000 +0100 ++++ grub-0.94-new/docs/Makefile.am 2004-08-22 18:06:12.234375720 +0100 +@@ -19,7 +19,7 @@ + boot.o: multiboot.h + endif + +-EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS) \ ++EXTRA_DIST = grub.conf $(man_MANS) $(noinst_SCRIPTS) \ + $(EXAMPLES) $(multiboot_TEXINFOS) + CLEANFILES = $(noinst_PROGRAMS) + +diff -Nur grub-0.94/docs/Makefile.in grub-0.94-new/docs/Makefile.in +--- grub-0.94/docs/Makefile.in 2003-10-19 18:28:23.000000000 +0100 ++++ grub-0.94-new/docs/Makefile.in 2004-08-22 18:06:12.244374200 +0100 +@@ -159,7 +159,7 @@ + + @BUILD_EXAMPLE_KERNEL_TRUE@kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 + +-EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS) \ ++EXTRA_DIST = grub.conf $(man_MANS) $(noinst_SCRIPTS) \ + $(EXAMPLES) $(multiboot_TEXINFOS) + + CLEANFILES = $(noinst_PROGRAMS) +diff -Nur grub-0.94/docs/grub.8 grub-0.94-new/docs/grub.8 +--- grub-0.94/docs/grub.8 2004-01-18 19:19:41.000000000 +0000 ++++ grub-0.94-new/docs/grub.8 2004-08-22 18:06:12.247373744 +0100 +@@ -15,7 +15,7 @@ + specify stage2 boot_drive [default=0x0] + .TP + \fB\-\-config\-file\fR=\fIFILE\fR +-specify stage2 config_file [default=/boot/grub/menu.lst] ++specify stage2 config_file [default=/boot/grub/grub.conf] + .TP + \fB\-\-device\-map\fR=\fIFILE\fR + use the device map file FILE +diff -Nur grub-0.94/docs/grub.info grub-0.94-new/docs/grub.info +--- grub-0.94/docs/grub.info 2004-01-25 15:41:23.000000000 +0000 ++++ grub-0.94-new/docs/grub.info 2004-08-22 18:06:12.180383928 +0100 +@@ -921,7 +921,7 @@ + (*note Menu interface::) from which you can select an item (using arrow + keys) that will do everything to boot an OS. + +- To enable the menu, you need a configuration file, `menu.lst' under ++ To enable the menu, you need a configuration file, `grub.conf' under + the boot directory. We'll analyze an example file. + + The file first contains some general settings, the menu interface +@@ -1147,7 +1147,7 @@ + foo:ht=1:ha=63655d0334a7:ip=145.71.35.127:\ + :bf=/nbgrub:\ + :tc=.allhost:\ +- :T150="(nd)/tftpboot/menu.lst.foo": ++ :T150="(nd)/tftpboot/grub.conf.foo": + + Note that you should specify the drive name `(nd)' in the name of + the configuration file. This is because you might change the root drive +@@ -1458,7 +1458,7 @@ + + An absolute file name resembles a Unix absolute file name, using `/' + for the directory separator (not `\' as in DOS). One example is +-`(hd0,0)/boot/grub/menu.lst'. This means the file `/boot/grub/menu.lst' ++`(hd0,0)/boot/grub/grub.conf'. This means the file `/boot/grub/grub.conf' + in the first partition of the first hard disk. If you omit the device + name in an absolute file name, GRUB uses GRUB's "root device" + implicitly. So if you set the root device to, say, `(hd1,0)' by the +@@ -3161,7 +3161,7 @@ + grub shell just ignores this option. + + `--config-file=FILE' +- Read the configuration file FILE instead of `/boot/grub/menu.lst'. ++ Read the configuration file FILE instead of `/boot/grub/grub.conf'. + The format is the same as the normal GRUB syntax. See *Note + Filesystem::, for more information. + +diff -Nur grub-0.94/docs/grub.texi grub-0.94-new/docs/grub.texi +--- grub-0.94/docs/grub.texi 2004-01-25 15:39:14.000000000 +0000 ++++ grub-0.94-new/docs/grub.texi 2004-08-22 18:06:12.219378000 +0100 +@@ -1018,7 +1018,7 @@ + keys) that will do everything to boot an OS. + + To enable the menu, you need a configuration file, +-@file{menu.lst} under the boot directory. We'll analyze an example ++@file{grub.conf} under the boot directory. We'll analyze an example + file. + + The file first contains some general settings, the menu interface +@@ -1291,7 +1291,7 @@ + foo:ht=1:ha=63655d0334a7:ip=145.71.35.127:\ + :bf=/nbgrub:\ + :tc=.allhost:\ +- :T150="(nd)/tftpboot/menu.lst.foo": ++ :T150="(nd)/tftpboot/grub.conf.foo": + @end group + @end example + +@@ -1626,8 +1626,8 @@ + + An absolute file name resembles a Unix absolute file name, using + @samp{/} for the directory separator (not @samp{\} as in DOS). One +-example is @samp{(hd0,0)/boot/grub/menu.lst}. This means the file +-@file{/boot/grub/menu.lst} in the first partition of the first hard ++example is @samp{(hd0,0)/boot/grub/grub.conf}. This means the file ++@file{/boot/grub/grub.conf} in the first partition of the first hard + disk. If you omit the device name in an absolute file name, GRUB uses + GRUB's @dfn{root device} implicitly. So if you set the root device to, + say, @samp{(hd1,0)} by the command @command{root} (@pxref{root}), then +@@ -3278,7 +3278,7 @@ + + @item --config-file=@var{file} + Read the configuration file @var{file} instead of +-@file{/boot/grub/menu.lst}. The format is the same as the normal GRUB ++@file{/boot/grub/grub.conf}. The format is the same as the normal GRUB + syntax. See @ref{Filesystem}, for more information. + + @item --boot-drive=@var{drive} +diff -Nur grub-0.94/grub/asmstub.c grub-0.94-new/grub/asmstub.c +--- grub-0.94/grub/asmstub.c 2004-01-11 09:39:22.000000000 +0000 ++++ grub-0.94-new/grub/asmstub.c 2004-08-22 18:06:12.373354592 +0100 +@@ -71,7 +71,7 @@ + unsigned long boot_drive = 0; + int saved_entryno = 0; + char version_string[] = VERSION; +-char config_file[128] = "/boot/grub/menu.lst"; /* FIXME: arbitrary */ ++char config_file[128] = "/boot/grub/grub.conf"; /* FIXME: arbitrary */ + unsigned long linux_text_len = 0; + char *linux_data_tmp_addr = 0; + char *linux_data_real_addr = 0; +diff -Nur grub-0.94/stage2/asm.S grub-0.94-new/stage2/asm.S +--- grub-0.94/stage2/asm.S 2004-08-22 18:07:55.258713640 +0100 ++++ grub-0.94-new/stage2/asm.S 2004-08-22 18:06:13.157235424 +0100 +@@ -97,7 +97,7 @@ + .string VERSION + VARIABLE(config_file) + #ifndef STAGE1_5 +- .string "/boot/grub/menu.lst" ++ .string "/boot/grub/grub.conf" + #else /* STAGE1_5 */ + .long 0xffffffff + .string "/boot/grub/stage2" +diff -Nur grub-0.94/stage2/builtins.c grub-0.94-new/stage2/builtins.c +--- grub-0.94/stage2/builtins.c 2004-08-22 18:07:55.263712880 +0100 ++++ grub-0.94-new/stage2/builtins.c 2004-08-22 18:06:13.556174776 +0100 +@@ -3976,7 +3976,7 @@ + + /* The prefix was determined. */ + grub_sprintf (stage2, "%s%s", prefix, "/stage2"); +- grub_sprintf (config_filename, "%s%s", prefix, "/menu.lst"); ++ grub_sprintf (config_filename, "%s%s", prefix, "/grub.conf"); + *real_config_filename = 0; + + /* Check if stage2 exists. */ +diff -Nur grub-0.94/stage2/builtins.c.orig grub-0.94-new/stage2/builtins.c.orig +--- grub-0.94/stage2/builtins.c.orig 2004-08-22 18:07:55.272711512 +0100 ++++ grub-0.94-new/stage2/builtins.c.orig 2004-08-22 18:06:13.505182528 +0100 +@@ -3844,7 +3844,7 @@ + + /* The prefix was determined. */ + grub_sprintf (stage2, "%s%s", prefix, "/stage2"); +- grub_sprintf (config_filename, "%s%s", prefix, "/menu.lst"); ++ grub_sprintf (config_filename, "%s%s", prefix, "/grub.conf"); + *real_config_filename = 0; + + /* Check if stage2 exists. */ +diff -Nur grub-0.94/util/grub-image.in grub-0.94-new/util/grub-image.in +--- grub-0.94/util/grub-image.in 2003-07-09 12:45:51.000000000 +0100 ++++ grub-0.94-new/util/grub-image.in 2004-08-22 18:06:12.393351552 +0100 +@@ -64,7 +64,7 @@ + mkdir -p $bootdir/boot/grub + cp -p $stage1dir/stage1 $stage2dir/*_stage1_5 $stage2dir/stage2 \ + $bootdir/boot/grub +- test ! -f menu.lst || cp -p menu.lst $bootdir/boot/grub ++ test ! -f grub.conf || cp -p grub.conf $bootdir/boot/grub + trap "rm -f $bootdir.tar.gz" 0 + GZIP=-9 tar -zcf $bootdir.tar.gz $bootdir + trap '' 0 diff --git a/sys-boot/grub/grub-0.94-r2.ebuild b/sys-boot/grub/grub-0.94-r2.ebuild new file mode 100644 index 000000000000..8a37c40f8a4f --- /dev/null +++ b/sys-boot/grub/grub-0.94-r2.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.94-r2.ebuild,v 1.1 2004/08/22 17:50:22 robmoss Exp $ + +inherit mount-boot eutils flag-o-matic gcc + +DESCRIPTION="GNU GRUB boot loader" +HOMEPAGE="http://www.gnu.org/software/grub/" +SRC_URI="ftp://alpha.gnu.org/gnu/grub/${P}.tar.gz + mirror://gentoo/${P}-splash.patch.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="static" + +DEPEND=">=sys-libs/ncurses-5.2-r5 + >=sys-devel/autoconf-2.5" +PROVIDE="virtual/bootloader" + +src_unpack() { + has_m32 || die "your compiler seems to be unable to compile 32bit code. if you are on amd64, make sure you compile gcc with USE=multilib FEATURES=-sandbox" + + unpack ${A} + cd ${S} + + epatch ${WORKDIR}/${P}-splash.patch + epatch ${FILESDIR}/${P}-gcc3.4.patch + + # Trying to get rid of the need for the ugly menu.lst -> grub.conf symlink + epatch ${FILESDIR}/${P}-grub.conf.patch + + # This patchset is from SuSE -- hopefully fixes the acl symlink issue + # And should add some boot prettification +# epatch ${WORKDIR}/${PF}-gentoo.diff +# epatch ${FILESDIR}/${P}-test.patch +} + +src_compile() { + ### i686-specific code in the boot loader is a bad idea; disabling to ensure + ### at least some compatibility if the hard drive is moved to an older or + ### incompatible system. + unset CFLAGS + + filter-ldflags -pie + append-flags -DNDEBUG + [ `gcc-major-version` -eq 3 ] && append-flags -minline-all-stringops + use static && append-ldflags -static + + has_pie && CC="${CC} `test_flag -fno-pic` `test_flag -nopie`" + has_ssp && CC="${CC} `test_flag -fno-stack-protector`" + + autoconf || die + aclocal || die + automake || die + + # build the net-bootable grub first + CFLAGS="" \ + econf \ + --datadir=/usr/lib/grub \ + --exec-prefix=/ \ + --disable-auto-linux-mem-opt \ + --enable-diskless \ + --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \ + --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \ + --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \ + --enable-{tulip,via-rhine,w89c840} || die + + emake w89c840_o_CFLAGS="-O" || die "making netboot stuff" + + mv stage2/{nbgrub,pxegrub} ${S} + mv stage2/stage2 stage2/stage2.netboot + + make clean || die + + # now build the regular grub + CFLAGS="${CFLAGS}" \ + econf \ + --datadir=/usr/lib/grub \ + --exec-prefix=/ \ + --disable-auto-linux-mem-opt || die + emake || die "making regular stuff" +} + +src_install() { + make DESTDIR=${D} install || die + exeinto /usr/lib/grub + doexe nbgrub pxegrub stage2/stage2 stage2/stage2.netboot + + insinto /boot/grub + doins ${FILESDIR}/splash.xpm.gz + newins docs/menu.lst grub.conf.sample + + dodoc AUTHORS BUGS COPYING ChangeLog NEWS README THANKS TODO + newdoc docs/menu.lst grub.conf.sample +} + +pkg_postinst() { + [ "$ROOT" != "/" ] && return 0 + + # change menu.lst to grub.conf + if [ ! -e /boot/grub/grub.conf -a -e /boot/grub/menu.lst ] + then + mv /boot/grub/menu.lst /boot/grub/grub.conf + ewarn + ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" + ewarn + fi + einfo "Linking from new grub.conf name to menu.lst" + ln -s grub.conf /boot/grub/menu.lst + + [ -e /boot/grub/stage2 ] && mv /boot/grub/stage2{,.old} + + einfo "Copying files from /usr/lib/grub to /boot" + cp -p /usr/lib/grub/* /boot/grub + cp -p /usr/lib/grub/grub/*/* /boot/grub + + [ -e /boot/grub/grub.conf ] \ + && /usr/sbin/grub \ + --batch \ + --device-map=/boot/grub/device.map \ + < /boot/grub/grub.conf > /dev/null 2>&1 +} |