Hello community,

here is the log from the commit of package efivar for openSUSE:Factory checked 
in at 2017-02-11 01:39:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/efivar (Old)
 and      /work/SRC/openSUSE:Factory/.efivar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "efivar"

Changes:
--------
--- /work/SRC/openSUSE:Factory/efivar/efivar.changes    2016-07-20 
09:15:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.efivar.new/efivar.changes       2017-02-11 
01:39:21.052523371 +0100
@@ -1,0 +2,13 @@
+Thu Feb  9 06:32:10 UTC 2017 - g...@suse.com
+
+- Add efivar-use-sysmacros.patch to fix the Factory/Tumbleweed
+  build correctly.
+- Amend the spec file to specify the gcc version for SLE11SP4
+
+-------------------------------------------------------------------
+Mon Feb  6 14:40:25 UTC 2017 - r...@suse.com
+
+- Fix building for SLE11SP4, SLE12SP2, and Tumbleweed
+  (fate#322108, bnc#1012765)
+
+-------------------------------------------------------------------

New:
----
  efivar-use-sysmacros.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ efivar.spec ++++++
--- /var/tmp/diff_new_pack.cRqvIh/_old  2017-02-11 01:39:22.136370428 +0100
+++ /var/tmp/diff_new_pack.cRqvIh/_new  2017-02-11 01:39:22.136370428 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package efivar
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,6 +16,17 @@
 #
 
 
+%if 0%{?suse_version} <= 1320
+  # Allow building on older products (SLE11SP4, SLES12, and Leap 42.2)
+  %bcond_without forced_lto
+  %if 0%{?suse_version} == 1110
+    %define gcc 48
+    %define gcc_v 4.8
+  %endif
+%else
+  %bcond_with forced_lto
+%endif
+
 Name:           efivar
 Version:        0.24
 Release:        0
@@ -26,9 +37,17 @@
 Source0:        
https://github.com/rhinstaller/efivar/releases/download/%{version}/%{name}-%{version}.tar.bz2
 Patch1:         efivar-no-static.patch
 Patch2:         deprecated-readdir_r.patch
+Patch3:         efivar-use-sysmacros.patch
+%if "0%{?buildroot}" == "0"
+# set a sane value for buildroot, unless it's already there!
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%endif
 BuildRequires:  fdupes
 BuildRequires:  pkg-config
 BuildRequires:  popt-devel
+%if 0%{?gcc} != 0
+BuildRequires:  gcc%{gcc}
+%endif
 Requires:       libefivar0 = %{version}-%{release}
 
 %description
@@ -47,21 +66,48 @@
 Requires:       libefivar0 = %{version}-%{release}
 
 %description devel
-development headers required to use libefivar.
+Development headers required to use libefivar.
 
 %prep
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%if 0%{?suse_version} == 1110
+# Instead of conditional patching:
+# - 'popt.pc' missing in 'popt-devel' on SLE11
+perl -pi -e 's{^.*PKGS=popt.*$}{}; s{(efivar\S* : LIBS=.*)dl}{$1popt dl}' \
+   src/Makefile
+# - 'uchar.h' missing in both 'glibc-devel' and 'gcc-5' packages on SLE11
+perl -pi -e 's{\#include \<uchar\.h\>}{typedef __CHAR16_TYPE__ char16_t;}' \
+   src/export.c
+%endif
 
 %build
-export CFLAGS="%{optflags} -Wno-nonnull"
+CFLAGS="%{optflags} -Wno-nonnull"
+%if %{with forced_lto}
+  CFLAGS="$CFLAGS -flto"
+%endif
+%ifarch ia64
+  CFLAGS="${CFLAGS//-fstack-protector/}"
+%endif
+export CFLAGS
+
 make \
+%if 0%{?suse_version} == 1110
+  CC=gcc-%{gcc_v} \
+  AR=gcc-ar-%{gcc_v} \
+  NM=gcc-nm-%{gcc_v} \
+  RANLIB=gcc-ranlib-%{gcc_v} \
+%endif
   libdir=%{_libdir} \
   bindir=%{_bindir}
 
 %install
-make DESTDIR=%{buildroot} libdir=%{_libdir} install
+make DESTDIR=%{buildroot} \
+  libdir=%{_libdir} \
+  bindir=%{_bindir} \
+  install
 %fdupes -s %{buildroot}
 
 %post -n libefivar0 -p /sbin/ldconfig

++++++ efivar-use-sysmacros.patch ++++++
>From 3ad5aab6ec57b28e62625bf6f3e444b0bcde799a Mon Sep 17 00:00:00 2001
From: Peter Jones <pjo...@redhat.com>
Date: Wed, 10 Aug 2016 16:47:41 -0400
Subject: [PATCH] libefivar: use sysmacros.h

Signed-off-by: Peter Jones <pjo...@redhat.com>
---
 src/linux.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/linux.c b/src/linux.c
index 87f2284..7c644ed 100644
--- a/src/linux.c
+++ b/src/linux.c
@@ -31,6 +31,7 @@
 #include <stdio.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
-- 
2.11.0


Reply via email to