]> git.pld-linux.org Git - packages/efivar.git/commitdiff
- updated to 0.23 auto/th/efivar-0.23-1
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 23 Jun 2016 19:18:22 +0000 (21:18 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 23 Jun 2016 19:18:22 +0000 (21:18 +0200)
- 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 <linux/nvme.h> (or <linux/nvme_ioctl.h> in 4.4+)

efivar-build.patch
efivar-static.patch
efivar.spec

index 9e7fb472e4ad47aeff14af4a52b313729635935e..f3c2780c77a858541e472133385cdb03d3ce0e43 100644 (file)
@@ -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 <inttypes.h>
+ #include <limits.h>
+ #include <linux/ethtool.h>
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
++#include <linux/nvme_ioctl.h>
++#else
+ #include <linux/nvme.h>
++#endif
+ #include <linux/sockios.h>
+ #include <net/if.h>
+ #include <scsi/scsi.h>
+--- 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)"
index 15dd5d316b39879e5b93d3c7892b4ca9a37f45a2..423192720c0e42a0ed527d45740d8826cc59901f 100644 (file)
@@ -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) ;)
index b9cb49bc9d5820d5f89a3e5106b3c195cd47b0f1..dbfae48619b0755d0a613fef4765eb322c08367a 100644 (file)
@@ -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
This page took 0.051765 seconds and 4 git commands to generate.