Blame fwupdate.spec

f5597e4
%global efivar_version 28-1
70ada17
%global efibootmgr_version 13-0.1
f203620
f203620
Name:           fwupdate
f5597e4
Version:        7
70ada17
Release:        1%{?dist}
f203620
Summary:        Tools to manage UEFI firmware updates
f203620
License:        GPLv2+
f203620
URL:            https://github.com/rhinstaller/fwupdate
f203620
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
f203620
BuildRequires:  efivar-devel >= %{efivar_version}
f203620
BuildRequires:  gnu-efi gnu-efi-devel
f203620
BuildRequires:  pesign
fbce87c
BuildRequires:  elfutils popt-devel git gettext pkgconfig
fbce87c
BuildRequires:  systemd
f203620
ExclusiveArch:  x86_64 %{ix86} aarch64
fbce87c
Source0:        https://github.com/rhinstaller/fwupdate/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
f203620
f203620
%ifarch x86_64
f203620
%global efiarch x64
f203620
%endif
f203620
%ifarch %{ix86}
f203620
%global efiarch ia32
f203620
%endif
f203620
%ifarch aarch64
f203620
%global efiarch aa64
f203620
%endif
f203620
f203620
# Figure out the right file path to use
fbce87c
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
f203620
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
f203620
%prep
f203620
%setup -q -n %{name}-%{version}
f203620
git init
f203620
git config user.email "%{name}-owner@fedoraproject.org"
f203620
git config user.name "Fedora Ninjas"
f203620
git add .
f203620
git commit -a -q -m "%{version} baseline."
f203620
git am %{patches} 
f203620
git config --unset user.email
f203620
git config --unset user.name
f203620
f203620
%build
f203620
make OPT_FLAGS="$RPM_OPT_FLAGS" libdir=%{_libdir} bindir=%{_bindir} \
f203620
     EFIDIR=%{efidir} %{?_smp_mflags}
70ada17
mv -v efi/fwup%{efiarch}.efi efi/fwup%{efiarch}.unsigned.efi
70ada17
%pesign -s -i efi/fwup%{efiarch}.unsigned.efi -o efi/fwup%{efiarch}.efi
f203620
f203620
%install
f203620
rm -rf $RPM_BUILD_ROOT
fbce87c
%make_install EFIDIR=%{efidir} libdir=%{_libdir} \
fbce87c
       bindir=%{_bindir} mandir=%{_mandir} localedir=%{_datadir}/locale/ \
fbce87c
       includedir=%{_includedir} libexecdir=%{_libexecdir} \
fbce87c
       datadir=%{_datadir}
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
f203620
%files
f203620
%defattr(-,root,root,-)
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
%defattr(-,root,root,-)
f203620
%doc %{_mandir}/man3/*
f203620
%{_includedir}/*
f203620
%{_libdir}/*.so
f203620
%{_libdir}/pkgconfig/*.pc
f203620
f203620
%files libs
f203620
%defattr(-,root,root,-)
f203620
%{_libdir}/*.so.*
fbce87c
%{_datadir}/locale/en/libfwup.po
fbce87c
%{_unitdir}/fwupdate-cleanup.service
fbce87c
%attr(0755,root,root) %dir %{_datadir}/fwupdate/
fbce87c
%config(noreplace) %ghost %{_datadir}/fwupdate/done
fbce87c
%attr(0755,root,root) %dir %{_libexecdir}/fwupdate/
fbce87c
%{_libexecdir}/fwupdate/cleanup
fbce87c
fbce87c
%files efi
fbce87c
%defattr(-,root,root,-)
fbce87c
%attr(0700,root,root) %dir /boot/efi
fbce87c
%dir /boot/efi/EFI/%{efidir}/
fbce87c
%dir /boot/efi/EFI/%{efidir}/fw/
fbce87c
/boot/efi/EFI/%{efidir}/fwup%{efiarch}.efi
f203620
f203620
%changelog
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.