482dcd
Name:           efivar
ac385c
Version:        31
ac385c
Release:        4%{?dist}
482dcd
Summary:        Tools to manage UEFI variables
482dcd
License:        LGPLv2.1
ac385c
URL:            https://github.com/rhinstaller/efivar
482dcd
Requires:       %{name}-libs = %{version}-%{release}
7aeea2
ExclusiveArch:	i686 x86_64 aarch64
ac385c
ac385c
BuildRequires:  popt popt-devel popt-static git glibc-static
ac385c
Source0:        https://github.com/rhinstaller/efivar/releases/download/efivar-%{version}/efivar-%{version}.tar.bz2
ac385c
Patch0001:	0001-libabigail-isn-t-in-RHEL-yet-so-nerf-the-abi-check.patch
ac385c
Patch0002:	0002-Don-t-use-_Generic-because-gcc-4.x-doesn-t-have-it.patch
ac385c
Patch0003:	0003-popt-devel-in-RHEL-7.4-doesn-t-provide-popt.pc-so-in.patch
ac385c
Patch0004:	0004-efi_loadopt_args_from_file-fix-leaked-file-descripto.patch
ac385c
Patch0005:	0005-make_mac_path-fix-leaked-file-descriptor.patch
ac385c
Patch0006:	0006-gpt_disk_get_partition_info-free-our-allocations-on-.patch
ac385c
Patch0007:	0007-efi_generate_file_device_path-fix-one-error-case-s-f.patch
ac385c
Patch0008:	0008-efi_va_generate_file_device_path_from_esp-handle-err.patch
ac385c
Patch0009:	0009-efi_variable_import-fix-memory-leak-on-failure-path.patch
ac385c
Patch0010:	0010-efidp_append_path-error-check-the-right-variable.patch
ac385c
Patch0011:	0011-efi_variable_import-make-sure-var.data_size-is-set.patch
ac385c
Patch0012:	0012-makeguids-free-our-input-buffer.patch
ac385c
Patch0013:	0013-efi_variable_import-constrain-our-inputs-better.patch
ac385c
Patch0014:	0014-efi_loadopt_create-check-buf-for-NULLness.patch
ac385c
Patch0015:	0015-efidp_duplicate_extra-error-if-our-allocation-is-too.patch
ac385c
Patch0016:	0016-show_errors-make-the-useful-part-here-not-be-dead-co.patch
ac385c
Patch0017:	0017-efi_loadopt_args_from_file-make-sure-buf-is-only-NUL.patch
ac385c
Patch0018:	0018-calls-to-sysfs_readlink-check-linkbuf-for-NULLness.patch
ac385c
Patch0019:	0019-efivar-main-explain-efi_well_known_guids-to-the-comp.patch
ac385c
Patch0020:	0020-dp.h-Try-to-make-covscan-believe-format-is-checking-.patch
ac385c
Patch0021:	0021-gpt-try-to-avoid-trusting-unverified-partition-table.patch
ac385c
Patch0022:	0022-Simplify-efidp_append_node-even-more.patch
ac385c
Patch0023:	0023-efi_loadopt_create-avoid-NULL-dereference.patch
ac385c
Patch0024:	0024-efi_generate_file_device_path-make-all-error-paths-u.patch
ac385c
Patch0025:	0025-linux.c-fix-a-pile-of-sscanf-NULL-.-possibilities.patch
482dcd
482dcd
%description
482dcd
efivar provides a simple command line interface to the UEFI variable facility.
482dcd
482dcd
%package libs
482dcd
Summary: Library to manage UEFI variables
482dcd
482dcd
%description libs
482dcd
Library to allow for the simple manipulation of UEFI variables.
482dcd
482dcd
%package devel
482dcd
Summary: Development headers for libefivar
482dcd
Requires: %{name}-libs = %{version}-%{release}
482dcd
482dcd
%description devel
482dcd
development headers required to use libefivar.
482dcd
482dcd
%prep
482dcd
%setup -q -n %{name}-%{version}
482dcd
git init
482dcd
git config user.email "example@example.com"
482dcd
git config user.name "RHEL Ninjas"
482dcd
git add .
482dcd
git commit -a -q -m "%{version} baseline."
482dcd
git am %{patches} 
ac385c
git config --unset user.email
ac385c
git config --unset user.name
482dcd
482dcd
%build
ac385c
make libdir=%{_libdir} bindir=%{_bindir} CFLAGS="$RPM_OPT_FLAGS -flto" LDFLAGS="$RPM_LD_FLAGS -flto"
482dcd
482dcd
%install
482dcd
rm -rf $RPM_BUILD_ROOT
482dcd
%makeinstall
482dcd
482dcd
%clean
482dcd
rm -rf $RPM_BUILD_ROOT
482dcd
482dcd
%post libs -p /sbin/ldconfig
482dcd
482dcd
%postun libs -p /sbin/ldconfig
482dcd
482dcd
%files
ac385c
%{!?_licensedir:%global license %%doc}
ac385c
%license COPYING
ac385c
%doc README.md
482dcd
%{_bindir}/efivar
ac385c
%exclude %{_bindir}/efivar-static
482dcd
%{_mandir}/man1/*
482dcd
482dcd
%files devel
482dcd
%{_mandir}/man3/*
482dcd
%{_includedir}/*
482dcd
%{_libdir}/*.so
482dcd
%{_libdir}/pkgconfig/*.pc
482dcd
482dcd
%files libs
482dcd
%{_libdir}/*.so.*
482dcd
482dcd
%changelog
7aeea2
* Tue Oct 03 2017 Johnny Hughes <johnny@centos.org> - 31-4
7aeea2
- modify to build on i686
7aeea2
ac385c
* Tue May 09 2017 Peter Jones <pjones@redhat.com> - 31-4
ac385c
- Fix a bunch of coverity issues.
ac385c
  Related: rhbz#1380825
ac385c
  Related: rhbz#1310779
ac385c
ac385c
* Tue May 09 2017 Peter Jones <pjones@redhat.com> - 31-3
ac385c
- Fix a bunch of coverity issues.
ac385c
  Related: rhbz#1380825
ac385c
  Related: rhbz#1310779
ac385c
ac385c
* Tue May 09 2017 Peter Jones <pjones@redhat.com> - 31-2
ac385c
- Fix a bunch of coverity issues.
ac385c
  Related: rhbz#1380825
ac385c
  Related: rhbz#1310779
ac385c
ac385c
* Mon Mar 13 2017 Peter Jones <pjones@redhat.com> - 31-1
ac385c
- Update to efivar 31
ac385c
  Related: rhbz#1380825
ac385c
  Related: rhbz#1310779
ac385c
482dcd
* Wed Aug 20 2014 Peter Jones <pjones@redhat.com> - 0.11-1
482dcd
- Update to 0.11
482dcd
482dcd
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-3
482dcd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
482dcd
482dcd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10-2
482dcd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
482dcd
482dcd
* Fri May 02 2014 Peter Jones <pjones@redhat.com> - 0.10-1
482dcd
- Update package to 0.10.
482dcd
- Fixes a build error due to different cflags in the builders vs updstream
482dcd
  makefile.
482dcd
482dcd
* Fri May 02 2014 Peter Jones <pjones@redhat.com> - 0.9-0.1
482dcd
- Update package to 0.9.
482dcd
482dcd
* Tue Apr 01 2014 Peter Jones <pjones@redhat.com> - 0.8-0.1
482dcd
- Update package to 0.8 as well.
482dcd
482dcd
* Fri Oct 25 2013 Peter Jones <pjones@redhat.com> - 0.7-1
482dcd
- Update package to 0.7
482dcd
- adds --append support to the binary.
482dcd
482dcd
* Fri Sep 06 2013 Peter Jones <pjones@redhat.com> - 0.6-1
482dcd
- Update package to 0.6
482dcd
- fixes to documentation from lersek
482dcd
- more validation of uefi guids
482dcd
- use .xz for archives
482dcd
482dcd
* Thu Sep 05 2013 Peter Jones <pjones@redhat.com> - 0.5-0.1
482dcd
- Update to 0.5
482dcd
482dcd
* Mon Jun 17 2013 Peter Jones <pjones@redhat.com> - 0.4-0.2
482dcd
- Fix ldconfig invocation
482dcd
482dcd
* Mon Jun 17 2013 Peter Jones <pjones@redhat.com> - 0.4-0.1
482dcd
- Initial spec file