forked from pool/grub2
Accepting request 457610 from home:michael-chang:sle12-update
- Merge changes from SLE12 - add grub2-emu-4-all.patch * Build 'grub2-emu' wherever possible, to allow a better implementation of that feature. - add grub2-s390x-06-loadparm.patch, - add grub2-commands-introduce-read_file-subcommand.patch: * allow s390x to telecontrol grub2. (bsc#891946, bsc#892852) - add grub2-s390x-06-loadparm.patch: * ignore case and fix transliteration of parameter. (bsc#891946) - add grub2-s390x-07-add-image-param-for-zipl-setup.patch * Add --image switch to force zipl update to specific kernel (bsc#928131) - add grub2-s390x-08-workaround-part-to-disk.patch * Ignore partition tables on s390x. (bsc#935127) - add grub2-efi-chainload-harder.patch: * allow XEN to be chain-loaded despite firmware flaws. (bnc#887793) * Do not use shim lock protocol for reading pe header, it won't be available when secure boot disabled (bsc#943380) * Make firmware flaw condition be more precisely detected and add debug message for the case * Check msdos header to find PE file header (bsc#954126) - grub2-s390x-04-grub2-install.patch: * streamline boot to grub menu. (bsc#898198) * Force '/usr' to read-only before calling kexec. (bsc#932951) - grub2-once: * add '--enum' option to enumerate boot-entries in a way actually understood by 'grub2'. (bsc#892852, bsc#892811) * Examine variables from grub environment in 'grub2-once'. (fate#319632) OBS-URL: https://build.opensuse.org/request/show/457610 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=254
This commit is contained in:
93
grub2.spec
93
grub2.spec
@@ -64,9 +64,14 @@ BuildRequires: update-bootloader-rpm-macros
|
||||
# Modules code is dynamically loaded and collected from a _fixed_ path.
|
||||
%define _libdir %{_exec_prefix}/lib
|
||||
|
||||
# Build grub2-emu everywhere (it may be "required" by 'grub2-once')
|
||||
%define emu 1
|
||||
|
||||
%ifarch ppc ppc64 ppc64le
|
||||
%define grubcpu powerpc
|
||||
%define platform ieee1275
|
||||
# emu does not build here yet... :-(
|
||||
%define emu 0
|
||||
%endif
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
@@ -84,15 +89,18 @@ BuildRequires: update-bootloader-rpm-macros
|
||||
%define platform uboot
|
||||
%endif
|
||||
|
||||
%ifarch aarch64
|
||||
%define grubcpu arm64
|
||||
%define platform efi
|
||||
%define only_efi 1
|
||||
%endif
|
||||
|
||||
%define grubarch %{grubcpu}-%{platform}
|
||||
|
||||
# build efi bootloader on some platforms only:
|
||||
%if ! 0%{?efi:1}
|
||||
%global efi %{ix86} x86_64 ia64 aarch64 %{arm}
|
||||
%endif
|
||||
%ifarch aarch64
|
||||
%define only_efi 1
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
%ifarch %{ix86}
|
||||
@@ -118,6 +126,11 @@ BuildRequires: update-bootloader-rpm-macros
|
||||
%define grubxenarch x86_64-xen
|
||||
%endif
|
||||
|
||||
%if %{platform} == emu
|
||||
# force %{emu} to 1, e.g. for s390
|
||||
%define emu 1
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version} == 1110
|
||||
%define only_efi %{nil}
|
||||
%define only_x86_64 %{nil}
|
||||
@@ -187,6 +200,12 @@ Patch70: grub2-default-distributor.patch
|
||||
Patch71: grub2-menu-unrestricted.patch
|
||||
Patch72: grub2-mkconfig-arm.patch
|
||||
Patch74: grub2-accept-empty-module.patch
|
||||
Patch75: grub2-s390x-06-loadparm.patch
|
||||
Patch76: grub2-s390x-07-add-image-param-for-zipl-setup.patch
|
||||
Patch77: grub2-s390x-08-workaround-part-to-disk.patch
|
||||
Patch78: grub2-commands-introduce-read_file-subcommand.patch
|
||||
Patch79: grub2-efi-chainload-harder.patch
|
||||
Patch80: grub2-emu-4-all.patch
|
||||
# Btrfs snapshot booting related patches
|
||||
Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
|
||||
Patch102: grub2-btrfs-02-export-subvolume-envvars.patch
|
||||
@@ -280,6 +299,7 @@ Requires: %{name} = %{version}-%{release}
|
||||
%description branding-upstream
|
||||
Upstream branding for GRUB2's graphical console
|
||||
|
||||
%if ! 0%{?only_efi:1}
|
||||
%package %{grubarch}
|
||||
|
||||
Summary: Bootloader with support for Linux, Multiboot and more
|
||||
@@ -309,6 +329,8 @@ bootloader with modular architecture. It supports rich variety of kernel format
|
||||
file systems, computer architectures and hardware devices. This subpackage
|
||||
provides support for %{platform} systems.
|
||||
|
||||
%endif
|
||||
|
||||
%ifarch %{efi}
|
||||
|
||||
%package %{grubefiarch}
|
||||
@@ -433,6 +455,12 @@ swap partition while in resuming
|
||||
%patch71 -p1
|
||||
%patch72 -p1
|
||||
%patch74 -p1
|
||||
%patch75 -p1
|
||||
%patch76 -p1
|
||||
%patch77 -p1
|
||||
%patch78 -p1
|
||||
%patch79 -p1
|
||||
%patch80 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
@@ -487,6 +515,9 @@ mkdir build-efi
|
||||
%ifarch %{ix86} x86_64
|
||||
mkdir build-xen
|
||||
%endif
|
||||
%if %{emu}
|
||||
mkdir build-emu
|
||||
%endif
|
||||
|
||||
%build
|
||||
# autogen calls autoreconf -vi
|
||||
@@ -502,6 +533,28 @@ CXXFLAGS=" "
|
||||
FFLAGS=" "
|
||||
export CFLAGS CXXFLAGS FFLAGS
|
||||
|
||||
%if %{emu}
|
||||
cd build-emu
|
||||
%define arch_specific --enable-device-mapper --disable-grub-mount
|
||||
TFLAGS="-fPIC"
|
||||
|
||||
# -static is needed so that autoconf script is able to link
|
||||
# test that looks for _start symbol on 64 bit platforms
|
||||
../configure TARGET_LDFLAGS=$TFLAGS \
|
||||
--prefix=%{_prefix} \
|
||||
--sysconfdir=%{_sysconfdir} \
|
||||
--target=%{_target_platform} \
|
||||
--with-platform=emu \
|
||||
%{arch_specific} \
|
||||
--program-transform-name=s,grub,%{name},
|
||||
make %{?_smp_mflags}
|
||||
cd ..
|
||||
if [ "%{platform}" = "emu" ]; then
|
||||
rmdir build
|
||||
mv build-emu build
|
||||
fi
|
||||
%endif
|
||||
|
||||
%ifarch %{ix86} x86_64
|
||||
cd build-xen
|
||||
../configure \
|
||||
@@ -593,13 +646,9 @@ cd build
|
||||
%define _target_platform i386-%{_vendor}-%{_target_os}%{?_gnu}
|
||||
%endif
|
||||
|
||||
%ifarch s390x
|
||||
%define arch_specific --enable-device-mapper --disable-grub-mount
|
||||
TFLAGS="-fPIC"
|
||||
%else
|
||||
%if %{platform} != "emu"
|
||||
%define arch_specific --enable-device-mapper
|
||||
TFLAGS="-static"
|
||||
%endif
|
||||
|
||||
# -static is needed so that autoconf script is able to link
|
||||
# test that looks for _start symbol on 64 bit platforms
|
||||
@@ -612,6 +661,8 @@ TFLAGS="-static"
|
||||
--program-transform-name=s,grub,%{name},
|
||||
make %{?_smp_mflags}
|
||||
%endif
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
%install
|
||||
|
||||
@@ -651,10 +702,17 @@ cd ..
|
||||
%if ! 0%{?only_efi:1}
|
||||
cd build
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%else
|
||||
cd build-efi
|
||||
cd ..
|
||||
%endif
|
||||
|
||||
if [ -d build-emu/grub-core ]; then
|
||||
cd build-emu/grub-core
|
||||
install -m 755 grub-emu $RPM_BUILD_ROOT%{_bindir}/%{name}-emu
|
||||
install -m 755 grub-emu-lite $RPM_BUILD_ROOT%{_bindir}/%{name}-emu-lite
|
||||
install -m 644 grub-emu.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}-emu.1
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
# *.module files are installed with executable bits due to the way grub2 build
|
||||
# system works. Clear executable bits to not confuse find-debuginfo.sh
|
||||
find $RPM_BUILD_ROOT%{_libdir}/%{name} \
|
||||
@@ -878,16 +936,11 @@ if [ $1 = 0 ]; then
|
||||
fi
|
||||
%endif
|
||||
fi
|
||||
%if 0%{?only_efi:1}
|
||||
%define source_dir build-efi
|
||||
%else
|
||||
%define source_dir build
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%service_del_postun grub2-once.service
|
||||
|
||||
%files -f %{source_dir}/%{name}.lang
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING NEWS README
|
||||
%doc THANKS TODO ChangeLog
|
||||
@@ -963,11 +1016,11 @@ fi
|
||||
%{_mandir}/man8/%{name}-probe.8.*
|
||||
%{_mandir}/man8/%{name}-reboot.8.*
|
||||
%{_mandir}/man8/%{name}-set-default.8.*
|
||||
%ifarch s390x
|
||||
%{_bindir}/%{name}-emu
|
||||
%{_bindir}/%{name}-emu-lite
|
||||
%if %{emu}
|
||||
%{_bindir}/%{name}-emu*
|
||||
%{_mandir}/man1/%{name}-emu.1.*
|
||||
%else
|
||||
%endif
|
||||
%ifnarch s390x
|
||||
%config %{_sysconfdir}/grub.d/30_os-prober
|
||||
%{_bindir}/%{name}-mount
|
||||
%{_bindir}/%{name}-syslinux2cfg
|
||||
|
Reference in New Issue
Block a user