Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-boot/grub: ChangeLog grub-0.97-r5.ebuild
Date: Tue, 25 Mar 2008 06:23:45
Message-Id: E1Je2ZR-0000Uf-He@stork.gentoo.org
1 robbat2 08/03/25 06:23:41
2
3 Modified: ChangeLog
4 Added: grub-0.97-r5.ebuild
5 Log:
6 New version of the Gentoo grub patchset. Provides support for 256-byte ext3 inodes per bug #214563. Fixes unhide bugs with GPT patch per bug #211584. Long commandlines per bug #183443. Xen memorysize fix per bug #188312. In package.mask for testing.
7 (Portage version: 2.1.4.4)
8
9 Revision Changes Path
10 1.82 sys-boot/grub/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.82&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.82&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/ChangeLog?r1=1.81&r2=1.82
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v
19 retrieving revision 1.81
20 retrieving revision 1.82
21 diff -p -w -b -B -u -u -r1.81 -r1.82
22 --- ChangeLog 21 Mar 2008 22:02:05 -0000 1.81
23 +++ ChangeLog 25 Mar 2008 06:23:40 -0000 1.82
24 @@ -1,6 +1,14 @@
25 # ChangeLog for sys-boot/grub
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.81 2008/03/21 22:02:05 genstef Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.82 2008/03/25 06:23:40 robbat2 Exp $
29 +
30 +*grub-0.97-r5 (25 Mar 2008)
31 +
32 + 25 Mar 2008; Robin H. Johnson <robbat2@g.o> +grub-0.97-r5.ebuild:
33 + New version of the Gentoo grub patchset. Provides support for 256-byte
34 + ext3 inodes per bug #214563. Fixes unhide bugs with GPT patch per bug
35 + #211584. Long commandlines per bug #183443. Xen memorysize fix per bug
36 + #188312.
37
38 21 Mar 2008; Stefan Schweizer <genstef@g.o> grub-1.96.ebuild:
39 fails to build with two threads
40
41
42
43 1.1 sys-boot/grub/grub-0.97-r5.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-0.97-r5.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-boot/grub/grub-0.97-r5.ebuild?rev=1.1&content-type=text/plain
47
48 Index: grub-0.97-r5.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r5.ebuild,v 1.1 2008/03/25 06:23:40 robbat2 Exp $
53
54 inherit mount-boot eutils flag-o-matic toolchain-funcs autotools
55
56 PATCHVER="1.6"
57 DESCRIPTION="GNU GRUB Legacy boot loader"
58 HOMEPAGE="http://www.gnu.org/software/grub/"
59 SRC_URI="mirror://gentoo/${P}.tar.gz
60 ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz
61 mirror://gentoo/splash.xpm.gz
62 mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2"
63
64 LICENSE="GPL-2"
65 SLOT="0"
66 KEYWORDS="~amd64 ~x86 ~x86-fbsd"
67 IUSE="static netboot custom-cflags"
68
69 DEPEND=">=sys-libs/ncurses-5.2-r5"
70 PROVIDE="virtual/bootloader"
71
72 src_unpack() {
73 unpack ${A}
74 cd "${S}"
75
76 # patch breaks booting for some people #111885
77 rm "${WORKDIR}"/patch/400_*
78
79 if [[ -n ${PATCHVER} ]] ; then
80 EPATCH_SUFFIX="patch"
81 epatch "${WORKDIR}"/patch
82 eautoreconf
83 fi
84 }
85
86 src_compile() {
87 filter-flags -fPIE #168834
88
89 use amd64 && multilib_toolchain_setup x86
90
91 unset BLOCK_SIZE #73499
92
93 ### i686-specific code in the boot loader is a bad idea; disabling to ensure
94 ### at least some compatibility if the hard drive is moved to an older or
95 ### incompatible system.
96
97 # grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2,
98 # but the objcopy's (faulty) test fails if -fstack-protector is default.
99 # create a cache telling configure that objcopy is ok, and add -C to econf
100 # to make use of the cache.
101 #
102 # CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails.
103 # STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites
104 # -fno-stack-protector detected by configure, removed from netboot's emake.
105 use custom-cflags || unset CFLAGS
106
107 export grub_cv_prog_objcopy_absolute=yes #79734
108 use static && append-ldflags -static
109
110 # build the net-bootable grub first, but only if "netboot" is set
111 if use netboot ; then
112 econf \
113 --libdir=/lib \
114 --datadir=/usr/lib/grub \
115 --exec-prefix=/ \
116 --disable-auto-linux-mem-opt \
117 --enable-diskless \
118 --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \
119 --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \
120 --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \
121 --enable-{tulip,via-rhine,w89c840} || die "netboot econf failed"
122
123 emake w89c840_o_CFLAGS="-O" || die "making netboot stuff"
124
125 mv -f stage2/{nbgrub,pxegrub} "${S}"/
126 mv -f stage2/stage2 stage2/stage2.netboot
127
128 make clean || die "make clean failed"
129 fi
130
131 # Now build the regular grub
132 # Note that FFS and UFS2 support are broken for now - stage1_5 files too big
133 econf \
134 --libdir=/lib \
135 --datadir=/usr/lib/grub \
136 --exec-prefix=/ \
137 --disable-auto-linux-mem-opt || die "econf failed"
138 emake || die "making regular stuff"
139 }
140
141 src_test() {
142 # non-default block size also give false pass/fails.
143 unset BLOCK_SIZE
144 make check || die "make check failed"
145 }
146
147 src_install() {
148 make DESTDIR="${D}" install || die
149 if use netboot ; then
150 exeinto /usr/lib/grub/${CHOST}
151 doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install"
152 fi
153
154 insinto /boot/grub
155 doins "${DISTDIR}"/splash.xpm.gz
156 newins docs/menu.lst grub.conf.sample
157
158 dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO
159 newdoc docs/menu.lst grub.conf.sample
160 }
161
162 setup_boot_dir() {
163 local boot_dir=$1
164 local dir=${boot_dir}
165
166 [[ ! -e ${dir} ]] && die "${dir} does not exist!"
167 dir="${dir}/grub"
168 if [[ ! -e ${dir} ]] ; then
169 mkdir "${dir}" || die "${dir} does not exist!"
170 fi
171
172 # change menu.lst to grub.conf
173 if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then
174 mv -f "${dir}"/menu.lst "${dir}"/grub.conf
175 ewarn
176 ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf"
177 ewarn
178 fi
179
180 if [[ ! -e ${dir}/menu.lst ]]; then
181 einfo "Linking from new grub.conf name to menu.lst"
182 ln -snf grub.conf "${dir}"/menu.lst
183 fi
184
185 [[ -e ${dir}/stage2 ]] && mv "${dir}"/stage2{,.old}
186
187 einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}"
188 for x in "${ROOT}"/lib*/grub/*/* "${ROOT}"/usr/lib*/grub/*/* ; do
189 [[ -f "${x}" ]] && cp -p "${x}" "${dir}"/
190 done
191
192 if [[ -e ${dir}/grub.conf ]] ; then
193 egrep \
194 -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \
195 "${dir}"/grub.conf | \
196 /sbin/grub --batch \
197 --device-map="${dir}"/device.map \
198 > /dev/null
199 fi
200
201 # the grub default commands silently piss themselves if
202 # the default file does not exist ahead of time
203 if [[ ! -e ${dir}/default ]] ; then
204 grub-set-default --root-directory="${boot_dir}" default
205 fi
206 }
207
208 pkg_postinst() {
209 [[ -n ${DONT_MOUNT_BOOT} ]] && return 0
210 setup_boot_dir "${ROOT}"/boot
211 einfo "To install grub files to another device (like a usb stick), just run:"
212 einfo " emerge --config =${PF}"
213 }
214
215 pkg_config() {
216 local dir
217 einfo "Enter the directory where you want to setup grub:"
218 read dir
219 setup_boot_dir "${dir}"
220 }
221
222
223
224 --
225 gentoo-commits@l.g.o mailing list