SHA256
1
0
forked from pool/grub2

Accepting request 34740 from devel:openSUSE:Factory

Copy from devel:openSUSE:Factory/grub2 based on submit request 34740 from user a_jaeger

OBS-URL: https://build.opensuse.org/request/show/34740
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=2
This commit is contained in:
OBS User autobuild 2010-03-14 23:45:00 +00:00 committed by Git OBS Bridge
parent a32a645bb8
commit 689b3ecc34
9 changed files with 81 additions and 52 deletions

17
gccwarn.patch Normal file
View File

@ -0,0 +1,17 @@
Index: lib/libgcrypt-grub/cipher/camellia.c
===================================================================
--- lib/libgcrypt-grub/cipher/camellia.c.orig
+++ lib/libgcrypt-grub/cipher/camellia.c
@@ -25,11 +25,9 @@
* http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html
*/
-
+#include "memory.h"
#include "camellia.h"
-/* u32 must be 32bit word */
-typedef unsigned int u32;
typedef unsigned char u8;
/* key constants */

View File

@ -4,9 +4,11 @@ with grub2 and they both can share the same device.map.
Lubomir Rintel <lkundrak@v3.sk> Lubomir Rintel <lkundrak@v3.sk>
--- grub2.orig/include/grub/util/misc.h 2007-11-28 14:10:01.000000000 +0100 Index: include/grub/util/misc.h
+++ grub2/include/grub/util/misc.h 2007-11-28 14:10:20.000000000 +0100 ===================================================================
@@ -28,7 +28,7 @@ --- include/grub/util/misc.h.orig
+++ include/grub/util/misc.h
@@ -32,7 +32,7 @@
/* NetBSD uses /boot for its boot block. */ /* NetBSD uses /boot for its boot block. */
# define DEFAULT_DIRECTORY "/grub" # define DEFAULT_DIRECTORY "/grub"
#else #else

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:98c1d2623ce809ec25ba9136ea59c15a4580c71478d122be765e819cb06a1c49
size 1249181

3
grub-1.98.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bef2c1892e052967b65aab6aa62ac702c0e50ef8848506eacf3c0b2f5007c614
size 2449386

View File

@ -1,30 +0,0 @@
2008-05-07: Lubomir Rintel <lkundrak@fedoraproject.org>
* kern/dl.c (grub_dl_resolve_symbols): Let the
grub_gdb_trapvec symbol be resolved correctly (instead of 0).
--- grub2/kern/dl.c 2008-01-26 21:34:58.000000000 +0100
+++ grub2-gdb/kern/dl.c 2008-05-07 09:27:08.000000000 +0200
@@ -352,16 +352,18 @@ grub_dl_resolve_symbols (grub_dl_t mod,
{
case STT_NOTYPE:
/* Resolve a global symbol. */
- if (sym->st_name != 0 && sym->st_shndx == 0)
+ if (sym->st_name == 0)
+ break;
+
+ if (sym->st_shndx == 0) /* external */
{
sym->st_value = (Elf_Addr) grub_dl_resolve_symbol (name);
if (! sym->st_value)
return grub_error (GRUB_ERR_BAD_MODULE,
"the symbol `%s' not found", name);
- }
- else
- sym->st_value = 0;
break;
+ }
+ /* nonexternal, same as STT_OBJECT */
case STT_OBJECT:
sym->st_value += (Elf_Addr) grub_dl_get_section_addr (mod,

View File

@ -2,12 +2,12 @@ Index: util/grub.d/10_linux.in
=================================================================== ===================================================================
--- util/grub.d/10_linux.in.orig --- util/grub.d/10_linux.in.orig
+++ util/grub.d/10_linux.in +++ util/grub.d/10_linux.in
@@ -49,7 +49,7 @@ menuentry "$1" { @@ -84,7 +84,7 @@ EOF
EOF printf '%s\n' "${prepare_boot_cache}"
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
cat << EOF cat << EOF
- linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro $2 echo $(printf "$(gettext "Loading Linux %s ...")" ${version})
+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} $2 - linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
+ linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ${args}
EOF EOF
if test -n "${initrd}" ; then if test -n "${initrd}" ; then
cat << EOF cat << EOF

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Sun Mar 14 12:11:53 UTC 2010 - aj@suse.de
- Fix build on x86-64.
-------------------------------------------------------------------
Fri Mar 12 20:39:25 UTC 2010 - aj@suse.de
- Don't build parallel.
- Update to grub 1.98 including:
* Multiboot on EFI support.
* Saved default menu entry support, with new utilities `grub-reboot' and
`grub-set-default'.
* Encrypted password support, with a new utility `grub-mkpasswd-pbkdf2'.
* `grub-mkfloppy' removed; use `grub-mkrescue' to create floppy images.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 12 08:21:10 UTC 2010 - aj@suse.de Fri Feb 12 08:21:10 UTC 2010 - aj@suse.de

2
grub2.rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# We need to supply unstripped files for grub
addFilter("unstripped-binary-or-object .*")

View File

@ -1,5 +1,5 @@
# #
# spec file for package grub2 (Version 1.97.2) # spec file for package grub2 (Version 1.98)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -24,14 +24,16 @@ BuildRequires: freetype2-devel-32bit gcc-32bit glibc-devel-32bit libncurses5-32
BuildRequires: freetype2-devel gcc glibc-devel libncurses5 libusb-1_0-devel ncurses-devel BuildRequires: freetype2-devel gcc glibc-devel libncurses5 libusb-1_0-devel ncurses-devel
%endif %endif
BuildRequires: bison flex ruby BuildRequires: bison flex ruby
# Modules always contain just 32-bit code # Modules always contain just 32-bit code
%define _libdir %{_exec_prefix}/lib %define _libdir %{_exec_prefix}/lib
# 64-bit x86-64 machines use 32-bit boot loader # 64-bit x86-64 machines use 32-bit boot loader
# (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then) # (We cannot just redefine _target_cpu, as we'd get i386.rpm packages then)
%ifarch x86_64 %ifarch x86_64
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu} %define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
%endif %endif
Version: 1.97.2 Version: 1.98
Release: 1 Release: 1
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
Group: System/Boot Group: System/Boot
@ -41,11 +43,14 @@ Source0: ftp://alpha.gnu.org/gnu/grub/grub-%{version}.tar.gz
Source1: 90_persistent Source1: 90_persistent
Source2: grub.default Source2: grub.default
Source3: README.openSUSE Source3: README.openSUSE
Source4: grub2.rpmlintrc
Patch0: grub-1.95-grubdir.patch Patch0: grub-1.95-grubdir.patch
Patch1: grub2-dlsym-v4.patch
Patch2: grub2-linux.patch Patch2: grub2-linux.patch
Patch3: gccwarn.patch
PreReq: perl-Bootloader PreReq: perl-Bootloader
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# TODO: ppc # TODO: ppc
ExclusiveArch: %{ix86} x86_64 ExclusiveArch: %{ix86} x86_64
@ -64,35 +69,45 @@ file that is part of this package's documentation for more information.
%prep %prep
%setup -q -n grub-%{version} %setup -q -n grub-%{version}
%patch0 -p1 -b .grubdir %patch0 -p0 -b .grubdir
%patch1 -p1 -b .dlsym
%patch2 -p0 -b .linux %patch2 -p0 -b .linux
%patch3 -p0 -b .gccwarn
# README.openSUSE # README.openSUSE
cp %{SOURCE3} . cp %{SOURCE3} .
%build %build
sh autogen.sh #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
%configure TARGET_LDFLAGS=-static \ %configure TARGET_LDFLAGS=-static \
--with-platform=pc \ --with-platform=pc \
--enable-grub-emu \ --enable-grub-emu-usb \
--program-transform-name=s,grub,%{name}, --program-transform-name=s,grub,%{name},
%__make %{?jobs:-j%jobs}
make
%install %install
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
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/grub.d/ install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/grub.d/
# Ghost config file # Ghost config file
install -d $RPM_BUILD_ROOT/boot/%{name} install -d $RPM_BUILD_ROOT/boot/%{name}
touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg touch $RPM_BUILD_ROOT/boot/%{name}/grub.cfg
ln -s ../boot/%{name}/grub.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.cfg ln -s ../boot/%{name}/grub.cfg $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.cfg
# XXX: Remove for now, should be renamed to grub2.info # XXX: Remove for now, should be renamed to grub2.info
rm $RPM_BUILD_ROOT/%{_infodir}/grub.info* rm $RPM_BUILD_ROOT/%{_infodir}/grub.info*
# Remove devel files
rm $RPM_BUILD_ROOT/%{_libdir}/%{name}/*/*.h
# Defaults # Defaults
install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub install -m 644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/default/grub
#%post %find_lang grub
%post
exec >/dev/null 2>&1 exec >/dev/null 2>&1
# Create device.map or reuse one from GRUB Legacy # Create device.map or reuse one from GRUB Legacy
if [ -e /boot/grub/device.map ] ; then if [ -e /boot/grub/device.map ] ; then
@ -120,6 +135,7 @@ if [ -e /boot/%{name}/core.img ] ; then
rm -f /boot/%{name}/*.lst rm -f /boot/%{name}/*.lst
rm -f /boot/%{name}/device.map rm -f /boot/%{name}/device.map
fi fi
#%triggerin -- kernel, kernel-PAE #%triggerin -- kernel, kernel-PAE
#exec >/dev/null 2>&1 #exec >/dev/null 2>&1
## Generate grub.cfg ## Generate grub.cfg
@ -131,22 +147,28 @@ fi
## Generate grub.cfg ## Generate grub.cfg
#%{name}-mkconfig #%{name}-mkconfig
%files %files -f grub.lang
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/%{name} %{_libdir}/%{name}
%{_libdir}/grub/ %{_libdir}/grub/
%{_sbindir}/%{name}-mkdevicemap %{_sbindir}/%{name}-mkdevicemap
%{_sbindir}/%{name}-install %{_sbindir}/%{name}-install
%{_sbindir}/%{name}-emu
%{_sbindir}/%{name}-probe %{_sbindir}/%{name}-probe
%{_sbindir}/%{name}-setup %{_sbindir}/%{name}-setup
%{_sbindir}/%{name}-mkconfig %{_sbindir}/%{name}-mkconfig
%{_sbindir}/%{name}-reboot
%{_sbindir}/%{name}-set-default
%{_bindir}/%{name}-bin2h
%{_bindir}/%{name}-mkisofs
%{_bindir}/%{name}-mkrelpath
%{_bindir}/%{name}-script-check
%{_bindir}/%{name}-mkimage %{_bindir}/%{name}-mkimage
%{_bindir}/%{name}-mkelfimage %{_bindir}/%{name}-mkelfimage
%{_bindir}/%{name}-editenv %{_bindir}/%{name}-editenv
%{_bindir}/%{name}-fstest %{_bindir}/%{name}-fstest
%{_bindir}/%{name}-mkfont %{_bindir}/%{name}-mkfont
%{_bindir}/%{name}-mkrescue %{_bindir}/%{name}-mkrescue
%{_bindir}/%{name}-mkpasswd-pbkdf2
%dir %{_sysconfdir}/grub.d %dir %{_sysconfdir}/grub.d
%config %{_sysconfdir}/grub.d/??_* %config %{_sysconfdir}/grub.d/??_*
%{_sysconfdir}/grub.d/README %{_sysconfdir}/grub.d/README