From b0f23d1e562e753cb78a473fdade956a25cc337b Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 20 Nov 2016 17:42:34 +0100 Subject: finalize systemd as alternative init system Most important is the fix in patch-src_journal_journald-server_c, which breaks startup of systemd-journald when code is compiled with -DNDEBUG. A lot of base-files reorganizing to only install required files on sysv systems. --- package/systemd/patches/patch-Makefile_am | 30 ++++++++++++++++++++++ package/systemd/patches/patch-configure_ac | 11 ++++++++ .../patches/patch-src_journal_journald-server_c | 11 ++++++++ .../patch-units_console-getty_service_m4_in | 11 ++++++++ .../patches/patch-units_serial-getty@_service_m4 | 11 ++++++++ 5 files changed, 74 insertions(+) create mode 100644 package/systemd/patches/patch-Makefile_am create mode 100644 package/systemd/patches/patch-configure_ac create mode 100644 package/systemd/patches/patch-src_journal_journald-server_c create mode 100644 package/systemd/patches/patch-units_console-getty_service_m4_in create mode 100644 package/systemd/patches/patch-units_serial-getty@_service_m4 (limited to 'package/systemd/patches') diff --git a/package/systemd/patches/patch-Makefile_am b/package/systemd/patches/patch-Makefile_am new file mode 100644 index 000000000..a41947910 --- /dev/null +++ b/package/systemd/patches/patch-Makefile_am @@ -0,0 +1,30 @@ +--- systemd-231.orig/Makefile.am 2016-07-25 21:49:47.000000000 +0200 ++++ systemd-231/Makefile.am 2016-11-24 02:37:14.165088827 +0100 +@@ -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 \ +@@ -324,15 +324,6 @@ define install-aliases + shift 2 || exit $$?; \ + 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/package/systemd/patches/patch-configure_ac b/package/systemd/patches/patch-configure_ac new file mode 100644 index 000000000..8cfc64fa5 --- /dev/null +++ b/package/systemd/patches/patch-configure_ac @@ -0,0 +1,11 @@ +--- systemd-231.orig/configure.ac 2016-07-25 21:49:47.000000000 +0200 ++++ systemd-231/configure.ac 2016-11-24 02:37:14.165088827 +0100 +@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr + 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) diff --git a/package/systemd/patches/patch-src_journal_journald-server_c b/package/systemd/patches/patch-src_journal_journald-server_c new file mode 100644 index 000000000..704de9126 --- /dev/null +++ b/package/systemd/patches/patch-src_journal_journald-server_c @@ -0,0 +1,11 @@ +--- systemd-231.orig/src/journal/journald-server.c 2016-07-25 21:49:47.000000000 +0200 ++++ systemd-231/src/journal/journald-server.c 2016-11-25 00:47:51.392883508 +0100 +@@ -1347,7 +1347,7 @@ static int setup_signals(Server *s) { + + assert(s); + +- assert(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0); ++ assert_se(sigprocmask_many(SIG_SETMASK, NULL, SIGINT, SIGTERM, SIGUSR1, SIGUSR2, SIGRTMIN+1, -1) >= 0); + + r = sd_event_add_signal(s->event, &s->sigusr1_event_source, SIGUSR1, dispatch_sigusr1, s); + if (r < 0) diff --git a/package/systemd/patches/patch-units_console-getty_service_m4_in b/package/systemd/patches/patch-units_console-getty_service_m4_in new file mode 100644 index 000000000..3ffd541c6 --- /dev/null +++ b/package/systemd/patches/patch-units_console-getty_service_m4_in @@ -0,0 +1,11 @@ +--- systemd-232.orig/units/console-getty.service.m4.in 2016-11-03 18:16:42.000000000 +0100 ++++ systemd-232/units/console-getty.service.m4.in 2016-11-19 08:53:54.070304206 +0100 +@@ -16,7 +16,7 @@ After=rc-local.service + Before=getty.target + + [Service] +-ExecStart=-/sbin/agetty --noclear --keep-baud console 115200,38400,9600 $TERM ++ExecStart=-/sbin/getty -L %I 115200 vt100 + Type=idle + Restart=always + RestartSec=0 diff --git a/package/systemd/patches/patch-units_serial-getty@_service_m4 b/package/systemd/patches/patch-units_serial-getty@_service_m4 new file mode 100644 index 000000000..3767b53c2 --- /dev/null +++ b/package/systemd/patches/patch-units_serial-getty@_service_m4 @@ -0,0 +1,11 @@ +--- systemd-232.orig/units/serial-getty@.service.m4 2016-11-03 18:16:42.000000000 +0100 ++++ systemd-232/units/serial-getty@.service.m4 2016-11-19 08:53:35.509582664 +0100 +@@ -22,7 +22,7 @@ Before=getty.target + IgnoreOnIsolate=yes + + [Service] +-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM ++ExecStart=-/sbin/getty -L %I 115200 vt100 + Type=idle + Restart=always + UtmpIdentifier=%I -- cgit v1.2.3