2019-12-13 16:09:03 +08:00
|
|
|
%ifarch aarch64
|
|
|
|
|
%global efi_arch aa64
|
|
|
|
|
%global bootcsv BOOTAA64.CSV
|
|
|
|
|
%global bootefi BOOTAA64.EFI
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
%global efi_arch x64
|
|
|
|
|
%global bootcsv BOOTX64.CSV
|
|
|
|
|
%global bootefi BOOTX64.EFI
|
|
|
|
|
%endif
|
|
|
|
|
|
2019-09-30 11:17:08 -04:00
|
|
|
%global debug_package %{nil}
|
|
|
|
|
%global __debug_package 1
|
|
|
|
|
%global _binaries_in_noarch_packages_terminate_build 0
|
|
|
|
|
%undefine _debuginfo_subpackages
|
|
|
|
|
|
|
|
|
|
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' ))
|
2019-12-13 16:09:03 +08:00
|
|
|
%global shimdir %{_datadir}/shim/%{version}-%{release}/%{efi_arch}
|
2019-09-30 11:17:08 -04:00
|
|
|
%global shimefivendor /boot/efi/EFI/%{efi_vendor}/
|
|
|
|
|
%global shimBOOT /boot/efi/EFI/BOOT/
|
|
|
|
|
|
2020-06-22 18:20:52 +08:00
|
|
|
Name: shim
|
|
|
|
|
Version: 15
|
|
|
|
|
Release: 19
|
|
|
|
|
Summary: First-stage UEFI bootloader
|
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: https://github.com/rhboot/shim
|
|
|
|
|
Source0: https://github.com/rhboot/shim/releases/download/%{version}/shim-%{version}.tar.bz2
|
|
|
|
|
Source1: BOOTAA64.CSV
|
|
|
|
|
Source2: BOOTX64.CSV
|
|
|
|
|
|
|
|
|
|
Patch0000: 0001-fix-unaligned-point-value-with-GCC9.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: elfutils-libelf-devel openssl-devel openssl git pesign gnu-efi gnu-efi-devel gcc
|
|
|
|
|
Requires: dbxtool efi-filesystem mokutil
|
|
|
|
|
Provides: bundled(openssl) = 1.0.2j
|
|
|
|
|
Provides: shim-%{efi_arch}
|
|
|
|
|
Obsoletes: shim-%{efi_arch}
|
2019-09-30 11:17:08 -04:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Initial UEFI bootloader that handles chaining to a trusted full \
|
|
|
|
|
bootloader under secure boot environments.
|
|
|
|
|
|
|
|
|
|
%package debuginfo
|
2019-12-13 16:09:03 +08:00
|
|
|
Summary: Debug information for shim-unsigned
|
2019-09-30 11:17:08 -04:00
|
|
|
Requires: %{name}-debugsource = %{version}-%{release}
|
|
|
|
|
AutoReqProv: 0
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description debuginfo
|
|
|
|
|
This package provides debug information for package %{expand:%%{name}} \
|
|
|
|
|
Debug information is useful when developing applications that \
|
|
|
|
|
use this package or when debugging this package.
|
|
|
|
|
|
|
|
|
|
%package debugsource
|
|
|
|
|
Summary: Debug Source for shim-unsigned
|
|
|
|
|
AutoReqProv: 0
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description debugsource
|
|
|
|
|
This package provides debug information for package %{expand:%%{name}} \
|
|
|
|
|
Debug information is useful when developing applications that \
|
|
|
|
|
use this package or when debugging this package.
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-01-12 16:28:19 +08:00
|
|
|
#chmod +x %{SOURCE100}
|
2020-06-22 18:20:52 +08:00
|
|
|
%autosetup -n shim-%{version} -p1 -S git
|
2019-09-30 11:17:08 -04:00
|
|
|
git config --unset user.email
|
|
|
|
|
git config --unset user.name
|
2019-12-13 16:09:03 +08:00
|
|
|
mkdir build-%{efi_arch}
|
2019-09-30 11:17:08 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
COMMITID=$(cat commit)
|
|
|
|
|
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMITID=${COMMITID} "
|
|
|
|
|
MAKEFLAGS+="EFIDIR=%{efidir} PKGNAME=shim RELEASE=%{release} "
|
|
|
|
|
MAKEFLAGS+="ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true "
|
|
|
|
|
MAKEFLAGS+="%{_smp_mflags}"
|
|
|
|
|
|
2019-12-13 16:09:03 +08:00
|
|
|
cd build-%{efi_arch}
|
|
|
|
|
make ${MAKEFLAGS} DEFAULT_LOADER='\\\\grub%{efi_arch}.efi' all
|
2019-09-30 11:17:08 -04:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
COMMITID=$(cat commit)
|
|
|
|
|
MAKEFLAGS="TOPDIR=.. -f ../Makefile COMMITID=${COMMITID} "
|
|
|
|
|
MAKEFLAGS+="EFIDIR=%{efidir} PKGNAME=shim RELEASE=%{release} "
|
|
|
|
|
MAKEFLAGS+="ENABLE_HTTPBOOT=true ENABLE_SHIM_HASH=true "
|
|
|
|
|
|
2019-12-13 16:09:03 +08:00
|
|
|
cd build-%{efi_arch}
|
2019-09-30 11:17:08 -04:00
|
|
|
make ${MAKEFLAGS} \
|
2019-12-13 16:09:03 +08:00
|
|
|
DEFAULT_LOADER='\\\\grub%{efi_arch}.efi' \
|
2019-09-30 11:17:08 -04:00
|
|
|
DESTDIR=${RPM_BUILD_ROOT} \
|
|
|
|
|
install-debuginfo install-debugsource
|
|
|
|
|
|
|
|
|
|
install -d -m 0700 ${RPM_BUILD_ROOT}/%{shimBOOT}
|
2019-12-13 16:09:03 +08:00
|
|
|
install -m 0700 fb%{efi_arch}.efi ${RPM_BUILD_ROOT}/%{shimBOOT}
|
|
|
|
|
install -m 0700 mm%{efi_arch}.efi ${RPM_BUILD_ROOT}/%{shimBOOT}
|
|
|
|
|
install -m 0700 shim%{efi_arch}.efi ${RPM_BUILD_ROOT}/%{shimBOOT}/%{bootefi}
|
2019-09-30 11:17:08 -04:00
|
|
|
install -d -m 0700 ${RPM_BUILD_ROOT}/%{shimefivendor}
|
|
|
|
|
install -m 0700 *.efi ${RPM_BUILD_ROOT}/%{shimefivendor}
|
|
|
|
|
install -m 0700 *.hash ${RPM_BUILD_ROOT}/%{shimefivendor}
|
2019-12-13 16:09:03 +08:00
|
|
|
%ifarch aarch64
|
|
|
|
|
install -m 0700 %{SOURCE1} ${RPM_BUILD_ROOT}/%{shimefivendor}
|
|
|
|
|
%endif
|
|
|
|
|
%ifarch x86_64
|
|
|
|
|
install -m 0700 %{SOURCE2} ${RPM_BUILD_ROOT}/%{shimefivendor}
|
|
|
|
|
%endif
|
2019-09-30 11:17:08 -04:00
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license COPYRIGHT
|
2019-12-13 16:09:03 +08:00
|
|
|
%{shimBOOT}/fb%{efi_arch}.efi
|
|
|
|
|
%{shimBOOT}/mm%{efi_arch}.efi
|
|
|
|
|
%{shimBOOT}/%{bootefi}
|
|
|
|
|
%{shimefivendor}/%{bootcsv}
|
2019-09-30 11:17:08 -04:00
|
|
|
%{shimefivendor}/*.efi
|
|
|
|
|
%{shimefivendor}/*.hash
|
|
|
|
|
|
2020-01-12 16:28:19 +08:00
|
|
|
%files debuginfo
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
/usr/lib/debug/*
|
|
|
|
|
/usr/lib/debug/.build-id/*
|
2019-09-30 11:17:08 -04:00
|
|
|
|
2020-01-12 16:28:19 +08:00
|
|
|
%files debugsource
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%dir /usr/src/debug/%{name}-%{version}-%{release}
|
|
|
|
|
/usr/src/debug/%{name}-%{version}-%{release}/*
|
2019-09-30 11:17:08 -04:00
|
|
|
|
|
|
|
|
%changelog
|
2020-06-22 18:20:52 +08:00
|
|
|
* Mon Jun 22 2020 leiju <leiju4@huawei.com> - 15-19
|
|
|
|
|
- fix unaligned point value with GCC9
|
|
|
|
|
|
2020-03-10 11:16:45 +08:00
|
|
|
* Tue Mar 10 2020 openEuler Buildteam <buildteam@openeuler.org> - 15-18
|
|
|
|
|
- fix wrong information
|
|
|
|
|
|
2020-02-24 15:18:21 +08:00
|
|
|
* Mon Feb 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 15-17
|
|
|
|
|
- Remove excess packaged files
|
|
|
|
|
|
2020-02-13 16:52:51 +08:00
|
|
|
* Thu Feb 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 15-16
|
|
|
|
|
- add BuildRequires: gcc
|
|
|
|
|
|
2020-01-12 16:28:19 +08:00
|
|
|
* Sun Jan 12 2020 openEuler Buildteam <buildteam@openeuler.org> - 15-15
|
|
|
|
|
- List debug files
|
|
|
|
|
|
2019-12-13 16:09:03 +08:00
|
|
|
* Tue Nov 27 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-14
|
|
|
|
|
- Remove excess install
|
|
|
|
|
|
|
|
|
|
* Thu Nov 21 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-13
|
|
|
|
|
- Add defination of efi_arch
|
|
|
|
|
|
|
|
|
|
* Mon Nov 18 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-12
|
|
|
|
|
- Add %{bootefi}
|
|
|
|
|
|
|
|
|
|
* Thu Nov 14 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-11
|
|
|
|
|
- Add arch x86_64
|
|
|
|
|
|
2019-09-30 11:17:08 -04:00
|
|
|
* Thu Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-10
|
|
|
|
|
- Add missing BOOTAA64.CSV
|
|
|
|
|
|
|
|
|
|
* Thu Sep 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-9
|
|
|
|
|
- Package init
|
|
|
|
|
|
|
|
|
|
* Tue Sep 24 2019 openEuler Buildteam <buildteam@openeuler.org> - 15-8
|
|
|
|
|
- Package init
|