Update to grub-1.99 final.

Fix crt1.o require on x86-64 (fix from Mads Kiilerich)
Various CFLAGS fixes (from Mads Kiilerich)
fexceptions and -m64
Temporarily ignore translations (from Mads Kiilerich)
This commit is contained in:
Peter Jones 2011-09-01 11:33:20 -04:00
parent b35cdf37f7
commit ee1d6dae6f
5 changed files with 56 additions and 97 deletions

3
.gitignore vendored
View file

@ -1,2 +1 @@
grub-1.98.tar.gz grub-*.tar.?z
/grub-1.99~rc1.tar.gz

View file

@ -22,7 +22,7 @@ index a09c3e6..0b0df78 100644
else else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux" - OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR} Linux" + OS="${GRUB_DISTRIBUTOR} Linux"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}" CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
fi fi
diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
@ -38,7 +38,7 @@ index ee49cd9..10422b0 100644
else else
- OS="${GRUB_DISTRIBUTOR} GNU/Linux" - OS="${GRUB_DISTRIBUTOR} GNU/Linux"
+ OS="${GRUB_DISTRIBUTOR} Linux" + OS="${GRUB_DISTRIBUTOR} Linux"
CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr '[A-Z]' '[a-z]' | cut -d' ' -f1) ${CLASS}" CLASS="--class $(echo ${GRUB_DISTRIBUTOR} | tr 'A-Z' 'a-z' | cut -d' ' -f1) ${CLASS}"
fi fi
-- --

View file

@ -1,53 +0,0 @@
From 755da11214d4695fbf8245d6d591ae633cadc791 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Wed, 2 Mar 2011 13:47:04 -0500
Subject: [PATCH] Get rid of unused variable in zfs.
---
grub-core/mmap/efi/mmap.c | 3 +--
grub-core/fs/zfs/zfs.c | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c
index 5b575f3..3a94d88 100644
--- a/grub-core/fs/zfs/zfs.c
+++ b/grub-core/fs/zfs/zfs.c
@@ -837,14 +837,12 @@ zap_leaf_lookup (zap_leaf_phys_t * l, grub_zfs_endian_t endian,
name))
{
struct zap_leaf_array *la;
- grub_uint8_t *ip;
if (le->le_int_size != 8 || le->le_value_length != 1)
return grub_error (GRUB_ERR_BAD_FS, "invalid leaf chunk entry");
/* get the uint64_t property value */
la = &ZAP_LEAF_CHUNK (l, blksft, le->le_value_chunk).l_array;
- ip = la->la_array;
*value = grub_be_to_cpu64 (la->la_array64);
diff --git a/grub-core/mmap/efi/mmap.c b/grub-core/mmap/efi/mmap.c
index 5b82a87..8e5cce0 100644
--- a/grub-core/mmap/efi/mmap.c
+++ b/grub-core/mmap/efi/mmap.c
@@ -194,7 +194,6 @@ grub_mmap_unregister (int handle)
{
struct overlay *curover, *prevover;
grub_efi_boot_services_t *b;
- grub_efi_status_t status;
b = grub_efi_system_table->boot_services;
@@ -204,7 +203,7 @@ grub_mmap_unregister (int handle)
{
if (curover->handle == handle)
{
- status = efi_call_2 (b->free_pages, curover->address, curover->pages);
+ efi_call_2 (b->free_pages, curover->address, curover->pages);
if (prevover != 0)
prevover->next = curover->next;
else
--
1.7.3.1

View file

@ -18,29 +18,27 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 1.99 Version: 1.99
%define filever 1.99~rc1 Release: 1%{?dist}
Release: 0.3%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
Group: System Environment/Base Group: System Environment/Base
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/grub/ URL: http://www.gnu.org/software/grub/
Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{filever}.tar.gz Source0: ftp://ftp.gnu.org/gnu/grub/grub-%{version}.tar.xz
Source1: 90_persistent Source1: 90_persistent
Source2: grub.default Source2: grub.default
Source3: README.Fedora Source3: README.Fedora
Patch0: grub-1.99-handle-fwrite-return.patch Patch0: grub-1.99-handle-fwrite-return.patch
Patch1: grub-1.99-unused-variable.patch Patch1: grub-1.99-grub_test_assert_printf.patch
Patch2: grub-1.99-grub_test_assert_printf.patch Patch2: grub-1.99-just-say-linux.patch
Patch3: grub-1.99-just-say-linux.patch Patch3: grub-1.99-Workaround-for-variable-set-but-not-used-issue.patch
Patch4: grub-1.99-Workaround-for-variable-set-but-not-used-issue.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: flex bison binutils python BuildRequires: flex bison binutils python
BuildRequires: ncurses-devel xz-devel BuildRequires: ncurses-devel xz-devel
BuildRequires: freetype-devel libusb-devel BuildRequires: freetype-devel libusb-devel
%ifarch %{sparc} %ifarch %{sparc} x86_64
BuildRequires: /usr/lib64/crt1.o glibc-static BuildRequires: /usr/lib64/crt1.o glibc-static
%else %else
BuildRequires: /usr/lib/crt1.o glibc-static BuildRequires: /usr/lib/crt1.o glibc-static
@ -77,7 +75,7 @@ provides support for EFI systems.
%setup -T -c -n grub-%{version} %setup -T -c -n grub-%{version}
%ifarch %{efi} %ifarch %{efi}
%setup -D -q -T -a 0 -n grub-%{version} %setup -D -q -T -a 0 -n grub-%{version}
cd grub-%{filever} cd grub-%{version}
cp %{SOURCE3} . cp %{SOURCE3} .
git init git init
git config user.email "pjones@fedoraproject.org" git config user.email "pjones@fedoraproject.org"
@ -86,10 +84,10 @@ git add .
git commit -a -q -m "%{version} baseline." git commit -a -q -m "%{version} baseline."
git am %{patches} git am %{patches}
cd .. cd ..
mv grub-%{filever} grub-efi-%{filever} mv grub-%{version} grub-efi-%{version}
%endif %endif
%setup -D -q -T -a 0 -n grub-%{version} %setup -D -q -T -a 0 -n grub-%{version}
cd grub-%{filever} cd grub-%{version}
cp %{SOURCE3} . cp %{SOURCE3} .
git init git init
git config user.email "pjones@fedoraproject.org" git config user.email "pjones@fedoraproject.org"
@ -101,17 +99,18 @@ git am %{patches}
%build %build
%ifarch %{efi} %ifarch %{efi}
cd grub-efi-%{filever} cd grub-efi-%{version}
./autogen.sh ./autogen.sh
%configure \ %configure \
CFLAGS="$(echo $RPM_OPT_FLAGS | sed \ CFLAGS="$(echo $RPM_OPT_FLAGS | sed \
-e 's/-fstack-protector//g' \ -e 's/-fstack-protector//g' \
-e 's/--param=ssp-buffer-size=4//g' \ -e 's/--param=ssp-buffer-size=4//g' \
-e 's/-mregparm=3/-mregparm=4//g' \ -e 's/-mregparm=3/-mregparm=4//g' \
-e 's/-fasynchronous-unwind-tables//g' )"\ -e 's/-fexceptions//g' \
TARGET_LDFLAGS=-static \ -e 's/-fasynchronous-unwind-tables//g' )" \
--with-platform=efi \ TARGET_LDFLAGS=-static \
--program-transform-name=s,grub,%{name}-efi, \ --with-platform=efi \
--program-transform-name=s,grub,%{name}-efi, \
--sbindir=/sbin --sbindir=/sbin
make %{?_smp_mflags} make %{?_smp_mflags}
%ifarch %{ix86} %ifarch %{ix86}
@ -125,7 +124,7 @@ make %{?_smp_mflags}
cd .. cd ..
%endif %endif
cd grub-%{filever} cd grub-%{version}
./autogen.sh ./autogen.sh
# -static is needed so that autoconf script is able to link # -static is needed so that autoconf script is able to link
# test that looks for _start symbol on 64 bit platforms # test that looks for _start symbol on 64 bit platforms
@ -134,15 +133,17 @@ PLATFORM=ieee1275
%else %else
PLATFORM=pc PLATFORM=pc
%endif %endif
%configure \ %configure \
CFLAGS="$(echo $RPM_OPT_FLAGS | sed \ CFLAGS="$(echo $RPM_OPT_FLAGS | sed \
-e 's/-fstack-protector//g' \ -e 's/-fstack-protector//g' \
-e 's/--param=ssp-buffer-size=4//g' \ -e 's/--param=ssp-buffer-size=4//g' \
-e 's/-mregparm=3/-mregparm=4//g' \ -e 's/-mregparm=3/-mregparm=4//g' \
-e 's/-fasynchronous-unwind-tables//g' )"\ -e 's/-fexceptions//g' \
TARGET_LDFLAGS=-static \ -e 's/-m64//g' \
--with-platform=$PLATFORM \ -e 's/-fasynchronous-unwind-tables//g' )" \
--program-transform-name=s,grub,%{name}, \ TARGET_LDFLAGS=-static \
--with-platform=$PLATFORM \
--program-transform-name=s,grub,%{name}, \
--sbindir=/sbin --sbindir=/sbin
make %{?_smp_mflags} make %{?_smp_mflags}
@ -152,7 +153,7 @@ set -e
rm -fr $RPM_BUILD_ROOT rm -fr $RPM_BUILD_ROOT
%ifarch %{efi} %ifarch %{efi}
cd grub-efi-%{filever} cd grub-efi-%{version}
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
# Ghost config file # Ghost config file
@ -178,7 +179,7 @@ install -m 755 grub.efi $RPM_BUILD_ROOT/boot/efi/EFI/redhat/grub.efi
cd .. cd ..
%endif %endif
cd grub-%{filever} cd grub-%{version}
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=$RPM_BUILD_ROOT install
# Script that makes part of grub.cfg persist across updates # Script that makes part of grub.cfg persist across updates
@ -204,10 +205,13 @@ do
done done
mv $RPM_BUILD_ROOT%{_infodir}/grub.info $RPM_BUILD_ROOT%{_infodir}/grub2.info mv $RPM_BUILD_ROOT%{_infodir}/grub.info $RPM_BUILD_ROOT%{_infodir}/grub2.info
mv $RPM_BUILD_ROOT%{_infodir}/grub-dev.info $RPM_BUILD_ROOT%{_infodir}/grub2-dev.info
rm $RPM_BUILD_ROOT%{_infodir}/dir rm $RPM_BUILD_ROOT%{_infodir}/dir
# Defaults # Defaults
install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub
# TODO: rename locale files to grub2 and make sure gettext works correctly
rm $RPM_BUILD_ROOT/usr/share/locale/*/LC_MESSAGES/grub.mo
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -219,12 +223,14 @@ BOOT_PARTITION=$(df -h /boot |(read; awk '{print $1; exit}'))
%{name}-install --grub-setup=/bin/true $BOOT_PARTITION %{name}-install --grub-setup=/bin/true $BOOT_PARTITION
if [ "$1" = 1 ]; then if [ "$1" = 1 ]; then
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || : /sbin/install-info --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || :
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/grub2-dev.info.gz || :
fi fi
%preun %preun
if [ "$1" = 0 ]; then if [ "$1" = 0 ]; then
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || : /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/grub2.info.gz || :
/sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/grub2-dev.info.gz || :
fi fi
# XXX Ugly # XXX Ugly
rm -f /boot/%{name}/*.mod rm -f /boot/%{name}/*.mod
@ -275,9 +281,9 @@ rm -f /boot/%{name}/device.map
# Actually, this is replaced by update-grub from scriptlets, # Actually, this is replaced by update-grub from scriptlets,
# but it takes care of modified persistent part # but it takes care of modified persistent part
%config(noreplace) /boot/%{name}/grub.cfg %config(noreplace) /boot/%{name}/grub.cfg
%doc grub-%{filever}/COPYING grub-%{filever}/INSTALL grub-%{filever}/NEWS %doc grub-%{version}/COPYING grub-%{version}/INSTALL grub-%{version}/NEWS
%doc grub-%{filever}/README grub-%{filever}/THANKS grub-%{filever}/TODO %doc grub-%{version}/README grub-%{version}/THANKS grub-%{version}/TODO
%doc grub-%{filever}/ChangeLog grub-%{filever}/README.Fedora %doc grub-%{version}/ChangeLog grub-%{version}/README.Fedora
%exclude %{_mandir} %exclude %{_mandir}
%{_infodir}/grub2* %{_infodir}/grub2*
@ -324,14 +330,21 @@ rm -f /boot/%{name}/device.map
# Actually, this is replaced by update-grub from scriptlets, # Actually, this is replaced by update-grub from scriptlets,
# but it takes care of modified persistent part # but it takes care of modified persistent part
%config(noreplace) /boot/grub2-efi/grub.cfg %config(noreplace) /boot/grub2-efi/grub.cfg
%doc grub-%{filever}/COPYING grub-%{filever}/INSTALL grub-%{filever}/NEWS %doc grub-%{version}/COPYING grub-%{version}/INSTALL grub-%{version}/NEWS
%doc grub-%{filever}/README grub-%{filever}/THANKS grub-%{filever}/TODO %doc grub-%{version}/README grub-%{version}/THANKS grub-%{version}/TODO
%doc grub-%{filever}/ChangeLog grub-%{filever}/README.Fedora %doc grub-%{version}/ChangeLog grub-%{version}/README.Fedora
%exclude %{_mandir} %exclude %{_mandir}
%{_infodir}/grub2* %{_infodir}/grub2*
%endif %endif
%changelog %changelog
* Thu Sep 01 2011 Peter Jones <pjones@redhat.com> - 1.99-1
- Update to grub-1.99 final.
- Fix crt1.o require on x86-64 (fix from Mads Kiilerich)
- Various CFLAGS fixes (from Mads Kiilerich)
- -fexceptions and -m64
- Temporarily ignore translations (from Mads Kiilerich)
* Thu Jul 21 2011 Peter Jones <pjones@redhat.com> - 1.99-0.3 * Thu Jul 21 2011 Peter Jones <pjones@redhat.com> - 1.99-0.3
- Use /sbin not /usr/sbin . - Use /sbin not /usr/sbin .

View file

@ -1 +1 @@
fd602ffaada5ba7939d0ea47091841a5 grub-1.99~rc1.tar.gz 27e360b951f006c464299d06bbd63442 grub-1.99.tar.xz