commit 77f9b7960afd26c4adc84a223819e8097ed1c98b Author: Andrew Lukoshko Date: Wed Sep 13 14:45:42 2023 +0000 import Fedora efitools-1.9.2-9.fc38 diff --git a/.efitools.metadata b/.efitools.metadata new file mode 100644 index 0000000..991ce64 --- /dev/null +++ b/.efitools.metadata @@ -0,0 +1 @@ +eb06da832e02ca4a6afeefb89c015ee566961c58 SOURCES/efitools-1.9.2.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6563af7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/efitools-1.9.2.tar.gz diff --git a/SOURCES/efitools-c99-1.patch b/SOURCES/efitools-c99-1.patch new file mode 100644 index 0000000..5d36fdd --- /dev/null +++ b/SOURCES/efitools-c99-1.patch @@ -0,0 +1,24 @@ +Define _GNU_SOURCE for a declaration of strptime + +This is needed for compatibility with future C compilers which reject +implicit function declarations by default. Without _GNU_SOURCE (or a +similar feature test macro), does not declare the strptime +function, and compilation can fail. + +Submitted upstream: + + + +diff --git a/Make.rules b/Make.rules +index 903a5a4..d4de1ef 100644 +--- a/Make.rules ++++ b/Make.rules +@@ -14,7 +14,7 @@ else + $(error unknown architecture $(ARCH)) + endif + INCDIR = -I$(TOPDIR)include/ -I/usr/include/efi -I/usr/include/efi/$(ARCH) -I/usr/include/efi/protocol +-CPPFLAGS = -DCONFIG_$(ARCH) ++CPPFLAGS = -DCONFIG_$(ARCH) -D_GNU_SOURCE + CFLAGS = -O2 -g $(ARCH3264) -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -fno-stack-protector -ffreestanding -fno-stack-check + LDFLAGS = -nostdlib + CRTOBJ = crt0-efi-$(ARCH).o diff --git a/SOURCES/efitools-c99-2.patch b/SOURCES/efitools-c99-2.patch new file mode 100644 index 0000000..021732c --- /dev/null +++ b/SOURCES/efitools-c99-2.patch @@ -0,0 +1,21 @@ +Include for the strcasecmp function + +Otherwise, an implicit function declaration is the result, and the +code may fail to compile with future compilers. + +Submitted upstream: + + + +diff --git a/efi-updatevar.c b/efi-updatevar.c +index 4247105..033d938 100644 +--- a/efi-updatevar.c ++++ b/efi-updatevar.c +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/SPECS/efitools.spec b/SPECS/efitools.spec new file mode 100644 index 0000000..3a05a66 --- /dev/null +++ b/SPECS/efitools.spec @@ -0,0 +1,96 @@ +Name: efitools +Version: 1.9.2 +Release: 9%{?dist} +Summary: Tools to manipulate EFI secure boot keys and signatures +License: GPLv2 and LGPLv2 and BSD + +# call-to-mktemp: +# https://github.com/vathpela/efitools/issues/2 +URL: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git +Source0: %{url}/snapshot/%{name}-%{version}.tar.gz +Patch1: efitools-c99-1.patch +Patch2: efitools-c99-2.patch + +# same as gnu-efi +ExclusiveArch: %{efi} + +BuildRequires: pkgconfig(openssl) + +BuildRequires: gcc +BuildRequires: gnu-efi-devel +BuildRequires: help2man +BuildRequires: openssl +BuildRequires: perl-File-Slurp +BuildRequires: sbsigntools + +Requires: coreutils%{_isa} +Requires: mtools%{_isa} +Requires: parted%{_isa} +Requires: util-linux%{_isa} +Recommends: sbsigntools%{_isa} + +%description +This package installs a variety of tools for manipulating keys and binary +signatures on UEFI secure boot platforms. +The tools provide access to the keys and certificates stored in the +secure variables of the UEFI firmware, usually in the NVRAM area. + +%prep +%autosetup -p1 + +%build +%set_build_flags +%make_build + +%install +%make_install DOCDIR=%{buildroot}%{_docdir}/%{name}/ CFLAGS="%{optflags}" + +rm -v %{buildroot}%{_docdir}/%{name}/COPYING + +%files +%doc README +%license COPYING + +%{_datadir}/%{name}/ +%{_mandir}/man1/*.1.* + +%{_bindir}/cert-to-efi-hash-list +%{_bindir}/cert-to-efi-sig-list +%{_bindir}/efi-readvar +%{_bindir}/efi-updatevar +%{_bindir}/efitool-mkusb +%{_bindir}/flash-var +%{_bindir}/hash-to-efi-sig-list +%{_bindir}/sig-list-to-certs +%{_bindir}/sign-efi-sig-list + +%changelog +* Wed Dec 14 2022 Florian Weimer - 1.9.2-9 +- C99 port + +* Thu Jul 21 2022 Fedora Release Engineering - 1.9.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Jan 20 2022 Fedora Release Engineering - 1.9.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Sep 14 2021 Sahana Prasad - 1.9.2-6 +- Rebuilt with OpenSSL 3.0.0 + +* Wed Jul 21 2021 Fedora Release Engineering - 1.9.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sun Mar 07 2021 Vladislav Kazakov - 1.9.2-4 +- Fix incorrect build. + +* Sat Feb 06 2021 Vladislav Kazakov - 1.9.2-3 +- Add system flags to CFLAGS. +- Remove i686 support. + +* Sun Jan 31 2021 Vladislav Kazakov - 1.9.2-2 +- Add BSD license. +- Rename LGPLv2.1 to LGPLv2. +- Add reference to issue about mktemp usage. + +* Sun Jan 17 2021 Vladislav Kazakov - 1.9.2-1 +- Initial SPEC release.