1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
|
%global efivar_version 28-1
%global efibootmgr_version 13-1
Name: fwupdate
Version: @@VERSION@@
Release: 1%{?dist}
Summary: Tools to manage UEFI firmware updates
License: GPLv2+
URL: https://github.com/rhinstaller/fwupdate
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
BuildRequires: efivar-devel >= %{efivar_version}
BuildRequires: gnu-efi gnu-efi-devel
BuildRequires: pesign
BuildRequires: elfutils popt-devel git gettext pkgconfig
BuildRequires: systemd
%ifarch x86_64 %{ix86}
BuildRequires: libsmbios-devel
%endif
ExclusiveArch: x86_64 %{ix86} aarch64
Source0: https://github.com/rhinstaller/fwupdate/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
%ifarch x86_64
%global efiarch x64
%endif
%ifarch %{ix86}
%global efiarch ia32
%endif
%ifarch aarch64
%global efiarch aa64
%endif
# Figure out the right file path to use
%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
%description
fwupdate provides a simple command line interface to the UEFI firmware updates.
%package libs
Summary: Library to manage UEFI firmware updates
Requires: shim
Requires: %{name}-efi = %{version}-%{release}
%description libs
Library to allow for the simple manipulation of UEFI firmware updates.
%package devel
Summary: Development headers for libfwup
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: efivar-devel >= %{efivar_version}
%description devel
development headers required to use libfwup.
%package efi
Summary: UEFI binaries used by libfwup
Requires: %{name}-libs = %{version}-%{release}
%description efi
UEFI binaries used by libfwup.
%prep
%setup -q -n %{name}-%{version}
git init
git config user.email "%{name}-owner@fedoraproject.org"
git config user.name "Fedora Ninjas"
git add .
git commit -a -q -m "%{version} baseline."
git am %{patches} </dev/null
git config --unset user.email
git config --unset user.name
%build
make OPT_FLAGS="$RPM_OPT_FLAGS" libdir=%{_libdir} bindir=%{_bindir} \
EFIDIR=%{efidir} %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%make_install EFIDIR=%{efidir} libdir=%{_libdir} \
bindir=%{_bindir} mandir=%{_mandir} localedir=%{_datadir}/locale/ \
includedir=%{_includedir} libexecdir=%{_libexecdir} \
datadir=%{_datadir}
%post libs
/sbin/ldconfig
%systemd_post fwupdate-cleanup.service
%preun libs
%systemd_preun fwupdate-cleanup.service
%postun libs
/sbin/ldconfig
%systemd_postun_with_restart pesign.service
%files
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license COPYING
# %%doc README
%{_bindir}/fwupdate
%{_datadir}/locale/en/fwupdate.po
%doc %{_mandir}/man1/*
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/fwupdate
%files devel
%defattr(-,root,root,-)
%doc %{_mandir}/man3/*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%files libs
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%{_datadir}/locale/en/libfwup.po
%{_unitdir}/fwupdate-cleanup.service
%attr(0755,root,root) %dir %{_datadir}/fwupdate/
%config(noreplace) %ghost %{_datadir}/fwupdate/done
%attr(0755,root,root) %dir %{_libexecdir}/fwupdate/
%{_libexecdir}/fwupdate/cleanup
%files efi
%defattr(-,root,root,-)
%attr(0700,root,root) %dir /boot/efi
%dir /boot/efi/EFI/%{efidir}/
%dir /boot/efi/EFI/%{efidir}/fw/
/boot/efi/EFI/%{efidir}/fwup%{efiarch}.efi
%changelog
* Fri Aug 19 2016 Peter Jones <pjones@redhat.com> - 8-1
- Update to fwupdate 8
- Fix some i686 build errors
- Be less stupid about SONAMEs so in the future we'll only have to rebuild
dependent things on actual ABI changes.
- Only depend on libsmbios on x86, for now, because it hasn't been ported to
Aarch64.
* Tue Aug 16 2016 Peter Jones <pjones@redhat.com> - 7-1
- Update to fwupdate 7.
- Minor bug fixes.
* Tue Aug 16 2016 Peter Jones <pjones@redhat.com> - 6-1
- Update to 0.6
- lots of build fixes for newer compilers and such
- Use libsmbios on some systems to enable firmware updates (Mario Limonciello)
- Use the correct reset type from the QueryCapsuleInfo data
- Lots of fixes from auditing
- Use efivar's error reporting infrastructure
* Tue Jun 02 2015 Peter Jones <pjones@redhat.com> - 0.4-1
- Update to 0.4
- Set DESTDIR so it's more consistently respected
- Always use upper case for Boot#### names.
- Create abbreviated device paths for our BootNext entry.
- Make subdir Makefiles get the version right.
- Fix ucs2len() to handle max=-1 correctly.
- Compare the right blobs when we're searching old boot entries.
- Fix .efi generation on non-x86 platforms.
- Use a relative path for fwupdate.efi when launched from shim.
- Show fewer debugging messages.
- Set BootNext when we find an old Boot#### variable as well.
- Add fwup_get_fw_type().
* Thu May 28 2015 Peter Jones <pjones@redhat.com> - 0.3-1
- Here we go again.
|