summaryrefslogtreecommitdiff
path: root/sys-apps/systemd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-01-25 17:37:21 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-01-25 17:37:21 +0000
commit011dbc9d6821df057bf337438aaaefbff6b7612c (patch)
treef3bc445e402088bf99b6dbe1122e1db621bd4167 /sys-apps/systemd/files
parent8b1caee825d7881ebb89fd53014de58fd85e7cd2 (diff)
systemd security update : https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-10156
Diffstat (limited to 'sys-apps/systemd/files')
-rw-r--r--sys-apps/systemd/files/215-0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch116
-rw-r--r--sys-apps/systemd/files/215-0002-endian-explicitly-include-endian.h-wherever-we-want-.patch53
-rw-r--r--sys-apps/systemd/files/215-0003-udev-exclude-MD-from-block-device-ownership-event-lo.patch54
-rw-r--r--sys-apps/systemd/files/216-lz4-build.patch19
-rw-r--r--sys-apps/systemd/files/216-tmpfiles-setup-dev.patch21
-rw-r--r--sys-apps/systemd/files/217-systemd-consoled.service.in15
-rw-r--r--sys-apps/systemd/files/218-noclean-tmp.patch28
-rw-r--r--sys-apps/systemd/files/224-0001-networkd-fix-neworkd-crash.patch28
-rw-r--r--sys-apps/systemd/files/224-0002-Use-getxpid-syscall-on-alpha-for-raw_getpid.patch30
-rw-r--r--sys-apps/systemd/files/232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch44
-rw-r--r--sys-apps/systemd/files/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch302
-rw-r--r--sys-apps/systemd/files/232-systemd-user-pam.patch16
-rw-r--r--sys-apps/systemd/files/233-systemd-user-pam.patch16
-rw-r--r--sys-apps/systemd/files/compile-unifont.py119
-rw-r--r--sys-apps/systemd/files/nsswitch.conf27
15 files changed, 405 insertions, 483 deletions
diff --git a/sys-apps/systemd/files/215-0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch b/sys-apps/systemd/files/215-0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
deleted file mode 100644
index b29c10de..00000000
--- a/sys-apps/systemd/files/215-0001-always-check-for-__BYTE_ORDER-__BIG_ENDIAN-when-chec.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 28f6bb18cdea297164763db94e2366ca4857c9c7 Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Fri, 11 Jul 2014 15:56:16 +0200
-Subject: [PATCH 1/2] always check for __BYTE_ORDER == __BIG_ENDIAN when
- checking for endianess
-
-Let's always stick to glibc's way to determine byte order, and not mix
-autoconf-specific checks with gcc checks.
----
- src/shared/architecture.h | 12 ++++++------
- src/shared/gpt.h | 4 ++--
- src/shared/time-dst.c | 6 +++---
- 3 files changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/src/shared/architecture.h b/src/shared/architecture.h
-index 4821d5d..58e97e5 100644
---- a/src/shared/architecture.h
-+++ b/src/shared/architecture.h
-@@ -80,7 +80,7 @@ Architecture uname_architecture(void);
- # define native_architecture() ARCHITECTURE_X86
- # define LIB_ARCH_TUPLE "i386-linux-gnu"
- #elif defined(__powerpc64__)
--# if defined(WORDS_BIGENDIAN)
-+# if __BYTE_ORDER == __BIG_ENDIAN
- # define native_architecture() ARCHITECTURE_PPC64
- # define LIB_ARCH_TUPLE "ppc64-linux-gnu"
- # else
-@@ -88,7 +88,7 @@ Architecture uname_architecture(void);
- # error "Missing LIB_ARCH_TUPLE for PPC64LE"
- # endif
- #elif defined(__powerpc__)
--# if defined(WORDS_BIGENDIAN)
-+# if __BYTE_ORDER == __BIG_ENDIAN
- # define native_architecture() ARCHITECTURE_PPC
- # define LIB_ARCH_TUPLE "powerpc-linux-gnu"
- # else
-@@ -117,7 +117,7 @@ Architecture uname_architecture(void);
- # define native_architecture() ARCHITECTURE_SPARC
- # define LIB_ARCH_TUPLE "sparc-linux-gnu"
- #elif defined(__mips64__)
--# if defined(WORDS_BIGENDIAN)
-+# if __BYTE_ORDER == __BIG_ENDIAN
- # define native_architecture() ARCHITECTURE_MIPS64
- # error "Missing LIB_ARCH_TUPLE for MIPS64"
- # else
-@@ -125,7 +125,7 @@ Architecture uname_architecture(void);
- # error "Missing LIB_ARCH_TUPLE for MIPS64_LE"
- # endif
- #elif defined(__mips__)
--# if defined(WORDS_BIGENDIAN)
-+# if __BYTE_ORDER == __BIG_ENDIAN
- # define native_architecture() ARCHITECTURE_MIPS
- # define LIB_ARCH_TUPLE "mips-linux-gnu"
- # else
-@@ -136,7 +136,7 @@ Architecture uname_architecture(void);
- # define native_architecture() ARCHITECTURE_ALPHA
- # define LIB_ARCH_TUPLE "alpha-linux-gnu"
- #elif defined(__aarch64__)
--# if defined(WORDS_BIGENDIAN)
-+# if __BYTE_ORDER == __BIG_ENDIAN
- # define native_architecture() ARCHITECTURE_ARM64_BE
- # define LIB_ARCH_TUPLE "aarch64_be-linux-gnu"
- # else
-@@ -144,7 +144,7 @@ Architecture uname_architecture(void);
- # define LIB_ARCH_TUPLE "aarch64-linux-gnu"
- # endif
- #elif defined(__arm__)
--# if defined(WORDS_BIGENDIAN)
-+# if __BYTE_ORDER == __BIG_ENDIAN
- # define native_architecture() ARCHITECTURE_ARM_BE
- # if defined(__ARM_EABI__)
- # if defined(__ARM_PCS_VFP)
-diff --git a/src/shared/gpt.h b/src/shared/gpt.h
-index 64090e0..278940b 100644
---- a/src/shared/gpt.h
-+++ b/src/shared/gpt.h
-@@ -42,10 +42,10 @@
- # define GPT_ROOT_NATIVE GPT_ROOT_X86
- #endif
-
--#if defined(__aarch64__) && !defined(WORDS_BIGENDIAN)
-+#if defined(__aarch64__) && (__BYTE_ORDER != __BIG_ENDIAN)
- # define GPT_ROOT_NATIVE GPT_ROOT_ARM_64
- # define GPT_ROOT_SECONDARY GPT_ROOT_ARM
--#elif defined(__arm__) && !defined(WORDS_BIGENDIAN)
-+#elif defined(__arm__) && (__BYTE_ORDER != __BIG_ENDIAN)
- # define GPT_ROOT_NATIVE GPT_ROOT_ARM
- #endif
-
-diff --git a/src/shared/time-dst.c b/src/shared/time-dst.c
-index ceca2fa..6195b11 100644
---- a/src/shared/time-dst.c
-+++ b/src/shared/time-dst.c
-@@ -207,8 +207,8 @@ read_again:
- if (type_idxs[i] >= num_types)
- return -EINVAL;
-
-- if (BYTE_ORDER == BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4
-- : sizeof(time_t) == 4 || trans_width == 4) {
-+ if (__BYTE_ORDER == __BIG_ENDIAN ? sizeof(time_t) == 8 && trans_width == 4
-+ : sizeof(time_t) == 4 || trans_width == 4) {
- /* Decode the transition times, stored as 4-byte integers in
- network (big-endian) byte order. We work from the end of
- the array so as not to clobber the next element to be
-@@ -216,7 +216,7 @@ read_again:
- i = num_transitions;
- while (i-- > 0)
- transitions[i] = decode((char *)transitions + i * 4);
-- } else if (BYTE_ORDER != BIG_ENDIAN && sizeof(time_t) == 8) {
-+ } else if (__BYTE_ORDER != __BIG_ENDIAN && sizeof(time_t) == 8) {
- /* Decode the transition times, stored as 8-byte integers in
- network (big-endian) byte order. */
- for (i = 0; i < num_transitions; ++i)
---
-1.8.5.5
-
diff --git a/sys-apps/systemd/files/215-0002-endian-explicitly-include-endian.h-wherever-we-want-.patch b/sys-apps/systemd/files/215-0002-endian-explicitly-include-endian.h-wherever-we-want-.patch
deleted file mode 100644
index 71acac1b..00000000
--- a/sys-apps/systemd/files/215-0002-endian-explicitly-include-endian.h-wherever-we-want-.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 2281422746c00d2803911f2b4699eee6bc87ee04 Mon Sep 17 00:00:00 2001
-From: Lennart Poettering <lennart@poettering.net>
-Date: Fri, 11 Jul 2014 16:13:13 +0200
-Subject: [PATCH 2/2] endian: explicitly include endian.h wherever we want to
- use __BYTE_ORDER
-
----
- src/libsystemd/sd-bus/bus-protocol.h | 1 +
- src/shared/architecture.h | 2 ++
- src/shared/gpt.h | 2 ++
- 3 files changed, 5 insertions(+)
-
-diff --git a/src/libsystemd/sd-bus/bus-protocol.h b/src/libsystemd/sd-bus/bus-protocol.h
-index 5046d17..4f46468 100644
---- a/src/libsystemd/sd-bus/bus-protocol.h
-+++ b/src/libsystemd/sd-bus/bus-protocol.h
-@@ -21,6 +21,7 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#include <endian.h>
-
- /* Endianness */
-
-diff --git a/src/shared/architecture.h b/src/shared/architecture.h
-index 58e97e5..38780d1 100644
---- a/src/shared/architecture.h
-+++ b/src/shared/architecture.h
-@@ -21,6 +21,8 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#include <endian.h>
-+
- #include "util.h"
-
- /* A cleaned up architecture definition. We don't want to get lost in
-diff --git a/src/shared/gpt.h b/src/shared/gpt.h
-index 278940b..ef3444f 100644
---- a/src/shared/gpt.h
-+++ b/src/shared/gpt.h
-@@ -19,6 +19,8 @@
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
- ***/
-
-+#include <endian.h>
-+
- #include "sd-id128.h"
-
- /* We only support root disk discovery for x86, x86-64 and ARM for
---
-1.8.5.5
-
diff --git a/sys-apps/systemd/files/215-0003-udev-exclude-MD-from-block-device-ownership-event-lo.patch b/sys-apps/systemd/files/215-0003-udev-exclude-MD-from-block-device-ownership-event-lo.patch
deleted file mode 100644
index c730242c..00000000
--- a/sys-apps/systemd/files/215-0003-udev-exclude-MD-from-block-device-ownership-event-lo.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 9d17a215fb30cb3e49db516a39c9bec2159004a7 Mon Sep 17 00:00:00 2001
-From: Kay Sievers <kay@vrfy.org>
-Date: Thu, 24 Jul 2014 23:37:35 +0200
-Subject: [PATCH 3/3] udev: exclude MD from block device ownership event
- locking
-
-MD instantiates devices at open(). This is incomptible with the
-locking logic, as the "change" event emitted when stopping a
-device will bring it back.
----
- src/udev/udevd.c | 23 +++++++----------------
- 1 file changed, 7 insertions(+), 16 deletions(-)
-
-diff --git a/src/udev/udevd.c b/src/udev/udevd.c
-index a45d324..db935d6 100644
---- a/src/udev/udevd.c
-+++ b/src/udev/udevd.c
-@@ -285,26 +285,17 @@ static void worker_new(struct event *event)
- udev_event->exec_delay = exec_delay;
-
- /*
-- * Take a "read lock" on the device node; this establishes
-+ * Take a shared lock on the device node; this establishes
- * a concept of device "ownership" to serialize device
-- * access. External processes holding a "write lock" will
-+ * access. External processes holding an exclusive lock will
- * cause udev to skip the event handling; in the case udev
-- * acquired the lock, the external process will block until
-+ * acquired the lock, the external process can block until
- * udev has finished its event handling.
- */
--
-- /*
-- * <kabi_> since we make check - device seems unused - we try
-- * ioctl to deactivate - and device is found to be opened
-- * <kay> sure, you try to take a write lock
-- * <kay> if you get it udev is out
-- * <kay> if you can't get it, udev is busy
-- * <kabi_> we cannot deactivate openned device (as it is in-use)
-- * <kay> maybe we should just exclude dm from that thing entirely
-- * <kabi_> IMHO this sounds like a good plan for this moment
-- */
-- if (streq_ptr("block", udev_device_get_subsystem(dev)) &&
-- !startswith(udev_device_get_sysname(dev), "dm-")) {
-+ if (!streq_ptr(udev_device_get_action(dev), "remove") &&
-+ streq_ptr("block", udev_device_get_subsystem(dev)) &&
-+ !startswith(udev_device_get_sysname(dev), "dm-") &&
-+ !startswith(udev_device_get_sysname(dev), "md")) {
- struct udev_device *d = dev;
-
- if (streq_ptr("partition", udev_device_get_devtype(d)))
---
-1.8.5.5
-
diff --git a/sys-apps/systemd/files/216-lz4-build.patch b/sys-apps/systemd/files/216-lz4-build.patch
deleted file mode 100644
index 65fe45cb..00000000
--- a/sys-apps/systemd/files/216-lz4-build.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-commit 10893a5cfa7d792ba171282c2ec46b85ed6aae0c
-Author: Gustavo Sverzut Barbieri <gustavo.barbieri@intel.com>
-Date: Thu Sep 25 18:08:02 2014 -0300
-
- journal: build fix when LZ4 is enabled but XZ is not
-
-diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h
-index da2ef3b..6b4bf0d 100644
---- a/src/journal/journal-file.h
-+++ b/src/journal/journal-file.h
-@@ -78,7 +78,7 @@ typedef struct JournalFile {
-
- Hashmap *chain_cache;
-
--#ifdef HAVE_XZ
-+#if defined(HAVE_XZ) || defined(HAVE_LZ4)
- void *compress_buffer;
- size_t compress_buffer_size;
- #endif
diff --git a/sys-apps/systemd/files/216-tmpfiles-setup-dev.patch b/sys-apps/systemd/files/216-tmpfiles-setup-dev.patch
deleted file mode 100644
index 1fa4a3e7..00000000
--- a/sys-apps/systemd/files/216-tmpfiles-setup-dev.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 8c94052ee543c3598a3c7b0c46688150aa2c6168 Mon Sep 17 00:00:00 2001
-From: Tom Gundersen <teg@jklm.no>
-Date: Mon, 27 Oct 2014 17:15:42 +0100
-Subject: units: tmpfiles-setup-dev - allow unsafe file creation to happen in
- /dev at boot
-
-This will allow us to mark static device nodes with '!' to indicate that they should only be created at early boot.
-
-diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in
-index f3833fd..0123a03 100644
---- a/units/systemd-tmpfiles-setup-dev.service.in
-+++ b/units/systemd-tmpfiles-setup-dev.service.in
-@@ -17,4 +17,4 @@ ConditionCapability=CAP_SYS_MODULE
- [Service]
- Type=oneshot
- RemainAfterExit=yes
--ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create
-+ExecStart=@rootbindir@/systemd-tmpfiles --prefix=/dev --create --boot
---
-cgit v0.10.2
-
diff --git a/sys-apps/systemd/files/217-systemd-consoled.service.in b/sys-apps/systemd/files/217-systemd-consoled.service.in
deleted file mode 100644
index fd7938aa..00000000
--- a/sys-apps/systemd/files/217-systemd-consoled.service.in
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file is part of systemd.
-#
-# systemd 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.
-
-[Unit]
-Description=Console Manager and Terminal Emulator
-
-[Service]
-Type=notify
-Restart=always
-RestartSec=0
-ExecStart=@rootlibexecdir@/systemd-consoled
diff --git a/sys-apps/systemd/files/218-noclean-tmp.patch b/sys-apps/systemd/files/218-noclean-tmp.patch
deleted file mode 100644
index b02e5c8e..00000000
--- a/sys-apps/systemd/files/218-noclean-tmp.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 63e5f76a91e2401e8a6227d0d8ae5e75dd2213b0 Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Fri, 25 Sep 2015 10:26:18 -0400
-Subject: [PATCH] tmpfiles: Disable cleaning of /tmp and /var/tmp
-
-Bug: https://bugs.gentoo.org/490676
----
- tmpfiles.d/tmp.conf | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/tmpfiles.d/tmp.conf b/tmpfiles.d/tmp.conf
-index b80dab4..241fad5 100644
---- a/tmpfiles.d/tmp.conf
-+++ b/tmpfiles.d/tmp.conf
-@@ -8,8 +8,8 @@
- # See tmpfiles.d(5) for details
-
- # Clear tmp directories separately, to make them easier to override
--d /tmp 1777 root root 10d
--d /var/tmp 1777 root root 30d
-+d /tmp 1777 root root
-+d /var/tmp 1777 root root
-
- # Exclude namespace mountpoints created with PrivateTmp=yes
- x /tmp/systemd-private-%b-*
---
-2.5.3
-
diff --git a/sys-apps/systemd/files/224-0001-networkd-fix-neworkd-crash.patch b/sys-apps/systemd/files/224-0001-networkd-fix-neworkd-crash.patch
deleted file mode 100644
index 0e73ddec..00000000
--- a/sys-apps/systemd/files/224-0001-networkd-fix-neworkd-crash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 49f6e11e89b46bacf7b26f6da3921abc1c2faa80 Mon Sep 17 00:00:00 2001
-From: Susant Sahani <ssahani@gmail.com>
-Date: Sun, 2 Aug 2015 00:16:02 +0530
-Subject: [PATCH] networkd: fix neworkd crash
-
-fix issue #827
-
-hostname should be init to NULL.
----
- src/network/networkd-dhcp4.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
-index 4aa301b..5454bdd 100644
---- a/src/network/networkd-dhcp4.c
-+++ b/src/network/networkd-dhcp4.c
-@@ -468,7 +468,7 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
- }
-
- if (link->network->dhcp_hostname) {
-- const char *hostname;
-+ const char *hostname = NULL;
-
- if (!link->network->hostname)
- r = sd_dhcp_lease_get_hostname(lease, &hostname);
---
-2.5.0
-
diff --git a/sys-apps/systemd/files/224-0002-Use-getxpid-syscall-on-alpha-for-raw_getpid.patch b/sys-apps/systemd/files/224-0002-Use-getxpid-syscall-on-alpha-for-raw_getpid.patch
deleted file mode 100644
index 40e2d1c1..00000000
--- a/sys-apps/systemd/files/224-0002-Use-getxpid-syscall-on-alpha-for-raw_getpid.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a242a99d42276b6b764f80bd0de70c26e5c5f1d4 Mon Sep 17 00:00:00 2001
-From: Matt Turner <mattst88@gmail.com>
-Date: Tue, 4 Aug 2015 14:47:01 -0700
-Subject: [PATCH] Use getxpid syscall on alpha for raw_getpid()
-
-Alpha does not have a getpid syscall, but rather has getxpid to match
-OSF/1.
----
- src/basic/missing.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index ed6cd80..34ab025 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -977,7 +977,11 @@ static inline int raw_clone(unsigned long flags, void *child_stack) {
- }
-
- static inline pid_t raw_getpid(void) {
-+#if defined(__alpha__)
-+ return (pid_t) syscall(__NR_getxpid);
-+#else
- return (pid_t) syscall(__NR_getpid);
-+#endif
- }
-
- #if !HAVE_DECL_RENAMEAT2
---
-2.5.0
-
diff --git a/sys-apps/systemd/files/232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch b/sys-apps/systemd/files/232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch
new file mode 100644
index 00000000..788f0aa1
--- /dev/null
+++ b/sys-apps/systemd/files/232-0001-build-sys-check-for-lz4-in-the-old-and-new-numbering.patch
@@ -0,0 +1,44 @@
+From 63621678f44325b4c48574f9c9d7a3c499d1a608 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Wed, 23 Nov 2016 10:18:30 -0500
+Subject: [PATCH 1/2] build-sys: check for lz4 in the old and new numbering
+ scheme (#4717)
+
+lz4 upstream decided to switch to an incompatible numbering scheme
+(1.7.3 follows 131, to match the so version).
+PKG_CHECK_MODULES does not allow two version matches for the same package,
+so e.g. lz4 < 10 || lz4 >= 125 cannot be used. Check twice, once for
+"new" numbers (anything below 10 is assume to be new), once for the "old"
+numbers (anything above >= 125). This assumes that the "new" versioning
+will not get to 10 to quickly. I think that's a safe assumption, lz4 is a
+mature project.
+
+Fixed #4690.
+---
+ configure.ac | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0b10fc7de..1928e65bd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -623,10 +623,13 @@ AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
+ have_lz4=no
+ AC_ARG_ENABLE(lz4, AS_HELP_STRING([--disable-lz4], [Disable optional LZ4 support]))
+ AS_IF([test "x$enable_lz4" != "xno"], [
+- PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
+- [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available])
++ PKG_CHECK_MODULES(LZ4, [ liblz4 < 10 ],
++ [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
+ have_lz4=yes],
+- have_lz4=no)
++ [PKG_CHECK_MODULES(LZ4, [ liblz4 >= 125 ],
++ [AC_DEFINE(HAVE_LZ4, 1, [Define if LZ4 is available])
++ have_lz4=yes],
++ have_lz4=no)])
+ AS_IF([test "x$have_lz4" = xno -a "x$enable_lz4" = xyes],
+ [AC_MSG_ERROR([*** LZ4 support requested but libraries not found])])
+ ])
+--
+2.11.0
+
diff --git a/sys-apps/systemd/files/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch b/sys-apps/systemd/files/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch
new file mode 100644
index 00000000..440ec75b
--- /dev/null
+++ b/sys-apps/systemd/files/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch
@@ -0,0 +1,302 @@
+From 016fb3b83b861cfe58694996076a9764dcb46475 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppymaster@gmail.com>
+Date: Tue, 10 Jan 2017 02:39:05 -0500
+Subject: [PATCH 2/2] build-sys: add check for gperf lookup function signature
+ (#5055)
+
+gperf-3.1 generates lookup functions that take a size_t length
+parameter instead of unsigned int. Test for this at configure time.
+
+Fixes: https://github.com/systemd/systemd/issues/5039
+---
+ configure.ac | 22 ++++++++++++++++++++++
+ src/basic/af-list.c | 2 +-
+ src/basic/arphrd-list.c | 2 +-
+ src/basic/cap-list.c | 2 +-
+ src/basic/errno-list.c | 2 +-
+ src/core/load-fragment.h | 2 +-
+ src/journal/journald-server.h | 2 +-
+ src/login/logind.h | 2 +-
+ src/network/networkd-conf.h | 2 +-
+ src/network/networkd-netdev.h | 2 +-
+ src/network/networkd-network.h | 2 +-
+ src/nspawn/nspawn-settings.h | 2 +-
+ src/resolve/dns-type.c | 2 +-
+ src/resolve/resolved-conf.h | 2 +-
+ src/test/test-af-list.c | 2 +-
+ src/test/test-arphrd-list.c | 2 +-
+ src/timesync/timesyncd-conf.h | 2 +-
+ src/udev/net/link-config.h | 2 +-
+ src/udev/udev-builtin-keyboard.c | 2 +-
+ 19 files changed, 40 insertions(+), 18 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1928e65bd..5c639e32d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -258,6 +258,28 @@ AC_CHECK_SIZEOF(rlim_t,,[
+ #include <sys/resource.h>
+ ])
+
++GPERF_TEST="$(echo foo,bar | ${GPERF} -L ANSI-C)"
++
++AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM([
++ #include <string.h>
++ const char * in_word_set(const char *, size_t);
++ $GPERF_TEST]
++ )],
++ [GPERF_LEN_TYPE=size_t],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM([
++ #include <string.h>
++ const char * in_word_set(const char *, unsigned);
++ $GPERF_TEST]
++ )],
++ [GPERF_LEN_TYPE=unsigned],
++ [AC_MSG_ERROR([** unable to determine gperf len type])]
++ )]
++)
++
++AC_DEFINE_UNQUOTED([GPERF_LEN_TYPE], [$GPERF_LEN_TYPE], [gperf len type])
++
+ # ------------------------------------------------------------------------------
+ # we use python to build the man page index
+ have_python=no
+diff --git a/src/basic/af-list.c b/src/basic/af-list.c
+index 3fac9c508..4b291d177 100644
+--- a/src/basic/af-list.c
++++ b/src/basic/af-list.c
+@@ -23,7 +23,7 @@
+ #include "af-list.h"
+ #include "macro.h"
+
+-static const struct af_name* lookup_af(register const char *str, register unsigned int len);
++static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
+
+ #include "af-from-name.h"
+ #include "af-to-name.h"
+diff --git a/src/basic/arphrd-list.c b/src/basic/arphrd-list.c
+index 6792d1ee3..2d598dc66 100644
+--- a/src/basic/arphrd-list.c
++++ b/src/basic/arphrd-list.c
+@@ -23,7 +23,7 @@
+ #include "arphrd-list.h"
+ #include "macro.h"
+
+-static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
++static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
+
+ #include "arphrd-from-name.h"
+ #include "arphrd-to-name.h"
+diff --git a/src/basic/cap-list.c b/src/basic/cap-list.c
+index 3e773a06f..d68cc78d0 100644
+--- a/src/basic/cap-list.c
++++ b/src/basic/cap-list.c
+@@ -26,7 +26,7 @@
+ #include "parse-util.h"
+ #include "util.h"
+
+-static const struct capability_name* lookup_capability(register const char *str, register unsigned int len);
++static const struct capability_name* lookup_capability(register const char *str, register GPERF_LEN_TYPE len);
+
+ #include "cap-from-name.h"
+ #include "cap-to-name.h"
+diff --git a/src/basic/errno-list.c b/src/basic/errno-list.c
+index 31b66bad5..c6a01eec8 100644
+--- a/src/basic/errno-list.c
++++ b/src/basic/errno-list.c
+@@ -23,7 +23,7 @@
+ #include "macro.h"
+
+ static const struct errno_name* lookup_errno(register const char *str,
+- register unsigned int len);
++ register GPERF_LEN_TYPE len);
+
+ #include "errno-from-name.h"
+ #include "errno-to-name.h"
+diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
+index c05f205c3..ede6b1f73 100644
+--- a/src/core/load-fragment.h
++++ b/src/core/load-fragment.h
+@@ -118,7 +118,7 @@ int config_parse_user_group(const char *unit, const char *filename, unsigned lin
+ int config_parse_user_group_strv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+ /* gperf prototypes */
+-const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+ extern const char load_fragment_gperf_nulstr[];
+
+ typedef enum Disabled {
+diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
+index 99d91496b..d1520c45d 100644
+--- a/src/journal/journald-server.h
++++ b/src/journal/journald-server.h
+@@ -179,7 +179,7 @@ void server_dispatch_message(Server *s, struct iovec *iovec, unsigned n, unsigne
+ void server_driver_message(Server *s, sd_id128_t message_id, const char *format, ...) _printf_(3,0) _sentinel_;
+
+ /* gperf lookup function */
+-const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* journald_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int config_parse_storage(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+diff --git a/src/login/logind.h b/src/login/logind.h
+index 086fa1eeb..7556ee2e4 100644
+--- a/src/login/logind.h
++++ b/src/login/logind.h
+@@ -182,7 +182,7 @@ int manager_unit_is_active(Manager *manager, const char *unit);
+ int manager_job_is_active(Manager *manager, const char *path);
+
+ /* gperf lookup function */
+-const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* logind_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int manager_set_lid_switch_ignore(Manager *m, usec_t until);
+
+diff --git a/src/network/networkd-conf.h b/src/network/networkd-conf.h
+index c7bfb42a7..00ddb7672 100644
+--- a/src/network/networkd-conf.h
++++ b/src/network/networkd-conf.h
+@@ -23,7 +23,7 @@
+
+ int manager_parse_config_file(Manager *m);
+
+-const struct ConfigPerfItem* networkd_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* networkd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int config_parse_duid_type(
+ const char *unit,
+diff --git a/src/network/networkd-netdev.h b/src/network/networkd-netdev.h
+index 70ff947b9..37c743121 100644
+--- a/src/network/networkd-netdev.h
++++ b/src/network/networkd-netdev.h
+@@ -175,7 +175,7 @@ NetDevKind netdev_kind_from_string(const char *d) _pure_;
+ int config_parse_netdev_kind(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+ /* gperf */
+-const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* network_netdev_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ /* Macros which append INTERFACE= to the message */
+
+diff --git a/src/network/networkd-network.h b/src/network/networkd-network.h
+index 42fc82d39..09c3b3a3a 100644
+--- a/src/network/networkd-network.h
++++ b/src/network/networkd-network.h
+@@ -236,7 +236,7 @@ int config_parse_dhcp_route_table(const char *unit, const char *filename, unsign
+ /* Legacy IPv4LL support */
+ int config_parse_ipv4ll(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+
+-const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* network_network_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ extern const sd_bus_vtable network_vtable[];
+
+diff --git a/src/nspawn/nspawn-settings.h b/src/nspawn/nspawn-settings.h
+index 231e6d726..4ae34f8e2 100644
+--- a/src/nspawn/nspawn-settings.h
++++ b/src/nspawn/nspawn-settings.h
+@@ -103,7 +103,7 @@ bool settings_private_network(Settings *s);
+
+ DEFINE_TRIVIAL_CLEANUP_FUNC(Settings*, settings_free);
+
+-const struct ConfigPerfItem* nspawn_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* nspawn_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int config_parse_capability(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+ int config_parse_id128(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+diff --git a/src/resolve/dns-type.c b/src/resolve/dns-type.c
+index aaf5ed62c..d89ae28dc 100644
+--- a/src/resolve/dns-type.c
++++ b/src/resolve/dns-type.c
+@@ -29,7 +29,7 @@ typedef const struct {
+ } dns_type;
+
+ static const struct dns_type_name *
+-lookup_dns_type (register const char *str, register unsigned int len);
++lookup_dns_type (register const char *str, register GPERF_LEN_TYPE len);
+
+ #include "dns_type-from-name.h"
+ #include "dns_type-to-name.h"
+diff --git a/src/resolve/resolved-conf.h b/src/resolve/resolved-conf.h
+index fc425a36b..8184d6cad 100644
+--- a/src/resolve/resolved-conf.h
++++ b/src/resolve/resolved-conf.h
+@@ -41,7 +41,7 @@ int manager_parse_search_domains_and_warn(Manager *m, const char *string);
+ int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char *word);
+ int manager_parse_dns_server_string_and_warn(Manager *m, DnsServerType type, const char *string);
+
+-const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* resolved_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int config_parse_dns_servers(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+ int config_parse_search_domains(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c
+index aeaa0929b..e2479133d 100644
+--- a/src/test/test-af-list.c
++++ b/src/test/test-af-list.c
+@@ -24,7 +24,7 @@
+ #include "string-util.h"
+ #include "util.h"
+
+-static const struct af_name* lookup_af(register const char *str, register unsigned int len);
++static const struct af_name* lookup_af(register const char *str, register GPERF_LEN_TYPE len);
+
+ #include "af-from-name.h"
+ #include "af-list.h"
+diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c
+index f3989ad20..8f4f342fa 100644
+--- a/src/test/test-arphrd-list.c
++++ b/src/test/test-arphrd-list.c
+@@ -24,7 +24,7 @@
+ #include "string-util.h"
+ #include "util.h"
+
+-static const struct arphrd_name* lookup_arphrd(register const char *str, register unsigned int len);
++static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
+
+ #include "arphrd-from-name.h"
+ #include "arphrd-list.h"
+diff --git a/src/timesync/timesyncd-conf.h b/src/timesync/timesyncd-conf.h
+index cba0724b1..0280697e9 100644
+--- a/src/timesync/timesyncd-conf.h
++++ b/src/timesync/timesyncd-conf.h
+@@ -22,7 +22,7 @@
+ #include "conf-parser.h"
+ #include "timesyncd-manager.h"
+
+-const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int manager_parse_server_string(Manager *m, ServerType type, const char *string);
+
+diff --git a/src/udev/net/link-config.h b/src/udev/net/link-config.h
+index 91cc0357c..b0d8ceb76 100644
+--- a/src/udev/net/link-config.h
++++ b/src/udev/net/link-config.h
+@@ -93,7 +93,7 @@ const char *mac_policy_to_string(MACPolicy p) _const_;
+ MACPolicy mac_policy_from_string(const char *p) _pure_;
+
+ /* gperf lookup function */
+-const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, unsigned length);
++const struct ConfigPerfItem* link_config_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
+
+ int config_parse_mac_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+ int config_parse_name_policy(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c
+index aa10beafb..09024116f 100644
+--- a/src/udev/udev-builtin-keyboard.c
++++ b/src/udev/udev-builtin-keyboard.c
+@@ -29,7 +29,7 @@
+ #include "string-util.h"
+ #include "udev.h"
+
+-static const struct key *keyboard_lookup_key(const char *str, unsigned len);
++static const struct key *keyboard_lookup_key(const char *str, GPERF_LEN_TYPE len);
+ #include "keyboard-keys-from-name.h"
+
+ static int install_force_release(struct udev_device *dev, const unsigned *release, unsigned release_count) {
+--
+2.11.0
+
diff --git a/sys-apps/systemd/files/232-systemd-user-pam.patch b/sys-apps/systemd/files/232-systemd-user-pam.patch
new file mode 100644
index 00000000..9c4b3910
--- /dev/null
+++ b/sys-apps/systemd/files/232-systemd-user-pam.patch
@@ -0,0 +1,16 @@
+--- a/src/login/systemd-user.m4
++++ b/src/login/systemd-user.m4
+@@ -2,11 +2,7 @@
+ #
+ # Used by systemd --user instances.
+
+-account required pam_unix.so
++account include system-services
+
+-m4_ifdef(`HAVE_SELINUX',
+-session required pam_selinux.so close
+-session required pam_selinux.so nottys open
+-)m4_dnl
+-session required pam_loginuid.so
++session include system-services
+ session optional pam_systemd.so
diff --git a/sys-apps/systemd/files/233-systemd-user-pam.patch b/sys-apps/systemd/files/233-systemd-user-pam.patch
new file mode 100644
index 00000000..eb2223e5
--- /dev/null
+++ b/sys-apps/systemd/files/233-systemd-user-pam.patch
@@ -0,0 +1,16 @@
+--- a/src/login/systemd-user.m4
++++ b/src/login/systemd-user.m4
+@@ -2,11 +2,7 @@
+ #
+ # Used by systemd --user instances.
+
+-account required pam_unix.so
+-m4_ifdef(`HAVE_SELINUX',
+-session required pam_selinux.so close
+-session required pam_selinux.so nottys open
+-)m4_dnl
+-session required pam_loginuid.so
++account include system-auth
++session include system-auth
+ session optional pam_keyinit.so force revoke
+ session optional pam_systemd.so
diff --git a/sys-apps/systemd/files/compile-unifont.py b/sys-apps/systemd/files/compile-unifont.py
deleted file mode 100644
index 5464c53e..00000000
--- a/sys-apps/systemd/files/compile-unifont.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
-#
-# This file is part of systemd.
-#
-# Copyright 2013-2014 David Herrmann <dh.herrmann@gmail.com>
-#
-# systemd 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.
-#
-# systemd 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 systemd; If not, see <http://www.gnu.org/licenses/>.
-
-#
-# Parse a unifont.hex file and produce a compressed binary-format.
-#
-
-from __future__ import print_function
-import re
-import sys
-import fileinput
-import struct
-
-#
-# Write "bits" array as binary output.
-#
-
-
-write = getattr(sys.stdout, 'buffer', sys.stdout).write
-
-def write_bin_entry(entry):
- l = len(entry)
- if l != 32 and l != 64:
- entry = "0" * 64
- l = 0
- elif l < 64:
- entry += "0" * (64 - l)
-
- write(struct.pack('B', int(l / 32))) # width
- write(struct.pack('B', 0)) # padding
- write(struct.pack('H', 0)) # padding
- write(struct.pack('I', 0)) # padding
-
- i = 0
- for j in range(0, 16):
- for k in range(0, 2):
- if l <= k * 16 * 2:
- c = 0
- else:
- c = int(entry[i:i+2], 16)
- i += 2
-
- write(struct.pack('B', c))
-
-def write_bin(bits):
- write(struct.pack('B', 0x44)) # ASCII: 'D'
- write(struct.pack('B', 0x56)) # ASCII: 'V'
- write(struct.pack('B', 0x44)) # ASCII: 'D'
- write(struct.pack('B', 0x48)) # ASCII: 'H'
- write(struct.pack('B', 0x52)) # ASCII: 'R'
- write(struct.pack('B', 0x4d)) # ASCII: 'M'
- write(struct.pack('B', 0x55)) # ASCII: 'U'
- write(struct.pack('B', 0x46)) # ASCII: 'F'
- write(struct.pack('<I', 0)) # compatible-flags
- write(struct.pack('<I', 0)) # incompatible-flags
- write(struct.pack('<I', 32)) # header-size
- write(struct.pack('<H', 8)) # glyph-header-size
- write(struct.pack('<H', 2)) # glyph-stride
- write(struct.pack('<Q', 32)) # glyph-body-size
-
- # write glyphs
- for idx in range(len(bits)):
- write_bin_entry(bits[idx])
-
-#
-# Parse hex file into "bits" array
-#
-
-def parse_hex_line(bits, line):
- m = re.match(r"^([0-9A-Fa-f]+):([0-9A-Fa-f]+)$", line)
- if m == None:
- return
-
- idx = int(m.group(1), 16)
- val = m.group(2)
-
- # insert skipped lines
- for i in range(len(bits), idx):
- bits.append("")
-
- bits.insert(idx, val)
-
-def parse_hex():
- bits = []
-
- for line in sys.stdin:
- if not line:
- continue
- if line.startswith("#"):
- continue
-
- parse_hex_line(bits, line)
-
- return bits
-
-#
-# In normal mode we simply read line by line from standard-input and write the
-# binary-file to standard-output.
-#
-
-if __name__ == "__main__":
- bits = parse_hex()
- write_bin(bits)
diff --git a/sys-apps/systemd/files/nsswitch.conf b/sys-apps/systemd/files/nsswitch.conf
new file mode 100644
index 00000000..00667c0c
--- /dev/null
+++ b/sys-apps/systemd/files/nsswitch.conf
@@ -0,0 +1,27 @@
+# Sample nss configuration for systemd
+
+# systemd-specific modules
+# See the manual pages fore further information.
+# nss-myhostname - host resolution for the local hostname
+# nss-mymachines - host, user, group resolution for containers
+# nss-resolve - host resolution using resolved
+# nss-systemd - dynamic user/group resolution (DynamicUser in unit files)
+
+passwd: compat mymachines systemd
+shadow: compat
+group: compat mymachines systemd
+gshadow: files
+
+hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
+networks: files
+
+services: db files
+protocols: db files
+rpc: db files
+ethers: db files
+netmasks: files
+netgroup: files
+bootparams: files
+
+automount: files
+aliases: files