From 3372401230ec4235f73b384d0a0e562e342fdcc9 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Fri, 27 May 2016 07:02:57 +0200 Subject: systemd: version bump 229 -> 230 Signed-off-by: Michael Olbrich --- .../0001-missing-defined-extra-clock-ids.patch | 34 ----- patches/systemd-229/0002-missing-add-BPF_XOR.patch | 28 ---- ...003-missing-define-__NR_kcmp-if-necessary.patch | 28 ---- ...4-missing-define-O_PATH-and-AT_EMPTY_PATH.patch | 43 ------ ...ure.ac-disable-NLS-to-avoid-unnecessary-d.patch | 35 ----- .../systemd-229/0006-missing-define-syncfs.patch | 45 ------ .../0007-missing-add-more-btrfs-defines.patch | 73 ---------- ...e-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch | 24 ---- .../0009-HACK-add-local-copy-of-uchar.h.patch | 152 --------------------- ...10-HACK-fix-building-without-linux-sctp.h.patch | 42 ------ ...utils.c-needs-missing.h-for-secure_getenv.patch | 24 ---- patches/systemd-229/autogen.sh | 9 -- patches/systemd-229/series | 16 --- .../0001-missing-defined-extra-clock-ids.patch | 34 +++++ patches/systemd-230/0002-missing-add-BPF_XOR.patch | 28 ++++ ...003-missing-define-__NR_kcmp-if-necessary.patch | 28 ++++ ...4-missing-define-O_PATH-and-AT_EMPTY_PATH.patch | 44 ++++++ ...ure.ac-disable-NLS-to-avoid-unnecessary-d.patch | 35 +++++ .../systemd-230/0006-missing-define-syncfs.patch | 45 ++++++ .../0007-missing-add-more-btrfs-defines.patch | 69 ++++++++++ ...e-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch | 24 ++++ .../0009-HACK-add-local-copy-of-uchar.h.patch | 152 +++++++++++++++++++++ ...10-HACK-fix-building-without-linux-sctp.h.patch | 42 ++++++ ...-SMACK_MAGIC-EFIVARFS_MAGIC-BINFMTFS_MAGI.patch | 34 +++++ patches/systemd-230/autogen.sh | 9 ++ patches/systemd-230/series | 16 +++ rules/host-systemd.make | 5 +- rules/systemd.make | 15 +- 28 files changed, 569 insertions(+), 564 deletions(-) delete mode 100644 patches/systemd-229/0001-missing-defined-extra-clock-ids.patch delete mode 100644 patches/systemd-229/0002-missing-add-BPF_XOR.patch delete mode 100644 patches/systemd-229/0003-missing-define-__NR_kcmp-if-necessary.patch delete mode 100644 patches/systemd-229/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch delete mode 100644 patches/systemd-229/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch delete mode 100644 patches/systemd-229/0006-missing-define-syncfs.patch delete mode 100644 patches/systemd-229/0007-missing-add-more-btrfs-defines.patch delete mode 100644 patches/systemd-229/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch delete mode 100644 patches/systemd-229/0009-HACK-add-local-copy-of-uchar.h.patch delete mode 100644 patches/systemd-229/0010-HACK-fix-building-without-linux-sctp.h.patch delete mode 100644 patches/systemd-229/0100-basic-user-utils.c-needs-missing.h-for-secure_getenv.patch delete mode 100755 patches/systemd-229/autogen.sh delete mode 100644 patches/systemd-229/series create mode 100644 patches/systemd-230/0001-missing-defined-extra-clock-ids.patch create mode 100644 patches/systemd-230/0002-missing-add-BPF_XOR.patch create mode 100644 patches/systemd-230/0003-missing-define-__NR_kcmp-if-necessary.patch create mode 100644 patches/systemd-230/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch create mode 100644 patches/systemd-230/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch create mode 100644 patches/systemd-230/0006-missing-define-syncfs.patch create mode 100644 patches/systemd-230/0007-missing-add-more-btrfs-defines.patch create mode 100644 patches/systemd-230/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch create mode 100644 patches/systemd-230/0009-HACK-add-local-copy-of-uchar.h.patch create mode 100644 patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch create mode 100644 patches/systemd-230/0011-missing-add-SMACK_MAGIC-EFIVARFS_MAGIC-BINFMTFS_MAGI.patch create mode 100755 patches/systemd-230/autogen.sh create mode 100644 patches/systemd-230/series diff --git a/patches/systemd-229/0001-missing-defined-extra-clock-ids.patch b/patches/systemd-229/0001-missing-defined-extra-clock-ids.patch deleted file mode 100644 index 618545bea..000000000 --- a/patches/systemd-229/0001-missing-defined-extra-clock-ids.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Michael Olbrich -Date: Thu, 19 Jun 2014 10:48:55 +0200 -Subject: [PATCH] missing: defined extra clock ids - -This is required for glibc <= 2.13 - -Upstream requires glibc 2.14 but this is useful for host-systemd. - -Signed-off-by: Michael Olbrich ---- - src/basic/missing.h | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 36b060496a7b..d73a73f64088 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -908,6 +908,16 @@ static inline int setns(int fd, int nstype) { - #define RTA_PREF 20 - #endif - -+#ifndef CLOCK_BOOTTIME -+#define CLOCK_BOOTTIME 7 -+#endif -+#ifndef CLOCK_REALTIME_ALARM -+#define CLOCK_REALTIME_ALARM 8 -+#endif -+#ifndef CLOCK_BOOTTIME_ALARM -+#define CLOCK_BOOTTIME_ALARM 9 -+#endif -+ - #ifndef IPV6_UNICAST_IF - #define IPV6_UNICAST_IF 76 - #endif diff --git a/patches/systemd-229/0002-missing-add-BPF_XOR.patch b/patches/systemd-229/0002-missing-add-BPF_XOR.patch deleted file mode 100644 index a2a4a88c9..000000000 --- a/patches/systemd-229/0002-missing-add-BPF_XOR.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Michael Olbrich -Date: Thu, 21 Aug 2014 12:30:15 +0200 -Subject: [PATCH] missing: add BPF_XOR - -BPF_XOR was introduced in kernel 3.7 - -Not for upstream, but needed for host-systemd. - -Signed-off-by: Michael Olbrich ---- - src/basic/missing.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/basic/missing.h b/src/basic/missing.h -index d73a73f64088..3d9ba1464608 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -970,6 +970,10 @@ static inline int setns(int fd, int nstype) { - # define BPF_XOR 0xa0 - #endif - -+#ifndef BPF_XOR -+# define BPF_XOR 0xa0 -+#endif -+ - /* Note that LOOPBACK_IFINDEX is currently not exported by the - * kernel/glibc, but hardcoded internally by the kernel. However, as - * it is exported to userspace indirectly via rtnetlink and the diff --git a/patches/systemd-229/0003-missing-define-__NR_kcmp-if-necessary.patch b/patches/systemd-229/0003-missing-define-__NR_kcmp-if-necessary.patch deleted file mode 100644 index e73fb7524..000000000 --- a/patches/systemd-229/0003-missing-define-__NR_kcmp-if-necessary.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Michael Olbrich -Date: Thu, 5 Mar 2015 10:33:25 +0100 -Subject: [PATCH] missing: define __NR_kcmp if necessary - -Needed for Kernel Headers < v3.5 - -Not for upstream, but needed for host-systemd. - -Signed-off-by: Michael Olbrich ---- - src/basic/missing.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 3d9ba1464608..34af717a7ce8 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -1079,6 +1079,10 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha - #define RENAME_NOREPLACE (1 << 0) - #endif - -+#ifndef __NR_kcmp -+# define __NR_kcmp 0xffffffff -+#endif -+ - #if !HAVE_DECL_KCMP - static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) { - #if defined(__NR_kcmp) diff --git a/patches/systemd-229/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch b/patches/systemd-229/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch deleted file mode 100644 index adfb10e58..000000000 --- a/patches/systemd-229/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Michael Olbrich -Date: Tue, 2 Jun 2015 10:46:05 +0200 -Subject: [PATCH] missing: define O_PATH and AT_EMPTY_PATH - -This is required for glibc <= 2.15 - -Upstream requires glibc 2.16 but this is useful for host-systemd. - -Signed-off-by: Michael Olbrich ---- - src/basic/missing.h | 6 ++++++ - src/basic/xattr-util.c | 1 + - 2 files changed, 7 insertions(+) - -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 34af717a7ce8..d17d725116e5 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -917,6 +917,12 @@ static inline int setns(int fd, int nstype) { - #ifndef CLOCK_BOOTTIME_ALARM - #define CLOCK_BOOTTIME_ALARM 9 - #endif -+#ifndef O_PATH -+#define O_PATH 010000000 -+#endif -+#ifndef AT_EMPTY_PATH -+#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ -+#endif - - #ifndef IPV6_UNICAST_IF - #define IPV6_UNICAST_IF 76 -diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c -index 8d7f14f3827e..dd9d2ebb1155 100644 ---- a/src/basic/xattr-util.c -+++ b/src/basic/xattr-util.c -@@ -25,6 +25,7 @@ - #include - #include - -+#include "missing.h" - #include "alloc-util.h" - #include "fd-util.h" - #include "macro.h" diff --git a/patches/systemd-229/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch b/patches/systemd-229/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch deleted file mode 100644 index c52ea7826..000000000 --- a/patches/systemd-229/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Michael Olbrich -Date: Tue, 7 Jul 2015 09:58:21 +0200 -Subject: [PATCH] HACK: configure.ac: disable NLS to avoid unnecessary - dependencies during autogen.sh - -Signed-off-by: Michael Olbrich ---- - configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 5fd73c59f15a..507ad1cc0660 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -59,6 +59,7 @@ SET_ARCH(IA32, i*86*) - SET_ARCH(MIPS, mips*) - SET_ARCH(AARCH64, aarch64*) - -+m4_ifdef([AM_NLS__DISABLED], [ - # i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise - AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no]) - AS_IF([test x"$intltool_found" != xyes], -@@ -81,6 +82,12 @@ AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [ - INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false' - AC_SUBST(INTLTOOL_POLICY_RULE) - ]) -+],[ -+touch `dirname $0`/po/Makefile.in.in -+echo -e 'all:\ninstall:\n' > `dirname $0`/po/Makefile -+INTLTOOL_POLICY_RULE= -+AC_SUBST(INTLTOOL_POLICY_RULE) -+]) - - GETTEXT_PACKAGE=systemd - AC_SUBST(GETTEXT_PACKAGE) diff --git a/patches/systemd-229/0006-missing-define-syncfs.patch b/patches/systemd-229/0006-missing-define-syncfs.patch deleted file mode 100644 index 536fd0c8a..000000000 --- a/patches/systemd-229/0006-missing-define-syncfs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Michael Olbrich -Date: Sat, 1 Aug 2015 21:36:38 +0200 -Subject: [PATCH] missing: define syncfs - -This is required for glibc < 2.14 - -Upstream requires glibc 2.16 but this is useful for host-systemd. - -Signed-off-by: Michael Olbrich ---- - configure.ac | 2 ++ - src/basic/missing.h | 7 +++++++ - 2 files changed, 9 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 507ad1cc0660..c998f6848d47 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -302,6 +302,8 @@ CAP_LIBS="$LIBS" - LIBS="$save_LIBS" - AC_SUBST(CAP_LIBS) - -+AC_CHECK_DECLS([syncfs], [], [], [[#include ]]) -+ - AC_CHECK_FUNCS([memfd_create]) - AC_CHECK_FUNCS([__secure_getenv secure_getenv]) - AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, -diff --git a/src/basic/missing.h b/src/basic/missing.h -index d17d725116e5..c64131da01c7 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -923,6 +923,13 @@ static inline int setns(int fd, int nstype) { - #ifndef AT_EMPTY_PATH - #define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ - #endif -+#if !HAVE_DECL_SYNCFS -+static inline int syncfs(int fd) -+{ -+ errno = ENOSYS; -+ return -1; -+} -+#endif - - #ifndef IPV6_UNICAST_IF - #define IPV6_UNICAST_IF 76 diff --git a/patches/systemd-229/0007-missing-add-more-btrfs-defines.patch b/patches/systemd-229/0007-missing-add-more-btrfs-defines.patch deleted file mode 100644 index 0d85b804a..000000000 --- a/patches/systemd-229/0007-missing-add-more-btrfs-defines.patch +++ /dev/null @@ -1,73 +0,0 @@ -From: Michael Olbrich -Date: Thu, 19 Nov 2015 16:52:47 +0100 -Subject: [PATCH] missing: add more btrfs defines - -Signed-off-by: Michael Olbrich ---- - src/basic/missing.h | 41 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 41 insertions(+) - -diff --git a/src/basic/missing.h b/src/basic/missing.h -index c64131da01c7..31fe1c5d44a7 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -387,6 +387,23 @@ struct btrfs_ioctl_quota_ctl_args { - __u64 cmd; - __u64 status; - }; -+ -+struct btrfs_ioctl_quota_rescan_args { -+ __u64 flags; -+ __u64 progress; -+ __u64 reserved[6]; -+}; -+ -+struct btrfs_ioctl_qgroup_assign_args { -+ __u64 assign; -+ __u64 src; -+ __u64 dst; -+}; -+ -+struct btrfs_ioctl_qgroup_create_args { -+ __u64 create; -+ __u64 qgroupid; -+}; - #endif - - #ifndef BTRFS_IOC_DEFRAG -@@ -461,11 +478,35 @@ struct btrfs_ioctl_quota_ctl_args { - struct btrfs_ioctl_quota_ctl_args) - #endif - -+#ifndef BTRFS_IOC_QGROUP_ASSIGN -+#define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \ -+ struct btrfs_ioctl_qgroup_assign_args) -+#endif -+ -+#ifndef BTRFS_IOC_QGROUP_CREATE -+#define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \ -+ struct btrfs_ioctl_qgroup_create_args) -+#endif -+ - #ifndef BTRFS_IOC_QGROUP_LIMIT - #define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \ - struct btrfs_ioctl_qgroup_limit_args) - #endif - -+#ifndef BTRFS_IOC_QUOTA_RESCAN -+#define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \ -+ struct btrfs_ioctl_quota_rescan_args) -+#endif -+ -+#ifndef BTRFS_IOC_QUOTA_RESCAN_STATUS -+#define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ -+ struct btrfs_ioctl_quota_rescan_args) -+#endif -+ -+#ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT -+#define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) -+#endif -+ - #ifndef BTRFS_FIRST_FREE_OBJECTID - #define BTRFS_FIRST_FREE_OBJECTID 256 - #endif diff --git a/patches/systemd-229/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch b/patches/systemd-229/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch deleted file mode 100644 index f75dd8613..000000000 --- a/patches/systemd-229/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Michael Olbrich -Date: Thu, 19 Nov 2015 16:53:42 +0100 -Subject: [PATCH] HACK: include missing.h in btrfs-ctree.h for BTRFS_UUID_SIZE - -This is needed for older Kernel headers without btrfs.h - -Not for upstream, but needed for host-systemd. - -Signed-off-by: Michael Olbrich ---- - src/basic/btrfs-ctree.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/basic/btrfs-ctree.h b/src/basic/btrfs-ctree.h -index 66bdf9736ef5..e9edc8eb5445 100644 ---- a/src/basic/btrfs-ctree.h -+++ b/src/basic/btrfs-ctree.h -@@ -1,5 +1,6 @@ - #pragma once - -+#include "missing.h" - #include "macro.h" - #include "sparse-endian.h" - diff --git a/patches/systemd-229/0009-HACK-add-local-copy-of-uchar.h.patch b/patches/systemd-229/0009-HACK-add-local-copy-of-uchar.h.patch deleted file mode 100644 index 77dd2419b..000000000 --- a/patches/systemd-229/0009-HACK-add-local-copy-of-uchar.h.patch +++ /dev/null @@ -1,152 +0,0 @@ -From: Michael Olbrich -Date: Fri, 15 Apr 2016 16:33:14 +0200 -Subject: [PATCH] HACK: add local copy of uchar.h - -Upstream requires glibc 2.16 and uchar.h is available in that version. - -Signed-off-by: Michael Olbrich ---- - configure.ac | 1 + - src/basic/_uchar.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/basic/escape.h | 1 - - src/basic/missing.h | 4 +++ - src/basic/utf8.h | 1 - - 5 files changed, 83 insertions(+), 2 deletions(-) - create mode 100644 src/basic/_uchar.h - -diff --git a/configure.ac b/configure.ac -index c998f6848d47..e78ed97a8b7c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -291,6 +291,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) - AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) - AC_CHECK_HEADERS([linux/btrfs.h], [], []) - AC_CHECK_HEADERS([linux/memfd.h], [], []) -+AC_CHECK_HEADERS([uchar.h], [], []) - - # unconditionally pull-in librt with old glibc versions - AC_SEARCH_LIBS([clock_gettime], [rt], [], []) -diff --git a/src/basic/_uchar.h b/src/basic/_uchar.h -new file mode 100644 -index 000000000000..b15d355ae0c5 ---- /dev/null -+++ b/src/basic/_uchar.h -@@ -0,0 +1,78 @@ -+/* Copyright (C) 2011-2015 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, see -+ . */ -+ -+/* -+ * ISO C11 Standard: 7.28 -+ * Unicode utilities -+ */ -+ -+#ifndef _UCHAR_H -+#define _UCHAR_H 1 -+ -+#include -+ -+#define __need_size_t -+#include -+#define __need_mbstate_t -+#include -+ -+/* Public type. */ -+typedef __mbstate_t mbstate_t; -+ -+ -+#if defined __GNUC__ && !defined __USE_ISOCXX11 -+/* Define the 16-bit and 32-bit character types. Use the information -+ provided by the compiler. */ -+# if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__ -+# if defined __STDC_VERSION__ && __STDC_VERSION__ < 201000L -+# error " requires ISO C11 mode" -+# else -+# error "definitions of __CHAR16_TYPE__ and/or __CHAR32_TYPE__ missing" -+# endif -+# endif -+typedef __CHAR16_TYPE__ char16_t; -+typedef __CHAR32_TYPE__ char32_t; -+#endif -+ -+ -+__BEGIN_DECLS -+ -+/* Write char16_t representation of multibyte character pointed -+ to by S to PC16. */ -+extern size_t mbrtoc16 (char16_t *__restrict __pc16, -+ const char *__restrict __s, size_t __n, -+ mbstate_t *__restrict __p) __THROW; -+ -+/* Write multibyte representation of char16_t C16 to S. */ -+extern size_t c16rtomb (char *__restrict __s, char16_t __c16, -+ mbstate_t *__restrict __ps) __THROW; -+ -+ -+ -+/* Write char32_t representation of multibyte character pointed -+ to by S to PC32. */ -+extern size_t mbrtoc32 (char32_t *__restrict __pc32, -+ const char *__restrict __s, size_t __n, -+ mbstate_t *__restrict __p) __THROW; -+ -+/* Write multibyte representation of char32_t C32 to S. */ -+extern size_t c32rtomb (char *__restrict __s, char32_t __c32, -+ mbstate_t *__restrict __ps) __THROW; -+ -+__END_DECLS -+ -+#endif /* uchar.h */ -diff --git a/src/basic/escape.h b/src/basic/escape.h -index 1b28bd10afc2..007e9df8015d 100644 ---- a/src/basic/escape.h -+++ b/src/basic/escape.h -@@ -23,7 +23,6 @@ - #include - #include - #include --#include - - #include "string-util.h" - #include "missing.h" -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 31fe1c5d44a7..ff370fea99d1 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -34,7 +34,11 @@ - #include - #include - #include -+#ifdef HAVE_UCHAR_H - #include -+#else -+#include "_uchar.h" -+#endif - #include - - #ifdef HAVE_AUDIT -diff --git a/src/basic/utf8.h b/src/basic/utf8.h -index 12c272d66e35..bea93a64437e 100644 ---- a/src/basic/utf8.h -+++ b/src/basic/utf8.h -@@ -22,7 +22,6 @@ - #include - #include - #include --#include - - #include "macro.h" - #include "missing.h" diff --git a/patches/systemd-229/0010-HACK-fix-building-without-linux-sctp.h.patch b/patches/systemd-229/0010-HACK-fix-building-without-linux-sctp.h.patch deleted file mode 100644 index 2b61ba4e8..000000000 --- a/patches/systemd-229/0010-HACK-fix-building-without-linux-sctp.h.patch +++ /dev/null @@ -1,42 +0,0 @@ -From: Michael Olbrich -Date: Mon, 18 Apr 2016 12:22:22 +0200 -Subject: [PATCH] HACK: fix building without linux/sctp.h - -linux/sctp.h exists since kernel 3.10. - -Upstream requires kernel 3.11 but this is useful for host-systemd. - -Signed-off-by: Michael Olbrich ---- - configure.ac | 1 + - src/core/socket.c | 4 ++++ - 2 files changed, 5 insertions(+) - -diff --git a/configure.ac b/configure.ac -index e78ed97a8b7c..733109747b07 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -292,6 +292,7 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n - AC_CHECK_HEADERS([linux/btrfs.h], [], []) - AC_CHECK_HEADERS([linux/memfd.h], [], []) - AC_CHECK_HEADERS([uchar.h], [], []) -+AC_CHECK_HEADERS([linux/sctp.h], [], []) - - # unconditionally pull-in librt with old glibc versions - AC_SEARCH_LIBS([clock_gettime], [rt], [], []) -diff --git a/src/core/socket.c b/src/core/socket.c -index 976687af416d..9ebbb6378cb0 100644 ---- a/src/core/socket.c -+++ b/src/core/socket.c -@@ -26,7 +26,11 @@ - #include - #include - #include -+#ifdef HAVE_LINUX_SCTP_H - #include -+#else -+#define SCTP_NODELAY 3 -+#endif - - #include "sd-event.h" - #include "alloc-util.h" diff --git a/patches/systemd-229/0100-basic-user-utils.c-needs-missing.h-for-secure_getenv.patch b/patches/systemd-229/0100-basic-user-utils.c-needs-missing.h-for-secure_getenv.patch deleted file mode 100644 index fbf753df0..000000000 --- a/patches/systemd-229/0100-basic-user-utils.c-needs-missing.h-for-secure_getenv.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Michael Olbrich -Date: Fri, 15 Apr 2016 16:43:02 +0200 -Subject: [PATCH] basic: user-utils.c needs missing.h for secure_getenv - -Otherwise building may fail with: - -src/basic/user-util.c: In function 'get_home_dir': -src/basic/user-util.c:343:9: error: implicit declaration of function 'secure_getenv' [-Werror=implicit-function-declaration] ---- - src/basic/user-util.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/basic/user-util.c b/src/basic/user-util.c -index 19155bce5364..f65ca3edaa28 100644 ---- a/src/basic/user-util.c -+++ b/src/basic/user-util.c -@@ -30,6 +30,7 @@ - #include - #include - -+#include "missing.h" - #include "alloc-util.h" - #include "fd-util.h" - #include "formats-util.h" diff --git a/patches/systemd-229/autogen.sh b/patches/systemd-229/autogen.sh deleted file mode 100755 index cbfab1ee7..000000000 --- a/patches/systemd-229/autogen.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -autoreconf \ - --force \ - --install \ - --warnings=cross \ - --warnings=syntax \ - --warnings=obsolete \ - --warnings=unsupported diff --git a/patches/systemd-229/series b/patches/systemd-229/series deleted file mode 100644 index dac126c74..000000000 --- a/patches/systemd-229/series +++ /dev/null @@ -1,16 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -#tag:host-systemd --start-number 1 -0001-missing-defined-extra-clock-ids.patch -0002-missing-add-BPF_XOR.patch -0003-missing-define-__NR_kcmp-if-necessary.patch -0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch -0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch -0006-missing-define-syncfs.patch -0007-missing-add-more-btrfs-defines.patch -0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch -0009-HACK-add-local-copy-of-uchar.h.patch -0010-HACK-fix-building-without-linux-sctp.h.patch -#tag:upstream --start-number 100 -0100-basic-user-utils.c-needs-missing.h-for-secure_getenv.patch -# dd2b53d96b8d4daf6822fc2a3324bc5b - git-ptx-patches magic diff --git a/patches/systemd-230/0001-missing-defined-extra-clock-ids.patch b/patches/systemd-230/0001-missing-defined-extra-clock-ids.patch new file mode 100644 index 000000000..9a8dc7d82 --- /dev/null +++ b/patches/systemd-230/0001-missing-defined-extra-clock-ids.patch @@ -0,0 +1,34 @@ +From: Michael Olbrich +Date: Thu, 19 Jun 2014 10:48:55 +0200 +Subject: [PATCH] missing: defined extra clock ids + +This is required for glibc <= 2.13 + +Upstream requires glibc 2.14 but this is useful for host-systemd. + +Signed-off-by: Michael Olbrich +--- + src/basic/missing.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index 651e41439511..e5554c6e1a22 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -832,6 +832,16 @@ struct btrfs_ioctl_quota_ctl_args { + #define RTA_PREF 20 + #endif + ++#ifndef CLOCK_BOOTTIME ++#define CLOCK_BOOTTIME 7 ++#endif ++#ifndef CLOCK_REALTIME_ALARM ++#define CLOCK_REALTIME_ALARM 8 ++#endif ++#ifndef CLOCK_BOOTTIME_ALARM ++#define CLOCK_BOOTTIME_ALARM 9 ++#endif ++ + #ifndef IPV6_UNICAST_IF + #define IPV6_UNICAST_IF 76 + #endif diff --git a/patches/systemd-230/0002-missing-add-BPF_XOR.patch b/patches/systemd-230/0002-missing-add-BPF_XOR.patch new file mode 100644 index 000000000..af49ef7ac --- /dev/null +++ b/patches/systemd-230/0002-missing-add-BPF_XOR.patch @@ -0,0 +1,28 @@ +From: Michael Olbrich +Date: Thu, 21 Aug 2014 12:30:15 +0200 +Subject: [PATCH] missing: add BPF_XOR + +BPF_XOR was introduced in kernel 3.7 + +Not for upstream, but needed for host-systemd. + +Signed-off-by: Michael Olbrich +--- + src/basic/missing.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index e5554c6e1a22..5f7d9c65d816 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -898,6 +898,10 @@ struct btrfs_ioctl_quota_ctl_args { + # define BPF_XOR 0xa0 + #endif + ++#ifndef BPF_XOR ++# define BPF_XOR 0xa0 ++#endif ++ + /* Note that LOOPBACK_IFINDEX is currently not exported by the + * kernel/glibc, but hardcoded internally by the kernel. However, as + * it is exported to userspace indirectly via rtnetlink and the diff --git a/patches/systemd-230/0003-missing-define-__NR_kcmp-if-necessary.patch b/patches/systemd-230/0003-missing-define-__NR_kcmp-if-necessary.patch new file mode 100644 index 000000000..871ea1d43 --- /dev/null +++ b/patches/systemd-230/0003-missing-define-__NR_kcmp-if-necessary.patch @@ -0,0 +1,28 @@ +From: Michael Olbrich +Date: Thu, 5 Mar 2015 10:33:25 +0100 +Subject: [PATCH] missing: define __NR_kcmp if necessary + +Needed for Kernel Headers < v3.5 + +Not for upstream, but needed for host-systemd. + +Signed-off-by: Michael Olbrich +--- + src/basic/missing_syscall.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h +index d502d3b9cad8..83c60d804531 100644 +--- a/src/basic/missing_syscall.h ++++ b/src/basic/missing_syscall.h +@@ -235,6 +235,10 @@ static inline int renameat2(int oldfd, const char *oldname, int newfd, const cha + + /* ======================================================================= */ + ++#ifndef __NR_kcmp ++# define __NR_kcmp 0xffffffff ++#endif ++ + #if !HAVE_DECL_KCMP + static inline int kcmp(pid_t pid1, pid_t pid2, int type, unsigned long idx1, unsigned long idx2) { + # ifdef __NR_kcmp diff --git a/patches/systemd-230/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch b/patches/systemd-230/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch new file mode 100644 index 000000000..f0757cc9b --- /dev/null +++ b/patches/systemd-230/0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch @@ -0,0 +1,44 @@ +From: Michael Olbrich +Date: Tue, 2 Jun 2015 10:46:05 +0200 +Subject: [PATCH] missing: define O_PATH and AT_EMPTY_PATH + +This is required for glibc <= 2.15 + +Upstream requires glibc 2.16 but this is useful for host-systemd. + +Signed-off-by: Michael Olbrich +--- + src/basic/missing.h | 7 +++++++ + src/basic/xattr-util.c | 1 + + 2 files changed, 8 insertions(+) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index 5f7d9c65d816..187b16757887 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -842,6 +842,13 @@ struct btrfs_ioctl_quota_ctl_args { + #define CLOCK_BOOTTIME_ALARM 9 + #endif + ++#ifndef O_PATH ++#define O_PATH 010000000 ++#endif ++#ifndef AT_EMPTY_PATH ++#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ ++#endif ++ + #ifndef IPV6_UNICAST_IF + #define IPV6_UNICAST_IF 76 + #endif +diff --git a/src/basic/xattr-util.c b/src/basic/xattr-util.c +index 8256899edae3..dc64a9aeb4c8 100644 +--- a/src/basic/xattr-util.c ++++ b/src/basic/xattr-util.c +@@ -25,6 +25,7 @@ + #include + #include + ++#include "missing.h" + #include "alloc-util.h" + #include "fd-util.h" + #include "macro.h" diff --git a/patches/systemd-230/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch b/patches/systemd-230/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch new file mode 100644 index 000000000..2cbf4cf8a --- /dev/null +++ b/patches/systemd-230/0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch @@ -0,0 +1,35 @@ +From: Michael Olbrich +Date: Tue, 7 Jul 2015 09:58:21 +0200 +Subject: [PATCH] HACK: configure.ac: disable NLS to avoid unnecessary + dependencies during autogen.sh + +Signed-off-by: Michael Olbrich +--- + configure.ac | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 329861a291d2..35f96228f06a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -59,6 +59,7 @@ SET_ARCH(IA32, i*86*) + SET_ARCH(MIPS, mips*) + SET_ARCH(AARCH64, aarch64*) + ++m4_ifdef([AM_NLS__DISABLED], [ + # i18n stuff for the PolicyKit policy files, heck whether intltool can be found, disable NLS otherwise + AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no]) + AS_IF([test x"$intltool_found" != xyes], +@@ -81,6 +82,12 @@ AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [ + INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo " ITMRG " $@ && echo "*** intltool support required to build target $@" && false' + AC_SUBST(INTLTOOL_POLICY_RULE) + ]) ++],[ ++touch `dirname $0`/po/Makefile.in.in ++echo -e 'all:\ninstall:\n' > `dirname $0`/po/Makefile ++INTLTOOL_POLICY_RULE= ++AC_SUBST(INTLTOOL_POLICY_RULE) ++]) + + GETTEXT_PACKAGE=systemd + AC_SUBST(GETTEXT_PACKAGE) diff --git a/patches/systemd-230/0006-missing-define-syncfs.patch b/patches/systemd-230/0006-missing-define-syncfs.patch new file mode 100644 index 000000000..b117a1e2e --- /dev/null +++ b/patches/systemd-230/0006-missing-define-syncfs.patch @@ -0,0 +1,45 @@ +From: Michael Olbrich +Date: Sat, 1 Aug 2015 21:36:38 +0200 +Subject: [PATCH] missing: define syncfs + +This is required for glibc < 2.14 + +Upstream requires glibc 2.16 but this is useful for host-systemd. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 1 + + src/basic/missing.h | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 35f96228f06a..00a68a7ea867 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -309,6 +309,7 @@ AC_CHECK_DECLS([ + pivot_root, + name_to_handle_at, + setns, ++ syncfs, + getrandom, + renameat2, + kcmp, +diff --git a/src/basic/missing.h b/src/basic/missing.h +index 187b16757887..e67763c9b8ca 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -849,6 +849,14 @@ struct btrfs_ioctl_quota_ctl_args { + #define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */ + #endif + ++#if !HAVE_DECL_SYNCFS ++static inline int syncfs(int fd) ++{ ++ errno = ENOSYS; ++ return -1; ++} ++#endif ++ + #ifndef IPV6_UNICAST_IF + #define IPV6_UNICAST_IF 76 + #endif diff --git a/patches/systemd-230/0007-missing-add-more-btrfs-defines.patch b/patches/systemd-230/0007-missing-add-more-btrfs-defines.patch new file mode 100644 index 000000000..c4a1e875b --- /dev/null +++ b/patches/systemd-230/0007-missing-add-more-btrfs-defines.patch @@ -0,0 +1,69 @@ +From: Michael Olbrich +Date: Thu, 19 Nov 2015 16:52:47 +0100 +Subject: [PATCH] missing: add more btrfs defines + +Signed-off-by: Michael Olbrich +--- + src/basic/missing.h | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index e67763c9b8ca..bb97544f750e 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -310,6 +310,23 @@ struct btrfs_ioctl_quota_ctl_args { + __u64 cmd; + __u64 status; + }; ++ ++struct btrfs_ioctl_quota_rescan_args { ++ __u64 flags; ++ __u64 progress; ++ __u64 reserved[6]; ++}; ++ ++struct btrfs_ioctl_qgroup_assign_args { ++ __u64 assign; ++ __u64 src; ++ __u64 dst; ++}; ++ ++struct btrfs_ioctl_qgroup_create_args { ++ __u64 create; ++ __u64 qgroupid; ++}; + #endif + + #ifndef BTRFS_IOC_DEFRAG +@@ -384,11 +401,31 @@ struct btrfs_ioctl_quota_ctl_args { + struct btrfs_ioctl_quota_ctl_args) + #endif + ++#ifndef BTRFS_IOC_QGROUP_ASSIGN ++#define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \ ++ struct btrfs_ioctl_qgroup_assign_args) ++#endif ++ ++#ifndef BTRFS_IOC_QGROUP_CREATE ++#define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \ ++ struct btrfs_ioctl_qgroup_create_args) ++#endif ++ + #ifndef BTRFS_IOC_QGROUP_LIMIT + #define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \ + struct btrfs_ioctl_qgroup_limit_args) + #endif + ++#ifndef BTRFS_IOC_QUOTA_RESCAN ++#define BTRFS_IOC_QUOTA_RESCAN _IOW(BTRFS_IOCTL_MAGIC, 44, \ ++ struct btrfs_ioctl_quota_rescan_args) ++#endif ++ ++#ifndef BTRFS_IOC_QUOTA_RESCAN_STATUS ++#define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \ ++ struct btrfs_ioctl_quota_rescan_args) ++#endif ++ + #ifndef BTRFS_IOC_QUOTA_RESCAN_WAIT + #define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46) + #endif diff --git a/patches/systemd-230/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch b/patches/systemd-230/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch new file mode 100644 index 000000000..f75dd8613 --- /dev/null +++ b/patches/systemd-230/0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch @@ -0,0 +1,24 @@ +From: Michael Olbrich +Date: Thu, 19 Nov 2015 16:53:42 +0100 +Subject: [PATCH] HACK: include missing.h in btrfs-ctree.h for BTRFS_UUID_SIZE + +This is needed for older Kernel headers without btrfs.h + +Not for upstream, but needed for host-systemd. + +Signed-off-by: Michael Olbrich +--- + src/basic/btrfs-ctree.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/basic/btrfs-ctree.h b/src/basic/btrfs-ctree.h +index 66bdf9736ef5..e9edc8eb5445 100644 +--- a/src/basic/btrfs-ctree.h ++++ b/src/basic/btrfs-ctree.h +@@ -1,5 +1,6 @@ + #pragma once + ++#include "missing.h" + #include "macro.h" + #include "sparse-endian.h" + diff --git a/patches/systemd-230/0009-HACK-add-local-copy-of-uchar.h.patch b/patches/systemd-230/0009-HACK-add-local-copy-of-uchar.h.patch new file mode 100644 index 000000000..07cc8c161 --- /dev/null +++ b/patches/systemd-230/0009-HACK-add-local-copy-of-uchar.h.patch @@ -0,0 +1,152 @@ +From: Michael Olbrich +Date: Fri, 15 Apr 2016 16:33:14 +0200 +Subject: [PATCH] HACK: add local copy of uchar.h + +Upstream requires glibc 2.16 and uchar.h is available in that version. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 1 + + src/basic/_uchar.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/basic/escape.h | 1 - + src/basic/missing.h | 4 +++ + src/basic/utf8.h | 1 - + 5 files changed, 83 insertions(+), 2 deletions(-) + create mode 100644 src/basic/_uchar.h + +diff --git a/configure.ac b/configure.ac +index 00a68a7ea867..650a5be1edf2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -291,6 +291,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"]) + AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])]) + AC_CHECK_HEADERS([linux/btrfs.h], [], []) + AC_CHECK_HEADERS([linux/memfd.h], [], []) ++AC_CHECK_HEADERS([uchar.h], [], []) + + # unconditionally pull-in librt with old glibc versions + AC_SEARCH_LIBS([clock_gettime], [rt], [], []) +diff --git a/src/basic/_uchar.h b/src/basic/_uchar.h +new file mode 100644 +index 000000000000..b15d355ae0c5 +--- /dev/null ++++ b/src/basic/_uchar.h +@@ -0,0 +1,78 @@ ++/* Copyright (C) 2011-2015 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, see ++ . */ ++ ++/* ++ * ISO C11 Standard: 7.28 ++ * Unicode utilities ++ */ ++ ++#ifndef _UCHAR_H ++#define _UCHAR_H 1 ++ ++#include ++ ++#define __need_size_t ++#include ++#define __need_mbstate_t ++#include ++ ++/* Public type. */ ++typedef __mbstate_t mbstate_t; ++ ++ ++#if defined __GNUC__ && !defined __USE_ISOCXX11 ++/* Define the 16-bit and 32-bit character types. Use the information ++ provided by the compiler. */ ++# if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__ ++# if defined __STDC_VERSION__ && __STDC_VERSION__ < 201000L ++# error " requires ISO C11 mode" ++# else ++# error "definitions of __CHAR16_TYPE__ and/or __CHAR32_TYPE__ missing" ++# endif ++# endif ++typedef __CHAR16_TYPE__ char16_t; ++typedef __CHAR32_TYPE__ char32_t; ++#endif ++ ++ ++__BEGIN_DECLS ++ ++/* Write char16_t representation of multibyte character pointed ++ to by S to PC16. */ ++extern size_t mbrtoc16 (char16_t *__restrict __pc16, ++ const char *__restrict __s, size_t __n, ++ mbstate_t *__restrict __p) __THROW; ++ ++/* Write multibyte representation of char16_t C16 to S. */ ++extern size_t c16rtomb (char *__restrict __s, char16_t __c16, ++ mbstate_t *__restrict __ps) __THROW; ++ ++ ++ ++/* Write char32_t representation of multibyte character pointed ++ to by S to PC32. */ ++extern size_t mbrtoc32 (char32_t *__restrict __pc32, ++ const char *__restrict __s, size_t __n, ++ mbstate_t *__restrict __p) __THROW; ++ ++/* Write multibyte representation of char32_t C32 to S. */ ++extern size_t c32rtomb (char *__restrict __s, char32_t __c32, ++ mbstate_t *__restrict __ps) __THROW; ++ ++__END_DECLS ++ ++#endif /* uchar.h */ +diff --git a/src/basic/escape.h b/src/basic/escape.h +index deaa4def2828..36d437cfaa2f 100644 +--- a/src/basic/escape.h ++++ b/src/basic/escape.h +@@ -23,7 +23,6 @@ + #include + #include + #include +-#include + + #include "string-util.h" + #include "missing.h" +diff --git a/src/basic/missing.h b/src/basic/missing.h +index bb97544f750e..0d28c1a4c22a 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -35,7 +35,11 @@ + #include + #include + #include ++#ifdef HAVE_UCHAR_H + #include ++#else ++#include "_uchar.h" ++#endif + #include + + #ifdef HAVE_AUDIT +diff --git a/src/basic/utf8.h b/src/basic/utf8.h +index f9b9c9468bb1..6ac9a3c8d087 100644 +--- a/src/basic/utf8.h ++++ b/src/basic/utf8.h +@@ -22,7 +22,6 @@ + #include + #include + #include +-#include + + #include "macro.h" + #include "missing.h" diff --git a/patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch b/patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch new file mode 100644 index 000000000..640acba5a --- /dev/null +++ b/patches/systemd-230/0010-HACK-fix-building-without-linux-sctp.h.patch @@ -0,0 +1,42 @@ +From: Michael Olbrich +Date: Mon, 18 Apr 2016 12:22:22 +0200 +Subject: [PATCH] HACK: fix building without linux/sctp.h + +linux/sctp.h exists since kernel 3.10. + +Upstream requires kernel 3.11 but this is useful for host-systemd. + +Signed-off-by: Michael Olbrich +--- + configure.ac | 1 + + src/core/socket.c | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 650a5be1edf2..f7eb2c4f963f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -292,6 +292,7 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n + AC_CHECK_HEADERS([linux/btrfs.h], [], []) + AC_CHECK_HEADERS([linux/memfd.h], [], []) + AC_CHECK_HEADERS([uchar.h], [], []) ++AC_CHECK_HEADERS([linux/sctp.h], [], []) + + # unconditionally pull-in librt with old glibc versions + AC_SEARCH_LIBS([clock_gettime], [rt], [], []) +diff --git a/src/core/socket.c b/src/core/socket.c +index f6204d04bfd8..212ff2dd913d 100644 +--- a/src/core/socket.c ++++ b/src/core/socket.c +@@ -26,7 +26,11 @@ + #include + #include + #include ++#ifdef HAVE_LINUX_SCTP_H + #include ++#else ++#define SCTP_NODELAY 3 ++#endif + + #include "alloc-util.h" + #include "bus-error.h" diff --git a/patches/systemd-230/0011-missing-add-SMACK_MAGIC-EFIVARFS_MAGIC-BINFMTFS_MAGI.patch b/patches/systemd-230/0011-missing-add-SMACK_MAGIC-EFIVARFS_MAGIC-BINFMTFS_MAGI.patch new file mode 100644 index 000000000..4372ab742 --- /dev/null +++ b/patches/systemd-230/0011-missing-add-SMACK_MAGIC-EFIVARFS_MAGIC-BINFMTFS_MAGI.patch @@ -0,0 +1,34 @@ +From: Michael Olbrich +Date: Fri, 27 May 2016 10:49:55 +0200 +Subject: [PATCH] missing: add SMACK_MAGIC, EFIVARFS_MAGIC, BINFMTFS_MAGIC + +These were all introduced before kernel v3.9 + +Not for upstream, but needed for host-systemd. + +Signed-off-by: Michael Olbrich +--- + src/basic/missing.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/basic/missing.h b/src/basic/missing.h +index 0d28c1a4c22a..795a21bdf22d 100644 +--- a/src/basic/missing.h ++++ b/src/basic/missing.h +@@ -898,6 +898,16 @@ static inline int syncfs(int fd) + } + #endif + ++#ifndef SMACK_MAGIC ++#define SMACK_MAGIC 0x43415d53 ++#endif ++#ifndef EFIVARFS_MAGIC ++#define EFIVARFS_MAGIC 0xde5e81e4 ++#endif ++#ifndef BINFMTFS_MAGIC ++#define BINFMTFS_MAGIC 0x42494e4d ++#endif ++ + #ifndef IPV6_UNICAST_IF + #define IPV6_UNICAST_IF 76 + #endif diff --git a/patches/systemd-230/autogen.sh b/patches/systemd-230/autogen.sh new file mode 100755 index 000000000..cbfab1ee7 --- /dev/null +++ b/patches/systemd-230/autogen.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +autoreconf \ + --force \ + --install \ + --warnings=cross \ + --warnings=syntax \ + --warnings=obsolete \ + --warnings=unsupported diff --git a/patches/systemd-230/series b/patches/systemd-230/series new file mode 100644 index 000000000..9a20226b9 --- /dev/null +++ b/patches/systemd-230/series @@ -0,0 +1,16 @@ +# generated by git-ptx-patches +#tag:base --start-number 1 +#tag:host-systemd --start-number 1 +0001-missing-defined-extra-clock-ids.patch +0002-missing-add-BPF_XOR.patch +0003-missing-define-__NR_kcmp-if-necessary.patch +0004-missing-define-O_PATH-and-AT_EMPTY_PATH.patch +0005-HACK-configure.ac-disable-NLS-to-avoid-unnecessary-d.patch +0006-missing-define-syncfs.patch +0007-missing-add-more-btrfs-defines.patch +0008-HACK-include-missing.h-in-btrfs-ctree.h-for-BTRFS_UU.patch +0009-HACK-add-local-copy-of-uchar.h.patch +0010-HACK-fix-building-without-linux-sctp.h.patch +0011-missing-add-SMACK_MAGIC-EFIVARFS_MAGIC-BINFMTFS_MAGI.patch +#tag:upstream --start-number 100 +# 7f7dfeb35e2a532321c19ec07f30f1fb - git-ptx-patches magic diff --git a/rules/host-systemd.make b/rules/host-systemd.make index 547b3c853..835cc59b4 100644 --- a/rules/host-systemd.make +++ b/rules/host-systemd.make @@ -38,7 +38,6 @@ HOST_SYSTEMD_CONF_OPT := \ --disable-undefined-sanitizer \ --disable-dbus \ --disable-utmp \ - --disable-compat-libs \ --disable-coverage \ --disable-kmod \ --disable-xkbcommon \ @@ -47,6 +46,8 @@ HOST_SYSTEMD_CONF_OPT := \ --disable-ima \ --disable-selinux \ --disable-apparmor \ + --disable-adm-group \ + --disable-wheel-group \ --disable-xz \ --disable-zlib \ --disable-bzip2 \ @@ -65,7 +66,6 @@ HOST_SYSTEMD_CONF_OPT := \ --disable-libiptc \ --disable-binfmt \ --disable-vconsole \ - --disable-bootchart \ --disable-quotacheck \ --disable-tmpfiles \ --disable-sysusers \ @@ -86,6 +86,7 @@ HOST_SYSTEMD_CONF_OPT := \ --disable-networkd \ --disable-efi \ --disable-gnuefi \ + --disable-tpm \ --disable-kdbus \ --disable-myhostname \ --enable-hwdb \ diff --git a/rules/systemd.make b/rules/systemd.make index 71c633a8d..29ddbd84f 100644 --- a/rules/systemd.make +++ b/rules/systemd.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_SYSTEMD) += systemd # # Paths and names # -SYSTEMD_VERSION := 229 -SYSTEMD_MD5 := 5d696f65381b2608da70544df07c2b3c +SYSTEMD_VERSION := 230 +SYSTEMD_MD5 := f2f10a6f100c38582b4f02d60210227d SYSTEMD := systemd-$(SYSTEMD_VERSION) SYSTEMD_SUFFIX := tar.gz SYSTEMD_URL := https://github.com/systemd/systemd/archive/v$(SYSTEMD_VERSION).$(SYSTEMD_SUFFIX) @@ -68,7 +68,6 @@ SYSTEMD_CONF_OPT := \ --disable-undefined-sanitizer \ --disable-dbus \ --disable-utmp \ - --enable-compat-libs \ --disable-coverage \ --enable-kmod \ --disable-xkbcommon \ @@ -77,6 +76,8 @@ SYSTEMD_CONF_OPT := \ --disable-ima \ $(GLOBAL_SELINUX_OPTION) \ --disable-apparmor \ + --enable-adm-group \ + --disable-wheel-group \ --$(call ptx/endis,PTXCONF_SYSTEMD_XZ)-xz \ --disable-zlib \ --disable-bzip2 \ @@ -95,7 +96,6 @@ SYSTEMD_CONF_OPT := \ --$(call ptx/endis,PTXCONF_SYSTEMD_IPMASQUERADE)-libiptc \ --disable-binfmt \ --$(call ptx/endis,PTXCONF_SYSTEMD_VCONSOLE)-vconsole \ - --enable-bootchart \ --enable-quotacheck \ --enable-tmpfiles \ --disable-sysusers \ @@ -116,6 +116,7 @@ SYSTEMD_CONF_OPT := \ --$(call ptx/endis,PTXCONF_SYSTEMD_NETWORK)-networkd \ --enable-efi \ --disable-gnuefi \ + --disable-tpm \ --enable-kdbus \ --enable-myhostname \ --$(call ptx/endis,PTXCONF_UDEV_HWDB)-hwdb \ @@ -174,9 +175,6 @@ endif SYSTEMD_HELPER := \ systemd \ systemd-ac-power \ - systemd-activate \ - systemd-bootchart \ - systemd-bus-proxyd \ systemd-cgroups-agent \ $(call ptx/ifdef, PTXCONF_SYSTEMD_COREDUMP,systemd-coredump,) \ systemd-fsck \ @@ -250,6 +248,7 @@ endif @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-delta) @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-path) @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-run) + @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-socket-activate) @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-stdio-bridge) ifdef PTXCONF_SYSTEMD_TIMEDATE @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/timedatectl) @@ -271,8 +270,6 @@ endif # # configuration @$(call install_alternative, systemd, 0, 0, 0644, \ /etc/systemd/system.conf) - @$(call install_alternative, systemd, 0, 0, 0644, \ - /etc/systemd/bootchart.conf) @$(call install_alternative, systemd, 0, 0, 0644, \ /etc/systemd/journald.conf) ifdef PTXCONF_SYSTEMD_LOGIND -- cgit v1.2.3