2a3a59
Name:           efivar
2a3a59
Version:        38
d69dea
Release:        3%{?dist}
2a3a59
Summary:        Tools to manage UEFI variables
2a3a59
License:        LGPLv2
2a3a59
URL:            https://github.com/rhboot/efivar
2a3a59
Requires:       %{name}-libs = %{version}-%{release}
2a3a59
ExclusiveArch:  %{efi}
2a3a59
2a3a59
BuildRequires:  gcc
2a3a59
BuildRequires:  efi-srpm-macros git glibc-static libabigail
2a3a59
BuildRequires:  make
2a3a59
BuildRequires:  git
2a3a59
# please don't fix this to reflect github's incomprehensible url that goes
2a3a59
# to a different tarball.
2a3a59
Source0:        https://github.com/rhboot/efivar/releases/download/%{version}/efivar-%{version}.tar.bz2
2a3a59
Source1:        efivar.patches
2a3a59
2a3a59
# include patches
2a3a59
%include %{SOURCE1}
2a3a59
2a3a59
%description
2a3a59
efivar provides a simple command line interface to the UEFI variable facility.
2a3a59
2a3a59
%package libs
2a3a59
Summary: Library to manage UEFI variables
2a3a59
2a3a59
%description libs
2a3a59
Library to allow for the simple manipulation of UEFI variables.
2a3a59
2a3a59
%package devel
2a3a59
Summary: Development headers for libefivar
2a3a59
Requires: %{name}-libs = %{version}-%{release}
2a3a59
2a3a59
%description devel
2a3a59
development headers required to use libefivar.
2a3a59
2a3a59
%prep
2a3a59
%setup -q -n %{name}-%{version}
2a3a59
git init
2a3a59
git config user.email "%{name}-owner@fedoraproject.org"
2a3a59
git config user.name "Fedora Ninjas"
2a3a59
git add .
2a3a59
git commit -a -q -m "%{version} baseline."
2a3a59
git am %{patches} 
2a3a59
git config --unset user.email
2a3a59
git config --unset user.name
2a3a59
2a3a59
%build
2a3a59
# This package implements symbol versioning with toplevel ASM statments which is
2a3a59
# incompatible with LTO.  Disable LTO
2a3a59
%define _lto_cflags %{nil}
2a3a59
2a3a59
# mandoc isn't packaged in RHEL, so do... this.
2a3a59
for f in efisecdb.1; do
2a3a59
    cp docs/"$f".mdoc docs/"$f"
2a3a59
done
2a3a59
2a3a59
make LIBDIR=%{_libdir} BINDIR=%{_bindir} CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
2a3a59
2a3a59
%install
d69dea
%makeinstall CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
2a3a59
install -m 0644 src/abignore %{buildroot}%{_includedir}/efivar/.abignore
2a3a59
2a3a59
%check
2a3a59
%ifarch x86_64
d69dea
make abicheck CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
2a3a59
%endif
2a3a59
2a3a59
%ldconfig_scriptlets libs
2a3a59
2a3a59
%files
2a3a59
%{!?_licensedir:%global license %%doc}
2a3a59
%license COPYING
2a3a59
%doc README.md
2a3a59
%{_bindir}/efivar
2a3a59
%{_bindir}/efisecdb
2a3a59
%exclude %{_bindir}/efivar-static
2a3a59
%{_mandir}/man1/*
2a3a59
2a3a59
%files devel
2a3a59
%{_mandir}/man3/*
2a3a59
%{_includedir}/*
2a3a59
%{_libdir}/*.so
2a3a59
%{_libdir}/pkgconfig/*.pc
2a3a59
2a3a59
%files libs
2a3a59
%{_libdir}/*.so.*
2a3a59
2a3a59
%changelog
d69dea
* Wed Jan 11 2023 Robbie Harwood <rharwood@redhat.com> - 38-3
d69dea
- Fix inheritance of buildflags
d69dea
- Resolves: #2144520
d69dea
2a3a59
* Wed Feb 02 2022 Robbie Harwood <rharwood@redhat.com> - 38-2
2a3a59
- Bump to re-run tests; no code changes
2a3a59
- Resolves: #2024374
2a3a59
2a3a59
* Tue Feb 01 2022 Robbie Harwood <rharwood@redhat.com> - 38-1
2a3a59
- New upstream release (38)
2a3a59
- Resolves: #2024374
2a3a59
2a3a59
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org>
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2a3a59
2a3a59
* Thu Jun 17 2021 Javier Martinez Canillas <javierm@redhat.com> - 37-16
2a3a59
- Enable Intel Control-flow Enforcement Technology (CET)
2a3a59
  Resolves: rhbz#1808811
2a3a59
2a3a59
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org>
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2a3a59
2a3a59
* Tue Oct 27 2020 Petr Pisar <ppisar@redhat.com> - 37-14
2a3a59
- Fix XML ABI dumps that were generated with a faulty GCC and missed the
2a3a59
  variadic arguments when building without LTO (bug #1863475)
2a3a59
2a3a59
* Thu Aug 06 2020 Jeff Law <law@redhat.com>
2a3a59
- Remove explicit LTO bits from flags
2a3a59
2a3a59
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org>
2a3a59
- Second attempt - Rebuilt for
2a3a59
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2a3a59
2a3a59
* Mon Jul 27 2020 Jeff Law <law@redhat.com> - 37-11
2a3a59
- Disable LTO
2a3a59
2a3a59
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org>
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2a3a59
2a3a59
* Mon Jul 13 2020 Javier Martinez Canillas <javierm@redhat.com> - 37-9
2a3a59
- Change License field to LGPL-2.1 to prevent rpminspect test to fail
2a3a59
2a3a59
* Wed Apr 22 2020 Hans de Goede <hdegoede@redhat.com> - 37-8
2a3a59
- Add a patch to fix eMMC sysfs path parsing
2a3a59
  Resolves: rhbz#1826864
2a3a59
2a3a59
* Mon Feb 24 2020 Peter Jones <pjones@redhat.com> - 37-7
2a3a59
- Package our abignore file to try to shut taskotron up some.
2a3a59
2a3a59
* Mon Feb 24 2020 Peter Jones <pjones@redhat.com> - 37-6
2a3a59
- Pull in a bunch of patches from upstream.
2a3a59
2a3a59
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 37-5
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2a3a59
2a3a59
* Tue Nov 12 2019 Peter Jones <pjones@redhat.com> - 37-4
2a3a59
- Update for some compiler warning fixes.
2a3a59
  Resolves: rhbz#1735168
2a3a59
2a3a59
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 37-3
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2a3a59
2a3a59
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 37-2
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2a3a59
2a3a59
* Wed Dec 05 2018 Peter Jones <pjones@redhat.com> - 37-1
2a3a59
- Update to efivar 37:
2a3a59
  - Minor coverity fixes
2a3a59
  - Improve ACPI device path formatting
2a3a59
  - Add support for SOC devices that use FDT as their PCI root node
2a3a59
  - Make devices we can't parse the "device" sysfs link for use DEV_ABBREV_ONLY
2a3a59
  - Handle SCSI port numbers better
2a3a59
  - Don't require an EUI for NVMe
2a3a59
  - Fix the accidental requirement on ACPI UID nodes existing
2a3a59
  - Add support for EMMC devices
2a3a59
  - Add support for PCI root nodes without a device link in sysfs
2a3a59
  - Add support for partitioned MD devices
2a3a59
  - Fix partition number detection when the number isn't provided
2a3a59
  - Add support for ACPI Generic Container and Embedded Controller root nodes
2a3a59
  - Add limited support for SAS/SATA port expanders
2a3a59
2a3a59
* Mon Sep 17 2018 Peter Jones <pjones@redhat.com> - 36-1
2a3a59
- Update to efivar 36
2a3a59
- Add NVDIMM support
2a3a59
- Re-written linux interface parser to handle how devices are
2a3a59
  partitioned better, and for cleaner code, with one file per device
2a3a59
  type.
2a3a59
- lots of verbosity updates
2a3a59
- better CI
2a3a59
- analysis with clang's analyzer as well as coverity
2a3a59
- Better handling of immutable bits in sysfs
2a3a59
- LIBEFIVAR_OPS=help
2a3a59
- lots of code cleanups.
2a3a59
2a3a59
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 35-4
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2a3a59
2a3a59
* Fri May 04 2018 Peter Jones <pjones@redhat.com> - 35-3
2a3a59
- Rebuild for new efi-rpm-macros, now that it has settled down a bit.
2a3a59
2a3a59
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 35-2
2a3a59
- Use efi-rpm-macros instead of defining efi-related macros ourselves
2a3a59
2a3a59
* Mon Apr 09 2018 Peter Jones <pjones@redhat.com> - 35-1
2a3a59
- Update to efivar 35
2a3a59
- fixes for older compilers
2a3a59
- efi_get_variable_exists()
2a3a59
- Lots of stuff to make CI work.
2a3a59
- use usleep() to avoid hitting the kernel rate limiter on efivarfs
2a3a59
- better EFI_GUID macro
2a3a59
- add efi_guid_fwupdate (0abba7dc-e516-4167-bbf5-4d9d1c739416)
2a3a59
2a3a59
* Tue Feb 27 2018 Peter Jones <pjones@redhat.com> - 34-1
2a3a59
- Update to efivar 34, and include a patch to avoid upstream rate limiting.
2a3a59
2a3a59
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 33-3
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
2a3a59
2a3a59
* Tue Jan 30 2018 Peter Robinson <pbrobinson@fedoraproject.org> 33-2
2a3a59
- Enable ARMv7, minor spec cleanups
2a3a59
2a3a59
* Tue Jan 23 2018 Peter Jones <pjones@redhat.com> - 33-1
2a3a59
- Add NVDIMM support
2a3a59
- Bump version to 33
2a3a59
2a3a59
* Tue Sep 12 2017 Peter Jones <pjones@redhat.com> - 32-2
2a3a59
- Make efi_guid_ux_capsule actually get exported right.
2a3a59
2a3a59
* Tue Sep 12 2017 Peter Jones <pjones@redhat.com> - 32-1
2a3a59
- efivar 32
2a3a59
- lots of coverity fixes; mostly leaked memory and fds and the like
2a3a59
- fix sysfs pci path formats
2a3a59
- handle device paths for dns, nfit, bluetooth, wifi, emmc, btle.
2a3a59
- improved abi checking on releases
2a3a59
- Fix failures on EDIT_WRITE in edit_variable() when the variable doesn't exist
2a3a59
- Add efi_guid_ux_capsule_guid to our guids
2a3a59
- Now with %%check
2a3a59
2a3a59
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 31-3
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
2a3a59
2a3a59
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 31-2
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2a3a59
2a3a59
* Mon Mar 06 2017 Peter Jones <pjones@redhat.com> - 31-1
2a3a59
- Update to efivar 31
2a3a59
- Work around NVMe EUI sysfs change
2a3a59
- Provide some oldish version strings we should have kept.
2a3a59
- lots of overflow checking on our pointer math in dp parsing
2a3a59
- fix major/minor device number handling in the linux code
2a3a59
- Do better formatting checks for MBR partitions
2a3a59
- Fixes for gcc 7
2a3a59
2a3a59
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 30-5
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
2a3a59
2a3a59
* Mon Oct 17 2016 Peter Jones <pjones@redhat.com> - 30-4
2a3a59
- Handle NVMe device attributes paths moving around in sysfs.
2a3a59
2a3a59
* Wed Sep 28 2016 Peter Jones <pjones@redhat.com> - 30-3
2a3a59
- Maybe even provide the *right* old linker deps.
2a3a59
2a3a59
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 30-2
2a3a59
- Try not to screw up SONAME stuff quite so badly.
2a3a59
2a3a59
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 30-1
2a3a59
- Fix efidp_*() functions with __pure__ that break with some optimizations
2a3a59
- Fix NVMe EUI parsing.
2a3a59
2a3a59
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 29-1
2a3a59
- Use -pie not -PIE in our linker config
2a3a59
- Fix some overflow checks for gcc < 5.x
2a3a59
- Make variable class probes other than the first one actually work
2a3a59
- Move -flto to CFLAGS
2a3a59
- Pack all of the efi device path headers
2a3a59
- Fix redundant decl of efi_guid_zero()
2a3a59
2a3a59
* Wed Aug 17 2016 Peter Jones <pjones@redhat.com> - 28-1
2a3a59
- Make our sonames always lib$FOO.1 , not lib$FOO.$VERSION .
2a3a59
2a3a59
* Tue Aug 16 2016 Peter Jones <pjones@redhat.com> - 27-1
2a3a59
- Bug fix for 086eeb17 in efivar 26.
2a3a59
2a3a59
* Wed Aug 10 2016 Peter Jones <pjones@redhat.com> - 26-1
2a3a59
- Update to efivar-26 .
2a3a59
2a3a59
* Thu Jun 30 2016 Peter Jones <pjones@redhat.com> - 0.24-1
2a3a59
- Update to 0.24
2a3a59
2a3a59
* Mon Feb 15 2016 Peter Jones <pjones@redhat.com> - 0.23-1
2a3a59
- Update to 0.23
2a3a59
2a3a59
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-3
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2a3a59
2a3a59
* Mon Nov 02 2015 Peter Jones <pjones@redhat.com> - 0.21-2
2a3a59
- Bump the release here so f22->f23->f24 updates work.
2a3a59
2a3a59
* Mon Jul 13 2015 Peter Jones <pjones@redhat.com> - 0.21-1
2a3a59
- Rename "make test" so packagers don't think it's a good idea to run it
2a3a59
  during builds.
2a3a59
- Error check sizes in vars_get_variable()
2a3a59
- Fix some file size comparisons
2a3a59
- make SONAME reflect the correct values.
2a3a59
- Fix some uses of "const"
2a3a59
- Compile with -O2 by default
2a3a59
- Fix some strict-aliasing violations
2a3a59
- Fix some of the .pc files and how we do linking to work better.
2a3a59
2a3a59
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-2
2a3a59
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2a3a59
2a3a59
* Tue Jun 02 2015 Peter Jones <pjones@redhat.com> - 0.20-1
2a3a59
- Update to 0.20
2a3a59
- Make sure tester is build with the right link order for libraries.
2a3a59
- Adjust linker order for pkg-config
2a3a59
- Work around LocateDevicePath() not grokking PcieRoot() devices properly.
2a3a59
- Rectify some missing changelog entries
2a3a59
2a3a59
* Thu May 28 2015 Peter Jones <pjones@redhat.com> - 0.19-1
2a3a59
- Update to 0.19
2a3a59
- add API from efibootmgr so fwupdate and other tools can use it.
2a3a59
2a3a59
* Wed Oct 15 2014 Peter Jones <pjones@redhat.com> - 0.15-1
2a3a59
- Update to 0.15
2a3a59
- Make 32-bit builds set variables' DataSize correctly.
2a3a59
2a3a59
* Wed Oct 08 2014 Peter Jones <pjones@redhat.com> - 0.14-1
2a3a59
- Update to 0.14
2a3a59
- add efi_id_guid_to_guid() and efi_guid_to_id_guid(), which support {ID GUID}
2a3a59
  as a concept.
2a3a59
- Add some vendor specific guids to our guid list.
2a3a59
- Call "empty" "zero" now, as many other places do.  References to
2a3a59
  efi_guid_is_empty() and efi_guid_empty still exist for ABI compatibility.
2a3a59
- add "efivar -L" to the man page.
2a3a59
2a3a59
* Tue Oct 07 2014 Peter Jones <pjones@redhat.com> - 0.13-1
2a3a59
- Update to 0.13:
2a3a59
- add efi_symbol_to_guid()
2a3a59
- efi_name_to_guid() will now fall back on efi_symbol_to_guid() as a last
2a3a59
  resort
2a3a59
- "efivar -L" to list all the guids we know about
2a3a59
- better namespacing on libefivar.so (rename well_known_* -> efi_well_known_*)
2a3a59
2a3a59
* Thu Sep 25 2014 Peter Jones <pjones@redhat.com> - 0.12-1
2a3a59
- Update to 0.12
2a3a59
2a3a59
* Wed Aug 20 2014 Peter Jones <pjones@redhat.com> - 0.11-1
2a3a59
- Update to 0.11
2a3a59
2a3a59
* Fri May 02 2014 Peter Jones <pjones@redhat.com> - 0.10-1
2a3a59
- Update package to 0.10.
2a3a59
- Fixes a build error due to different cflags in the builders vs updstream
2a3a59
  makefile.
2a3a59
2a3a59
* Fri May 02 2014 Peter Jones <pjones@redhat.com> - 0.9-0.1
2a3a59
- Update package to 0.9.
2a3a59
2a3a59
* Tue Apr 01 2014 Peter Jones <pjones@redhat.com> - 0.8-0.1
2a3a59
- Update package to 0.8 as well.
2a3a59
2a3a59
* Fri Oct 25 2013 Peter Jones <pjones@redhat.com> - 0.7-1
2a3a59
- Update package to 0.7
2a3a59
- adds --append support to the binary.
2a3a59
2a3a59
* Fri Sep 06 2013 Peter Jones <pjones@redhat.com> - 0.6-1
2a3a59
- Update package to 0.6
2a3a59
- fixes to documentation from lersek
2a3a59
- more validation of uefi guids
2a3a59
- use .xz for archives
2a3a59
2a3a59
* Thu Sep 05 2013 Peter Jones <pjones@redhat.com> - 0.5-0.1
2a3a59
- Update to 0.5
2a3a59
2a3a59
* Mon Jun 17 2013 Peter Jones <pjones@redhat.com> - 0.4-0.2
2a3a59
- Fix ldconfig invocation
2a3a59
2a3a59
* Mon Jun 17 2013 Peter Jones <pjones@redhat.com> - 0.4-0.1
2a3a59
- Initial spec file