Blame SPECS/fwupdate.spec

f656dd
%global efivar_version 36-1
f656dd
%global efibootmgr_version 17-1
f656dd
%global gnu_efi_version 1:3.0.8-1
f656dd
%global pesign_version 0.109-10
f656dd
f656dd
Name:           fwupdate
f656dd
Version:        12
f656dd
Release:        5%{?dist}
f656dd
Summary:        Tools to manage UEFI firmware updates
f656dd
License:        GPLv2+
f656dd
URL:            https://github.com/rhinstaller/fwupdate
f656dd
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
f656dd
BuildRequires:  efivar-devel >= %{efivar_version}
f656dd
BuildRequires:  gnu-efi >= %{gnu_efi_version}
f656dd
BuildRequires:  gnu-efi-devel >= %{gnu_efi_version}
f656dd
BuildRequires:  pesign >= %{pesign_version}
f656dd
BuildRequires:  elfutils popt-devel git gettext pkgconfig
f656dd
BuildRequires:  systemd
f656dd
ExclusiveArch:  x86_64 aarch64
f656dd
Source0:        https://github.com/rhinstaller/fwupdate/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
f656dd
Source1:        securebootca.cer
f656dd
Source2:        secureboot.cer
f656dd
Patch0001: 0001-Make-some-compiler-versions-ignore-missing-field-ini.patch
f656dd
Patch0002: 0002-libfwup-set_up_boot_next-make-sure-we-check-if-our-f.patch
f656dd
Patch0003: 0003-Actually-add-fwup_version-to-our-exposed-API-list.patch
f656dd
f656dd
%ifarch x86_64
f656dd
%global efiarch x64
f656dd
%endif
f656dd
%ifarch aarch64
f656dd
%global efiarch aa64
f656dd
%endif
f656dd
f656dd
# Figure out the right file path to use
f656dd
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
f656dd
f656dd
%description
f656dd
fwupdate provides a simple command line interface to the UEFI firmware updates.
f656dd
f656dd
%package libs
f656dd
Summary: Library to manage UEFI firmware updates
f656dd
Requires: %{name}-efi = %{version}-%{release}
f656dd
f656dd
%description libs
f656dd
Library to allow for the simple manipulation of UEFI firmware updates.
f656dd
f656dd
%package devel
f656dd
Summary: Development headers for libfwup
f656dd
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
f656dd
Requires: efivar-devel >= %{efivar_version}
f656dd
f656dd
%description devel
f656dd
development headers required to use libfwup.
f656dd
f656dd
%package efi
f656dd
Summary: UEFI binaries used by libfwup
f656dd
Requires: shim
f656dd
f656dd
%description efi
f656dd
UEFI binaries used by libfwup.
f656dd
f656dd
%prep
f656dd
%setup -q -n %{name}-%{version}
f656dd
git init
f656dd
git config user.email "%{name}-owner@fedoraproject.org"
f656dd
git config user.name "Fedora Ninjas"
f656dd
git add .
f656dd
git commit -a -q -m "%{version} baseline."
f656dd
git am %{patches} 
f656dd
git config --unset user.email
f656dd
git config --unset user.name
f656dd
f656dd
%build
f656dd
git config --local --add fwupdate.efidir '%{efidir}'
f656dd
%ifarch x86_64
f656dd
setarch linux32 -B make CFLAGS="$RPM_OPT_FLAGS" libdir=%{_libdir} \
f656dd
        bindir=%{_bindir} EFIDIR=%{efidir} %{?_smp_mflags} \
f656dd
        SUBDIRS=efi ARCH=ia32
f656dd
mv -v efi/fwupia32.efi fwupia32.unsigned.efi
f656dd
%pesign -s -i fwupia32.unsigned.efi -o fwupia32.efi -a %{SOURCE1} -c %{SOURCE2} -n redhatsecureboot301
f656dd
make clean
f656dd
%endif
f656dd
make CFLAGS="$RPM_OPT_FLAGS" libdir=%{_libdir} bindir=%{_bindir} \
f656dd
     EFIDIR=%{efidir} %{?_smp_mflags}
f656dd
mv -v efi/fwup%{efiarch}.efi efi/fwup%{efiarch}.unsigned.efi
f656dd
%pesign -s -i efi/fwup%{efiarch}.unsigned.efi -o efi/fwup%{efiarch}.efi -a %{SOURCE1} -c %{SOURCE2} -n redhatsecureboot301
f656dd
f656dd
%install
f656dd
rm -rf $RPM_BUILD_ROOT
f656dd
install -d -m 0755 $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/
f656dd
%make_install EFIDIR=%{efidir} libdir=%{_libdir} \
f656dd
       bindir=%{_bindir} mandir=%{_mandir} localedir=%{_datadir}/locale/ \
f656dd
       includedir=%{_includedir} libexecdir=%{_libexecdir} \
f656dd
       datadir=%{_datadir}
f656dd
%ifarch x86_64
f656dd
mv fwupia32.efi $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/
f656dd
%endif
f656dd
f656dd
%ifnarch %{ix86}
f656dd
%post libs
f656dd
/sbin/ldconfig
f656dd
%systemd_post fwupdate-cleanup.service
f656dd
f656dd
%preun libs
f656dd
%systemd_preun fwupdate-cleanup.service
f656dd
f656dd
%postun libs
f656dd
/sbin/ldconfig
f656dd
%systemd_postun_with_restart pesign.service
f656dd
f656dd
%files
f656dd
%defattr(-,root,root,-)
f656dd
%{!?_licensedir:%global license %%doc}
f656dd
%license COPYING
f656dd
# %%doc README
f656dd
%{_bindir}/fwupdate
f656dd
%{_datadir}/locale/en/fwupdate.po
f656dd
%doc %{_mandir}/man1/*
f656dd
%dir %{_datadir}/bash-completion/completions
f656dd
%{_datadir}/bash-completion/completions/fwupdate
f656dd
f656dd
%files devel
f656dd
%defattr(-,root,root,-)
f656dd
%doc %{_mandir}/man3/*
f656dd
%{_includedir}/*
f656dd
%{_libdir}/*.so
f656dd
%{_libdir}/pkgconfig/*.pc
f656dd
f656dd
%files libs
f656dd
%defattr(-,root,root,-)
f656dd
%{_libdir}/*.so.*
f656dd
%{_datadir}/locale/en/libfwup.po
f656dd
%{_unitdir}/fwupdate-cleanup.service
f656dd
%attr(0755,root,root) %dir %{_sharedstatedir}/fwupdate/
f656dd
%config(noreplace) %ghost %{_sharedstatedir}/fwupdate/done
f656dd
%attr(0755,root,root) %dir %{_libexecdir}/fwupdate/
f656dd
%{_libexecdir}/fwupdate/cleanup
f656dd
%endif
f656dd
f656dd
%files efi
f656dd
%defattr(-,root,root,-)
f656dd
%dir %attr(0700,root,root) %dir /boot/efi
f656dd
%dir %attr(0700,root,root)/boot/efi/EFI/%{efidir}/
f656dd
%dir %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fw/
f656dd
%attr(0700,root,root)/boot/efi/EFI/%{efidir}/fwup*.efi
f656dd
f656dd
%changelog
f656dd
* Thu Jun 28 2018 Peter Jones <pjones@redhat.com> - 12-5
f656dd
- Make sure fwup_version() gets exported correctly.
f656dd
  Related: rhbz#1570032
f656dd
f656dd
* Thu Jun 21 2018 Peter Jones <pjones@redhat.com> - 12-4
f656dd
- Fix permissions on /boot/efi/...
f656dd
  Related: rhbz#1496952
f656dd
f656dd
* Thu Jun 14 2018 Peter Jones <pjones@redhat.com> - 12-3
f656dd
- Fix some more covscan nits.
f656dd
  Related: rhbz#1570032
f656dd
f656dd
* Wed Jun 13 2018 Peter Jones <pjones@redhat.com> - 12-2
f656dd
- Fix some covscan nits.
f656dd
  Related: rhbz#1570032
f656dd
f656dd
* Mon Jun 11 2018 Peter Jones <pjones@redhat.com> - 12-1
f656dd
- Update to fwupdate-12
f656dd
  Resolves: rhbz#1570032
f656dd
f656dd
* Fri May 19 2017 Peter Jones <pjones@redhat.com> - 9-8
f656dd
- Hopefully the last TPS related rebuild.
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Fri May 19 2017 Peter Jones <pjones@redhat.com> - 9-7
f656dd
- One more TPS related rebuild...
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Wed May 17 2017 Peter Jones <pjones@redhat.com> - 9-6
f656dd
- Rebuild to make some dependencies versioned, in order to make TPS's really
f656dd
  broken builder setup work.
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Tue May 09 2017 Peter Jones <pjones@redhat.com> - 9-5
f656dd
- Fix some more coverity issues
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Mon May 08 2017 Peter Jones <pjones@redhat.com> - 9-4
f656dd
- Fix some more coverity issues
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Mon Apr 03 2017 Peter Jones <pjones@redhat.com> - 9-3
f656dd
- Fix CFLAGS on make invocation
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Tue Mar 28 2017 Peter Jones <pjones@redhat.com> - 9-2
f656dd
- Fix a pile of coverity issues.
f656dd
  Related: rhbz#1380825
f656dd
f656dd
* Mon Mar 13 2017 Peter Jones <pjones@redhat.com> - 9-1
f656dd
- First build in RHEL 7
f656dd
  Resolves: rhbz#1380825