Accepting request 252438 from home:gary_lin:UEFI

The newer efibootmgr needs libefivar to access the EFI variables.
I packaged efivar so we can upgrade efibootmgr later.

OBS-URL: https://build.opensuse.org/request/show/252438
OBS-URL: https://build.opensuse.org/package/show/Base:System/efivar?expand=0&rev=1
This commit is contained in:
Marcus Meissner 2014-10-01 07:20:23 +00:00 committed by Git OBS Bridge
commit d3a56e9131
6 changed files with 152 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
efivar-0.12.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a451b164be4d1c2d61c30682d3d1da3a984f70f95802f8ad2a96e62b3c4c20ec
size 25504

15
efivar-suse-build.patch Normal file
View File

@ -0,0 +1,15 @@
---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,7 +21,7 @@ libefivar.a :: $(OBJECTS)
libefivar.so.$(SONAME_VERSION) :: $(OBJECTS)
efivar : efivar.o libefivar.so
- $(CCLD) $(ccldflags) -L. -lefivar -o $@ $^ -lpopt
+ $(CCLD) $(ccldflags) -L. $^ -lefivar -lpopt -o $@
efivar.pc : efivar.pc.in
sed -e "s,@@VERSION@@,$(VERSION),g" \

27
efivar.changes Normal file
View File

@ -0,0 +1,27 @@
-------------------------------------------------------------------
Fri Sep 26 04:06:57 UTC 2014 - glin@suse.com
- Update to 0.12
+ Make efi_guid_to_str() only optionally allocate.
+ Add ", mode" optionally to efi_set_variable()
+ Fix some return values that don't properly set errno.
+ Make "wrong size" test more verbose
+ Excise read_fd() since we've got read_file(), plus cleanups.
+ Remove variables we've failed to create.
+ Only open with O_CREAT if we're not using
EFI_VARIABLE_APPEND_WRITE
+ Fix poptReadDefaultConfig() error checking
+ Get rid of ftruncate() call in efivarfs writes.
+ If the real file size of an efivarfs file is smaller than stat,
get it right.
+ Fix uninitialized variables
+ Remove effectively dead code from text_to_guid()
+ Remove unnecessary explicit definitions or overrides of make
variables
- refresh efivar-suse-build.patch
-------------------------------------------------------------------
Mon Nov 4 08:05:05 UTC 2013 - glin@suse.com
- Initial import 0.7

83
efivar.spec Normal file
View File

@ -0,0 +1,83 @@
#
# spec file for package efivar
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: efivar
Version: 0.12
Release: 0
Summary: Tools to manage UEFI variables
License: LGPL-2.1
Group: Development/Libraries/Other
Url: https://github.com/vathpela/efivar
Source0: https://github.com/vathpela/efivar/releases/download/0.12/%{name}-%{version}.tar.bz2
Patch0: efivar-suse-build.patch
BuildRequires: popt-devel
BuildRequires: pkg-config
Requires: libefivar0 = %{version}-%{release}
%description
efivar provides a simple command line interface to the UEFI variable facility.
%package -n libefivar0
Summary: Library to manage UEFI variables
Group: Development/Libraries/Other
%description -n libefivar0
Library to allow for the simple manipulation of UEFI variables.
%package devel
Summary: Development headers for libefivar
Requires: libefivar0 = %{version}-%{release}
%description devel
development headers required to use libefivar.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%build
make libdir=%{_libdir} bindir=%{_bindir} OPT_FLAGS="$RPM_OPT_FLAGS"
%install
make DESTDIR=%{buildroot} libdir=%{_libdir} install
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libefivar0 -p /sbin/ldconfig
%postun -n libefivar0 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc
%{_bindir}/efivar
%{_mandir}/man1/*
%files devel
%defattr(-,root,root)
%{_mandir}/man3/*
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%files -n libefivar0
%defattr(-,root,root)
%{_libdir}/*.so.*
%changelog