arrfab / rpms / shim

Forked from rpms/shim 5 years ago
Clone

Blame SPECS/shim.spec

1a3571
# this is to make us only expand %%{dist} if we're on a modularity build.
1a3571
# it's 2 macros make vim's \c not put a brace at the end of the changelog.
1a3571
%global _dist %{expand:%{?_module_build:%%{?dist}}}
1a3571
%global dist %{expand:%%{_dist}}
1a3571
1a3571
Name:		shim
1a3571
Version:	15
a82719
Release:	8%{?dist}
1a3571
Summary:	First-stage UEFI bootloader
1a3571
License:	BSD
1a3571
URL:		https://github.com/rhboot/shim/
1a3571
BuildRequires:	efi-filesystem
1a3571
BuildRequires:	efi-srpm-macros >= 3-2
1a3571
1a3571
ExclusiveArch:	%{efi}
1a3571
# but we don't build a .i686 package, just a shim-ia32.x86_64 package
1a3571
ExcludeArch:	%{ix86}
1a3571
# and we don't have shim-unsigned-arm builds *yet*
1a3571
ExcludeArch:	%{arm}
1a3571
1a3571
Source0:	shim.rpmmacros
1a3571
Source1:	secureboot.cer
1a3571
Source2:	securebootca.cer
1a3571
1a3571
# keep these two lists of sources synched up arch-wise.  That is 0 and 10
1a3571
# match, 1 and 11 match, ...
1a3571
Source10:	BOOTAA64.CSV
1a3571
Source20:	shimaa64.efi
1a3571
Source11:	BOOTIA32.CSV
1a3571
Source21:	shimia32.efi
1a3571
Source12:	BOOTX64.CSV
1a3571
Source22:	shimx64.efi
1a3571
#Source13:	BOOTARM.CSV
1a3571
#Source23:	shimarm.efi
1a3571
1a3571
%include %{SOURCE0}
1a3571
1a3571
BuildRequires:	pesign >= 0.112-20.fc27
1a3571
# We need this because %%{efi} won't expand before choosing where to make
1a3571
# the src.rpm in koji, and we could be on a non-efi architecture, in which
1a3571
# case we won't have a valid expansion here...  To be solved in the future
1a3571
# (shim 16+) by making the unsigned packages all provide "shim-unsigned", so
1a3571
# we can just BuildRequires that.
1a3571
%ifarch x86_64
1a3571
BuildRequires:	%{unsignedx64} = %{shimverx64}
1a3571
BuildRequires:	%{unsignedia32} = %{shimveria32}
1a3571
%endif
1a3571
%ifarch aarch64
1a3571
BuildRequires:	%{unsignedaa64} = %{shimveraa64}
1a3571
%endif
1a3571
#%%ifarch arm
1a3571
#BuildRequires:	%%{unsignedarm} = %%{shimverarm}
1a3571
#%%endif
1a3571
1a3571
%description
1a3571
Initial UEFI bootloader that handles chaining to a trusted full bootloader
1a3571
under secure boot environments. This package contains the version signed by
1a3571
the UEFI signing service.
1a3571
1a3571
%define_pkg -a %{efi_arch} -p 1
1a3571
%if %{efi_has_alt_arch}
1a3571
%define_pkg -a %{efi_alt_arch}
1a3571
%endif
1a3571
1a3571
%prep
1a3571
cd %{_builddir}
1a3571
rm -rf shim-%{version}
1a3571
mkdir shim-%{version}
1a3571
1a3571
%build
1a3571
1a3571
cd shim-%{version}
1a3571
%if %{efi_has_alt_arch}
1a3571
%define_build -a %{efi_alt_arch} -A %{efi_alt_arch_upper} -i %{shimefialt} -b yes -c %{is_alt_signed} -d %{shimdiralt}
1a3571
%endif
1a3571
%define_build -a %{efi_arch} -A %{efi_arch_upper} -i %{shimefi} -b yes -c %{is_signed} -d %{shimdir}
1a3571
1a3571
%install
1a3571
rm -rf $RPM_BUILD_ROOT
1a3571
cd shim-%{version}
1a3571
install -D -d -m 0755 $RPM_BUILD_ROOT/boot/
1a3571
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_root}/
1a3571
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_efi}/
1a3571
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_dir}/
1a3571
install -D -d -m 0700 $RPM_BUILD_ROOT%{efi_esp_boot}/
1a3571
1a3571
%do_install -a %{efi_arch} -A %{efi_arch_upper} -b %{bootcsv}
1a3571
%if %{efi_has_alt_arch}
1a3571
%do_install -a %{efi_alt_arch} -A %{efi_alt_arch_upper} -b %{bootcsvalt}
1a3571
%endif
1a3571
1a3571
%if %{provide_legacy_shim}
1a3571
install -m 0700 %{shimefi} $RPM_BUILD_ROOT%{efi_esp_dir}/shim.efi
1a3571
%endif
1a3571
1a3571
( cd $RPM_BUILD_ROOT ; find .%{efi_esp_root} -type f ) \
1a3571
  | sed -e 's/\./\^/' -e 's,^\\\./,.*/,' -e 's,$,$,' > %{__brp_mangle_shebangs_exclude_from_file}
1a3571
1a3571
%define_files -a %{efi_arch} -A %{efi_arch_upper}
1a3571
%if %{efi_has_alt_arch}
1a3571
%define_files -a %{efi_alt_arch} -A %{efi_alt_arch_upper}
1a3571
%endif
1a3571
1a3571
%if %{provide_legacy_shim}
1a3571
%{efi_esp_dir}/shim.efi
1a3571
%endif
1a3571
1a3571
%changelog
a82719
* Fri Apr 12 2019 Javier Martinez Canillas <javierm@redhat.com> - 15-8
a82719
- Rebuild with correct target
a82719
  Resolves: rhbz#1690270
a82719
a82719
* Fri Apr 12 2019 Peter Jones <pjones@redhat.com> - 15-7
a82719
- Rebuild in rhel-8.0.0-...
a82719
  Resolves: rhbz#1690270
a82719
a82719
* Thu Mar 14 2019 Peter Jones <pjones@redhat.com> - 15-6
a82719
- Fix MoK mirroring issue which breaks kdump without intervention
a82719
  Resolves: rhbz#1668966
a82719
1a3571
* Thu Jan 24 2019 Peter Jones <pjones@redhat.com> - 15-5
1a3571
- Rebuild for signing once again. If the signer actually works, then:
1a3571
  Resolves: rhbz#1620941
1a3571
1a3571
* Tue Oct 16 2018 Peter Jones <pjones@redhat.com> - 15-4
1a3571
- Rebuild for signing
1a3571
  Resolves: rhbz#1620941
1a3571
1a3571
* Mon Aug 13 2018 Troy Dawson <tdawson@redhat.com>
1a3571
- Release Bumped for el8 Mass Rebuild
1a3571
1a3571
* Sat Aug 11 2018 Troy Dawson <tdawson@redhat.com>
1a3571
- Release Bumped for el8+8 Mass Rebuild
1a3571
1a3571
* Mon Jul 23 2018 Peter Jones <pjones@redhat.com> - 15-1
1a3571
- Build for RHEL 8