a43681
Name:           efivar
a43681
Version:        37
a43681
Release:        4%{?dist}
a43681
Summary:        Tools to manage UEFI variables
a43681
License:        LGPL-2.1
a43681
URL:            https://github.com/rhboot/efivar
a43681
Requires:       %{name}-libs = %{version}-%{release}
a43681
ExclusiveArch:  %{ix86} x86_64 aarch64 %{arm}
a43681
a43681
BuildRequires:  popt-devel git glibc-static libabigail
a43681
# please don't fix this to reflect github's incomprehensible url that goes
a43681
# to a different tarball.
a43681
Source0:        https://github.com/rhboot/efivar/archive/efivar-%{version}.tar.bz2
a43681
Patch0001: 0001-util.h-add-unlikely-and-likely-macros.patch
a43681
Patch0002: 0002-dp.h-make-format_guid-handle-misaligned-guid-pointer.patch
a43681
Patch0003: 0003-linux-pci-root-remove-an-unused-assignment.patch
a43681
Patch0004: 0004-Fix-all-the-places-Werror-address-of-packed-member-c.patch
a43681
Patch0005: 0005-Get-rid-of-the-arrows-in-our-debug-messages.patch
a43681
Patch0006: 0006-Define-strdupa-if-it-is-not-defined.patch
a43681
Patch0007: 0007-Android-inital-porting-of-libefivar.patch
a43681
Patch0008: 0008-Remove-an-unused-function.patch
a43681
Patch0009: 0009-Fix-another-error-of-Werror-address-of-packed-member.patch
a43681
Patch0010: 0010-ucs2.h-remove-unused-variable.patch
a43681
Patch0011: 0011-ucs2.h-fix-logic-that-checks-for-UCS-2-string-termin.patch
a43681
Patch0012: 0012-dp-message-fix-efidp_ipv4_addr-fields-assignment.patch
a43681
Patch0013: 0013-Always-refer-to-MBR-and-GPT-fixed-values-as-magic-no.patch
a43681
Patch0014: 0014-Add-more-hexdump-logging-functions.patch
a43681
Patch0015: 0015-Add-efi_error_pop-and-pop-some-errors-sometimes.patch
a43681
Patch0016: 0016-Always-log-to-a-memfd-regardless-of-loglevel.patch
a43681
Patch0017: 0017-Always-initialize-any-variable-we-use-with-sscanf-s-.patch
a43681
Patch0018: 0018-Add-efi_get_libefivar_version-and-efi_get_libefiboot.patch
a43681
Patch0019: 0019-Fix-dbglog_seek-to-update-the-offset.patch
a43681
Patch0020: 0020-Update-efivar-37-.abixml-for-new-libabigail-version.patch
a43681
Patch0021: 0021-Fix-up-efi_guid_cmp-s-alignment-problem-a-different-.patch
a43681
Patch0022: 0022-Fix-dbglog_write-to-always-return-the-status-of-writ.patch
a43681
Patch0023: 0023-Do-a-better-job-of-making-sure-DLIBEFIVAR_VERSION-ha.patch
a43681
Patch0024: 0024-efi_stash_loglevel_-efi_set_loglevel.patch
a43681
Patch0025: 0025-guids-add-grub-guid-for-grubenv.patch
a43681
Patch0026: 0026-gcc.specs-add-grecord-gcc-switches.patch
a43681
Patch0027: 0027-Makefile-don-t-echo-our-deps-submake-invocation.patch
a43681
Patch0028: 0028-Make-Add-some-more-stuff-to-the-toplevel-clean.patch
a43681
Patch0029: 0029-Make-scan-build-rules-slightly-more-intuitive.patch
a43681
Patch0030: 0030-Local-header-whitespace-cleanup.patch
a43681
Patch0031: 0031-Exported-header-whitespace-cleanup.patch
a43681
Patch0032: 0032-Main-code-whitespace-cleanup.patch
a43681
Patch0033: 0033-efivar-rework-usage.patch
a43681
Patch0034: 0034-Try-to-deal-with-some-signof-char-signof-uint8_t-mad.patch
a43681
Patch0035: 0035-ucs2-document-things-a-little-better.patch
a43681
Patch0036: 0036-util.h-implement-add-mul-sub-for-more-integer-types.patch
a43681
Patch0037: 0037-Implement-efivar-export-foo.var.patch
a43681
Patch0038: 0038-Add-some-test-cases-for-efivar-export-import.patch
a43681
Patch0039: 0039-Fix-a-case-clang-analyzer-found-where-we-may-try-to-.patch
a43681
Patch0040: 0040-Make-sure-makeguids-helper-is-compiled-for-the-host-.patch
a43681
Patch0041: 0041-Makefile-sort-wildcard-output-for-reproducibility.patch
a43681
Patch0042: 0042-guids.txt-correct-sentinal-typo.patch
a43681
Patch0043: 0043-update-manpage-for-efivar-such-that-it-reflects-the-.patch
a43681
Patch0044: 0044-Fix-some-32-bit-size_t-format-specifier-errors.patch
a43681
Patch0045: 0045-Make-the-top-level-makefile-not-parallelize.patch
a43681
Patch0046: 0046-guids-add-auto_created_boot_option.patch
a43681
Patch0047: 0047-Move-our-infrastructure-makefiles-out-of-the-topdir.patch
a43681
Patch0048: 0048-Make-CC_FOR_BUILD-and-CCLD_FOR_BUILD-override-HOSTCC.patch
a43681
Patch0049: 0049-Rework-some-makefile-bits-to-make-overriding-some-op.patch
a43681
Patch0050: 0050-Make-add-Wno-missing-field-initializers.patch
a43681
Patch0051: 0051-debug-don-t-write-newlines-to-memfd.patch
a43681
Patch0052: 0052-sysfs-parsing-add-some-more-debugging-output.patch
a43681
Patch0053: 0053-gitignore-ignore-.strace.patch
a43681
Patch0054: 0054-Improve-consistency-of-debug-prints.patch
a43681
Patch0055: 0055-Fix-the-error-path-in-set_disk_and_part_name.patch
a43681
Patch0056: 0056-Try-even-harder-to-find-disk-device-symlinks-in-sysf.patch
a43681
Patch0057: 0057-Handle-sys-devices-virtual-nvme-fabrics-nvme-subsyst.patch
a43681
Patch0058: 0058-sysfs-parsers-make-all-the-sys-block-link-parsers-wo.patch
a43681
Patch0059: 0059-Put-some-EFI-device-paths-into-the-debug-log.patch
a43681
Patch0060: 0060-Update-abixml.patch
a43681
Patch0061: 0061-Update-abixml-files-and-work-around-some-inconsequen.patch
a43681
Patch0062: 0062-Don-t-use-march-native-on-ia64.patch
a43681
Patch0063: 0063-Work-around-autoconf-existing-in-the-world.patch
a43681
Patch0064: 0064-Fix-efivar-w-and-efivar-a.patch
a43681
Patch0065: 0065-Fix-variable-sz-uninitialized-error.patch
a43681
a43681
%description
a43681
efivar provides a simple command line interface to the UEFI variable facility.
a43681
a43681
%package libs
a43681
Summary: Library to manage UEFI variables
a43681
a43681
%description libs
a43681
Library to allow for the simple manipulation of UEFI variables.
a43681
a43681
%package devel
a43681
Summary: Development headers for libefivar
a43681
Requires: %{name}-libs = %{version}-%{release}
a43681
a43681
%description devel
a43681
development headers required to use libefivar.
a43681
a43681
%prep
a43681
%setup -q -n %{name}-%{version}
a43681
git init
a43681
git config user.email "%{name}-owner@fedoraproject.org"
a43681
git config user.name "Fedora Ninjas"
a43681
git add .
a43681
git commit -a -q -m "%{version} baseline."
a43681
git am %{patches} 
a43681
git config --unset user.email
a43681
git config --unset user.name
a43681
a43681
%build
a43681
make libdir=%{_libdir} bindir=%{_bindir} CFLAGS="$RPM_OPT_FLAGS -flto" LDFLAGS="$RPM_LD_FLAGS -flto"
a43681
a43681
%install
a43681
%makeinstall
a43681
a43681
%check
a43681
%ifarch x86_64
a43681
#make abicheck
a43681
%endif
a43681
a43681
%post libs -p /sbin/ldconfig
a43681
a43681
%postun libs -p /sbin/ldconfig
a43681
a43681
%files
a43681
%{!?_licensedir:%global license %%doc}
a43681
%license COPYING
a43681
%doc README.md
a43681
%{_bindir}/efivar
a43681
%exclude %{_bindir}/efivar-static
a43681
%{_mandir}/man1/*
a43681
a43681
%files devel
a43681
%{_mandir}/man3/*
a43681
%{_includedir}/*
a43681
%{_libdir}/*.so
a43681
%{_libdir}/pkgconfig/*.pc
a43681
a43681
%files libs
a43681
%{_libdir}/*.so.*
a43681
a43681
%changelog
a43681
* Tue Jul 14 2020 Javier Martinez Canillas <javierm@redhat.com> - 37-4
a43681
- Fix efivar "-w" and "-a" options that broke due the rebase
a43681
  Related: rhbz#1755645
a43681
a43681
* Tue Jul 14 2020 Javier Martinez Canillas <javierm@redhat.com> - 37-3
a43681
- Fix uninitialized variable found by covscan
a43681
  Related: rhbz#1755645
a43681
a43681
* Mon Jul 13 2020 Javier Martinez Canillas <javierm@redhat.com> - 37-2
a43681
- Change License field to LGPL-2.1 to prevent rpminspect test to fail
a43681
  Related: rhbz#1755645
a43681
a43681
* Thu Jul 02 2020 Javier Martinez Canillas <javierm@redhat.com> - 37-1
a43681
- Update to efivar 37 and some changes to support NVMe over FC
a43681
  Resolves: rhbz#1755645
a43681
a43681
* Tue Oct 02 2018 Peter Jones <pjones@redhat.com> - 36-1
a43681
- Update to efivar 36 (and some change)
a43681
  Resolves: rhbz#1635019
a43681
- Add NVDIMM support
a43681
- Re-written linux interface parser to handle how devices are
a43681
  partitioned better, and for cleaner code, with one file per device
a43681
  type.
a43681
- lots of verbosity updates
a43681
- better CI
a43681
- analysis with clang's analyzer as well as coverity
a43681
- Better handling of immutable bits in sysfs
a43681
- LIBEFIVAR_OPS=help
a43681
- lots of code cleanups.
a43681
- Add emmc device support
a43681
- Add SAS port expander support
a43681
- Support for ACPI root nodes that are less common
a43681
  (i.e. ACPI Generic Container and Embedded Controller PNP nodes)
a43681
- Make abbreviated device paths if we can't parse a device's info
a43681
- Don't require NVME to have an EUI
a43681
a43681
* Mon Apr 09 2018 Peter Jones <pjones@redhat.com> - 35-1
a43681
- Update to efivar 35
a43681
- fixes for older compilers
a43681
- efi_get_variable_exists()
a43681
- Lots of stuff to make CI work.
a43681
- use usleep() to avoid hitting the kernel rate limiter on efivarfs
a43681
- better EFI_GUID macro
a43681
- add efi_guid_fwupdate (0abba7dc-e516-4167-bbf5-4d9d1c739416)
a43681
a43681
* Tue Feb 27 2018 Peter Jones <pjones@redhat.com> - 34-1
a43681
- Update to efivar 34, and include a patch to avoid upstream rate limiting.
a43681
a43681
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 33-3
a43681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
a43681
a43681
* Tue Jan 30 2018 Peter Robinson <pbrobinson@fedoraproject.org> 33-2
a43681
- Enable ARMv7, minor spec cleanups
a43681
a43681
* Tue Jan 23 2018 Peter Jones <pjones@redhat.com> - 33-1
a43681
- Add NVDIMM support
a43681
- Bump version to 33
a43681
a43681
* Tue Sep 12 2017 Peter Jones <pjones@redhat.com> - 32-2
a43681
- Make efi_guid_ux_capsule actually get exported right.
a43681
a43681
* Tue Sep 12 2017 Peter Jones <pjones@redhat.com> - 32-1
a43681
- efivar 32
a43681
- lots of coverity fixes; mostly leaked memory and fds and the like
a43681
- fix sysfs pci path formats
a43681
- handle device paths for dns, nfit, bluetooth, wifi, emmc, btle.
a43681
- improved abi checking on releases
a43681
- Fix failures on EDIT_WRITE in edit_variable() when the variable doesn't exist
a43681
- Add efi_guid_ux_capsule_guid to our guids
a43681
- Now with %%check
a43681
a43681
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 31-3
a43681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
a43681
a43681
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 31-2
a43681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
a43681
a43681
* Mon Mar 06 2017 Peter Jones <pjones@redhat.com> - 31-1
a43681
- Update to efivar 31
a43681
- Work around NVMe EUI sysfs change
a43681
- Provide some oldish version strings we should have kept.
a43681
- lots of overflow checking on our pointer math in dp parsing
a43681
- fix major/minor device number handling in the linux code
a43681
- Do better formatting checks for MBR partitions
a43681
- Fixes for gcc 7
a43681
a43681
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 30-5
a43681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a43681
a43681
* Mon Oct 17 2016 Peter Jones <pjones@redhat.com> - 30-4
a43681
- Handle NVMe device attributes paths moving around in sysfs.
a43681
a43681
* Wed Sep 28 2016 Peter Jones <pjones@redhat.com> - 30-3
a43681
- Maybe even provide the *right* old linker deps.
a43681
a43681
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 30-2
a43681
- Try not to screw up SONAME stuff quite so badly.
a43681
a43681
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 30-1
a43681
- Fix efidp_*() functions with __pure__ that break with some optimizations
a43681
- Fix NVMe EUI parsing.
a43681
a43681
* Tue Sep 27 2016 Peter Jones <pjones@redhat.com> - 29-1
a43681
- Use -pie not -PIE in our linker config
a43681
- Fix some overflow checks for gcc < 5.x
a43681
- Make variable class probes other than the first one actually work
a43681
- Move -flto to CFLAGS
a43681
- Pack all of the efi device path headers
a43681
- Fix redundant decl of efi_guid_zero()
a43681
a43681
* Wed Aug 17 2016 Peter Jones <pjones@redhat.com> - 28-1
a43681
- Make our sonames always lib$FOO.1 , not lib$FOO.$VERSION .
a43681
a43681
* Tue Aug 16 2016 Peter Jones <pjones@redhat.com> - 27-1
a43681
- Bug fix for 086eeb17 in efivar 26.
a43681
a43681
* Wed Aug 10 2016 Peter Jones <pjones@redhat.com> - 26-1
a43681
- Update to efivar-26 .
a43681
a43681
* Thu Jun 30 2016 Peter Jones <pjones@redhat.com> - 0.24-1
a43681
- Update to 0.24
a43681
a43681
* Mon Feb 15 2016 Peter Jones <pjones@redhat.com> - 0.23-1
a43681
- Update to 0.23
a43681
a43681
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-3
a43681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a43681
a43681
* Mon Nov 02 2015 Peter Jones <pjones@redhat.com> - 0.21-2
a43681
- Bump the release here so f22->f23->f24 updates work.
a43681
a43681
* Mon Jul 13 2015 Peter Jones <pjones@redhat.com> - 0.21-1
a43681
- Rename "make test" so packagers don't think it's a good idea to run it
a43681
  during builds.
a43681
- Error check sizes in vars_get_variable()
a43681
- Fix some file size comparisons
a43681
- make SONAME reflect the correct values.
a43681
- Fix some uses of "const"
a43681
- Compile with -O2 by default
a43681
- Fix some strict-aliasing violations
a43681
- Fix some of the .pc files and how we do linking to work better.
a43681
a43681
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.20-2
a43681
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
a43681
a43681
* Tue Jun 02 2015 Peter Jones <pjones@redhat.com> - 0.20-1
a43681
- Update to 0.20
a43681
- Make sure tester is build with the right link order for libraries.
a43681
- Adjust linker order for pkg-config
a43681
- Work around LocateDevicePath() not grokking PcieRoot() devices properly.
a43681
- Rectify some missing changelog entries
a43681
a43681
* Thu May 28 2015 Peter Jones <pjones@redhat.com> - 0.19-1
a43681
- Update to 0.19
a43681
- add API from efibootmgr so fwupdate and other tools can use it.
a43681
a43681
* Wed Oct 15 2014 Peter Jones <pjones@redhat.com> - 0.15-1
a43681
- Update to 0.15
a43681
- Make 32-bit builds set variables' DataSize correctly.
a43681
a43681
* Wed Oct 08 2014 Peter Jones <pjones@redhat.com> - 0.14-1
a43681
- Update to 0.14
a43681
- add efi_id_guid_to_guid() and efi_guid_to_id_guid(), which support {ID GUID}
a43681
  as a concept.
a43681
- Add some vendor specific guids to our guid list.
a43681
- Call "empty" "zero" now, as many other places do.  References to
a43681
  efi_guid_is_empty() and efi_guid_empty still exist for ABI compatibility.
a43681
- add "efivar -L" to the man page.
a43681
a43681
* Tue Oct 07 2014 Peter Jones <pjones@redhat.com> - 0.13-1
a43681
- Update to 0.13:
a43681
- add efi_symbol_to_guid()
a43681
- efi_name_to_guid() will now fall back on efi_symbol_to_guid() as a last
a43681
  resort
a43681
- "efivar -L" to list all the guids we know about
a43681
- better namespacing on libefivar.so (rename well_known_* -> efi_well_known_*)
a43681
a43681
* Thu Sep 25 2014 Peter Jones <pjones@redhat.com> - 0.12-1
a43681
- Update to 0.12
a43681
a43681
* Wed Aug 20 2014 Peter Jones <pjones@redhat.com> - 0.11-1
a43681
- Update to 0.11
a43681
a43681
* Fri May 02 2014 Peter Jones <pjones@redhat.com> - 0.10-1
a43681
- Update package to 0.10.
a43681
- Fixes a build error due to different cflags in the builders vs updstream
a43681
  makefile.
a43681
a43681
* Fri May 02 2014 Peter Jones <pjones@redhat.com> - 0.9-0.1
a43681
- Update package to 0.9.
a43681
a43681
* Tue Apr 01 2014 Peter Jones <pjones@redhat.com> - 0.8-0.1
a43681
- Update package to 0.8 as well.
a43681
a43681
* Fri Oct 25 2013 Peter Jones <pjones@redhat.com> - 0.7-1
a43681
- Update package to 0.7
a43681
- adds --append support to the binary.
a43681
a43681
* Fri Sep 06 2013 Peter Jones <pjones@redhat.com> - 0.6-1
a43681
- Update package to 0.6
a43681
- fixes to documentation from lersek
a43681
- more validation of uefi guids
a43681
- use .xz for archives
a43681
a43681
* Thu Sep 05 2013 Peter Jones <pjones@redhat.com> - 0.5-0.1
a43681
- Update to 0.5
a43681
a43681
* Mon Jun 17 2013 Peter Jones <pjones@redhat.com> - 0.4-0.2
a43681
- Fix ldconfig invocation
a43681
a43681
* Mon Jun 17 2013 Peter Jones <pjones@redhat.com> - 0.4-0.1
a43681
- Initial spec file