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