Blame fwupdate.spec

8f9c94c
%global efivar_version 35-3
8f9c94c
%global efibootmgr_version 16-3
8f9c94c
%global gnu_efi_version 3.0.8-4
8f9c94c
%global efi_macros_version 3-2
ad6ef38
%undefine _debuginfo_subpackages
f203620
f203620
Name:           fwupdate
c00f9b0
Version:        11
f51524a
Release:        5%{?dist}
f203620
Summary:        Tools to manage UEFI firmware updates
f203620
License:        GPLv2+
8f9c94c
URL:            https://github.com/rhboot/fwupdate
f203620
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
8f9c94c
Requires:       efi-filesystem
cf5fd57
BuildRequires:  gcc
8f9c94c
BuildRequires:  efi-srpm-macros >= %{efi_macros_version}
8f9c94c
BuildRequires:  efi-filesystem
f203620
BuildRequires:  efivar-devel >= %{efivar_version}
ffab5db
BuildRequires:  gnu-efi >= %{gnu_efi_version}
ffab5db
BuildRequires:  gnu-efi-devel >= %{gnu_efi_version}
f203620
BuildRequires:  pesign
fbce87c
BuildRequires:  elfutils popt-devel git gettext pkgconfig
3775b01
BuildRequires:  systemd
6f8acf7
BuildRequires:  libabigail
ad6ef38
%ifarch x86_64
3775b01
BuildRequires: libsmbios-devel
3775b01
%endif
8f9c94c
ExclusiveArch:  %{efi}
2cae1ce
ExcludeArch:    %{arm}
8f9c94c
Source0:        https://github.com/rhboot/fwupdate/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
23cd556
Source1:        find-debuginfo-efi.sh
8f9c94c
Patch0001:      0001-Update-arch-names-for-gnu-efi-3.0.8-3.fc29.patch
f203620
23cd556
%global __os_install_post %{expand:\
23cd556
  %{?__debug_package:%{__debug_install_post}} \
23cd556
  %{SOURCE1} \
23cd556
  %{__arch_install_post} \
23cd556
  %{__os_install_post} \
23cd556
  %{nil}}%{nil}
23cd556
f203620
%description
f203620
fwupdate provides a simple command line interface to the UEFI firmware updates.
f203620
f203620
%package libs
f203620
Summary: Library to manage UEFI firmware updates
b08c84f
%ifnarch %{ix86}
47c99a0
Requires: shim
b08c84f
%endif
47c99a0
Requires: %{name}-efi = %{version}-%{release}
f203620
f203620
%description libs
f203620
Library to allow for the simple manipulation of UEFI firmware updates.
f203620
f203620
%package devel
f203620
Summary: Development headers for libfwup
f203620
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
f203620
Requires: efivar-devel >= %{efivar_version}
f203620
f203620
%description devel
f203620
development headers required to use libfwup.
f203620
fbce87c
%package efi
fbce87c
Summary: UEFI binaries used by libfwup
fbce87c
Requires: %{name}-libs = %{version}-%{release}
fbce87c
fbce87c
%description efi
fbce87c
UEFI binaries used by libfwup.
fbce87c
ad6ef38
%package efi-debuginfo
ad6ef38
Summary: debuginfo for UEFI binaries used by libfwup
ad6ef38
Requires: %{name}-efi = %{version}-%{release}
ad6ef38
AutoReq: 0
ad6ef38
AutoProv: 1
ad6ef38
ad6ef38
%description efi-debuginfo
ad6ef38
debuginfo for UEFI binaries used by libfwup.
ad6ef38
f203620
%prep
8f9c94c
%autosetup -S git
8f9c94c
mkdir build-%{efi_arch}
8f9c94c
%if %{efi_has_alt_arch}
8f9c94c
        mkdir build-%{efi_alt_arch}
ad6ef38
%endif
8f9c94c
git config --local --add fwupdate.efidir %{efi_vendor}
f203620
f203620
%build
8f9c94c
cd build-%{efi_arch}
8f9c94c
%make_build -f ../Makefile \
8f9c94c
        TOPDIR=.. OPT_FLAGS="$RPM_OPT_FLAGS" \
8f9c94c
        libdir=%{_libdir} bindir=%{_bindir} \
8f9c94c
        EFIDIR=%{efi_vendor}
8f9c94c
mv -v efi/fwup%{efi_arch}.efi efi/fwup%{efi_arch}.unsigned.efi
8f9c94c
%pesign -s -i efi/fwup%{efi_arch}.unsigned.efi -o efi/fwup%{efi_arch}.efi
ad6ef38
cd ..
ad6ef38
8f9c94c
%if %{efi_has_alt_arch}
8f9c94c
        cd build-%{efi_alt_arch}
8f9c94c
        setarch linux32 -B %make_build -f ../Makefile \
8f9c94c
                TOPDIR=.. ARCH=%{efi_alt_arch} \
8f9c94c
                OPT_FLAGS="$RPM_OPT_FLAGS" \
8f9c94c
                libdir=%{_libdir} bindir=%{_bindir} \
8f9c94c
                EFIDIR=%{efi_vendor}
8f9c94c
        mv -v efi/fwup%{efi_alt_arch}.efi efi/fwup%{efi_alt_arch}.unsigned.efi
8f9c94c
        %pesign -s -i efi/fwup%{efi_alt_arch}.unsigned.efi -o efi/fwup%{efi_alt_arch}.efi
8f9c94c
        cd ..
ad6ef38
%endif
f203620
f203620
%install
f203620
rm -rf $RPM_BUILD_ROOT
8f9c94c
cd build-%{efi_arch}
8f9c94c
%make_install -f ../Makefile \
8f9c94c
        TOPDIR=.. RPMARCH=%{_arch} RELEASE=%{RELEASE} \
8f9c94c
        libdir=%{_libdir} bindir=%{_bindir} mandir=%{_mandir} \
8f9c94c
        localedir=%{_datadir}/locale/ includedir=%{_includedir} \
8f9c94c
        libexecdir=%{_libexecdir} datadir=%{_datadir} \
8f9c94c
        sharedstatedir=%{_sharedstatedir}
ad6ef38
cd ..
ad6ef38
8f9c94c
%if %{efi_has_alt_arch}
8f9c94c
        cd build-%{efi_alt_arch}
8f9c94c
        setarch linux32 -B %make_install -f ../Makefile \
8f9c94c
                ARCH=%{efi_alt_arch} TOPDIR=.. \
8f9c94c
                EFIDIR=%{efi_vendor} RPMARCH=%{_arch} \
8f9c94c
                RELEASE=%{RELEASE} libdir=%{_libdir} \
8f9c94c
                bindir=%{_bindir} mandir=%{_mandir} \
8f9c94c
                localedir=%{_datadir}/locale/ \
8f9c94c
                includedir=%{_includedir} \
8f9c94c
                libexecdir=%{_libexecdir} \
8f9c94c
                datadir=%{_datadir} \
8f9c94c
                sharedstatedir=%{_sharedstatedir}
8f9c94c
        cd ..
ad6ef38
%endif
fbce87c
fbce87c
%post libs
fbce87c
/sbin/ldconfig
fbce87c
%systemd_post fwupdate-cleanup.service
f203620
fbce87c
%preun libs
fbce87c
%systemd_preun fwupdate-cleanup.service
f203620
fbce87c
%postun libs
fbce87c
/sbin/ldconfig
fbce87c
%systemd_postun_with_restart pesign.service
f203620
6f8acf7
%check
6f8acf7
%ifarch x86_64
6f8acf7
make abicheck
6f8acf7
%endif
6f8acf7
f203620
%files
f203620
%{!?_licensedir:%global license %%doc}
f203620
%license COPYING
f203620
# %%doc README
f203620
%{_bindir}/fwupdate
fbce87c
%{_datadir}/locale/en/fwupdate.po
f203620
%doc %{_mandir}/man1/*
fbce87c
%dir %{_datadir}/bash-completion/completions
fbce87c
%{_datadir}/bash-completion/completions/fwupdate
f203620
f203620
%files devel
f203620
%doc %{_mandir}/man3/*
f203620
%{_includedir}/*
f203620
%{_libdir}/*.so
f203620
%{_libdir}/pkgconfig/*.pc
f203620
f203620
%files libs
f203620
%{_libdir}/*.so.*
fbce87c
%{_datadir}/locale/en/libfwup.po
fbce87c
%{_unitdir}/fwupdate-cleanup.service
ad6ef38
%attr(0755,root,root) %dir %{_sharedstatedir}/fwupdate/
ad6ef38
%config(noreplace) %ghost %{_sharedstatedir}/fwupdate/done
fbce87c
%attr(0755,root,root) %dir %{_libexecdir}/fwupdate/
fbce87c
%{_libexecdir}/fwupdate/cleanup
fbce87c
fbce87c
%files efi
8f9c94c
%dir %attr(0700,root,root) %{efi_esp_dir}/fw/
8f9c94c
%attr (0700,root,root) %{efi_esp_dir}/fwup%{efi_arch}.efi
8f9c94c
%if %{efi_has_alt_arch}
8f9c94c
%attr (0700,root,root) %{efi_esp_dir}/fwup%{efi_alt_arch}.efi
ad6ef38
%endif
23cd556
23cd556
%files efi-debuginfo -f debugfiles-efi.list
23cd556
f203620
%changelog
f51524a
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 11-5
f51524a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
f51524a
5760fe0
* Wed Aug 08 2018 Peter Jones <pjones@redhat.com> - 11-4
5760fe0
- Fix the completely broken -3 build that shouldn't have been allowed at
5760fe0
  all.
5760fe0
beca998
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org>
beca998
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
beca998
8f9c94c
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 11-2
8f9c94c
- Use efi-rpm-macros instead of defining all the efi macros ourselves
8f9c94c
c00f9b0
* Mon Apr 09 2018 Peter Jones <pjones@redhat.com> - 11-1
c00f9b0
- Update to fwupdate 11
c00f9b0
3c8b4fe
* Thu Mar 01 2018 Peter Jones <pjones@redhat.com> - 10-6
3c8b4fe
- Fix fwup.pc
3c8b4fe
cf5411d
* Tue Feb 27 2018 Peter Jones <pjones@redhat.com> - 10-5
cf5411d
- Rebuild because I forgot to make sure efivar-34 was already in the
cf5411d
  buildroot.
cf5411d
8c91034
* Tue Feb 27 2018 Peter Jones <pjones@redhat.com> - 10-4
8c91034
- Roll in some bugfixes that'll be in fwupdate-11 upstream.
8c91034
  This helps fix a couple of vendors machines.
8c91034
8d153c7
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 10-3
8d153c7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
8d153c7
04bd280
* Thu Jan 18 2018 Peter Jones <pjones@redhat.com> - 10-2
04bd280
- Make really sure everything in /boot/efi is 0700 so we don't conflict with
04bd280
  the grub packages.
04bd280
72990dd
* Mon Jan 08 2018 Peter Jones <pjones@redhat.com> - 10-1
72990dd
- Update to the final released version 10.
b38bd42
- Make everything under /boot/efi be mode 0700, since that's what FAT will
b38bd42
  show anyway.
b38bd42
6f8acf7
* Tue Sep 12 2017 Peter Jones <pjones@redhat.com> - 10-0.2
6f8acf7
- Update for version 10
6f8acf7
- test release for ux capsule support; to enable UX capsules define
6f8acf7
  LIBFWUP_ADD_UX_CAPSULE=1 in your environment.
6f8acf7
ffab5db
* Thu Aug 24 2017 Peter Jones <pjones@redhat.com> - 9-0.2
ffab5db
- Rebuild for aarch64 .reloc fix.
ffab5db
ad6ef38
* Tue Aug 22 2017 Peter Jones <pjones@redhat.com> - 9-0.1
ad6ef38
- Update to fwupdate 9
ad6ef38
- Support ia32
ad6ef38
7b27fa7
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8-7
7b27fa7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
7b27fa7
23cd556
* Wed Jul 26 2017 Peter Jones <pjones@redhat.com> - 8-6
23cd556
- Try to make debuginfo generation work with rpm-4.13.0.1-38.fc27.x86_64
23cd556
106b34e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8-5
106b34e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
106b34e
da2f6d0
* Sat Jul 08 2017 Peter Jones <pjones@redhat.com> - 8-4
da2f6d0
- Rebuild for efivar-31-1.fc26
da2f6d0
  Related: rhbz#1468841
703d339
- Fix some gcc 7 quirks
da2f6d0
ebfd83e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 8-3
ebfd83e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ebfd83e
14d3446
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 8-2
14d3446
- Rebuild for efivar 30.
14d3446
3775b01
* Fri Aug 19 2016 Peter Jones <pjones@redhat.com> - 8-1
3775b01
- Update to fwupdate 8
3775b01
- Fix some i686 build errors
3775b01
- Be less stupid about SONAMEs so in the future we'll only have to rebuild
3775b01
  dependent things on actual ABI changes.
3775b01
- Only depend on libsmbios on x86, for now, because it hasn't been ported to
3775b01
  Aarch64.
3775b01
f5597e4
* Wed Aug 17 2016 Peter Jones <pjones@redhat.com> - 7-1
f5597e4
- Update to fwupdate 7
f5597e4
- Fix the fix for ae7b85
f5597e4
- fix one place where a second "rc" varibale is clobbering a result.
f5597e4
70ada17
* Tue Aug 16 2016 Peter Jones <pjones@redhat.com> - 6-1
70ada17
- Update to fwupdate 6
70ada17
- lots of build fixes for newer compilers and such
70ada17
- Use libsmbios on some systems to enable firmware updates (Mario Limonciello)
70ada17
- Use the correct reset type from the QueryCapsuleInfo data
70ada17
- Lots of fixes from auditing
70ada17
- Use efivar's error reporting infrastructure
70ada17
8e4b4ab
* Fri Aug 12 2016 Adam Williamson <awilliam@redhat.com> - 0.5-5
8e4b4ab
- backport a couple of commits to fix build against efivar 26
8e4b4ab
33081a3
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-4
33081a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
33081a3
b08c84f
* Wed Nov 18 2015 Peter Jones <pjones@redhat.com> - 0.5-3
b08c84f
- Temporarily don't require shim on i?86 - we've never built it there, and
b08c84f
  libfwup knows how to handle it not being there just fine.
b08c84f
47c99a0
* Wed Nov 18 2015 Peter Jones <pjones@redhat.com> - 0.5-2
47c99a0
- Fix missing -libs Requires: due to editing error
47c99a0
fbce87c
* Wed Nov 18 2015 Peter Jones <pjones@redhat.com> - 0.5-1
fbce87c
- Rebase to 0.5
fbce87c
- Highlights in 0.5:
fbce87c
  - fwupdate.efi is called fwup$EFI_ARCH.efi now so weird platforms can have
fbce87c
    them coexist.  "Platform" here might mean "distro tools that care about
fbce87c
    multilib".  Anyway, it's needed to support things like baytrail.
fbce87c
  - Worked around shim command line bug where we need to treat LOAD_OPTIONS
fbce87c
    differently if we're invoked from the shell vs BDS
fbce87c
  - various debug features - SHIM_DEBUG and FWUPDATE_VERBOSE UEFI variables
fbce87c
    that'll let you get some debugging info some times
fbce87c
  - oh yeah, the actual debuginfo is useful
fbce87c
  - Automatically cleans up old instances on fresh OS installs
fbce87c
  - valgrind --leak-check=full on fwupdate doesn't show any errors at all
fbce87c
  - covscan shows only two things; one *really* doesn't matter, the other is
fbce87c
    because it doesn't understand our firmware variable data structure and
fbce87c
    can't work out that we have guaranteed the length of some data in a code
fbce87c
    path it isn't considering.
fbce87c
  - fwup_set_up_update() API improvements
fbce87c
  - killed fwup_sterror() and friends entirely
fbce87c
  - Should work on x64, ia32, and aarch64.
fbce87c
c5227a7
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
c5227a7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c5227a7
dbe4279
* Tue Jun 02 2015 Peter Jones <pjones@redhat.com> - 0.4-1
dbe4279
- Update to 0.4
dbe4279
- Set DESTDIR so it's more consistently respected
dbe4279
- Always use upper case for Boot#### names.
dbe4279
- Create abbreviated device paths for our BootNext entry.
dbe4279
- Make subdir Makefiles get the version right.
dbe4279
- Fix ucs2len() to handle max=-1 correctly.
dbe4279
- Compare the right blobs when we're searching old boot entries.
dbe4279
- Fix .efi generation on non-x86 platforms.
dbe4279
- Use a relative path for fwupdate.efi when launched from shim.
dbe4279
- Show fewer debugging messages.
dbe4279
- Set BootNext when we find an old Boot#### variable as well.
dbe4279
- Add fwup_get_fw_type().
dbe4279
6ef9f7c
* Mon Jun 01 2015 Peter Jones <pjones@redhat.com> - 0.3-4
6ef9f7c
- Make abbreviated device paths work in the BootNext entry.
6ef9f7c
- Fix a ucs2 parsing bug.
6ef9f7c
6ef9f7c
* Mon Jun 01 2015 Peter Jones <pjones@redhat.com> - 0.3-3
6ef9f7c
- Always use abbreviated device paths for Boot#### entries.
6ef9f7c
7dbc96f
* Mon Jun 01 2015 Peter Jones <pjones@redhat.com> - 0.3-2
7dbc96f
- Fix boot entry naming.
7dbc96f
f203620
* Thu May 28 2015 Peter Jones <pjones@redhat.com> - 0.3-1
f203620
- Here we go again.
ad6ef38
ad6ef38
# vim:expandtab