Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > db972f342c499c7112408467768ac228 > files > 18

grub-0.97-13mlcs4.src.rpm

Summary: GRand Unified Bootloader
Name: grub
Version: 0.97
Release: %mkrel 13
URL: http://www.gnu.org/software/grub/
Source0: ftp://alpha.gnu.org/gnu/grub/%{name}-%{version}.tar.gz
Source1: mdv-grub_splash.xpm.gz
Source2: menu.lst.example
Patch0: grub-0.5.96.1-ezd.patch.bz2
Patch1: grub-0.97-gcc4_warnings.patch.bz2
Patch2: grub-0.96-mdvversion.patch.bz2
Patch4: grub-0.94-addsyncs.patch.bz2
Patch5: grub-0.95-eltorito.patch.bz2
Patch6: grub-0.95-special-device-names.patch.bz2
Patch7: grub-0.91-nice-magic.patch.bz2
Patch9: grub-0.95-mem_lower.patch.bz2
Patch13: grub-0.94-initrdmax.patch.bz2
Patch14: grub-0.95-odirect.patch.bz2
Patch15: grub-0.97-install_sh.patch.bz2

# patches 200-299 are for graphics mode related patches
Patch200: grub-0.97-graphics.patch.bz2
Patch201: grub-0.95-graphics-chainboot_info.patch.bz2
Patch203: grub-0.95-hiddenmenu-tweak.patch.bz2

# apply chainboot patch only after graphics patch
Patch300: grub-0.97-chainboot.patch.bz2

# the 2.6 kernel no longer does geometry fixups.  so now I get to do it
# instead in userspace everywhere.  
Patch1000: grub-0.95-geometry-26kernel.patch.bz2

License: GPL
Group: System/Kernel and hardware
BuildRequires: autoconf2.5
BuildRequires: automake1.8
#BuildRequires: gcc3.3
BuildRequires: libgpm-devel
BuildRequires: libncurses-devel
BuildRequires: tetex-dvips
BuildRequires: tetex-latex
Requires(post): info-install
Requires(preun): info-install
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Exclusivearch: %ix86 x86_64 amd64 ia32e

Provides: bootloader
Conflicts: initscripts <= 6.40.2-15mdk

%description
GRUB is a GPLed bootloader intended to unify bootloading across x86
operating systems.  In addition to loading the Linux and *BSD kernels,
it implements the Multiboot standard, which allows for flexible loading
of multiple boot images (needed for modular kernels such as the GNU
Hurd).

%package doc
Summary: More documentation for grub
Group: Books/Computer books

%description doc
More documentation for grub

%prep
%setup -q

%patch200 -p1
%patch201 -p1
%patch203 -p1 -b .hidden

%patch300 -p1

%patch1000 -p1 -b .26geom

%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch9 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1

sed -i 's/MDVVERSION/"%{release}"/' stage2/char_io.c

%build
rm -f configure; aclocal-1.9 && automake-1.9 && autoheader && autoconf --force
export CC="gcc" CFLAGS="%{optflags}"
./configure --build=%{_target_platform} \
            --host=%{_host} \
            --target=%{_target} \
            --prefix=%{_prefix} \
            --exec-prefix=/ \
            --bindir=%{_bindir} \
            --mandir=%{_mandir} \
            --infodir=%{_infodir} \
            --disable-auto-linux-mem-opt
%make
make -C docs ps

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
rm -f %{buildroot}/%{_infodir}/dir
install -d %{buildroot}/boot/grub
install -m 0644 %{_sourcedir}/mdv-grub_splash.xpm.gz %{buildroot}/boot/grub
install -m 0644 %{_sourcedir}/menu.lst.example %{buildroot}/boot/grub

%clean
rm -rf %{buildroot}

%post
if [ -f /boot/grub/install.sh ]; then
	if [ -x /usr/sbin/detectloader ]; then
		LOADER=$(/usr/sbin/detectloader)
		if [ "$LOADER" = "GRUB" ]; then
			for file in /lib/grub/%{_arch}-%{_real_vendor}/*stage*; do
				cp -f $file /boot/grub/ || :
			done
			sh /boot/grub/install.sh > /dev/null
		fi
	fi
elif [ -e /boot/grub/menu.lst -a -e /boot/grub/stage2 ]; then
    # no install.sh, trying to get one

    # look for the device
    for DEVICE in `awk '{print "/dev/" $4}' /proc/partitions`; do
	if [ -b $DEVICE ]; then
	    echo "trying $DEVICE"
	    if /bin/dd if=$DEVICE bs=512 count=1 2>/dev/null | /bin/grep -q GRUB; then
		if [ -z "$BOOT" ]; then
		    BOOT=$DEVICE
		else
		    echo "oops, GRUB found on both $DEVICE and $BOOT"
		fi
	    fi
	fi
    done

    if [ -n "$BOOT" ]; then
	echo "installing grub on $BOOT"
	grub-install $BOOT
    else
	echo "can not find where GRUB is installed"
    fi
fi
%_install_info %{name}.info
%_install_info multiboot.info

%preun
%_remove_install_info %{name}.info
%_remove_install_info multiboot.info

# What a hack hell... we need this things because of upgrading from
# previous grub versions. The problem is that previous grub packages
# remove the stage files from /boot/grub in some cases, making the
# system unbootable.
%triggerun -- grub <= 0.97-1mdk
mkdir -p /boot/grub/backup_stagefiles
mv /boot/grub/*stage* /boot/grub/backup_stagefiles/ >/dev/null 2>&1 || :

# Replicate post script code here, because the trigger scripts are
# executed only after post script of this new package, and old
# install.sh was used then. So we need to execute again to use the new
# generated install.sh script.
if [ -f /boot/grub/install.sh ]; then
	if [ -x /usr/sbin/detectloader ]; then
		LOADER=$(/usr/sbin/detectloader)
		if [ "$LOADER" = "GRUB" ]; then
			for file in /lib/grub/%{_arch}-%{_real_vendor}/*stage*; do
				cp -f $file /boot/grub/ || :
			done
			sh /boot/grub/install.sh > /dev/null
		fi
	fi
fi

%triggerpostun -- grub <= 0.97-1mdk
if [ -d /boot/grub/backup_stagefiles ]; then
	for file in /boot/grub/backup_stagefiles/*stage*; do
		if [ ! -f "/boot/grub/`basename $file`" ]; then
			mv $file /boot/grub/ || :
		else
			rm -f $file;
		fi
	done
	rmdir /boot/grub/backup_stagefiles > /dev/null || :
fi

%files
%defattr(0644,root,root,0755)
/boot/grub
%{_infodir}/*
%{_mandir}/*/*
/lib/grub
%defattr(0755,root,root,0755)
%{_bindir}/mbchk
/sbin/grub*

%files doc
%defattr(0644,root,root,0755)
%doc AUTHORS BUGS ChangeLog docs/grub.ps docs/multiboot.ps NEWS README
%doc THANKS TODO

%changelog
* Tue Aug 22 2006 Anne Nicolas <anicolas@mandriva.com> 0.97-14mdk
- add CS4 grub splash
- don't use old gcc 3.3 anymore (it works nicely with gcc 4) - Pixel

* Mon Sep 12 2005 Pixel <pixel@mandriva.com> 0.97-13mdk
- search the boot drive and call grub-install
  when there is no install.sh but a menu.lst and a stage2 (for upgrading conectiva)
  (the previous condition was checking device.map, but there is none)
  (maybe we could use /root/tmp/mi/grubcmd...)

* Thu Sep  8 2005 Pixel <pixel@mandriva.com> 0.97-12mdk
- allow /boot to be mounted noexec (using "sh /boot/grub/install.sh") (#17935)

* Thu Sep  1 2005 Pixel <pixel@mandriva.com> 0.97-11mdk
- patch grub-install to generate /boot/grub/install.sh 
- add code in %%post to search the boot drive and call grub-install
  when there is no install.sh but a device.map (for upgrading conectiva)
- remove code modifying existing install.sh
  (sometimes it's better not using "setup" for explictly not using stage1.5,
   for eg. when you use partimage or similar tools which don't save those sectors)

* Mon Aug 15 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-10mdk
- Added %%post and %%preun requires for info-install (ticket #17418).

* Fri Aug 05 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-9mdk
- Before using perl script to update /boot/grub/install.sh inside
  %%triggerun, we check if the file exists. Also, all output redirected
  to /dev/null as it isn't useful.

* Wed Jul 14 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-8mdk
- Revert back change "Replaced /lib references to /%%{_lib}", as Gwenole
  Beauchesne reported it's unlikely we'll have a 64 bits bootloader and could
  cause problems with scripts using /lib in a hardcoded way.

* Wed Jul 13 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-7mdk
- Finally fix BuildRequires of gpm and ncurses packages, had forgot to
  fix this.
- Updated bootsplash image, new Mandrivas's wallpaper.
- Replaced /lib references to /%%{_lib}.

* Wed Jul 13 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-6mdk
- Escape '$' symbols at embedded perl script inside triggerun script,
  otherwise they get interpreted as shell variables and doesn't work as
  intended.

* Tue Jul 12 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-5mdk
- Added athlon 64 architectures to Exclusive Archs, grub also works on
  them (reported by Thierry Vignaud).
- In trigger scripts, do not use cp to copy stage files, instead use mv,
  to avoid problems with grub not finding them on boot because of changed
  inodes and improved trigger script to remove files not used (reported
  by Pascal Rigaux).

* Mon Jun 20 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-4mdk
- Compiling grub with gcc 3.3, I'm getting some errors still when trying
  to boot from a root reiserfs partition, will continue to investigate
  this but for now just using a older gcc to not leave grub broken. Also
  readding use of optflags doesn't causes problems.
- Remove /boot/grub/backup_stagefiles after upgrading from grub
  versions prior to 0.97-1mdk, as suggested by Pixel.
- Pass build/host options etc. to configure script.
- Update stage files on /boot/grub (copy them from /lib/grub to
  /boot/grub) because setup command inside /boot/grub/install.sh needs
  this and doesn't copy automatically the stage files (grub-install also
  does this).

* Fri Jun 17 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-3mdk
- Readded back previous %%post code, now install.sh from drakboot is
  generated correctly. Removed related Requires(post) too.
- Fix expansion of %%{buildroot} tag on previous changelog entry. 

* Mon May 30 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-2mdk
- Updated BuildRequires, removed tetex and added tetex-latex/tetex-dvips
  (needed for building ps documentation, they already requires tetex).
- Do not use configure macro (instead call configure directly), because
  it sets gcc flags that are breaking grub when compiling with gcc 4.0 in some
  cases (grub can't boot from a root reiserfs partition because can't load
  kernel, displaying the error "Invalid or unsupported executable
  format", for example, disabling the default gcc flags and reinstalling
  grub seems to fix the problem).
- Replaced $RPM_BUILD_ROOT by %%{buildroot}.
- Moved back text documentation files to subpackage doc.
- Added back mbchk to package.
- Removed grub-install patch: it is better to install stage files in /lib,
  and with this we don't need the patch anymore, keeping compatibility
  with cases where /usr reside in another partition. This also prevents
  that with a new grub release we must update or check grub-install for
  errors and update this patch. Another problem that I experienced with
  stage files installed in /boot/grub is that grub-install itself
  updates these files on each run, and this causes conflicts because grub
  then doesn't have anymore the original stage file from the package,
  sometimes complaining that /boot/grub/stage2 file isn't valid.
- Redid graphics patch: fixed gcc4 warnings, other fixes on code to be
  more robust.
- Redid chainboot patch: fixed gcc4 warnings.
- Added to post section more code to detect and upgrade grub.
- Added patch gcc4_warnings, fixing most of gcc4 compiling warnings.
- Added trigger scripts to handle upgrading from previous grub packages
  (the /boot/grub/*stage* files are removed causing the next boot fail
  with Error 15).

* Sun May 29 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.97-1mdk
- New upstream version: 0.97.
- Making sure that we're using automake and aclocal 1.9, by explicitly calling
  them (without using the binaries from alternatives).
- Reenabled building of documentation files.
- Redid graphics patch: updated to new grub version and removed redundant .orig
  files inside it.
- Renamed graphics_info patch to graphics-chainboot_info to reflect better its
  contents.
- Removed gcc4 patch, applied upstream.
- Fix bug in src.rpm: menu.lst.example wasn't included into the source rpm file.
- Installing additional files (README etc.).
- Added explicitly permission modes on files section (spec).

* Mon May 23 2005 Herton Ronaldo Krzesinski <herton@mandriva.com> 0.96-1mdk
- New upstream version: 0.96.
- Added menu.lst.example file, showing a default configuration as
  example, placed in /boot/grub.
- Added gcc4 patch, fix compilation issues with gcc 4.0.
- Removed init-config-end--prepatch, does nothing.
- Removed robust and fallback-entryno patches, already applied
  upstream.
- Added mdvversion patch, to show release of the package on boot menu,
  spec updated accordingly.
- Added a more complete special-raid-devices patch.
- Removed grub-0.90-grub-install patch file, there is another patch
  grub-0.96-grub-install that does the same thing.
- Removed uneeded compatibility patches, grub just ignore these
  options if they still exists: i18n-messages-and-keytable2,
  altconfigfile-deprecated.
- Added addsyncs patch from Fedora.
- Replaced graphics with a better one, fixes graphical mode bugs, add
  additional opptions (viewport - move drawing of characters and border,
  shade - add shadow for letters). Added also updated info files
  (graphics_info patch), removed splashimagehelp patch.
- Added chainboot patch: this adds chainboot option to grub. Chainboot
  is useful for bootable cdroms for example, where after the timeout
  instead of booting from the cdrom boot from first hard disk.
- Added eltorito patch: fix various issues with grub implementation of
  eltorito non-emulation boot support.
- Replaced geometry-26kernel patch with a better one without bugs (the
  current patch makes grub to display the message "Unable to read
  partition table entry: Invalid Format" when writing mba of a disk for
  example (to reproduce, try with old release 8mdk the command
  grub-install /dev/hda)
- Added mem_lower patch.
- Added odirect patch from Fedora.
- Added a simple splash image, based on current Mandriva wallpaper.
- Spec changed accordingly patches/issues fixed.

* Wed Mar  9 2005 Pixel <pixel@mandrakesoft.com> 0.95-8mdk
- fix loading initrd when you have more than 4GB
  (otherwise 32 bits signed int comparison in memcheck is wrong)

* Thu Jul 29 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.95-7mdk
- fix bug in fallback

* Mon Jul 19 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.95-6mdk
- add stuff from CVS to make grub more robust (fallback and savedefault)

* Tue Jul 13 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.95-5mdk
- add buildrequires

* Tue Jul 13 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.95-4mdk
- need to run aclocal/automake/autoconf to enable the patches!

* Tue Jul 13 2004 Pixel <pixel@mandrakesoft.com> 0.95-3mdk
- fix broken geometry patch (RedHat sucks)

* Mon Jul 12 2004 Pixel <pixel@mandrakesoft.com> 0.95-2mdk
- add splashimage patches and geometry patch (from RedHat)

* Mon Jul  5 2004 Pixel <pixel@mandrakesoft.com> 0.95-1mdk
- new release
- drop grub-0.93-gcc33.patch included upstream
- drop grub-0.93-add-our-own-memcpy.patch included upstream

* Wed Jan  7 2004 Pixel <pixel@mandrakesoft.com> 0.93-5mdk
- provides bootloader (basesystem now requires "bootloader" instead of lilo)

* Fri Jan  2 2004 Pixel <pixel@mandrakesoft.com> 0.93-4mdk
- altconfigfile is kept, but doesn't do anything anymore (bug #6664)

* Mon Aug 18 2003 Pixel <pixel@mandrakesoft.com> 0.93-3mdk
- don't include our own memcpy when building WITHOUT_LIBC_STUBS

* Thu Aug 14 2003 Pixel <pixel@mandrakesoft.com> 0.93-2mdk
- distlint DIRM fix: now owning /boot/grub
- add patch from upstream to fix build with gcc 3.3
- include our own memcpy since gcc generates a call to memcpy for some
  assignments (and using CFLAGS=-Os doesn't do the trick anymore)

* Mon Dec  9 2002 Pixel <pixel@mandrakesoft.com> 0.93-1mdk
- new release
- use CFLAGS=-Os (so that gcc doesn't use memcpy)

* Mon Oct 14 2002 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.92-2mdk
- fix doc subpackage group

* Tue Apr 30 2002 Pixel <pixel@mandrakesoft.com> 0.92-1mdk
- new release

* Thu Jan 24 2002 Pixel <pixel@mandrakesoft.com> 0.91-2mdk
- add a nice magic
- conflicts with current initscripts (=> force joe guy to update the new
initscript which understand that magic)

* Tue Jan 22 2002 Pixel <pixel@mandrakesoft.com> 0.91-1mdk
- new version

* Thu Sep  6 2001 Pixel <pixel@mandrakesoft.com> 0.90-4mdk
- update JFS patch, add XFS patch

* Wed Sep  5 2001 Pixel <pixel@mandrakesoft.com> 0.90-3mdk
- drop i18n and keytable broken patches (just keep command compatibility)

* Sun Aug  5 2001 Pixel <pixel@mandrakesoft.com> 0.90-2mdk
- add JFS support

* Wed Jul 18 2001 Pixel <pixel@mandrakesoft.com> 0.90-1mdk
- new version

* Tue Apr  3 2001 Pixel <pixel@mandrakesoft.com> 0.5.96.1-8mdk
- patch for raid (rd, ida, cciss)

* Tue Mar 20 2001 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.96.1-7mdk
- BuildRequires: tetex.
- Conflicts: initscripts <= 5.61.1-7mdk
- Remove rebootin (moved to initscripts).

* Sat Mar  3 2001 Pixel <pixel@mandrakesoft.com> 0.5.96.1-6mdk
- modified patch i18n-messages-and-keytable for yet another layout fix

* Sat Feb 24 2001 Pixel <pixel@mandrakesoft.com> 0.5.96.1-5mdk
- small layout fix

* Fri Feb 23 2001 Pixel <pixel@mandrakesoft.com> 0.5.96.1-4mdk
- don't give parameter "mem=" to kernel (bad for 2.4 kernels, see jeff for more)

* Thu Dec 21 2000 Pixel <pixel@mandrakesoft.com> 0.5.96.1-3mdk
- capitalize summary

* Mon Dec 11 2000 Pixel <pixel@mandrakesoft.com> 0.5.96.1-2mdk
- add a call to /boot/grub/install.sh if needed

* Sat Dec  9 2000 Pixel <pixel@mandrakesoft.com> 0.5.96.1-1mdk
- new version
  * patch fixbiosbug-nbsectors no more needed (unless you define NO_BUGGY_BIOS_IN_THE_WORLD)

* Thu Aug 24 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-7mdk
- %%_remove_install_info is fixed, yeepee :)

* Tue Aug 22 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-6mdk
- fixbiosbug-nbsectors for some Geom Errors (warly's case)

* Wed Aug 16 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-5mdk
- fix erroneous remove_info macro (sillyme)

* Mon Aug 07 2000 Frederic Lepied <flepied@mandrakesoft.com> 0.5.95-4mdk
- automatically added BuildRequires

* Fri Jul 21 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-3mdk
- macroization, BM

* Wed Jul 12 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-2mdk
- add a patch for ezbios nonsense

* Mon Jul  3 2000 Pixel <pixel@mandrakesoft.com> 0.5.95-1mdk
- new version

* Sat May 20 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-14mdk
- add rebootin command (use altconfigfile cmd in menu.lst)
- add altconfigfile (read once)

* Mon May  8 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-12mdk
- add reiserfs handling (missing symlink handling though)

* Wed May  3 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-11mdk
- fix for linux-extended extended partition

* Tue May  2 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-10mdk
- fix case of not found keytable

* Tue Apr 18 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-9mdk
- remove a patch from caldera

* Sun Apr 16 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-8mdk
- nicer menu
- don't add automatic mem= if one is given

* Tue Apr  4 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-7mdk
- fix install path

* Mon Apr  3 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-6mdk
- integrate patches from caldera

* Fri Mar 31 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-5mdk
- re-rebuild

* Wed Mar 29 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-4mdk
- big patch (i18n & look)

* Sat Mar 25 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-3mdk
- split printable doc and some more to have smaller package (keep mainly info in
main package, very good one)
- cleanup install-info in % post scripts

* Fri Mar 24 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-2mdk
- remove unneeded patch
- use of % { ix86 }

* Wed Mar 22 2000 Pixel <pixel@mandrakesoft.com> 0.5.94-1mdk
- remove now unneeded --disable-gunzip
- added option --disable-lba-support-bitmap-check
- patch for *very* buggy bioses (tells grub every hd is gigantic)
- new version

* Mon Mar 13 2000 Pixel <pixel@mandrakesoft.com> 0.5.93.1-7mdk
- configure with --disable-gunzip
(so that initrd is not gunzip'ed and fits in memory, that's the kernel's job anyway)

* Wed Mar  1 2000 Pixel <pixel@mandrakesoft.com> 0.5.93.1-6mdk
- remove no-device-check (was stupid)
- replace by something better (option --devices)

* Tue Feb 29 2000 Pixel <pixel@mandrakesoft.com> 0.5.93.1-5mdk
- add option no-device-check for grub binary (mainly for non-interactive use)

* Sun Jan 16 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.93.1-4mdk
- Add Exclusivearch.

* Tue Jan 4 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.93.1-3mdk
- Add install_grub_on_floppy script (thnks b.bodin).
- Add dvi docs (tknks b.bodin).

* Mon Jan  3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 0.5.93.1-2mdk
- Add %packager (thnks rpmlint).
- Remove CFLAGS.

* Mon Jan  3 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- First spec file for Mandrake distribution based on debian version.