Bump buidlroot version to 2018.02.6

This commit is contained in:
jbnadal
2018-10-22 14:55:59 +02:00
parent 222960cedb
commit bec94fdb63
6150 changed files with 84803 additions and 117446 deletions

View File

@@ -0,0 +1,48 @@
From 7deb6387aeb07fa4300fa3cf9d6c039dabd120d7 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime.ripard@free-electrons.com>
Date: Mon, 31 Jul 2017 10:08:46 -0400
Subject: [PATCH] fix-getty-unit
Prefer getty to agetty in console setup systemd units
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
[aduskett@gmail.com: Update for systemd v237]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
units/getty@.service.m4 | 5 +----
units/serial-getty@.service.m4 | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
index 2a84061..7ad588f 100644
--- a/units/getty@.service.m4
+++ b/units/getty@.service.m4
@@ -35,10 +35,7 @@ ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
-# The '-o' option value tells agetty to replace 'login' arguments with an
-# option to preserve environment (-p), followed by '--' for safety, and then
-# the entered username.
-ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
+ExecStart=-/sbin/getty -L %I 115200 vt100
Type=idle
Restart=always
RestartSec=0
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
index b7caeaf..c663612 100644
--- a/units/serial-getty@.service.m4
+++ b/units/serial-getty@.service.m4
@@ -33,7 +33,7 @@ Before=rescue.service
# The '-o' option value tells agetty to replace 'login' arguments with an
# option to preserve environment (-p), followed by '--' for safety, and then
# the entered username.
-ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,38400,9600 %I $TERM
+ExecStart=-/sbin/getty -L %I 115200 vt100
Type=idle
Restart=always
UtmpIdentifier=%I
--
2.13.3

View File

@@ -1,28 +0,0 @@
From a924f43f30f9c4acaf70618dd2a055f8b0f166be Mon Sep 17 00:00:00 2001
From: Evgeny Vereshchagin <evvers@ya.ru>
Date: Wed, 24 May 2017 08:56:48 +0300
Subject: [PATCH] resolved: bugfix of null pointer p->question dereferencing
(#6020)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
[Upstream commit: https://github.com/systemd/systemd/commit/a924f43f30f9c4acaf70618dd2a055f8b0f166be]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
src/resolve/resolved-dns-packet.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 652970284e..240ee448f4 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
if (r < 0)
return r;
+ if (!p->question)
+ return 0;
+
if (p->question->n_keys != 1)
return 0;

View File

@@ -0,0 +1,80 @@
From 17560d52e9ec0afebbfe31e694870c6433b36f60 Mon Sep 17 00:00:00 2001
From: Adam Duskett <Adamduskett@outlook.com>
Date: Sun, 31 Dec 2017 12:46:04 -0500
Subject: [PATCH] install: don't use ln --relative
Oldish enterprise-class distributions have too old versions of
coreutils, with ln not supporting --relative.
So we fake it.
ln --relative would create minimalist relative paths, but they are not
trivial to generate. Instead, we always create paths relative to the
root, i.e.:
ln -s --relative /usr/bin/foo /usr/sbin/foo
would create: /usr/sbin/foo -> ../bin/foo
while we do : /usr/sbin/foo -> ../../usr/bin/foo
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[aduskett@gmail.com: Added meson.build section and dirname wrapper in add-wants]
[aduskett@gmail.com: Update for systemd v237]
Signed-off-by: Adam Duskett <Adamduskett@outlook.com>
[tpiepho@impinj.com: Fix add-wants wrapper]
Signed-off-by: Trent Piepho <tpiepho@impinj.com>
---
meson.build | 2 +-
tools/meson-make-symlink.sh | 3 ++-
units/meson-add-wants.sh | 6 ++++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index d4af95a44..d75f2b34c 100644
--- a/meson.build
+++ b/meson.build
@@ -586,7 +586,7 @@ endforeach
conf.set_quoted('TELINIT', get_option('telinit-path'))
if run_command('ln', '--relative', '--help').returncode() != 0
- error('ln does not support --relative')
+ message('ln does not support --relative')
endif
############################################################
diff --git a/tools/meson-make-symlink.sh b/tools/meson-make-symlink.sh
index 501cd43d4..25e7f89fd 100755
--- a/tools/meson-make-symlink.sh
+++ b/tools/meson-make-symlink.sh
@@ -8,5 +8,6 @@ mkdir -vp "$(dirname "${DESTDIR:-}$2")"
if [ "$(dirname $1)" = . ]; then
ln -vfs -T "$1" "${DESTDIR:-}$2"
else
- ln -vfs -T --relative "${DESTDIR:-}$1" "${DESTDIR:-}$2"
+ dds="$( dirname "$2" |sed -r -e 's:/+[^/]+:../:g; s:/$::' )"
+ ln -vfs -T "${dds}$1" "${DESTDIR:-}$2"
fi
diff --git a/units/meson-add-wants.sh b/units/meson-add-wants.sh
index 70f7172ae..bb8155075 100755
--- a/units/meson-add-wants.sh
+++ b/units/meson-add-wants.sh
@@ -14,7 +14,7 @@ case "$target" in
;;
esac
-unitpath="${DESTDIR:-}${unitdir}/${unit}"
+unitpath="${unitdir}/${unit}"
case "$target" in
*/)
@@ -25,4 +25,6 @@ case "$target" in
;;
esac
-ln -vfs --relative "$unitpath" "$dir"
+[ ! -d "${dir}" ] && linkdir=`dirname "${dir}"` || linkdir="${dir}"
+dds="$(printf "%s" "${linkdir#${DESTDIR:-}}" |sed -r -e 's:/+[^/]+:../:g; s:/$::')"
+ln -vfs "$dds$unitpath" "$dir"
--
2.14.3

View File

@@ -1,51 +0,0 @@
From db848813bae4d28c524b3b6a7dad135e426659ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sun, 18 Jun 2017 16:07:57 -0400
Subject: [PATCH] resolved: simplify alloc size calculation
The allocation size was calculated in a complicated way, and for values
close to the page size we would actually allocate less than requested.
Reported by Chris Coulson <chris.coulson@canonical.com>.
CVE-2017-9445
[Upstream commit: https://github.com/systemd/systemd/commit/db848813bae4d28c524b3b6a7dad135e426659ce]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
src/resolve/resolved-dns-packet.c | 8 +-------
src/resolve/resolved-dns-packet.h | 2 --
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 240ee448f4..821b66e266 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -47,13 +47,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
assert(ret);
- if (mtu <= UDP_PACKET_HEADER_SIZE)
- a = DNS_PACKET_SIZE_START;
- else
- a = mtu - UDP_PACKET_HEADER_SIZE;
-
- if (a < DNS_PACKET_HEADER_SIZE)
- a = DNS_PACKET_HEADER_SIZE;
+ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
/* round up to next page size */
a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
index 2c92392e4d..3abcaf8cf3 100644
--- a/src/resolve/resolved-dns-packet.h
+++ b/src/resolve/resolved-dns-packet.h
@@ -66,8 +66,6 @@ struct DnsPacketHeader {
/* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
-#define DNS_PACKET_SIZE_START 512
-
struct DnsPacket {
int n_ref;
DnsProtocol protocol;

View File

@@ -1,4 +1,7 @@
Fix AM_PATH_LIBGCRYPT not found
From cb47c1da9c4a8f69662f9c17497aeeb8a922d41a Mon Sep 17 00:00:00 2001
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Date: Fri, 28 Jul 2017 07:13:51 -0400
Subject: [PATCH] Fix AM_PATH_LIBGCRYPT not found
This patch installs a copy of libgcrypt.m4 from the libgcrypt source tarball
to systemd m4 directory.
@@ -15,10 +18,18 @@ machine or adding libgcrypt as a build dependency to systemd is not
acceptable, the required file is added to the m4 directory.
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Index: systemd-213/m4/libgcrypt.m4
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ systemd-213/m4/libgcrypt.m4 2014-06-11 10:41:11.749305509 +0200
[Adam: Refresh for 234]
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
m4/libgcrypt.m4 | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 123 insertions(+)
create mode 100644 m4/libgcrypt.m4
diff --git a/m4/libgcrypt.m4 b/m4/libgcrypt.m4
new file mode 100644
index 0000000..831dc0c
--- /dev/null
+++ b/m4/libgcrypt.m4
@@ -0,0 +1,123 @@
+dnl Autoconf macros for libgcrypt
+dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
@@ -143,3 +154,6 @@ Index: systemd-213/m4/libgcrypt.m4
+ AC_SUBST(LIBGCRYPT_CFLAGS)
+ AC_SUBST(LIBGCRYPT_LIBS)
+])
--
2.13.3

View File

@@ -1,48 +0,0 @@
From 88795538726a5bbfd9efc13d441cb05e1d7fc139 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Tue, 27 Jun 2017 14:20:00 -0400
Subject: [PATCH] resolved: do not allocate packets with minimum size
dns_packet_new() is sometimes called with mtu == 0, and in that case we should
allocate more than the absolute minimum (which is the dns packet header size),
otherwise we have to resize immediately again after appending the first data to
the packet.
This partially reverts the previous commit.
[Upstream commit: https://github.com/systemd/systemd/commit/88795538726a5bbfd9efc13d441cb05e1d7fc139]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
src/resolve/resolved-dns-packet.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 821b66e266..d1f0f760a4 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -28,6 +28,9 @@
#define EDNS0_OPT_DO (1<<15)
+#define DNS_PACKET_SIZE_START 512
+assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
+
typedef struct DnsPacketRewinder {
DnsPacket *packet;
size_t saved_rindex;
@@ -47,7 +50,14 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
assert(ret);
- a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
+ /* When dns_packet_new() is called with mtu == 0, allocate more than the
+ * absolute minimum (which is the dns packet header size), to avoid
+ * resizing immediately again after appending the first data to the packet.
+ */
+ if (mtu < UDP_PACKET_HEADER_SIZE)
+ a = DNS_PACKET_SIZE_START;
+ else
+ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
/* round up to next page size */
a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));

View File

@@ -0,0 +1,75 @@
From 227b8a762fea1458547be2cdf0e6e4aac0079730 Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Mon, 26 Mar 2018 17:34:53 +0200
Subject: [PATCH] core: don't include libmount.h in a header file (#8580)
linux/fs.h sys/mount.h, libmount.h and missing.h all include MS_*
definitions.
To avoid problems, only one of linux/fs.h, sys/mount.h and libmount.h
should be included. And missing.h must be included last.
Without this, building systemd may fail with:
In file included from [...]/libmount/libmount.h:31:0,
from ../systemd-238/src/core/manager.h:23,
from ../systemd-238/src/core/emergency-action.h:37,
from ../systemd-238/src/core/unit.h:34,
from ../systemd-238/src/core/dbus-timer.h:25,
from ../systemd-238/src/core/timer.c:26:
[...]/sys/mount.h:57:2: error: expected identifier before numeric constant
Upstream: https://github.com/systemd/systemd/pull/8580
Signed-off-by: Stefan Becker <chemobejk@gmail.com>
---
src/core/dbus-execute.c | 1 +
src/core/manager.h | 3 ++-
src/core/mount.c | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c
index 7344623ebf6..c342093bca4 100644
--- a/src/core/dbus-execute.c
+++ b/src/core/dbus-execute.c
@@ -18,6 +18,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include <sys/mount.h>
#include <sys/prctl.h>
#include <stdio_ext.h>
diff --git a/src/core/manager.h b/src/core/manager.h
index 28c5da225b1..e09e0cdf5e9 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -20,7 +20,6 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <libmount.h>
#include <stdbool.h>
#include <stdio.h>
@@ -34,6 +33,8 @@
#include "list.h"
#include "ratelimit.h"
+struct libmnt_monitor;
+
/* Enforce upper limit how many names we allow */
#define MANAGER_MAX_NAMES 131072 /* 128K */
diff --git a/src/core/mount.c b/src/core/mount.c
index 0e755da5c02..0154ebda5d6 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -23,6 +23,8 @@
#include <stdio.h>
#include <sys/epoll.h>
+#include <libmount.h>
+
#include "sd-messages.h"
#include "alloc-util.h"

View File

@@ -1,30 +0,0 @@
Prefer getty to agetty in console setup systemd units
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
diff -aburN systemd-212.orig/units/getty@.service.m4 systemd-212/units/getty@.service.m4
--- systemd-212.orig/units/getty@.service.m4 2014-01-28 11:08:51.000000000 +0100
+++ systemd-212/units/getty@.service.m4 2014-03-26 11:06:27.000000000 +0100
@@ -27,7 +27,7 @@
[Service]
# the VT is cleared by TTYVTDisallocate
-ExecStart=-/sbin/agetty --noclear %I $TERM
+ExecStart=-/sbin/getty -L %I 115200 vt100
Type=idle
Restart=always
RestartSec=0
diff -aburN systemd-212.orig/units/serial-getty@.service.m4 systemd-212/units/serial-getty@.service.m4
--- systemd-212.orig/units/serial-getty@.service.m4 2014-03-13 18:47:24.000000000 +0100
+++ systemd-212/units/serial-getty@.service.m4 2014-03-26 11:07:01.000000000 +0100
@@ -22,7 +22,7 @@
IgnoreOnIsolate=yes
[Service]
-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
+ExecStart=-/sbin/getty -L %I 115200 vt100
Type=idle
Restart=always
RestartSec=0

View File

@@ -0,0 +1,201 @@
From 848e863acc51ecfb0f3955c498874588201d9130 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Thu, 15 Mar 2018 06:23:46 +0100
Subject: [PATCH] basic/macros: rename noreturn into _noreturn_ (#8456)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
"noreturn" is reserved and can be used in other header files we include:
[ 16s] In file included from /usr/include/gcrypt.h:30:0,
[ 16s] from ../src/journal/journal-file.h:26,
[ 16s] from ../src/journal/journal-vacuum.c:31:
[ 16s] /usr/include/gpg-error.h:1544:46: error: expected , or ; before ) token
[ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
Here we include grcrypt.h (which in turns include gpg-error.h) *after* we
"noreturn" was defined in macro.h.
Upstream: https://github.com/systemd/systemd/pull/8456
Signed-off-by: Stefan Becker <chemobejk@gmail.com>
---
src/basic/log.c | 4 ++--
src/basic/log.h | 4 ++--
src/basic/macro.h | 19 +++++++++----------
src/basic/process-util.c | 2 +-
src/basic/process-util.h | 2 +-
src/core/main.c | 4 ++--
src/journal/test-journal-interleaving.c | 2 +-
src/shared/pager.c | 2 +-
src/udev/collect/collect.c | 2 +-
9 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/src/basic/log.c b/src/basic/log.c
index 7a7f2cbec13..16a2431c548 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -814,7 +814,7 @@ static void log_assert(
log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer);
}
-noreturn void log_assert_failed_realm(
+_noreturn_ void log_assert_failed_realm(
LogRealm realm,
const char *text,
const char *file,
@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm(
abort();
}
-noreturn void log_assert_failed_unreachable_realm(
+_noreturn_ void log_assert_failed_unreachable_realm(
LogRealm realm,
const char *text,
const char *file,
diff --git a/src/basic/log.h b/src/basic/log.h
index efcf0f1bfc1..314be128a23 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -186,7 +186,7 @@ int log_dump_internal(
char *buffer);
/* Logging for various assertions */
-noreturn void log_assert_failed_realm(
+_noreturn_ void log_assert_failed_realm(
LogRealm realm,
const char *text,
const char *file,
@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm(
#define log_assert_failed(text, ...) \
log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__)
-noreturn void log_assert_failed_unreachable_realm(
+_noreturn_ void log_assert_failed_unreachable_realm(
LogRealm realm,
const char *text,
const char *file,
diff --git a/src/basic/macro.h b/src/basic/macro.h
index 95be63a2040..8911edfc4be 100644
--- a/src/basic/macro.h
+++ b/src/basic/macro.h
@@ -53,6 +53,15 @@
#else
#define _fallthrough_
#endif
+/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
+ * compiler versions */
+#ifndef _noreturn_
+#if __STDC_VERSION__ >= 201112L
+#define _noreturn_ _Noreturn
+#else
+#define _noreturn_ __attribute__((noreturn))
+#endif
+#endif
/* Temporarily disable some warnings */
#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \
@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
#endif
#endif
-/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
- * compiler versions */
-#ifndef noreturn
-#if __STDC_VERSION__ >= 201112L
-#define noreturn _Noreturn
-#else
-#define noreturn __attribute__((noreturn))
-#endif
-#endif
-
#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
static inline void func##p(type *p) { \
if (*p) \
diff --git a/src/basic/process-util.c b/src/basic/process-util.c
index aa9846db5dc..e6120af5b68 100644
--- a/src/basic/process-util.c
+++ b/src/basic/process-util.c
@@ -987,7 +987,7 @@ bool is_main_thread(void) {
return cached > 0;
}
-noreturn void freeze(void) {
+_noreturn_ void freeze(void) {
log_close();
diff --git a/src/basic/process-util.h b/src/basic/process-util.h
index 93029e36e5f..5170adec7bb 100644
--- a/src/basic/process-util.h
+++ b/src/basic/process-util.h
@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid);
bool is_main_thread(void);
-noreturn void freeze(void);
+_noreturn_ void freeze(void);
bool oom_score_adjust_is_valid(int oa);
diff --git a/src/core/main.c b/src/core/main.c
index 076846a41c0..4b2d1492373 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX;
static sd_id128_t arg_machine_id = {};
static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE;
-noreturn static void freeze_or_reboot(void) {
+_noreturn_ static void freeze_or_reboot(void) {
if (arg_crash_reboot) {
log_notice("Rebooting in 10s...");
@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) {
freeze();
}
-noreturn static void crash(int sig) {
+_noreturn_ static void crash(int sig) {
struct sigaction sa;
pid_t pid;
diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c
index 5a88b2774fa..d87bdbdd32a 100644
--- a/src/journal/test-journal-interleaving.c
+++ b/src/journal/test-journal-interleaving.c
@@ -37,7 +37,7 @@
static bool arg_keep = false;
-noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
+_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
log_internal(LOG_CRIT, error, file, line, func,
"'%s' failed at %s:%u (%s): %m", text, file, line, func);
abort();
diff --git a/src/shared/pager.c b/src/shared/pager.c
index 75db3c985bd..681af9c40e3 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
@@ -47,7 +47,7 @@ static int stored_stderr = -1;
static bool stdout_redirected = false;
static bool stderr_redirected = false;
-noreturn static void pager_fallback(void) {
+_noreturn_ static void pager_fallback(void) {
int r;
r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0);
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 2821640e93b..c8fa47b3d7d 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node)
return container_of(node, struct _mate, node);
}
-noreturn static void sig_alrm(int signo)
+_noreturn_ static void sig_alrm(int signo)
{
exit(4);
}

View File

@@ -1,72 +0,0 @@
From 32b6c22006767f0762edfa116b8b0f7be0c5c121 Mon Sep 17 00:00:00 2001
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Date: Wed, 27 Jul 2016 15:43:16 +0200
Subject: [PATCH] build-sys: revert use of ln relative option.
Systemd build system now uses the `--relative` option from `ln(1)`.
This option was added to GNU coreutils 8.16, which is not widely
deployed yet by GNU/Linux distributions (not available in Debian Wheezy
for example).
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
[Maxime: refresh the patch]
[Vincent:
refresh the patch, move-to-rootlibdir removed by:
https://github.com/systemd/systemd/commit/082210c7a837063fd8b520b18c221b42059d7eff
]
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
Makefile.am | 11 ++---------
configure.ac | 2 --
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 0c27f81..4de1595 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -312,9 +312,9 @@ install-aliases-hook:
set -- $(SYSTEM_UNIT_ALIASES) && \
dir=$(systemunitdir) && $(install-aliases)
set -- $(USER_UNIT_ALIASES) && \
- dir=$(userunitdir) && $(install-relative-aliases)
+ dir=$(userunitdir) && $(install-aliases)
set -- $(GENERAL_ALIASES) && \
- dir= && $(install-relative-aliases)
+ dir= && $(install-aliases)
define install-aliases
while [ -n "$$1" ]; do \
@@ -325,15 +325,6 @@ define install-aliases
done
endef
-define install-relative-aliases
- while [ -n "$$1" ]; do \
- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
- rm -f $(DESTDIR)$$dir/$$2 && \
- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
- shift 2 || exit $$?; \
- done
-endef
-
install-touch-usr-hook:
touch -c $(DESTDIR)/$(prefix)
diff --git a/configure.ac b/configure.ac
index cf595e6..d58f303 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
-
M4_DEFINES=
AC_CHECK_TOOL(OBJCOPY, objcopy)
--
2.8.1

View File

@@ -27,18 +27,20 @@ menuconfig BR2_PACKAGE_SYSTEMD
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
select BR2_PACKAGE_KMOD_TOOLS
select BR2_TARGET_TZ_INFO
select BR2_NEEDS_HOST_UTF8_LOCALE
help
systemd is a system and service manager for Linux, compatible with
SysV and LSB init scripts. systemd provides aggressive parallelization
capabilities, uses socket and D-Bus activation for starting services,
offers on-demand starting of daemons, keeps track of processes using
Linux cgroups, supports snapshotting and restoring of the system
state, maintains mount and automount points and implements an
elaborate transactional dependency-based service control logic.
It can work as a drop-in replacement for sysvinit.
systemd is a system and service manager for Linux,
compatible with SysV and LSB init scripts. systemd provides
aggressive parallelization capabilities, uses socket and
D-Bus activation for starting services, offers on-demand
starting of daemons, keeps track of processes using Linux
cgroups, supports snapshotting and restoring of the system
state, maintains mount and automount points and implements
an elaborate transactional dependency-based service control
logic. It can work as a drop-in replacement for sysvinit.
Systemd requires a Linux kernel >= 3.0 with the following options
enabled:
Systemd requires a Linux kernel >= 3.0 with the following
options enabled:
- CONFIG_CGROUPS
- CONFIG_INOTIFY_USER
@@ -65,8 +67,8 @@ menuconfig BR2_PACKAGE_SYSTEMD
Notice that systemd selects the fsck wrapper from util-linux
but no particular fsck.<fstype> is selected. You must choose
the apropriate ones (e.g. e2fsck, from the e2fsprogs package)
according to the system configuration.
the apropriate ones (e.g. e2fsck, from the e2fsprogs
package) according to the system configuration.
http://freedesktop.org/wiki/Software/systemd
@@ -162,11 +164,6 @@ config BR2_PACKAGE_SYSTEMD_IMPORTD
http://www.freedesktop.org/software/systemd/man/machinectl.html#Image%20Transfer%20Commands
config BR2_PACKAGE_SYSTEMD_KDBUS
bool "enable kdbus support"
help
Enable kdbus support for Systemd.
config BR2_PACKAGE_SYSTEMD_LOCALED
bool "enable locale daemon"
help
@@ -208,11 +205,11 @@ config BR2_PACKAGE_SYSTEMD_NETWORKD
default y
help
systemd-networkd is a system service that manages networks.
It detects and configures network devices as they appear, as well as
creating virtual network devices.
It detects and configures network devices as they appear, as
well as creating virtual network devices.
This simple network configuration solution is an alternative to
dhcpcd or ISC dhcp.
This simple network configuration solution is an alternative
to dhcpcd or ISC dhcp.
http://www.freedesktop.org/software/systemd/man/systemd-networkd.html
@@ -271,14 +268,14 @@ config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
select BR2_PACKAGE_ATTR
select BR2_PACKAGE_SMACK
help
Enable support for SMACK, the Simple Mandatory Access Control
Kernel, a minimal approach to Access Control implemented as a kernel
LSM.
Enable support for SMACK, the Simple Mandatory Access
Control Kernel, a minimal approach to Access Control
implemented as a kernel LSM.
This feature requires a kernel >= 3.8.
When this feature is enabled, Systemd mounts smackfs and manages
security labels for sockets.
When this feature is enabled, Systemd mounts smackfs and
manages security labels for sockets.
config BR2_PACKAGE_SYSTEMD_SYSUSERS
bool "enable sysusers support"
@@ -302,11 +299,12 @@ config BR2_PACKAGE_SYSTEMD_TIMESYNCD
bool "enable timesync daemon"
default y
help
systemd-timesyncd is a service that may be used to synchronize the
local system clock with a Network Time Protocol server.
systemd-timesyncd is a service that may be used to
synchronize the local system clock with a Network Time
Protocol server.
This simple NTP solution is an alternative to sntp/ntpd from the ntp
package.
This simple NTP solution is an alternative to sntp/ntpd from
the ntp package.
http://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html

View File

@@ -1,21 +0,0 @@
[Unit]
Description=Network Connectivity
Wants=network.target
Before=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
# lo is brought up earlier, which will cause the upcoming "ifup -a" to fail
# with exit code 1, due to an "ip: RTNETLINK answers: File exists" error during
# its "ip addr add ..." command, subsequently causing this unit to fail even
# though it is a benign error. Flushing the lo address with the command below
# before ifup prevents this failure.
ExecStart=/sbin/ip addr flush dev lo
ExecStart=/sbin/ifup -a
ExecStop=/sbin/ifdown -a
[Install]
WantedBy=multi-user.target

View File

@@ -1,2 +1,5 @@
# sha256 locally computed
sha256 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880 systemd-232.tar.gz
sha256 c83dabbe1c9de6b9db1dafdb7e04140c7d0535705c68842f6c0768653ba4913c systemd-237.tar.gz
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL2
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1
sha256 9c7709aa401a41c4c3f33ea75c34ae5d5354d62c310c3391c2a5958952d8aadd README

View File

@@ -4,20 +4,20 @@
#
################################################################################
SYSTEMD_VERSION = 232
SYSTEMD_VERSION = 237
SYSTEMD_SITE = $(call github,systemd,systemd,v$(SYSTEMD_VERSION))
SYSTEMD_LICENSE = LGPLv2.1+, GPLv2+ (udev), Public Domain (few source files, see README)
SYSTEMD_LICENSE = LGPL-2.1+, GPL-2.0+ (udev), Public Domain (few source files, see README)
SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README
SYSTEMD_INSTALL_STAGING = YES
SYSTEMD_DEPENDENCIES = \
host-gperf \
host-intltool \
libcap \
util-linux \
host-meson \
kmod \
host-gperf
libcap \
util-linux
SYSTEMD_PROVIDES = udev
SYSTEMD_AUTORECONF = YES
# Make sure that systemd will always be built after busybox so that we have
# a consistent init setup between two builds
@@ -26,268 +26,253 @@ SYSTEMD_DEPENDENCIES += busybox
endif
SYSTEMD_CONF_OPTS += \
--with-rootprefix= \
--enable-blkid \
--enable-static=no \
--disable-manpages \
--disable-pam \
--disable-ima \
--disable-libcryptsetup \
--disable-efi \
--disable-gnuefi \
--disable-ldconfig \
--disable-tests \
--disable-coverage \
--with-default-dnssec=no \
--without-python
SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
# Override paths to a few utilities needed at runtime, to
# avoid finding those we would install in $(HOST_DIR).
SYSTEMD_CONF_ENV = \
CFLAGS="$(SYSTEMD_CFLAGS)" \
ac_cv_path_KILL=/usr/bin/kill \
ac_cv_path_KMOD=/usr/bin/kmod \
ac_cv_path_KEXEC=/usr/sbin/kexec \
ac_cv_path_SULOGIN=/usr/sbin/sulogin \
ac_cv_path_MOUNT_PATH=/usr/bin/mount \
ac_cv_path_UMOUNT_PATH=/usr/bin/umount
define SYSTEMD_RUN_INTLTOOLIZE
cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake
endef
SYSTEMD_PRE_CONFIGURE_HOOKS += SYSTEMD_RUN_INTLTOOLIZE
--prefix=/usr \
--libdir='/usr/lib' \
--buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \
--cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf \
-Drootlibdir='/usr/lib' \
-Dblkid=true \
-Dman=false \
-Dima=false \
-Dlibcryptsetup=false \
-Defi=false \
-Dgnu-efi=false \
-Dldconfig=false \
-Ddefault-dnssec=no \
-Dtests=false \
-Dsystem-uid-max=999 \
-Dsystem-gid-max=999 \
-Dtelinit-path=$(TARGET_DIR)/sbin/telinit \
-Dkill-path=/usr/bin/kill \
-Dkmod-path=/usr/bin/kmod \
-Dkexec-path=/usr/sbin/kexec \
-Dsulogin-path=/usr/sbin/sulogin \
-Dmount-path=/usr/bin/mount \
-Dumount-path=/usr/bin/umount \
-Dnobody-group=nogroup
ifeq ($(BR2_PACKAGE_ACL),y)
SYSTEMD_CONF_OPTS += --enable-acl
SYSTEMD_DEPENDENCIES += acl
SYSTEMD_CONF_OPTS += -Dacl=true
else
SYSTEMD_CONF_OPTS += --disable-acl
SYSTEMD_CONF_OPTS += -Dacl=false
endif
ifeq ($(BR2_PACKAGE_AUDIT),y)
SYSTEMD_CONF_OPTS += --enable-audit
SYSTEMD_DEPENDENCIES += audit
SYSTEMD_CONF_OPTS += -Daudit=true
else
SYSTEMD_CONF_OPTS += --disable-audit
SYSTEMD_CONF_OPTS += -Daudit=false
endif
ifeq ($(BR2_PACKAGE_LIBIDN),y)
SYSTEMD_CONF_OPTS += --enable-libidn
SYSTEMD_DEPENDENCIES += libidn
SYSTEMD_CONF_OPTS += -Dlibidn=true
else
SYSTEMD_CONF_OPTS += --disable-libidn
SYSTEMD_CONF_OPTS += -Dlibidn=false
endif
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
SYSTEMD_CONF_OPTS += --enable-seccomp
SYSTEMD_DEPENDENCIES += libseccomp
SYSTEMD_CONF_OPTS += -Dseccomp=true
else
SYSTEMD_CONF_OPTS += --disable-seccomp
SYSTEMD_CONF_OPTS += -Dseccomp=false
endif
ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
SYSTEMD_CONF_OPTS += --enable-xkbcommon
SYSTEMD_DEPENDENCIES += libxkbcommon
SYSTEMD_CONF_OPTS += -Dxkbcommon=true
else
SYSTEMD_CONF_OPTS += --disable-xkbcommon
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS),y)
SYSTEMD_CONF_OPTS += --enable-kdbus
else
SYSTEMD_CONF_OPTS += --disable-kdbus
SYSTEMD_CONF_OPTS += -Dxkbcommon=false
endif
ifeq ($(BR2_PACKAGE_BZIP2),y)
SYSTEMD_DEPENDENCIES += bzip2
SYSTEMD_CONF_OPTS += --enable-bzip2
SYSTEMD_CONF_OPTS += -Dbzip2=true
else
SYSTEMD_CONF_OPTS += --disable-bzip2
SYSTEMD_CONF_OPTS += -Dbzip2=false
endif
ifeq ($(BR2_PACKAGE_LZ4),y)
SYSTEMD_DEPENDENCIES += lz4
SYSTEMD_CONF_OPTS += --enable-lz4
SYSTEMD_CONF_OPTS += -Dlz4=true
else
SYSTEMD_CONF_OPTS += --disable-lz4
SYSTEMD_CONF_OPTS += -Dlz4=false
endif
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
SYSTEMD_DEPENDENCIES += linux-pam
SYSTEMD_CONF_OPTS += -Dpam=true
else
SYSTEMD_CONF_OPTS += -Dpam=false
endif
ifeq ($(BR2_PACKAGE_XZ),y)
SYSTEMD_DEPENDENCIES += xz
SYSTEMD_CONF_OPTS += --enable-xz
SYSTEMD_CONF_OPTS += -Dxz=true
else
SYSTEMD_CONF_OPTS += --disable-xz
SYSTEMD_CONF_OPTS += -Dxz=false
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
SYSTEMD_DEPENDENCIES += zlib
SYSTEMD_CONF_OPTS += --enable-zlib
SYSTEMD_CONF_OPTS += -Dzlib=true
else
SYSTEMD_CONF_OPTS += --disable-zlib
SYSTEMD_CONF_OPTS += -Dzlib=false
endif
ifeq ($(BR2_PACKAGE_LIBCURL),y)
SYSTEMD_DEPENDENCIES += libcurl
SYSTEMD_CONF_OPTS += --enable-libcurl
SYSTEMD_CONF_OPTS += -Dlibcurl=true
else
SYSTEMD_CONF_OPTS += --disable-libcurl
SYSTEMD_CONF_OPTS += -Dlibcurl=false
endif
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
SYSTEMD_DEPENDENCIES += libgcrypt
SYSTEMD_CONF_OPTS += \
--enable-gcrypt \
--with-libgcrypt-prefix=$(STAGING_DIR)/usr \
--with-libgpg-error-prefix=$(STAGING_DIR)/usr
SYSTEMD_CONF_OPTS += -Dgcrypt=true
else
SYSTEMD_CONF_OPTS += --disable-gcrypt
SYSTEMD_CONF_OPTS += -Dgcrypt=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
SYSTEMD_DEPENDENCIES += libmicrohttpd
SYSTEMD_CONF_OPTS += --enable-microhttpd
SYSTEMD_CONF_OPTS += -Dmicrohttpd=true
ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
SYSTEMD_CONF_OPTS += --enable-qrencode
SYSTEMD_CONF_OPTS += -Dqrencode=true
SYSTEMD_DEPENDENCIES += libqrencode
else
SYSTEMD_CONF_OPTS += --disable-qrencode
SYSTEMD_CONF_OPTS += -Dqrencode=false
endif
else
SYSTEMD_CONF_OPTS += --disable-microhttpd --disable-qrencode
SYSTEMD_CONF_OPTS += -Dmicrohttpd=false -Dqrencode=false
endif
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
SYSTEMD_DEPENDENCIES += libselinux
SYSTEMD_CONF_OPTS += --enable-selinux
SYSTEMD_CONF_OPTS += -Dselinux=true
else
SYSTEMD_CONF_OPTS += --disable-selinux
SYSTEMD_CONF_OPTS += -Dselinux=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
SYSTEMD_CONF_OPTS += --enable-hwdb
SYSTEMD_CONF_OPTS += -Dhwdb=true
else
SYSTEMD_CONF_OPTS += --disable-hwdb
SYSTEMD_CONF_OPTS += -Dhwdb=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
SYSTEMD_CONF_OPTS += --enable-binfmt
SYSTEMD_CONF_OPTS += -Dbinfmt=true
else
SYSTEMD_CONF_OPTS += --disable-binfmt
SYSTEMD_CONF_OPTS += -Dbinfmt=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
SYSTEMD_CONF_OPTS += --enable-vconsole
SYSTEMD_CONF_OPTS += -Dvconsole=true
else
SYSTEMD_CONF_OPTS += --disable-vconsole
SYSTEMD_CONF_OPTS += -Dvconsole=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y)
SYSTEMD_CONF_OPTS += --enable-quotacheck
SYSTEMD_CONF_ENV += \
ac_cv_path_QUOTAON=/usr/sbin/quotaon \
ac_cv_path_QUOTACHECK=/usr/sbin/quotacheck
SYSTEMD_CONF_OPTS += -Dquotacheck=true
else
SYSTEMD_CONF_OPTS += --disable-quotacheck
SYSTEMD_CONF_ENV += \
ac_cv_path_QUOTAON=/.missing \
ac_cv_path_QUOTACHECK=/.missing
SYSTEMD_CONF_OPTS += -Dquotacheck=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES),y)
SYSTEMD_CONF_OPTS += --enable-tmpfiles
SYSTEMD_CONF_OPTS += -Dtmpfiles=true
else
SYSTEMD_CONF_OPTS += --disable-tmpfiles
SYSTEMD_CONF_OPTS += -Dtmpfiles=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
SYSTEMD_CONF_OPTS += --enable-sysusers
SYSTEMD_CONF_OPTS += -Dsysusers=true
else
SYSTEMD_CONF_OPTS += --disable-sysusers
SYSTEMD_CONF_OPTS += -Dsysusers=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y)
SYSTEMD_CONF_OPTS += --enable-firstboot
SYSTEMD_CONF_OPTS += -Dfirstboot=true
else
SYSTEMD_CONF_OPTS += --disable-firstboot
SYSTEMD_CONF_OPTS += -Dfirstboot=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y)
SYSTEMD_CONF_OPTS += --enable-randomseed
SYSTEMD_CONF_OPTS += -Drandomseed=true
else
SYSTEMD_CONF_OPTS += --disable-randomseed
SYSTEMD_CONF_OPTS += -Drandomseed=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y)
SYSTEMD_CONF_OPTS += --enable-backlight
SYSTEMD_CONF_OPTS += -Dbacklight=true
else
SYSTEMD_CONF_OPTS += --disable-backlight
SYSTEMD_CONF_OPTS += -Dbacklight=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y)
SYSTEMD_CONF_OPTS += --enable-rfkill
SYSTEMD_CONF_OPTS += -Drfkill=true
else
SYSTEMD_CONF_OPTS += --disable-rfkill
SYSTEMD_CONF_OPTS += -Drfkill=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
SYSTEMD_CONF_OPTS += --enable-logind
SYSTEMD_CONF_OPTS += -Dlogind=true
else
SYSTEMD_CONF_OPTS += --disable-logind
SYSTEMD_CONF_OPTS += -Dlogind=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
SYSTEMD_CONF_OPTS += --enable-machined
SYSTEMD_CONF_OPTS += -Dmachined=true
else
SYSTEMD_CONF_OPTS += --disable-machined
SYSTEMD_CONF_OPTS += -Dmachined=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
SYSTEMD_CONF_OPTS += --enable-importd
SYSTEMD_CONF_OPTS += -Dimportd=true
else
SYSTEMD_CONF_OPTS += --disable-importd
SYSTEMD_CONF_OPTS += -Dimportd=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
SYSTEMD_CONF_OPTS += --enable-hostnamed
SYSTEMD_CONF_OPTS += -Dhostnamed=true
else
SYSTEMD_CONF_OPTS += --disable-hostnamed
SYSTEMD_CONF_OPTS += -Dhostnamed=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y)
SYSTEMD_CONF_OPTS += --enable-myhostname
SYSTEMD_CONF_OPTS += -Dmyhostname=true
else
SYSTEMD_CONF_OPTS += --disable-myhostname
SYSTEMD_CONF_OPTS += -Dmyhostname=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y)
SYSTEMD_CONF_OPTS += --enable-timedated
SYSTEMD_CONF_OPTS += -Dtimedated=true
else
SYSTEMD_CONF_OPTS += --disable-timedated
SYSTEMD_CONF_OPTS += -Dtimedated=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y)
SYSTEMD_CONF_OPTS += --enable-localed
SYSTEMD_CONF_OPTS += -Dlocaled=true
else
SYSTEMD_CONF_OPTS += --disable-localed
SYSTEMD_CONF_OPTS += -Dlocaled=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
SYSTEMD_CONF_OPTS += --enable-coredump
SYSTEMD_CONF_OPTS += -Dcoredump=true
SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /var/lib/systemd/coredump - - Core Dumper
else
SYSTEMD_CONF_OPTS += --disable-coredump
SYSTEMD_CONF_OPTS += -Dcoredump=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y)
SYSTEMD_CONF_OPTS += --enable-polkit
SYSTEMD_CONF_OPTS += -Dpolkit=true
SYSTEMD_DEPENDENCIES += polkit
else
SYSTEMD_CONF_OPTS += --disable-polkit
SYSTEMD_CONF_OPTS += -Dpolkit=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
SYSTEMD_CONF_OPTS += --enable-networkd
SYSTEMD_CONF_OPTS += -Dnetworkd=true
SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - Network Manager
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
ln -sf ../run/systemd/resolve/resolv.conf \
@@ -302,25 +287,18 @@ define SYSTEMD_INSTALL_NETWORK_CONFS
endef
endif
else
SYSTEMD_CONF_OPTS += --disable-networkd
define SYSTEMD_INSTALL_SERVICE_NETWORK
$(INSTALL) -D -m 644 package/systemd/network.service \
$(TARGET_DIR)/etc/systemd/system/network.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../network.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service
endef
SYSTEMD_CONF_OPTS += -Dnetworkd=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
SYSTEMD_CONF_OPTS += --enable-resolved
SYSTEMD_CONF_OPTS += -Dresolve=true
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
else
SYSTEMD_CONF_OPTS += --disable-resolved
SYSTEMD_CONF_OPTS += -Dresolve=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
SYSTEMD_CONF_OPTS += --enable-timesyncd
SYSTEMD_CONF_OPTS += -Dtimesyncd=true
SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
define SYSTEMD_INSTALL_SERVICE_TIMESYNC
mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
@@ -328,19 +306,24 @@ define SYSTEMD_INSTALL_SERVICE_TIMESYNC
$(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
endef
else
SYSTEMD_CONF_OPTS += --disable-timesyncd
SYSTEMD_CONF_OPTS += -Dtimesyncd=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
SYSTEMD_CONF_OPTS += --enable-smack
SYSTEMD_CONF_OPTS += -Dsmack=true
else
SYSTEMD_CONF_OPTS += --disable-smack
SYSTEMD_CONF_OPTS += -Dsmack=false
endif
ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y)
SYSTEMD_CONF_OPTS += --enable-hibernate
SYSTEMD_CONF_OPTS += -Dhibernate=true
else
SYSTEMD_CONF_OPTS += --disable-hibernate
SYSTEMD_CONF_OPTS += -Dhibernate=false
endif
SYSTEMD_FALLBACK_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),)
SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME)
endif
define SYSTEMD_INSTALL_INIT_HOOK
@@ -348,7 +331,7 @@ define SYSTEMD_INSTALL_INIT_HOOK
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot
ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/shutdown
ln -fs ../../../lib/systemd/system/multi-user.target \
$(TARGET_DIR)/etc/systemd/system/default.target
endef
@@ -365,6 +348,8 @@ SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
define SYSTEMD_USERS
- - input -1 * - - - Input device group
- - systemd-journal -1 * - - - Journal
- - render -1 * - - - DRI rendering nodes
- - kvm -1 * - - - kvm nodes
systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus
systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote
@@ -401,9 +386,32 @@ endif
define SYSTEMD_INSTALL_INIT_SYSTEMD
$(SYSTEMD_DISABLE_SERVICE_TTY1)
$(SYSTEMD_INSTALL_SERVICE_TTY)
$(SYSTEMD_INSTALL_SERVICE_NETWORK)
$(SYSTEMD_INSTALL_SERVICE_TIMESYNC)
$(SYSTEMD_INSTALL_NETWORK_CONFS)
endef
$(eval $(autotools-package))
SYSTEMD_NINJA_OPTS = $(if $(VERBOSE),-v) -j$(PARALLEL_JOBS)
SYSTEMD_ENV = $(TARGET_MAKE_ENV) $(HOST_UTF8_LOCALE_ENV)
define SYSTEMD_CONFIGURE_CMDS
rm -rf $(@D)/build
mkdir -p $(@D)/build
$(SYSTEMD_ENV) meson $(SYSTEMD_CONF_OPTS) $(@D) $(@D)/build
endef
define SYSTEMD_BUILD_CMDS
$(SYSTEMD_ENV) ninja $(SYSTEMD_NINJA_OPTS) -C $(@D)/build
endef
define SYSTEMD_INSTALL_TARGET_CMDS
$(SYSTEMD_ENV) DESTDIR=$(TARGET_DIR) ninja $(SYSTEMD_NINJA_OPTS) \
-C $(@D)/build install
endef
define SYSTEMD_INSTALL_STAGING_CMDS
$(SYSTEMD_ENV) DESTDIR=$(STAGING_DIR) ninja $(SYSTEMD_NINJA_OPTS) \
-C $(@D)/build install
endef
$(eval $(generic-package))