[packages/systemd] - added struct-statx-in-glibc patch (from Fedora, fixes build with glibc 2.28) - switch to libidn2
qboosh
qboosh at pld-linux.org
Tue Sep 11 18:55:44 CEST 2018
commit 2c05495525c62b0487d290b22acc5db5e06979b9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Sep 11 18:58:44 2018 +0200
- added struct-statx-in-glibc patch (from Fedora, fixes build with glibc 2.28)
- switch to libidn2
systemd-struct-statx-in-glibc.patch | 106 ++++++++++++++++++++++++++++++++++++
systemd.spec | 16 ++++--
2 files changed, 117 insertions(+), 5 deletions(-)
---
diff --git a/systemd.spec b/systemd.spec
index 57dcd43..4262c53 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -109,6 +109,7 @@ Patch3: tmpfiles-not-fatal.patch
Patch4: udev-ploop-rules.patch
Patch5: udevadm-in-sbin.patch
Patch6: net-rename-revert.patch
+Patch7: %{name}-struct-statx-in-glibc.patch
Patch8: proc-hidepid.patch
Patch9: %{name}-configfs.patch
Patch10: pld-boot_efi_mount.patch
@@ -131,6 +132,7 @@ BuildRequires: docbook-dtd45-xml
BuildRequires: docbook-style-xsl
BuildRequires: elfutils-devel >= 0.158
BuildRequires: gettext-tools
+BuildRequires: glib2-devel >= 1:2.22.0
BuildRequires: glibc-misc
%{?with_efi:BuildRequires: gnu-efi}
BuildRequires: gnutls-devel >= 3.1.4
@@ -144,18 +146,20 @@ BuildRequires: libblkid-devel >= 2.24
BuildRequires: libcap-devel
BuildRequires: libgcrypt-devel >= 1.4.5
BuildRequires: libgpg-error-devel >= 1.12
-BuildRequires: libidn-devel
+BuildRequires: libidn2-devel
%{?with_microhttpd:BuildRequires: libmicrohttpd-devel >= 0.9.33}
-BuildRequires: libmount-devel >= 2.28.2-2
+BuildRequires: libmount-devel >= 2.30
BuildRequires: libseccomp-devel >= 2.3.1
%{?with_selinux:BuildRequires: libselinux-devel >= 2.6}
BuildRequires: libtool >= 2:2.2
BuildRequires: libxslt-progs
BuildRequires: lz4-devel >= r125
BuildRequires: m4
-BuildRequires: meson
+BuildRequires: meson >= 0.44
%{?with_pam:BuildRequires: pam-devel >= 1.1.2}
+BuildRequires: pcre2-8-devel
BuildRequires: pkgconfig >= 0.9.0
+BuildRequires: polkit-devel >= 0.106
BuildRequires: python3
BuildRequires: python3-lxml
%{?with_qrencode:BuildRequires: qrencode-devel}
@@ -189,13 +193,13 @@ Requires: kmod >= 25-2
Requires: libgpg-error >= 1.12
%{?with_microhttpd:Requires: libmicrohttpd >= 0.9.33}
Requires: libutempter
-Requires: polkit
+Requires: polkit >= 0.106
Requires: rc-scripts >= 0.4.5.3-7
Requires: setup >= 2.8.0-2
Requires: udev-core = %{epoch}:%{version}-%{release}
Requires: udev-libs = %{epoch}:%{version}-%{release}
Requires: uname(release) >= 3.13
-Requires: util-linux >= 2.28.2-2
+Requires: util-linux >= 2.30
Suggests: fsck >= 2.25.0
Suggests: service(klogd)
Suggests: service(syslog)
@@ -671,6 +675,7 @@ Uzupełnianie parametrów w zsh dla poleceń udev.
%patch5 -p1
# rejected upstream (do not disable!)
%patch6 -p1
+%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
@@ -693,6 +698,7 @@ cp -p %{SOURCE2} src/systemd_booted.c
-Dkill-path=/bin/kill \
-Dkmod-path=/sbin/kmod \
-Dlibcryptsetup=%{__true_false cryptsetup} \
+ -Dlibidn2=true \
-Dloadkeys-path=/usr/bin/loadkeys \
-Dlz4=true \
-Dmicrohttpd=%{__true_false microhttpd} \
diff --git a/systemd-struct-statx-in-glibc.patch b/systemd-struct-statx-in-glibc.patch
new file mode 100644
index 0000000..c3216d5
--- /dev/null
+++ b/systemd-struct-statx-in-glibc.patch
@@ -0,0 +1,106 @@
+[Fedora 0001-build-sys-Detect-whether-struct-statx-is-defined-in-.patch]
+From 75720bff62a84896e9a0654afc7cf9408cf89a38 Mon Sep 17 00:00:00 2001
+From: Filipe Brandenburger <filbranden at 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>
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/2c05495525c62b0487d290b22acc5db5e06979b9
More information about the pld-cvs-commit
mailing list