diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-07-29 13:10:15 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2012-08-24 11:53:34 +0200 |
commit | 7eb5bf20e497b283541b79b77846f2945a08e2db (patch) | |
tree | 3ebd161580e42c5a780eb5b4b59bd1db264a8ff0 | |
parent | c4e3bfd683cc99ceb1ef435561b4dc999a81d71f (diff) | |
download | ptxdist-7eb5bf20e497b283541b79b77846f2945a08e2db.tar.gz ptxdist-7eb5bf20e497b283541b79b77846f2945a08e2db.tar.xz |
systemd: version bump 44 -> 187
udev is now included now, so we need to add some special handling for
this too.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | patches/systemd-189/0001-journald-add-missing-includes.patch | 88 | ||||
-rw-r--r-- | patches/systemd-189/0002-journald-fix-building-with-XZ-support-disabled.patch | 39 | ||||
-rw-r--r-- | patches/systemd-189/series | 2 | ||||
-rw-r--r-- | patches/systemd-37/0001-socket-if-we-fail-to-create-an-instantiated-service-.patch | 33 | ||||
-rw-r--r-- | patches/systemd-37/series | 4 | ||||
-rw-r--r-- | patches/systemd-44/0001-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch | 45 | ||||
-rw-r--r-- | patches/systemd-44/series | 1 | ||||
-rw-r--r-- | rules/systemd.make | 76 | ||||
-rw-r--r-- | rules/udev.in | 11 | ||||
-rw-r--r-- | rules/udev.make | 50 |
10 files changed, 226 insertions, 123 deletions
diff --git a/patches/systemd-189/0001-journald-add-missing-includes.patch b/patches/systemd-189/0001-journald-add-missing-includes.patch new file mode 100644 index 000000000..e2f204df1 --- /dev/null +++ b/patches/systemd-189/0001-journald-add-missing-includes.patch @@ -0,0 +1,88 @@ +From 4871690d9e32608bbd9b18505b5326c2079c9690 Mon Sep 17 00:00:00 2001 +From: Allin Cottrell <cottrell@wfu.edu> +Date: Fri, 24 Aug 2012 01:46:38 +0200 +Subject: [PATCH] journald: add missing includes + +--- + src/journal/journald-console.c | 1 + + src/journal/journald-gperf.gperf | 1 + + src/journal/journald-kmsg.c | 1 + + src/journal/journald-native.c | 1 + + src/journal/journald-stream.c | 1 + + src/journal/journald-syslog.c | 1 + + 6 files changed, 6 insertions(+) + +diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c +index 6cd2397..2596d44 100644 +--- a/src/journal/journald-console.c ++++ b/src/journal/journald-console.c +@@ -21,6 +21,7 @@ + + #include <fcntl.h> + #include <unistd.h> ++#include <sys/socket.h> + + #include "journald.h" + #include "journald-console.h" +diff --git a/src/journal/journald-gperf.gperf b/src/journal/journald-gperf.gperf +index 2f83cbd..32474df 100644 +--- a/src/journal/journald-gperf.gperf ++++ b/src/journal/journald-gperf.gperf +@@ -1,5 +1,6 @@ + %{ + #include <stddef.h> ++#include <sys/socket.h> + #include "conf-parser.h" + #include "journald.h" + %} +diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c +index aebca5d..b259480 100644 +--- a/src/journal/journald-kmsg.c ++++ b/src/journal/journald-kmsg.c +@@ -23,6 +23,7 @@ + #include <sys/epoll.h> + #include <fcntl.h> + #include <sys/mman.h> ++#include <sys/socket.h> + + #include <systemd/sd-messages.h> + #include <libudev.h> +diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c +index 7aa99a3..4e44c3a 100644 +--- a/src/journal/journald-native.c ++++ b/src/journal/journald-native.c +@@ -20,6 +20,7 @@ + ***/ + + #include <unistd.h> ++#include <stddef.h> + #include <sys/epoll.h> + + #include "socket-util.h" +diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c +index 3e4022a..113c421 100644 +--- a/src/journal/journald-stream.c ++++ b/src/journal/journald-stream.c +@@ -21,6 +21,7 @@ + + #include <fcntl.h> + #include <unistd.h> ++#include <stddef.h> + #include <sys/epoll.h> + + #ifdef HAVE_SELINUX +diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c +index daed095..9db9198 100644 +--- a/src/journal/journald-syslog.c ++++ b/src/journal/journald-syslog.c +@@ -20,6 +20,7 @@ + ***/ + + #include <unistd.h> ++#include <stddef.h> + #include <sys/epoll.h> + + #include "socket-util.h" +-- +1.7.10.4 + diff --git a/patches/systemd-189/0002-journald-fix-building-with-XZ-support-disabled.patch b/patches/systemd-189/0002-journald-fix-building-with-XZ-support-disabled.patch new file mode 100644 index 000000000..64d96b282 --- /dev/null +++ b/patches/systemd-189/0002-journald-fix-building-with-XZ-support-disabled.patch @@ -0,0 +1,39 @@ +From 3d18857a29e082fb6b763fd2d41563c4feb6d966 Mon Sep 17 00:00:00 2001 +From: Michael Olbrich <m.olbrich@pengutronix.de> +Date: Fri, 24 Aug 2012 11:25:56 +0200 +Subject: [PATCH] journald: fix building with XZ support disabled + +uncompress_blob() is not defined when XZ support is disabled. Without this +patch building fails with +[...] +.../systemd-189/src/journal/journal-verify.c:69: undefined reference to `uncompress_blob' +[...] +--- + src/journal/journal-verify.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c +index 2401293..5d134bd 100644 +--- a/src/journal/journal-verify.c ++++ b/src/journal/journal-verify.c +@@ -63,6 +63,7 @@ static int journal_file_object_verify(JournalFile *f, Object *o) { + h1 = le64toh(o->data.hash); + + if (o->object.flags & OBJECT_COMPRESSED) { ++#ifdef HAVE_XZ + void *b = NULL; + uint64_t alloc = 0, b_size; + +@@ -73,6 +74,9 @@ static int journal_file_object_verify(JournalFile *f, Object *o) { + + h2 = hash64(b, b_size); + free(b); ++#else ++ return -EPROTONOSUPPORT; ++#endif + } else + h2 = hash64(o->data.payload, le64toh(o->object.size) - offsetof(Object, data.payload)); + +-- +1.7.10.4 + diff --git a/patches/systemd-189/series b/patches/systemd-189/series new file mode 100644 index 000000000..dbd5de531 --- /dev/null +++ b/patches/systemd-189/series @@ -0,0 +1,2 @@ +0001-journald-add-missing-includes.patch +0002-journald-fix-building-with-XZ-support-disabled.patch diff --git a/patches/systemd-37/0001-socket-if-we-fail-to-create-an-instantiated-service-.patch b/patches/systemd-37/0001-socket-if-we-fail-to-create-an-instantiated-service-.patch deleted file mode 100644 index c8dcfdf30..000000000 --- a/patches/systemd-37/0001-socket-if-we-fail-to-create-an-instantiated-service-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Michael Olbrich <m.olbrich@pengutronix.de> -Date: Mon, 2 Apr 2012 22:02:03 +0200 -Subject: [PATCH] socket: if we fail to create an instantiated service for a - socket, don't put the socket in failure mode - -Based on upstream patch 9586cdfab6a2638078702b7fea7e16b3a71899e2 - -An incoming connection that is immediately terminated might result in -getpeername() or a similar call failing. Hence it is quite possible that -while we are setting up an instantiated service for a socket we might -get an error and we shouldn't take this as hint to take the listening -socket down. - -https://bugs.freedesktop.org/show_bug.cgi?id=45297 -https://bugzilla.novell.com/show_bug.cgi?id=741590 - -Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> ---- - src/socket.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/socket.c b/src/socket.c -index 7ddf326..2208127 100644 ---- a/src/socket.c -+++ b/src/socket.c -@@ -1445,7 +1445,6 @@ static void socket_enter_running(Socket *s, int cfd) { - - fail: - log_warning("%s failed to queue socket startup job: %s", s->meta.id, bus_error(&error, r)); -- socket_enter_stop_pre(s, false); - - if (cfd >= 0) - close_nointr_nofail(cfd); diff --git a/patches/systemd-37/series b/patches/systemd-37/series deleted file mode 100644 index 5196ebf95..000000000 --- a/patches/systemd-37/series +++ /dev/null @@ -1,4 +0,0 @@ -# generated by git-ptx-patches -#tag:base --start-number 1 -0001-socket-if-we-fail-to-create-an-instantiated-service-.patch -# 7bf2c0aaff16d200a8c3c06216eb6acf - git-ptx-patches magic diff --git a/patches/systemd-44/0001-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch b/patches/systemd-44/0001-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch deleted file mode 100644 index 32a1c4f19..000000000 --- a/patches/systemd-44/0001-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7264278fbbdc1dc6c30fedc902d1337594aa6ff6 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering <lennart@poettering.net> -Date: Wed, 21 Mar 2012 23:47:44 +0100 -Subject: [PATCH] journal: PAGE_SIZE is not known on ppc and other archs - -Let's use NAME_MAX, as suggested by Dan Walsh ---- - src/journal/journald.c | 15 ++++++++++++--- - 1 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/src/journal/journald.c b/src/journal/journald.c -index d27cb60..87390bd 100644 ---- a/src/journal/journald.c -+++ b/src/journal/journald.c -@@ -29,7 +29,6 @@ - #include <sys/ioctl.h> - #include <linux/sockios.h> - #include <sys/statvfs.h> --#include <sys/user.h> - - #include <systemd/sd-journal.h> - #include <systemd/sd-login.h> -@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) { - size_t label_len = 0; - union { - struct cmsghdr cmsghdr; -+ -+ /* We use NAME_MAX space for the -+ * SELinux label here. The kernel -+ * currently enforces no limit, but -+ * according to suggestions from the -+ * SELinux people this will change and -+ * it will probably be identical to -+ * NAME_MAX. For now we use that, but -+ * this should be updated one day when -+ * the final limit is known.*/ - uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) + - CMSG_SPACE(sizeof(struct timeval)) + -- CMSG_SPACE(sizeof(int)) + -- CMSG_SPACE(PAGE_SIZE)]; /* selinux label */ -+ CMSG_SPACE(sizeof(int)) + /* fd */ -+ CMSG_SPACE(NAME_MAX)]; /* selinux label */ - } control; - ssize_t n; - int v; diff --git a/patches/systemd-44/series b/patches/systemd-44/series deleted file mode 100644 index 901249332..000000000 --- a/patches/systemd-44/series +++ /dev/null @@ -1 +0,0 @@ -0001-journal-PAGE_SIZE-is-not-known-on-ppc-and-other-arch.patch diff --git a/rules/systemd.make b/rules/systemd.make index d57484fe3..00f9a14d9 100644 --- a/rules/systemd.make +++ b/rules/systemd.make @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_SYSTEMD) += systemd # # Paths and names # -SYSTEMD_VERSION := 44 -SYSTEMD_MD5 := 11f44ff74c87850064e4351518bcff17 +SYSTEMD_VERSION := 189 +SYSTEMD_MD5 := ac2eb313f5dce79622f60aac56bca66d SYSTEMD := systemd-$(SYSTEMD_VERSION) SYSTEMD_SUFFIX := tar.xz SYSTEMD_URL := http://www.freedesktop.org/software/systemd/$(SYSTEMD).$(SYSTEMD_SUFFIX) @@ -37,15 +37,21 @@ SYSTEMD_CONF_OPT += \ $(CROSS_AUTOCONF_USR) \ $(GLOBAL_LARGE_FILE_OPTION) \ --enable-silent-rules \ - --disable-nls \ --disable-static \ + --disable-nls \ + --disable-gtk-doc \ + --disable-gtk-doc-html \ + --disable-gtk-doc-pdf \ + --disable-ima \ --disable-selinux \ --$(call ptx/endis,PTXCONF_SYSTEMD_XZ)-xz \ --$(call ptx/endis,PTXCONF_SYSTEMD_TCPWRAP)-tcpwrap \ --disable-pam \ --disable-acl \ + --disable-gcrypt \ --disable-audit \ --disable-libcryptsetup \ + --disable-qrencode \ --enable-binfmt \ --$(call ptx/endis,PTXCONF_SYSTEMD_VCONSOLE)-vconsole \ --enable-readahead \ @@ -56,10 +62,12 @@ SYSTEMD_CONF_OPT += \ --enable-timedated \ --enable-localed \ --disable-coredump \ + --$(call ptx/endis,PTXCONF_UDEV_LIBGUDEV)-gudev \ + --$(call ptx/endis,PTXCONF_UDEV_KEYMAPS)-keymap \ --disable-manpages \ - --disable-gtk \ - --disable-plymouth \ --enable-split-usr \ + --with-usb-ids-path=/usr/share/usb.ids \ + --with-pci-ids-path=/usr/share/pci.ids$(call ptx/ifdef, PTXCONF_PCIUTILS_COMPRESS,.gz,) \ --with-distro=other \ --with-sysvinit-path="" \ --with-sysvrcd-path="" \ @@ -67,7 +75,6 @@ SYSTEMD_CONF_OPT += \ --with-dbussessionservicedir=/usr/share/dbus-1/services \ --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ - --with-udevrulesdir=/lib/udev/rules.d \ --with-pamlibdir=/lib/security \ --with-rootprefix= \ --with-rootlibdir=/lib @@ -83,9 +90,45 @@ SYSTEMD_CONF_OPT += \ # - mount fails # ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/systemd.install: + @$(call targetinfo) + @$(call world/install, SYSTEMD) + @ln -sf multi-user.target "$(SYSTEMD_PKGDIR)/lib/systemd/system/default.target" + @$(call touch) + +# ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- +SYSTEMD_HELPER := \ + systemd \ + systemd-ac-power \ + systemd-binfmt \ + systemd-cgroups-agent \ + systemd-fsck \ + systemd-hostnamed \ + systemd-initctl \ + systemd-journald \ + systemd-localed \ + systemd-logind \ + systemd-modules-load \ + systemd-multi-seat-x \ + systemd-quotacheck \ + systemd-readahead \ + systemd-remount-fs \ + systemd-reply-password \ + systemd-shutdown \ + systemd-shutdownd \ + systemd-sleep \ + systemd-sysctl \ + systemd-timedated \ + systemd-timestamp \ + systemd-update-utmp \ + systemd-user-sessions + $(STATEDIR)/systemd.targetinstall: @$(call targetinfo) @@ -108,18 +151,31 @@ $(STATEDIR)/systemd.targetinstall: # # daemon + tools @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemctl) + @$(call install_copy, systemd, 0, 0, 0755, -, /bin/journalctl) + @$(call install_copy, systemd, 0, 0, 0755, -, /bin/loginctl) @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-ask-password) - @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-journalctl) + @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-inhibit) @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-machine-id-setup) @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-tmpfiles) @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-notify) @$(call install_copy, systemd, 0, 0, 0755, -, /bin/systemd-tty-ask-password-agent) + @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-cat) @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-cgls) + @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-cgtop) + @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-delta) + @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-detect-virt) + @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-nspawn) @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-stdio-bridge) ifdef PTXCONF_SYSTEMD_ANALYZE @$(call install_copy, systemd, 0, 0, 0755, -, /usr/bin/systemd-analyze) endif + @$(call install_tree, systemd, 0, 0, -, /lib/systemd/system-generators/) + @$(foreach helper, $(SYSTEMD_HELPER), \ + $(call install_copy, systemd, 0, 0, 755, -, \ + /lib/systemd/$(helper));) + + ifdef PTXCONF_INITMETHOD_SYSTEMD @$(call install_link, systemd, ../lib/systemd/systemd, /sbin/init) @$(call install_link, systemd, ../bin/systemctl, /sbin/halt) @@ -131,9 +187,9 @@ endif @$(call install_alternative, systemd, 0, 0, 0644, \ /etc/systemd/system.conf) @$(call install_alternative, systemd, 0, 0, 0644, \ - /etc/systemd/systemd-journald.conf) + /etc/systemd/journald.conf) @$(call install_alternative, systemd, 0, 0, 0644, \ - /etc/systemd/systemd-logind.conf) + /etc/systemd/logind.conf) @$(call install_tree, systemd, 0, 0, -, /etc/systemd/system/) @$(call install_tree, systemd, 0, 0, -, /usr/lib/tmpfiles.d/) @$(call install_copy, systemd, 0, 0, 0644, -, /lib/udev/rules.d/99-systemd.rules) @@ -144,7 +200,7 @@ endif @$(call install_copy, systemd, 0, 0, 0644, -, /usr/share/systemd/kbd-model-map) # # units - @$(call install_tree, systemd, 0, 0, -, /lib/systemd) + @$(call install_tree, systemd, 0, 0, -, /lib/systemd/system/) @$(call install_alternative, systemd, 0, 0, 0644, /etc/vconsole.conf) diff --git a/rules/udev.in b/rules/udev.in index a5df80209..5f8a346c0 100644 --- a/rules/udev.in +++ b/rules/udev.in @@ -32,6 +32,8 @@ menuconfig UDEV if UDEV +if !SYSTEMD + menu "build options " config UDEV_LEGACY @@ -58,6 +60,8 @@ config UDEV_SYSLOG endmenu +endif + menu "install options " config UDEV_ETC_CONF @@ -114,12 +118,6 @@ config UDEV_STARTSCRIPT Install the startup magic for either bbinit or upstart. Select Y here, as this is what you usually want. -config UDEV_SYSTEMD - bool - default y - depends on SYSTEMD - prompt "install systemd service files" - endmenu menu "persistent device node links " @@ -139,6 +137,7 @@ config UDEV_PERSISTENT_EDD config UDEV_PERSISTENT_GENERATOR bool + depends on !SYSTEMD prompt "cd / network generator" help This will generate udev-based persistent naming rules for diff --git a/rules/udev.make b/rules/udev.make index 1936f6e20..4f69cfac7 100644 --- a/rules/udev.make +++ b/rules/udev.make @@ -17,6 +17,10 @@ PACKAGES-$(PTXCONF_UDEV) += udev # # Paths and names # +ifdef PTXCONF_SYSTEMD +UDEV_VERSION = $(SYSTEMD_VERSION) +UDEV = $(SYSTEMD) +else ifdef PTXCONF_UDEV_LEGACY UDEV_VERSION := 172 UDEV_MD5 := bd122d04cf758441f498aad0169a454f @@ -78,7 +82,10 @@ UDEV_CONF_OPT += \ --$(call ptx/endis,PTXCONF_UDEV_MTD_PROBE)-mtd_probe endif +endif # PTXCONF_SYSTEMD + UDEV_RULES-y := \ + 42-usb-hid-pm.rules \ 50-udev-default.rules \ 60-persistent-alsa.rules \ 60-persistent-input.rules \ @@ -90,6 +97,16 @@ UDEV_RULES-y := \ 78-sound-card.rules \ 95-udev-late.rules +ifdef PTXCONF_SYSTEMD + +UDEV_RULES-y += \ + 70-power-switch.rules \ + 70-uaccess.rules \ + 71-seat.rules \ + 73-seat-late.rules + +endif + UDEV_RULES-$(PTXCONF_UDEV_ACCELEROMETER) += 61-accelerometer.rules ifdef PTXCONF_UDEV_LEGACY UDEV_RULES-$(PTXCONF_UDEV_ACL) += 70-acl.rules @@ -135,6 +152,10 @@ endif # Target-Install # ---------------------------------------------------------------------------- +ifdef PTXCONF_SYSTEMD +$(STATEDIR)/udev.targetinstall: $(STATEDIR)/systemd.install.post +endif + $(STATEDIR)/udev.targetinstall: @$(call targetinfo) @@ -152,9 +173,14 @@ ifdef PTXCONF_UDEV_LEGACY @$(call install_copy, udev, 0, 0, 0755, -, /sbin/udevd) @$(call install_copy, udev, 0, 0, 0755, -, /sbin/udevadm) else +ifdef PTXCONF_SYSTEMD + @$(call install_copy, udev, 0, 0, 0755, -, /lib/systemd/systemd-udevd) + @$(call install_copy, udev, 0, 0, 0755, -, /usr/bin/udevadm) +else @$(call install_copy, udev, 0, 0, 0755, -, /lib/udev/udevd) @$(call install_copy, udev, 0, 0, 0755, -, /bin/udevadm) endif +endif @$(foreach rule, $(UDEV_RULES-y), \ $(call install_copy, udev, 0, 0, 0644, -, \ @@ -213,30 +239,6 @@ ifdef PTXCONF_INITMETHOD_UPSTART @$(call install_alternative, udev, 0, 0, 0644, /etc/init/udev-finish.conf) endif endif -ifdef PTXCONF_UDEV_SYSTEMD - @$(call install_copy, udev, 0, 0, 0644, -, \ - /lib/systemd/system/udev-kernel.socket) - @$(call install_link, udev, ../udev-kernel.socket, \ - /lib/systemd/system/sockets.target.wants/udev-kernel.socket) - - @$(call install_copy, udev, 0, 0, 0644, -, \ - /lib/systemd/system/udev-control.socket) - @$(call install_link, udev, ../udev-control.socket, \ - /lib/systemd/system/sockets.target.wants/udev-control.socket) - - @$(call install_copy, udev, 0, 0, 0644, -, \ - /lib/systemd/system/udev.service) - @$(call install_link, udev, ../udev.service, \ - /lib/systemd/system/basic.target.wants/udev.service) - - @$(call install_copy, udev, 0, 0, 0644, -, \ - /lib/systemd/system/udev-trigger.service) - @$(call install_link, udev, ../udev-trigger.service, \ - /lib/systemd/system/basic.target.wants/udev-trigger.service) - - @$(call install_copy, udev, 0, 0, 0644, -, \ - /lib/systemd/system/udev-settle.service) -endif @$(call install_finish, udev) @$(call touch) |