From: Jakub Bogusz Date: Thu, 23 Jun 2016 19:18:22 +0000 (+0200) Subject: - updated to 0.23 X-Git-Tag: auto/th/efivar-0.23-1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fefivar.git;a=commitdiff_plain;h=6ae92608ffc9e0fea7b1c1cf4997623bf7b1cbd2 - updated to 0.23 - updated static patch - previous build patch obsolete; added new one: fix build with linux 4.4+ headers and libefiboot linking - BR: linux-libc-headers >= 3.3 for (or in 4.4+) --- diff --git a/efivar-build.patch b/efivar-build.patch index 9e7fb47..f3c2780 100644 --- a/efivar-build.patch +++ b/efivar-build.patch @@ -1,11 +1,25 @@ ---- efivar-0.21/src/linux.c.orig 2015-07-13 22:00:06.000000000 +0200 -+++ efivar-0.21/src/linux.c 2015-09-11 23:12:37.823596690 +0200 -@@ -847,7 +847,7 @@ - __attribute__((__visibility__ ("hidden"))) - make_mac_path(uint8_t *buf, ssize_t size, const char * const ifname) - { -- struct ifreq ifr = { 0, }; -+ struct ifreq ifr = { { { 0 } }, }; - struct ethtool_drvinfo drvinfo = { 0, }; - int fd, rc; - ssize_t ret = -1, sz, off=0; +--- efivar-0.23/src/linux.c.orig 2016-06-23 20:56:40.006600643 +0200 ++++ efivar-0.23/src/linux.c 2016-06-23 20:56:49.526548896 +0200 +@@ -22,7 +22,12 @@ + #include + #include + #include ++#include ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) ++#include ++#else + #include ++#endif + #include + #include + #include +--- efivar-0.23/src/Makefile.orig 2016-06-23 21:04:59.510561274 +0200 ++++ efivar-0.23/src/Makefile 2016-06-23 21:08:25.262779936 +0200 +@@ -60,6 +60,7 @@ + libefiboot.a : $(patsubst %.o,%.static.o,$(LIBEFIBOOT_OBJECTS)) + + libefiboot.so : $(LIBEFIBOOT_OBJECTS) ++libefiboot.so : LIBS=efivar + + deps :: $(ALL_SOURCES) + $(MAKE) -f $(SRCDIR)/Make.deps deps SOURCES="$(ALL_SOURCES)" diff --git a/efivar-static.patch b/efivar-static.patch index 15dd5d3..4231927 100644 --- a/efivar-static.patch +++ b/efivar-static.patch @@ -1,23 +1,9 @@ ---- efivar-0.21/src/Makefile.orig 2015-07-13 22:00:06.000000000 +0200 -+++ efivar-0.21/src/Makefile 2015-09-12 09:24:38.062055687 +0200 -@@ -5,11 +5,12 @@ - include $(TOPDIR)/Make.version - - LIBTARGETS = $(foreach x,libefivar libefiboot,$(x).so.$(VERSION) $(x).so.$(MAJOR_VERSION)) -+STATICLIBTARGETS = libefivar.a libefiboot.a - PCTARGETS = efivar.pc efiboot.pc - BINTARGETS = efivar - INCTARGETS = include/efivar/efivar-guids.h - all : $(EFIVAR_DEPS) $(INCTARGETS) deps --all : $(LIBTARGETS) $(PCTARGETS) $(BINTARGETS) libefiboot.so -+all : $(LIBTARGETS) $(STATICLIBTARGETS) $(PCTARGETS) $(BINTARGETS) libefiboot.so - @$(MAKE) -C test TOPDIR=$(TOPDIR) SRCDIR=$(SRCDIR)/test $@ - - EFIVAR_OBJECTS = dp.o dp-acpi.o dp-hw.o dp-media.o dp-message.o \ -@@ -89,6 +90,7 @@ - install : all - $(INSTALL) -d -m 755 $(DESTDIR)$(libdir) - $(foreach x, $(LIBTARGETS), $(INSTALL) -m 755 $(x) $(DESTDIR)$(libdir);) +--- efivar-0.23/src/Makefile.orig 2016-06-23 20:40:50.398411788 +0200 ++++ efivar-0.23/src/Makefile 2016-06-23 20:43:14.654297154 +0200 +@@ -77,6 +77,7 @@ + $(INSTALL) -m 755 $(x) $(DESTDIR)$(libdir)/$(x).$(VERSION) ;\ + ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x).$(MAJOR_VERSION);\ + ln -fs $(x).$(VERSION) $(DESTDIR)$(libdir)/$(x); ) + $(foreach x, $(STATICLIBTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(libdir);) $(INSTALL) -d -m 755 $(DESTDIR)$(PCDIR) $(foreach x, $(PCTARGETS), $(INSTALL) -m 644 $(x) $(DESTDIR)$(PCDIR) ;) diff --git a/efivar.spec b/efivar.spec index b9cb49b..dbfae48 100644 --- a/efivar.spec +++ b/efivar.spec @@ -1,20 +1,27 @@ # # Conditional build: -%bcond_without static_libs # don't build static libraries +%bcond_without static # efivar-static binary (static version of efivar) +%bcond_without static_libs # static libraries # Summary: Tools to manage UEFI variables Summary(pl.UTF-8): Narzędzia do zarządzania zmiennymi UEFI Name: efivar -Version: 0.21 +Version: 0.23 Release: 1 License: LGPL v2.1 Group: Applications/System -Source0: https://github.com/rhinstaller/efivar/archive/%{version}/%{name}-%{version}.tar.gz -# Source0-md5: 9b2bc790c267614b46b9c9c6528629d6 +#Source0Download: https://github.com/rhinstaller/efivar/releases +Source0: https://github.com/rhinstaller/efivar/releases/download/%{version}/%{name}-%{version}.tar.bz2 +# Source0-md5: bff7aa95fdb2f5d79f4aa9721dca2bbd Patch0: %{name}-build.patch Patch1: %{name}-static.patch URL: https://github.com/rhinstaller/efivar +BuildRequires: linux-libc-headers >= 7:3.3 BuildRequires: popt-devel +%if %{with static} +BuildRequires: glibc-static +BuildRequires: popt-static +%endif Requires: %{name}-libs = %{version}-%{release} # Beside (U)EFI architectures, additionally allow x32 userspace for x86_64 boot arch ExclusiveArch: %{ix86} %{x8664} x32 arm aarch64 ia64 @@ -68,9 +75,10 @@ Statyczna biblioteka efivar. %patch1 -p1 %build -%{__make} \ +%{__make} -j1 \ CC="%{__cc}" \ CFLAGS="%{rpmcflags}" \ + %{!?with_static:BINTARGETS=efivar} \ %{!?with_static_libs:STATICLIBTARGETS=} \ libdir=%{_libdir} @@ -79,6 +87,7 @@ rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ + %{!?with_static:BINTARGETS=efivar} \ %{!?with_static_libs:STATICLIBTARGETS=} \ libdir=%{_libdir} @@ -92,6 +101,9 @@ rm -rf $RPM_BUILD_ROOT %defattr(644,root,root,755) %doc README.md TODO %attr(755,root,root) %{_bindir}/efivar +%if %{with static} +%attr(755,root,root) %{_bindir}/efivar-static +%endif %{_mandir}/man1/efivar.1* %files libs