Hello community,

here is the log from the commit of package trustedgrub2 for openSUSE:Factory 
checked in at 2017-02-20 13:15:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trustedgrub2 (Old)
 and      /work/SRC/openSUSE:Factory/.trustedgrub2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trustedgrub2"

Changes:
--------
--- /work/SRC/openSUSE:Factory/trustedgrub2/trustedgrub2.changes        
2016-04-22 16:24:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.trustedgrub2.new/trustedgrub2.changes   
2017-02-20 13:15:20.706348547 +0100
@@ -1,0 +2,7 @@
+Sun Feb 19 05:59:19 UTC 2017 - [email protected]
+
+- Fix build aginst glibc 2.25+
+ * 0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch 
+ * 0002-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch
+
+-------------------------------------------------------------------

New:
----
  0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch
  0002-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch

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

Other differences:
------------------
++++++ trustedgrub2.spec ++++++
--- /var/tmp/diff_new_pack.DtoR7C/_old  2017-02-20 13:15:21.562228213 +0100
+++ /var/tmp/diff_new_pack.DtoR7C/_new  2017-02-20 13:15:21.574226527 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package trustedgrub2
 #
-# 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
@@ -28,6 +28,8 @@
 Source2:        HOWTO.luks-keyfile
 Patch1:         use-grub2-as-a-package-name.patch
 Patch2:         grub2-linguas.sh-no-rsync.patch
+Patch3:         0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch
+Patch4:         0002-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch
 # Btrfs snapshot booting related patches
 Patch101:       grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch
 Patch102:       grub2-btrfs-02-export-subvolume-envvars.patch
@@ -80,6 +82,8 @@
 %setup
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1

++++++ 0001-build-Use-AC_HEADER_MAJOR-to-find-device-macros.patch ++++++
>From 7a5b301e3adb8e054288518a325135a1883c1c6c Mon Sep 17 00:00:00 2001
From: Mike Gilbert <[email protected]>
Date: Tue, 19 Apr 2016 14:27:22 -0400
Subject: [PATCH] build: Use AC_HEADER_MAJOR to find device macros

Depending on the OS/libc, device macros are defined in different
headers. This change ensures we include the right one.

sys/types.h - BSD
sys/mkdev.h - Sun
sys/sysmacros.h - glibc (Linux)

glibc currently pulls sys/sysmacros.h into sys/types.h, but this may
change in a future release.

https://sourceware.org/ml/libc-alpha/2015-11/msg00253.html
---
 configure.ac                         | 3 ++-
 grub-core/osdep/devmapper/getroot.c  | 6 ++++++
 grub-core/osdep/devmapper/hostdisk.c | 5 +++++
 grub-core/osdep/linux/getroot.c      | 6 ++++++
 grub-core/osdep/unix/getroot.c       | 4 +++-
 5 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 57e1713..9ddfc53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -388,7 +388,8 @@ fi
 
 # Check for functions and headers.
 AC_CHECK_FUNCS(posix_memalign memalign getextmntent)
-AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h sys/mkdev.h limits.h)
+AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
+AC_HEADER_MAJOR
 
 AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
 #include <sys/param.h>
diff --git a/grub-core/osdep/devmapper/getroot.c 
b/grub-core/osdep/devmapper/getroot.c
index 05eda50..72e5582 100644
--- a/grub-core/osdep/devmapper/getroot.c
+++ b/grub-core/osdep/devmapper/getroot.c
@@ -40,6 +40,12 @@
 #include <limits.h>
 #endif
 
+#if defined(MAJOR_IN_MKDEV)
+#include <sys/mkdev.h>
+#elif defined(MAJOR_IN_SYSMACROS)
+#include <sys/sysmacros.h>
+#endif
+
 #include <libdevmapper.h>
 
 #include <grub/types.h>
diff --git a/grub-core/osdep/devmapper/hostdisk.c 
b/grub-core/osdep/devmapper/hostdisk.c
index 19c1101..a697bcb 100644
--- a/grub-core/osdep/devmapper/hostdisk.c
+++ b/grub-core/osdep/devmapper/hostdisk.c
@@ -24,6 +24,11 @@
 #include <errno.h>
 #include <limits.h>
 
+#if defined(MAJOR_IN_MKDEV)
+#include <sys/mkdev.h>
+#elif defined(MAJOR_IN_SYSMACROS)
+#include <sys/sysmacros.h>
+#endif
 
 #ifdef HAVE_DEVICE_MAPPER
 # include <libdevmapper.h>
diff --git a/grub-core/osdep/linux/getroot.c b/grub-core/osdep/linux/getroot.c
index 10480b6..09e7e6e 100644
--- a/grub-core/osdep/linux/getroot.c
+++ b/grub-core/osdep/linux/getroot.c
@@ -35,6 +35,12 @@
 #include <limits.h>
 #endif
 
+#if defined(MAJOR_IN_MKDEV)
+#include <sys/mkdev.h>
+#elif defined(MAJOR_IN_SYSMACROS)
+#include <sys/sysmacros.h>
+#endif
+
 #include <grub/types.h>
 #include <sys/ioctl.h>         /* ioctl */
 #include <sys/mount.h>
diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c
index 1079a91..4bf37b0 100644
--- a/grub-core/osdep/unix/getroot.c
+++ b/grub-core/osdep/unix/getroot.c
@@ -51,8 +51,10 @@
 #endif
 
 #include <sys/types.h>
-#if defined(HAVE_SYS_MKDEV_H)
+#if defined(MAJOR_IN_MKDEV)
 #include <sys/mkdev.h>
+#elif defined(MAJOR_IN_SYSMACROS)
+#include <sys/sysmacros.h>
 #endif
 
 #if defined(HAVE_LIBZFS) && defined(HAVE_LIBNVPAIR)
-- 
2.6.6

++++++ 0002-configure-fix-check-for-sys-sysmacros.h-under-glibc-.patch ++++++
>From 07662af7aed55bcec448bc2a6610de1f0cb62100 Mon Sep 17 00:00:00 2001
From: Andrei Borzenkov <[email protected]>
Date: Thu, 22 Dec 2016 22:48:25 +0300
Subject: [PATCH] configure: fix check for sys/sysmacros.h under glibc 2.25+

glibc 2.25 still includes sys/sysmacros.h in sys/types.h but also emits
deprecation warning. So test for sys/types.h succeeds in configure but later
compilation fails because we use -Werror by default.

While this is fixed in current autoconf GIT, we really cannot force everyone
to use bleeding edge (that is not even released right now). So run test under
-Werror as well to force proper detection.

This should have no impact on autoconf 2.70+ as AC_HEADER_MAJOR in this version
simply checks for header existence.

Reported and tested by Khem Raj <[email protected]>
---
 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index dc56564..4e980c5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -389,7 +389,14 @@ fi
 # Check for functions and headers.
 AC_CHECK_FUNCS(posix_memalign memalign getextmntent)
 AC_CHECK_HEADERS(sys/param.h sys/mount.h sys/mnttab.h limits.h)
+
+# glibc 2.25 still includes sys/sysmacros.h in sys/types.h but emits 
deprecation
+# warning which causes compilation failure later with -Werror. So use -Werror 
here
+# as well to force proper sys/sysmacros.h detection.
+SAVED_CFLAGS="$CFLAGS"
+CFLAGS="$HOST_CFLAGS -Werror"
 AC_HEADER_MAJOR
+CFLAGS="$SAVED_CFLAGS"
 
 AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$ac_includes_default
 #include <sys/param.h>
-- 
2.6.6


Reply via email to