2012-08-13 15:39:34 +00:00
|
|
|
Name: shim
|
2014-10-14 14:32:16 +00:00
|
|
|
Version: 0.8
|
2014-12-03 17:33:38 +00:00
|
|
|
Release: 2%{?dist}
|
2012-08-13 15:39:34 +00:00
|
|
|
Summary: First-stage UEFI bootloader
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
URL: http://www.codon.org.uk/~mjg59/shim/
|
2014-10-14 14:32:16 +00:00
|
|
|
Source0: https://github.com/mjg59/%{name}/releases/download/%{version}/%{name}-%{version}.tar.bz2
|
2012-10-18 22:32:33 +00:00
|
|
|
Source1: fedora-ca.cer
|
2012-08-13 15:39:34 +00:00
|
|
|
|
2012-11-01 19:33:41 +00:00
|
|
|
# currently here's what's in our dbx:
|
|
|
|
# grub2-efi-2.00-11.fc18.x86_64:
|
|
|
|
# grubx64.efi 6ac839881e73504047c06a1aac0c4763408ecb3642783c8acf77a2d393ea5cd7
|
|
|
|
# gcdx64.efi 065cd63bab696ad2f4732af9634d66f2c0d48f8a3134b8808750d378550be151
|
|
|
|
# grub2-efi-2.00-11.fc19.x86_64:
|
|
|
|
# grubx64.efi 49ece9a10a9403b32c8e0c892fd9afe24a974323c96f2cc3dd63608754bf9b45
|
|
|
|
# gcdx64.efi 99fcaa957786c155a92b40be9c981c4e4685b8c62b408cb0f6cb2df9c30b9978
|
|
|
|
# woops.
|
2014-10-14 14:32:16 +00:00
|
|
|
Source2: dbx.esl
|
2014-12-03 17:33:38 +00:00
|
|
|
Source4: rhtest.cer
|
2012-11-27 01:01:27 +00:00
|
|
|
|
2014-10-14 14:32:16 +00:00
|
|
|
BuildRequires: git openssl-devel openssl
|
2013-06-07 20:56:37 +00:00
|
|
|
BuildRequires: pesign >= 0.106-1
|
2014-10-14 14:32:16 +00:00
|
|
|
BuildRequires: gnu-efi = 3.0w
|
|
|
|
BuildRequires: gnu-efi-devel = 3.0w
|
2012-08-13 15:39:34 +00:00
|
|
|
|
|
|
|
# Shim uses OpenSSL, but cannot use the system copy as the UEFI ABI is not
|
|
|
|
# compatible with SysV (there's no red zone under UEFI) and there isn't a
|
|
|
|
# POSIX-style C library.
|
|
|
|
# BuildRequires: OpenSSL
|
2014-10-14 14:32:16 +00:00
|
|
|
Provides: bundled(openssl) = 0.9.8zb
|
2012-08-13 15:39:34 +00:00
|
|
|
|
|
|
|
# Shim is only required on platforms implementing the UEFI secure boot
|
|
|
|
# protocol. The only one of those we currently wish to support is 64-bit x86.
|
|
|
|
# Adding further platforms will require adding appropriate relocation code.
|
2014-10-14 14:32:16 +00:00
|
|
|
ExclusiveArch: x86_64 aarch64
|
2012-08-13 15:39:34 +00:00
|
|
|
|
2014-12-03 17:33:38 +00:00
|
|
|
%ifarch x86_64
|
|
|
|
%global efiarch x64
|
|
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
|
|
%global efiarch aa64
|
|
|
|
%endif
|
|
|
|
|
2012-08-13 15:45:54 +00:00
|
|
|
# Figure out the right file path to use
|
|
|
|
%if 0%{?rhel}
|
|
|
|
%global efidir redhat
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora}
|
|
|
|
%global efidir fedora
|
|
|
|
%endif
|
|
|
|
|
2012-08-13 15:39:34 +00:00
|
|
|
%description
|
|
|
|
Initial UEFI bootloader that handles chaining to a trusted full bootloader
|
|
|
|
under secure boot environments.
|
|
|
|
|
2012-10-18 19:27:54 +00:00
|
|
|
%package -n shim-unsigned
|
|
|
|
Summary: First-stage UEFI bootloader (unsigned data)
|
|
|
|
|
|
|
|
%description -n shim-unsigned
|
|
|
|
Initial UEFI bootloader that handles chaining to a trusted full bootloader
|
|
|
|
under secure boot environments.
|
|
|
|
|
2012-08-13 15:39:34 +00:00
|
|
|
%prep
|
2013-10-04 21:17:31 +00:00
|
|
|
%setup -q
|
2012-08-14 15:54:28 +00:00
|
|
|
git init
|
2014-10-14 14:32:16 +00:00
|
|
|
git config user.email "%{name}-owner@fedoraproject.org"
|
2012-08-14 15:54:28 +00:00
|
|
|
git config user.name "Fedora Ninjas"
|
|
|
|
git add .
|
|
|
|
git commit -a -q -m "%{version} baseline."
|
2014-12-03 17:33:38 +00:00
|
|
|
git am --ignore-whitespace %{patches} </dev/null
|
2014-10-30 15:05:09 +00:00
|
|
|
git config --unset user.email
|
|
|
|
git config --unset user.name
|
2014-10-14 14:32:16 +00:00
|
|
|
|
2012-08-13 15:39:34 +00:00
|
|
|
%build
|
2012-08-14 15:54:28 +00:00
|
|
|
MAKEFLAGS=""
|
2014-12-03 17:33:38 +00:00
|
|
|
%ifarch aarch64
|
|
|
|
if [ -f "%{SOURCE4}" ]; then
|
|
|
|
MAKEFLAGS="VENDOR_CERT_FILE=%{SOURCE4} VENDOR_DBX_FILE=%{SOURCE2}"
|
|
|
|
fi
|
|
|
|
%else
|
2012-10-18 22:32:33 +00:00
|
|
|
if [ -f "%{SOURCE1}" ]; then
|
2014-10-14 14:32:16 +00:00
|
|
|
MAKEFLAGS="VENDOR_CERT_FILE=%{SOURCE1} VENDOR_DBX_FILE=%{SOURCE2}"
|
2012-08-14 15:54:28 +00:00
|
|
|
fi
|
2014-12-03 17:33:38 +00:00
|
|
|
%endif
|
|
|
|
make 'DEFAULT_LOADER=\\\\grub%{efiarch}.efi' ${MAKEFLAGS} shim.efi MokManager.efi fallback.efi
|
2012-08-13 15:39:34 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2013-06-07 21:17:26 +00:00
|
|
|
pesign -h -P -i shim.efi -h > shim.hash
|
2012-10-18 19:27:54 +00:00
|
|
|
install -D -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/shim/
|
|
|
|
install -m 0644 shim.efi $RPM_BUILD_ROOT%{_datadir}/shim/shim.efi
|
2013-06-07 20:56:37 +00:00
|
|
|
install -m 0644 shim.hash $RPM_BUILD_ROOT%{_datadir}/shim/shim.hash
|
|
|
|
install -m 0644 fallback.efi $RPM_BUILD_ROOT%{_datadir}/shim/fallback.efi
|
|
|
|
install -m 0644 MokManager.efi $RPM_BUILD_ROOT%{_datadir}/shim/MokManager.efi
|
2013-05-14 18:48:41 +00:00
|
|
|
# now install our .debug files...
|
|
|
|
install -D -d -m 0755 $RPM_BUILD_ROOT/usr/lib/debug/%{_datadir}/shim/
|
|
|
|
install -m 0644 shim.efi.debug $RPM_BUILD_ROOT/usr/lib/debug/%{_datadir}/shim/shim.efi.debug
|
|
|
|
install -m 0644 fallback.efi.debug $RPM_BUILD_ROOT/usr/lib/debug/%{_datadir}/shim/fallback.efi.debug
|
2013-06-07 20:56:37 +00:00
|
|
|
install -m 0644 MokManager.efi.debug $RPM_BUILD_ROOT/usr/lib/debug/%{_datadir}/shim/MokManager.efi.debug
|
2012-08-13 15:39:34 +00:00
|
|
|
|
2012-10-18 19:27:54 +00:00
|
|
|
%files -n shim-unsigned
|
2012-08-13 15:39:34 +00:00
|
|
|
%doc
|
2012-10-18 19:27:54 +00:00
|
|
|
%dir %{_datadir}/shim
|
|
|
|
%{_datadir}/shim/*
|
2013-06-07 20:56:37 +00:00
|
|
|
|
2012-08-13 15:39:34 +00:00
|
|
|
%changelog
|
2014-12-03 17:33:38 +00:00
|
|
|
* Wed Dec 03 2014 Peter Jones <pjones@redhat.com> - 0.8-2
|
|
|
|
- Fix bootloader path and whitelist certificates on ARM Aarch64.
|
|
|
|
Resolves: rhbz#1170289
|
|
|
|
|
2014-10-14 14:32:16 +00:00
|
|
|
* Tue Oct 14 2014 Peter Jones <pjones@redhat.com> - 0.8-1
|
|
|
|
- Update to 0.8
|
|
|
|
Related: rhbz#1148230
|
|
|
|
Related: rhbz#1148231
|
|
|
|
Related: rhbz#1148232
|
|
|
|
|
2013-11-06 19:32:15 +00:00
|
|
|
* Wed Nov 06 2013 Peter Jones <pjones@redhat.com> - 0.7-1
|
|
|
|
- Fix logic to handle SetupMode efi variable.
|
|
|
|
|
2013-10-31 15:34:04 +00:00
|
|
|
* Thu Oct 31 2013 Peter Jones <pjones@redhat.com> - 0.6-1
|
2013-10-30 20:45:13 +00:00
|
|
|
- Fix a FreePool(NULL) call on machines too old for SB
|
|
|
|
|
2013-10-04 21:17:31 +00:00
|
|
|
* Fri Oct 04 2013 Peter Jones <pjones@redhat.com> - 0.5-1
|
|
|
|
- Update to 0.5
|
|
|
|
|
2013-06-11 19:13:49 +00:00
|
|
|
* Tue Jun 11 2013 Peter Jones <pjones@redhat.com> - 0.4-1
|
2013-06-11 13:07:34 +00:00
|
|
|
- Update to 0.4
|
|
|
|
|
2013-06-07 18:27:12 +00:00
|
|
|
* Fri Jun 07 2013 Peter Jones <pjones@redhat.com> - 0.3-2
|
2013-06-07 20:56:37 +00:00
|
|
|
- Require gnu-efi-3.0q for now.
|
2013-06-07 18:27:12 +00:00
|
|
|
- Don't allow mmx or sse during compilation.
|
2013-06-07 20:56:37 +00:00
|
|
|
- Re-organize this so all real signing happens in shim-signed instead.
|
|
|
|
- Split out mokutil
|
2013-06-07 18:27:12 +00:00
|
|
|
|
2012-12-12 15:04:14 +00:00
|
|
|
* Wed Dec 12 2012 Peter Jones <pjones@redhat.com> - 0.2-3
|
|
|
|
- Fix mokutil's idea of signature sizes.
|
|
|
|
|
2012-11-28 17:18:07 +00:00
|
|
|
* Wed Nov 28 2012 Matthew Garrett <mjg59@srcf.ucam.org> - 0.2-2
|
|
|
|
- Fix secure_mode() always returning true
|
|
|
|
|
2012-11-27 01:01:27 +00:00
|
|
|
* Mon Nov 26 2012 Matthew Garrett <mjg59@srcf.ucam.org> - 0.2-1
|
|
|
|
- Update shim
|
|
|
|
- Include mokutil
|
|
|
|
- Add debuginfo package since mokutil is a userspace executable
|
|
|
|
|
2012-10-22 15:14:19 +00:00
|
|
|
* Mon Oct 22 2012 Peter Jones <pjones@redhat.com> - 0.1-4
|
2012-10-18 19:27:54 +00:00
|
|
|
- Produce an unsigned shim
|
|
|
|
|
2012-08-14 18:40:17 +00:00
|
|
|
* Tue Aug 14 2012 Peter Jones <pjones@redhat.com> - 0.1-3
|
|
|
|
- Update how embedded cert and signing work.
|
|
|
|
|
2012-08-13 16:48:29 +00:00
|
|
|
* Mon Aug 13 2012 Josh Boyer <jwboyer@redhat.com> - 0.1-2
|
|
|
|
- Add patch to fix image size calculation
|
|
|
|
|
2012-08-13 15:39:34 +00:00
|
|
|
* Mon Aug 13 2012 Matthew Garrett <mjg@redhat.com> - 0.1-1
|
|
|
|
- initial release
|