diff --git a/.efivar.metadata b/.efivar.metadata new file mode 100644 index 0000000..3116e27 --- /dev/null +++ b/.efivar.metadata @@ -0,0 +1 @@ +cf8563d5783fce87f331ae9eed531648e1aeb861 SOURCES/efivar-0.11.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7eacbf4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/efivar-0.11.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-Revert-Only-open-with-O_CREAT-if-we-re-not-using-EFI.patch b/SOURCES/0001-Revert-Only-open-with-O_CREAT-if-we-re-not-using-EFI.patch new file mode 100644 index 0000000..a6702f0 --- /dev/null +++ b/SOURCES/0001-Revert-Only-open-with-O_CREAT-if-we-re-not-using-EFI.patch @@ -0,0 +1,30 @@ +From 5a43dce1ef31d3d4927a4c67400a7e33ff8afe75 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Fri, 22 Aug 2014 12:23:28 -0400 +Subject: [PATCH] Revert "Only open with O_CREAT if we're not using + EFI_VARIABLE_APPEND_WRITE." + +This reverts commit 7153d0dbb7d1d36b1712dfa91e2e62043880fdfa. +--- + src/efivarfs.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/efivarfs.c b/src/efivarfs.c +index b918c67..9b77d4e 100644 +--- a/src/efivarfs.c ++++ b/src/efivarfs.c +@@ -209,10 +209,7 @@ efivarfs_set_variable(efi_guid_t guid, const char *name, uint8_t *data, + goto err; + } + +- int flags = O_WRONLY; +- if (!(attributes & EFI_VARIABLE_APPEND_WRITE)) +- flags |= O_CREAT|O_EXCL; +- fd = open(path, flags, 0600); ++ fd = open(path, O_WRONLY|O_CREAT, 0600); + if (fd < 0) + goto err; + +-- +1.9.3 + diff --git a/SPECS/efivar.spec b/SPECS/efivar.spec new file mode 100644 index 0000000..b8408b1 --- /dev/null +++ b/SPECS/efivar.spec @@ -0,0 +1,105 @@ +Name: efivar +Version: 0.11 +Release: 1%{?dist} +Summary: Tools to manage UEFI variables +License: LGPLv2.1 +URL: https://github.com/vathpela/efivar +Requires: %{name}-libs = %{version}-%{release} +ExclusiveArch: i386 x86_64 aarch64 + +BuildRequires: popt-devel git +Source0: https://github.com/vathpela/%{name}/archive/efivar-%{version}.tar.bz2 +Patch0001: 0001-Revert-Only-open-with-O_CREAT-if-we-re-not-using-EFI.patch + +%description +efivar provides a simple command line interface to the UEFI variable facility. + +%package libs +Summary: Library to manage UEFI variables + +%description libs +Library to allow for the simple manipulation of UEFI variables. + +%package devel +Summary: Development headers for libefivar +Requires: %{name}-libs = %{version}-%{release} + +%description devel +development headers required to use libefivar. + +%prep +%setup -q -n %{name}-%{version} +git init +git config user.email "example@example.com" +git config user.name "RHEL Ninjas" +git add . +git commit -a -q -m "%{version} baseline." +git am %{patches} - 0.11-1 +- Update to 0.11 + +* Sat Aug 16 2014 Fedora Release Engineering - 0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 02 2014 Peter Jones - 0.10-1 +- Update package to 0.10. +- Fixes a build error due to different cflags in the builders vs updstream + makefile. + +* Fri May 02 2014 Peter Jones - 0.9-0.1 +- Update package to 0.9. + +* Tue Apr 01 2014 Peter Jones - 0.8-0.1 +- Update package to 0.8 as well. + +* Fri Oct 25 2013 Peter Jones - 0.7-1 +- Update package to 0.7 +- adds --append support to the binary. + +* Fri Sep 06 2013 Peter Jones - 0.6-1 +- Update package to 0.6 +- fixes to documentation from lersek +- more validation of uefi guids +- use .xz for archives + +* Thu Sep 05 2013 Peter Jones - 0.5-0.1 +- Update to 0.5 + +* Mon Jun 17 2013 Peter Jones - 0.4-0.2 +- Fix ldconfig invocation + +* Mon Jun 17 2013 Peter Jones - 0.4-0.1 +- Initial spec file