summaryrefslogtreecommitdiff
path: root/sys-boot/systemd-boot
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-11-03 08:36:22 +0000
commitf65628136faa35d0c4d3b5e7332275c7b35fcd96 (patch)
tree021998302365c5652e37824b6c26d4d969a62055 /sys-boot/systemd-boot
parent70b82ae359a5538711e103b0e8dfb92654296644 (diff)
gentoo resync : 03.11.2018
Diffstat (limited to 'sys-boot/systemd-boot')
-rw-r--r--sys-boot/systemd-boot/Manifest4
-rw-r--r--sys-boot/systemd-boot/files/239-stat-0.patch108
-rw-r--r--sys-boot/systemd-boot/files/239-stat-1.patch74
-rw-r--r--sys-boot/systemd-boot/systemd-boot-239.ebuild2
4 files changed, 187 insertions, 1 deletions
diff --git a/sys-boot/systemd-boot/Manifest b/sys-boot/systemd-boot/Manifest
index da13294058de..7bed43799dc5 100644
--- a/sys-boot/systemd-boot/Manifest
+++ b/sys-boot/systemd-boot/Manifest
@@ -2,6 +2,8 @@ AUX 233-Force-libsystemd-shared-to-be-static.patch 601 BLAKE2B 2473eb2d2a355e468
AUX 235-libshared-static.patch 968 BLAKE2B 8979c8fa294d1dc3a0356e32ff1a6d15bd3b3a93d5f9bacbbd137bbc38931ae5ec383ecc9ca237e62b80353ac36cd1c0b8df96ff1afd86e1a43c2601574fae01 SHA512 b37a097a14a455f91e1f1f2b00782aa5f1af4e201bbc9c2ebd69b4bb426cabc9d169733f70e09caf8fa36ae62f3eb44d5f7b805bb242310d18c94230f18835ee
AUX 237-libshared-static.patch 659 BLAKE2B f97c3c4e9d6ef3da674bc74fce8326d18fe1ebd4008e0929f1362ef0c2e854a67c8786c0b4ce9b29aee2b4409c54c668429f61e3c4ab85844d72c3d060b41925 SHA512 79cd97a176c91c76b512bce5f30605d673fb5480921cc76e221da9e78a8f7caec802efb481f8811c7aefba2901d007e340ba032a07a53e907f77e4bbd52169a7
AUX 239-debug-extra.patch 1641 BLAKE2B 37dae0aa6fb95be3f6b7ad5647ddc7e6e7cf6654e0119c5a41280a0db630d13746d5aaa0d1de8e66f49525a0b5a25f4f1136e0b8edc27e628cc82b386f5c0759 SHA512 091f4a0a6d8f4f5963002f33ebafa36f00f7635caafa14ac618ed7c5e08538cffbe655930802e14a0f744851ed7acacc217d2ad7e625627eeb82e14cc3fabd4a
+AUX 239-stat-0.patch 3553 BLAKE2B 225dd5e8e001a10a33c7ecb5c1378589b3eeecbea4fc746f27cc72d8eb8787c6966b8787c5922f0d0cefa28ac966c7c4f65ed341335d4105bc109df14110604c SHA512 a982c6384fcad2a1ad709564e932231e837ef799b764bbfa73eff5c42635a4bdc0dcf36e72300482ed188b492da723d3cd7ae04dda9b2c16c70fd1871c556a46
+AUX 239-stat-1.patch 2553 BLAKE2B 123a9488f7e2c9c2b70cb87ecc45be54b19b18660a2b238d028227e19cb7ba4933a115e2e82652b3179462ed0d2115058bff5d8d0212f439a919857f083c318d SHA512 6aee279728d0e609956c825ced6d2c00d8f4905327492c0348ad6ee8e862287b101ec4e2f1daa19533cf51f2ba1a15f0ea2dd6ccde44a4ff1b0fb151ffc7381e
DIST systemd-233.tar.gz 4660737 BLAKE2B 38cdd74543447b3c02391b328428fed169fe2cf2df6e9341dcaf2f7d3d977612ec102301e144c1cada90d61e9e9bda3b2faaef708c8ff4bd0b52b143760a83b2 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e
DIST systemd-235.tar.gz 6586406 BLAKE2B f2e46a6c51fc9445800c4b7eee66f23ae83b42c2fedf2304acf612e6cb99122afe67f1b93cf72ed022b52384975afb92ab38cfb4efc6026384602c973d2eb98e SHA512 243f2eb5340fa37dd1286eaa63e83387bda9e03953af266cd6196a37535a13491482caf14c6ab10608bba4ed23b6c41923608e52017e0c26988ed72ddd2b9993
DIST systemd-237.tar.gz 6871350 BLAKE2B 4734a110a297fbbd6679bced6302fcdca55ab5d4207905e8dee9f5545f1de841d5adeaa4fd89961b9e63709d04b5c862b8bc81481311cf8e72ee327e459c9d91 SHA512 15ef4b92815a6dd9a6c51672dbc00fd7cd0f08068ef0cbeaca574f68d330b28bc67ba1946f24f75ef3d9e7b63843a73eea700db54688061dbf5c9f8470394c3b
@@ -9,5 +11,5 @@ DIST systemd-239.tar.gz 7157293 BLAKE2B 975f6215c8bb6662d6e161f637e1fece22930c01
EBUILD systemd-boot-233.ebuild 2118 BLAKE2B 02b1df09cf96432b865586699bc0c4da4d3bc064182ac5f55a6e16e3f24691467d8e7fec65d0c658a535dab7b79112cba645c81077772d398a6a963c06be4c0b SHA512 aa7f7259549b397403b7a539015f1435c47e2933d0f67c68e0a633393fc64ac4bb0fac99d7860d400e9da8f68dbc8235340426ceab715e51f4881fbc991ecfa8
EBUILD systemd-boot-235.ebuild 2274 BLAKE2B 20cae085bbeabfd265d84c16cc80fa9a162cc9d46776984206e04c368697015a6eb4bdb2e16dca2b137417b3ef51ca02f4a368e7c118bb7ce92ccc436e06c290 SHA512 c016caa2373bd5b5893e7db7d0044c71dbed1d7393a8ac42252e2420e8e554624defd644e6d0a8e1ca32e52496b0e674a09c6feb98232293e19b05b2c890e39d
EBUILD systemd-boot-237.ebuild 2326 BLAKE2B 0525544b11bfe923ea0a9d75f0a3c2dc6af19cda15ee5c5d9855478533a83694e22ab77b8fd8efce7ae54b97b539b3343f9f238fc22633d984acd3939310d5f9 SHA512 f942a34573f78249a0ddc40ab927cf7acf88ded00420a4a3048b8b0ce66b11b75450fb3b1bd9ff914a9d9c9b8e5dbe07e75ff0c263a620b03e31ece738d80df1
-EBUILD systemd-boot-239.ebuild 2360 BLAKE2B 255bb3335539490af4f09e1d372900794255f70d6cbae2a6adba257b5221a6f41291146b3f75cbcdf63737a0ddfa8466c357fb4d75707adbaec2a69acaa2a996 SHA512 3e58b2e39ff984ba133c2e2d51d87904d43670ab8375a50518dfd0cb4014309b26205fdcadbbb6fa06a175a95237f987cb1fcb3d1dd2dbd836969eb20f5a9d4e
+EBUILD systemd-boot-239.ebuild 2424 BLAKE2B ec26000bf32d10242e876af86e401d249c64c58519bd2855d793d2809395b72355f4656e5a1ab5a68c0c10dff9a9fe7bc0034449a357c5322db7ad05d1078d54 SHA512 c5d2be59f5ff81923f86330f4ddba7449663ddcba332fa39373e541a92c032f481a860defaf1ea7e7306b700f7fa16ee105bf7ac517afa4dbd3670c87ddb8730
MISC metadata.xml 326 BLAKE2B f33138d9048d3a13295360f070b8d610a22909f99ee0127d3138bc1e0a066fc4590f580c4cd8fd539d5c86efc005b4662eb0dddeb085469719d0aa951c36af9a SHA512 7d33f5273a066af06b319d04f9a01c2d8f14a6de2102cf77918d7abdf6846fd0b271f5c5adb503354f93402eb341af280853f20dbb673264196c552aa24eb6fe
diff --git a/sys-boot/systemd-boot/files/239-stat-0.patch b/sys-boot/systemd-boot/files/239-stat-0.patch
new file mode 100644
index 000000000000..e136b703a2f5
--- /dev/null
+++ b/sys-boot/systemd-boot/files/239-stat-0.patch
@@ -0,0 +1,108 @@
+From 75720bff62a84896e9a0654afc7cf9408cf89a38 Mon Sep 17 00:00:00 2001
+From: Filipe Brandenburger <filbranden@google.com>
+Date: Sun, 15 Jul 2018 22:43:35 -0700
+Subject: [PATCH] build-sys: Detect whether struct statx is defined in
+ sys/stat.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Starting with glibc 2.27.9000-36.fc29, include file sys/stat.h will have a
+definition for struct statx, in which case include file linux/stat.h should be
+avoided, in order to prevent a duplicate definition.
+
+ In file included from ../src/basic/missing.h:18,
+ from ../src/basic/util.h:28,
+ from ../src/basic/hashmap.h:10,
+ from ../src/shared/bus-util.h:12,
+ from ../src/libsystemd/sd-bus/bus-creds.c:11:
+ /usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’
+ struct statx {
+ ^~~~~
+ In file included from /usr/include/sys/stat.h:446,
+ from ../src/basic/util.h:19,
+ from ../src/basic/hashmap.h:10,
+ from ../src/shared/bus-util.h:12,
+ from ../src/libsystemd/sd-bus/bus-creds.c:11:
+ /usr/include/bits/statx.h:36:8: note: originally defined here
+ struct statx
+ ^~~~~
+
+Extend our meson.build to look for struct statx when only sys/stat.h is
+included and, in that case, do not include linux/stat.h anymore.
+
+Tested that systemd builds correctly when using a glibc version that includes a
+definition for struct statx.
+
+glibc Fedora RPM update:
+https://src.fedoraproject.org/rpms/glibc/c/28cb5d31fc1e5887912283c889689c47076278ae
+
+glibc upstream commit:
+https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=fd70af45528d59a00eb3190ef6706cb299488fcd
+---
+ meson.build | 5 +++++
+ src/basic/missing.h | 5 ++++-
+ src/basic/xattr-util.c | 1 -
+ 3 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index dd904c7148..68423bdfa5 100644
+--- a/meson.build
++++ b/meson.build
+@@ -425,6 +425,7 @@ decl_headers = '''
+ #include <sys/stat.h>
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
++# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -439,6 +440,10 @@ foreach decl : ['char16_t',
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+
++conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', prefix : '''
++#include <sys/stat.h>
++''', args : '-D_GNU_SOURCE') > 0)
++
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+ ['IFLA_VRF_TABLE', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 71a07d0574..14ad3d4914 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -15,7 +15,6 @@
+ #include <linux/neighbour.h>
+ #include <linux/oom.h>
+ #include <linux/rtnetlink.h>
+-#include <linux/stat.h>
+ #include <net/ethernet.h>
+ #include <stdlib.h>
+ #include <sys/resource.h>
+@@ -25,6 +24,10 @@
+ #include <uchar.h>
+ #include <unistd.h>
+
++#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#include <linux/stat.h>
++#endif
++
+ #if HAVE_AUDIT
+ #include <libaudit.h>
+ #endif
+diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c
+index c5c55ea846..0ee0979837 100644
+--- a/src/basic/xattr-util.c
++++ b/src/basic/xattr-util.c
+@@ -2,7 +2,6 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <linux/stat.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+--
+2.19.1
+
diff --git a/sys-boot/systemd-boot/files/239-stat-1.patch b/sys-boot/systemd-boot/files/239-stat-1.patch
new file mode 100644
index 000000000000..1104de3c9c1a
--- /dev/null
+++ b/sys-boot/systemd-boot/files/239-stat-1.patch
@@ -0,0 +1,74 @@
+From 9c869d08d82c73f62ab3527567858ce4b0cf1257 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 18 Jul 2018 17:26:17 +0200
+Subject: [PATCH] meson: unify linux/stat.h check with other checks and use
+ _GNU_SOURCE
+
+Using _GNU_SOURCE is better because that's how we include the headers in the
+actual build, and some headers define different stuff when it is defined.
+sys/stat.h for example defines 'struct statx' conditionally.
+---
+ meson.build | 20 ++++++++++++++------
+ src/basic/missing.h | 2 +-
+ 2 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 68423bdfa5..99035d2306 100644
+--- a/meson.build
++++ b/meson.build
+@@ -421,11 +421,9 @@ decl_headers = '''
+ #include <uchar.h>
+ #include <linux/ethtool.h>
+ #include <linux/fib_rules.h>
+-#include <linux/stat.h>
+ #include <sys/stat.h>
+ '''
+ # FIXME: key_serial_t is only defined in keyutils.h, this is bound to fail
+-# FIXME: these should use -D_GNU_SOURCE, since that is defined at build time
+
+ foreach decl : ['char16_t',
+ 'char32_t',
+@@ -436,13 +434,23 @@ foreach decl : ['char16_t',
+ ]
+
+ # We get -1 if the size cannot be determined
+- have = cc.sizeof(decl, prefix : decl_headers) > 0
++ have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
++
++ if decl == 'struct statx'
++ if have
++ want_linux_stat_h = false
++ else
++ have = cc.sizeof(decl,
++ prefix : decl_headers + '#include <linux/stat.h>',
++ args : '-D_GNU_SOURCE') > 0
++ want_linux_stat_h = have
++ endif
++ endif
++
+ conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
+ endforeach
+
+-conf.set10('HAVE_STRUCT_STATX_IN_SYS_STAT_H', cc.sizeof('struct statx', prefix : '''
+-#include <sys/stat.h>
+-''', args : '-D_GNU_SOURCE') > 0)
++conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
+
+ foreach decl : [['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
+ ['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index 14ad3d4914..9044683b15 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -24,7 +24,7 @@
+ #include <uchar.h>
+ #include <unistd.h>
+
+-#if !HAVE_STRUCT_STATX_IN_SYS_STAT_H
++#if WANT_LINUX_STAT_H
+ #include <linux/stat.h>
+ #endif
+
+--
+2.19.1
+
diff --git a/sys-boot/systemd-boot/systemd-boot-239.ebuild b/sys-boot/systemd-boot/systemd-boot-239.ebuild
index 4eb8570b73cc..603415b39a0f 100644
--- a/sys-boot/systemd-boot/systemd-boot-239.ebuild
+++ b/sys-boot/systemd-boot/systemd-boot-239.ebuild
@@ -38,6 +38,8 @@ S="${WORKDIR}/systemd-${PV}"
PATCHES=(
"${FILESDIR}/237-libshared-static.patch"
"${FILESDIR}/239-debug-extra.patch"
+ "${FILESDIR}/239-stat-0.patch"
+ "${FILESDIR}/239-stat-1.patch"
)
src_configure() {