]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/SuSE10.2/grub.spec
Update des GFXBoot-Patches für GRUB aus SuSE 10.2 v8.
[ipfire-2.x.git] / src / patches / SuSE10.2 / grub.spec
1 #
2 # spec file for package grub (Version 0.97)
3 #
4 # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 # This file and all modifications and additions to the pristine
6 # package are under the same license as the package itself.
7 #
8 # Please submit bugfixes or comments via http://bugs.opensuse.org/
9 #
10
11 # norootforbuild
12 # usedforbuild aaa_base acl attr audit-libs autoconf automake bash bind-libs bind-utils binutils bison bzip2 coreutils cpio cpp cpp41 cracklib cvs cyrus-sasl db diffutils e2fsprogs file filesystem fillup findutils flex gawk gcc gcc41 gdbm gdbm-devel gettext gettext-devel glibc glibc-devel glibc-locale gpm grep groff gzip info insserv klogd less libacl libattr libcom_err libgcc41 libltdl libmudflap41 libnscd libstdc++41 libtool libvolume_id libxcrypt libzio m4 make man mktemp module-init-tools ncurses ncurses-devel net-tools netcfg openldap2-client openssl pam pam-modules patch perl permissions popt procinfo procps psmisc pwdutils rcs readline rpm sed strace sysvinit tar tcpd texinfo timezone unzip util-linux vim zlib zlib-devel
13
14 # Commandline:
15 Name: grub
16 %ifarch x86_64
17 BuildRequires: gcc41-32bit glibc-devel-32bit ncurses-32bit ncurses-devel-32bit
18 %endif
19 License: GPL
20 Group: System/Boot
21 Version: 0.97
22 Release: 22
23 Source0: %{name}-%{version}.tar.gz
24 Source1: installgrub
25 Source2: grubonce
26 Patch0: %{name}-%{version}-path-patch
27 Patch1: use_ferror.diff
28 Patch2: grub-R
29 Patch3: bad-assert-sideeffect
30 Patch4: %{name}-gfxmenu-v8.diff
31 Patch5: reiser-unpack
32 Patch6: chainloader-devicefix
33 Patch7: %{name}-%{version}-devicemap.diff
34 Patch8: grub-linux-setup-fix
35 Patch9: fix-uninitialized
36 Patch10: force-LBA-off.diff
37 Patch11: gcc4-diff
38 Patch12: %{name}-%{version}-initrdaddr.diff
39 Patch20: stage2-dir-callback.diff
40 Patch21: stage2-wildcard.diff
41 Patch22: stage2-wildcard-zerowidth.diff
42 Patch23: stage2-wildcard-doc.diff
43 Patch24: grub-%{version}-protexec.patch
44 URL: http://www.gnu.org/software/grub/grub.en.html
45 BuildRoot: %{_tmppath}/%{name}-%{version}-build
46 Summary: Grand Unified Boot Loader
47 PreReq: fileutils sh-utils
48
49 %description
50 GNU GRUB is a multiboot boot loader. It was derived from GRUB. It is an
51 attempt to produce a boot loader for IBM PC-compatible machines that
52 has both the ability to be friendly to beginning or otherwise
53 nontechnically interested users and the flexibility to help experts in
54 diverse environments. It is compatible with Free/Net/OpenBSD and Linux.
55 It supports Win 9x/NT and OS/2 via chainloaders. It has a menu
56 interface and a command line interface.
57
58
59
60 Authors:
61 --------
62 Alessandro Rubini <rubini@gnu.org>
63 Chip Salzenberg <chip@valinux.com>
64 Edmund GRIMLEY EVANS <edmundo@rano.demon.co.uk>
65 Edward Killips <ekillips@triton.net>
66 Gordon Matzigkeit <gord@fig.org>
67 Jochen Hoenicke <jochen@gnu.org>
68 Khimenko Victor <grub@khim.sch57.msk.ru>
69 Klaus Reichl <Klaus.Reichl@alcatel.at>
70 Michael Hohmuth <hohmuth@innocent.com>
71 OKUJI Yoshinori <okuji@gnu.org>
72 Pavel Roskin <proski@gnu.org>
73
74 %debug_package
75 %prep
76 %setup
77 rm -f acconfig.h || true
78 %patch -p1 -E
79 %patch1
80 %patch2 -p1
81 %patch3 -p1
82 %patch4
83 %patch5 -p1
84 %patch6 -p1
85 %patch7 -p1
86 %patch8 -p1
87 %patch9 -p1
88 %patch10 -p1
89 %patch11 -p1
90 %patch12 -p1
91 # Disable the wildcard feature
92 #%patch20 -p1
93 #%patch21 -p1
94 #%patch22 -p1
95 #%patch23 -p1
96 %patch24 -p1
97
98 %build
99 perl -pi -e 's,/usr/share/grub/i386-pc,/usr/lib/grub,' docs/grub.texi
100 %{?suse_update_config:%{suse_update_config -l -f . }}
101 autoreconf --force --install
102 %ifarch x86_64
103 EXTRACFLAGS=' -fno-strict-aliasing -minline-all-stringops -m32 -fno-asynchronous-unwind-tables '
104 %else
105 EXTRACFLAGS=' -fno-strict-aliasing -minline-all-stringops'
106 %endif
107 CFLAGS="$RPM_OPT_FLAGS -Os -DNDEBUG -W -Wall -Wpointer-arith $EXTRACFLAGS" ./configure \
108 --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir} --datadir=/usr/lib \
109 --disable-auto-linux-mem-opt --enable-diskless \
110 --enable-{3c50{3,7},3c5{0,2}9,3c595,3c90x,cs89x0,davicom,depca,eepro{,100},epic100} \
111 --enable-{exos205,lance,ne,ne2100,ni{50,52,65}00,ns8390} \
112 --enable-{rtl8139,sk-g16,smc9000,tiara,tulip,via-rhine,w89c840,wd}
113 make
114 (cd stage2; mv nbgrub pxegrub ..)
115 mv stage2/stage2{,.netboot}
116 make clean
117 CFLAGS="$RPM_OPT_FLAGS -Os -DNDEBUG -W -Wall -Wpointer-arith $EXTRACFLAGS" ./configure \
118 --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir} --datadir=/usr/lib \
119 --disable-auto-linux-mem-opt
120 make
121
122 %install
123 [ "$RPM_BUILD_ROOT" != "" -a -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
124 make -k DESTDIR=$RPM_BUILD_ROOT install
125 mkdir -p $RPM_BUILD_ROOT/boot/grub
126 ln -sfn . $RPM_BUILD_ROOT/boot/boot
127 (cd $RPM_BUILD_ROOT/usr/lib/grub && mv *-suse/* . && rmdir *-suse) >/dev/null 2>&1 || true
128 cp -p {nb,pxe}grub stage2/stage2{,.netboot} $RPM_BUILD_ROOT/usr/lib/grub
129 cp -p %{SOURCE2} $RPM_BUILD_ROOT/usr/sbin/.
130 # This fine script used to do everything at once, which
131 # isn't necessary any more with Yast2 support.
132 # Kept only for reference and historical reasons.
133 # install -o root -g root -m 744 %{SOURCE1} /usr/sbin
134 # grub-terminfo is irrelevant to us
135 rm -f $RPM_BUILD_ROOT/usr/sbin/grub-terminfo
136 rm -f $RPM_BUILD_ROOT/usr/share/man/man8/grub-terminfo*
137
138 %clean
139 [ "$RPM_BUILD_ROOT" != "" -a -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
140
141 %preun
142 %install_info --delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
143 %install_info --delete --info-dir=%{_infodir} %{_infodir}/multiboot.info.gz
144
145 %files
146 %defattr(-,root,root)
147 %doc BUGS NEWS TODO README THANKS AUTHORS INSTALL ChangeLog COPYING
148 %docdir %{_infodir}
149 %docdir %{_mandir}
150 %docdir /usr/share/doc/packages/grub
151 %dir /boot/grub
152 /usr/bin/mbchk
153 %{_infodir}/grub*.gz
154 %{_infodir}/multiboot.info.gz
155 %{_mandir}/man1/mbchk.1.gz
156 %{_mandir}/man8/grub-install.8.gz
157 %{_mandir}/man8/grub.8.gz
158 %{_mandir}/man8/grub-md5-crypt.8.gz
159 /usr/sbin/grub
160 /usr/sbin/grubonce
161 /usr/sbin/grub-set-default
162 /usr/sbin/grub-install
163 /usr/sbin/grub-md5-crypt
164 #/usr/sbin/installgrub
165 %dir /boot/boot
166 /usr/lib/grub
167
168 %post
169 # should anything go wrong the system will remain bootable :
170 [ -e /boot/grub/stage2 ] && mv /boot/grub/stage2{,.old}
171 # copy especially stage2 over, because it will be modified in-place !
172 cp -p /usr/lib/grub/*stage1* /boot/grub 2>/dev/null || true
173 cp -p /usr/lib/grub/*/*stage1* /boot/grub 2>/dev/null || true
174 #special hack for #46843
175 dd if=/usr/lib/grub/stage2 of=/boot/grub/stage2 bs=256k
176 sync
177 # command sequence to update-install stage1/stage2.
178 # leave everything else alone !
179 [ -e /etc/grub.conf ] && /usr/sbin/grub --batch < /etc/grub.conf >/dev/null 2>&1
180 %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
181 %install_info --info-dir=%{_infodir} %{_infodir}/multiboot.info.gz
182 exit 0
183
184 %changelog -n grub
185 * Fri Aug 25 2006 - snwint@suse.de
186 - needs gcc41-32bit
187 * Thu Aug 24 2006 - snwint@suse.de
188 - support latest gfxmenu
189 * Mon Jul 17 2006 - snwint@suse.de
190 - extended gfxmenu interface to pass options for 'module' lines (#160066)
191 - merged various gfxmenu patch fragments into one patch
192 * Thu Apr 20 2006 - duwe@suse.de
193 - fix incorrect DL contents e.g. on chainloader (fd0)+1
194 (Bug #158072)
195 - initialize array in intel netcard probe (Bug #144171)
196 * Wed Jan 25 2006 - mls@suse.de
197 - converted neededforbuild to BuildRequires
198 * Thu Nov 24 2005 - snwint@suse.de
199 - support latest gfxboot
200 * Thu Nov 10 2005 - duwe@suse.de
201 - update to 0.97
202 * Fri Sep 09 2005 - coolo@suse.de
203 - make grubonce shutup
204 * Fri Sep 02 2005 - duwe@suse.de
205 - Make grubonce work with the new 0.96 savedefault,
206 (fixing bug #95082, and by coincidence 99185 along the way, too)
207 * Fri Jun 10 2005 - ro@suse.de
208 - fix variable type in last change
209 * Thu Jun 09 2005 - ro@suse.de
210 - fix gfx display (stackptr diff) (thanks to Steffen)
211 * Fri Apr 29 2005 - duwe@suse.de
212 - update to 0.96
213 - "grubonce" no handled differently
214 - re-do gcc4 fix (cleaner now)
215 - dropped rare NICs sis900 and natsemi in the process,
216 update from etherboot pending anyways.
217 * Sat Apr 09 2005 - aj@suse.de
218 - Compile with GCC4.
219 * Wed Mar 02 2005 - duwe@suse.de
220 - force cache reloading after "embed", for
221 the "setup" shortcut. This fixes Bug #66454
222 * Fri Feb 18 2005 - agruen@suse.de
223 - Disable the wildcard feature.
224 * Sun Feb 06 2005 - ro@suse.de
225 - fix build on i386
226 - use RPM_OPT_FLAGS
227 * Sat Feb 05 2005 - ro@suse.de
228 - use PROT_EXEC (from grub bug-tracking system)
229 * Fri Jan 28 2005 - snwint@suse.de
230 - updated gfxboot patch
231 * Wed Oct 06 2004 - sf@suse.de
232 - dd stage2 instead of copying it (#46843)
233 * Fri Oct 01 2004 - max@suse.de
234 - Added ncurses-devel-32bit and ncurses-devel-32bit to
235 neededforbuild to make history and command completion work
236 on x86_64 [Bug #46577].
237 * Thu Sep 30 2004 - duwe@suse.de
238 - try to defragment stage2 if it resides on reiserfs.
239 This should fix sporadic failures we see.
240 * Thu Sep 30 2004 - agruen@suse.de
241 - Wildcard feature:
242 + stage2-wildcard-zerowidth.diff: Allow zero-width matches (so
243 that the asterisk in wildcard matches has the usual file glob
244 sematics).
245 + stage2-wildcard-doc.diff: Document the wildcard feature.
246 * Tue Sep 21 2004 - duwe@suse.de
247 - removed one ill side effect of assert(), most likely
248 fixing blocker #44520
249 * Tue Sep 07 2004 - duwe@suse.de
250 - added "grubonce" script to demonstrate & ease "savedefault --once"
251 * Mon Sep 06 2004 - agruen@suse.de
252 - Fix usage of wrong variable in wildcard code.
253 * Sun Aug 22 2004 - agruen@suse.de
254 - stage2-dir-callback.diff: Make the dir command more flexible,
255 and clean up a bit.
256 - stage2-wildcard.diff: Implement wildcard menu entries.
257 * Mon Jul 26 2004 - duwe@suse.de
258 - update to the latest version, 0.95
259 * Thu May 13 2004 - duwe@suse.de
260 - added -fno-strict-aliasing to CFLAGS, as suggested
261 per autobuild.
262 * Thu May 13 2004 - duwe@suse.de
263 - fix at least Bugs #32351,#36460,#34576,#38774 and #27486,
264 maybe also #35262
265 * Fri Mar 05 2004 - duwe@suse.de
266 - fix bug #35352, the initrd patch only seemed to have gone into
267 0.94, the semantics differ slightly :-(
268 * Mon Mar 01 2004 - duwe@suse.de
269 - quick fix for changed --datadir in 0.94,
270 detected by automated build checks.
271 * Mon Mar 01 2004 - duwe@suse.de
272 - upgrade to 0.94
273 - integrate iso9660 FS
274 - network booting temporarily disabled
275 * Wed Jan 14 2004 - snwint@suse.de
276 - understand new gfxboot file format
277 * Sat Jan 10 2004 - adrian@suse.de
278 - add %%defattr
279 * Thu Aug 28 2003 - snwint@suse.de
280 - graphics patch had been accidentally disabled
281 * Thu Aug 14 2003 - duwe@suse.de
282 - another graphics consolidation, to allow
283 modular maintenance
284 * Thu Jul 31 2003 - duwe@suse.de
285 - reconsolidated graphics patches
286 - fix for machines with > 1GB of mem
287 (thanks to Karsten Keil for reporting/finding this)
288 - fix for hardware RAID device naming scheme
289 * Tue May 27 2003 - snwint@suse.de
290 - no graphics menu if 'savedefault --once' is used (#25356)
291 * Wed May 21 2003 - mmj@suse.de
292 - Don't package grub-terminfo
293 * Sat Mar 08 2003 - snwint@suse.de
294 - no graphics menu if 'hiddenmenu' is used (#23538)
295 * Thu Mar 06 2003 - kukuk@suse.de
296 - Remove not used cyrus-sasl from neededforbuild
297 * Wed Feb 19 2003 - duwe@suse.de
298 - use -minline-all-stringops to work around broken gcc
299 * Tue Feb 11 2003 - ro@suse.de
300 - combine the two postinstalls
301 * Mon Feb 10 2003 - mmj@suse.de
302 - Use %%install_info macros [#23420]
303 * Mon Feb 10 2003 - snwint@suse.de
304 - fixed evil bug in graphics patch
305 * Mon Feb 10 2003 - duwe@suse.de
306 - Now build network and non-network stage2 (Blocker #23502 )
307 - #19984 considered fixed now, too
308 * Sun Feb 09 2003 - snwint@suse.de
309 - updated graphics patch
310 * Thu Feb 06 2003 - duwe@suse.de
311 - update to 0.93 version
312 - patches rediffed accordingly
313 - gfx patches consolidated
314 - made patch to force LBA off (untested)
315 * Thu Jan 16 2003 - nadvornik@suse.cz
316 - fixed the 'valid preprocessing token' error
317 * Thu Nov 28 2002 - duwe@suse.de
318 - added an "important" security fix ;-)
319 passwd not working along with gfxmenu is now
320 made obvious and warned about.
321 - made grub compile with gcc-3.3 and hopefully up.
322 * Thu Nov 14 2002 - duwe@suse.de
323 (candidate to PUTONFTP -- please test)
324 - imported totally rewritten memory layout
325 handling from CVS. This should work around the
326 broken nforce chipsets.
327 - made device.map more robust:
328 * use /boot/grub/device.map by default if it exists
329 * erroneous lines are now skipped, and don't lead to
330 no device.map at all any more.
331 * Thu Oct 10 2002 - kukuk@suse.de
332 - remove requires from bootsplash
333 * Wed Sep 11 2002 - adrian@suse.de
334 - remove PreReq to itself
335 * Tue Sep 10 2002 - duwe@suse.de
336 - added --disable-auto-linux-mem-opt to ./configure options.
337 This prevents grub from arbitrarily adding "mem=" to kernel opts.
338 This anachronism was necessary for some 2.2 Linux kernels, and
339 breaks on MXT machines (#19288).
340 * Fri Sep 06 2002 - duwe@suse.de
341 - added "lilo -R" feature on strong popular demand (#18538)
342 * Tue Sep 03 2002 - snwint@suse.de
343 - fixed Requires
344 * Tue Aug 27 2002 - snwint@suse.de
345 - graphics: free some memory before loading kernel (#18291)
346 * Mon Aug 26 2002 - sf@suse.de
347 - add glibc-devel-32bit to compile on x86_64
348 * Thu Aug 22 2002 - sf@suse.de
349 - added x86_64
350 - compile with -m32 -fno-unwind-asynchronous-tables on x86_64
351 * Tue Aug 20 2002 - mmj@suse.de
352 - Correct PreReq
353 * Wed Jul 24 2002 - duwe@suse.de
354 - converted to safe update scheme using /etc/grub.conf
355 *stage* are now copied from /usr/lib/grub [FHS compliant]
356 to /boot/grub and remain functioning after uninstall.
357 Now configurable with next Yast2; remove previous versions
358 with "rpm -e", from here on "rpm -U" simply works.
359 - grub shell & friends moved to /usr/sbin
360 (you already have that functionality w/ GRUB even before
361 the kernel is booted, save for a mounted root FS)
362 * Thu Jul 18 2002 - snwint@suse.de
363 - basic graphics patch
364 * Thu Jun 20 2002 - stepan@suse.de
365 - update to 0.92 (bugfix release)
366 * Thu Apr 04 2002 - pthomas@suse.de
367 - Fixed to build with new autoconf/automake.
368 * Fri Feb 01 2002 - pthomas@suse.de
369 - Update to 0.91
370 - Clean up spec file.
371 - Handle the chase of /boot not being on its own partition correctly.
372 * Mon Mar 19 2001 - tw@suse.de
373 - switched to grub 0.5.96.1 so the patch of device.c is no longer needed
374 - build --recheck into the installgrub-script
375 * Mon Jan 15 2001 - tw@suse.de
376 - Don't install the stage bootloaders in /usr/share as FHS
377 prohibits doing so.
378 - Because the stage-bootloaders are not in /usr/share, they have
379 to be copied by "grub-install".
380 - Added a new script to ./util "installgrub", which automatically
381 searches the most common partition-types, the kernels and the initrds
382 and installs the bootmanager without action by the user.
383 - There was a bug in ./lib/device.c, that causes a DISK WRITE ERROR.
384 It is fixed now. (Only a O_RDONLY needed to be changed to O_RDRW)