diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index c482831a64..e2335140c3 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -17,13 +17,13 @@ ################################################################################ PKG_NAME="systemd" -PKG_VERSION="208" +PKG_VERSION="209" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.freedesktop.org/wiki/Software/systemd" PKG_URL="http://www.freedesktop.org/software/systemd/$PKG_NAME-$PKG_VERSION.tar.xz" -PKG_DEPENDS_TARGET="toolchain attr libcap dbus:bootstrap kmod util-linux glib libgcrypt" +PKG_DEPENDS_TARGET="toolchain attr libcap kmod util-linux glib libgcrypt" PKG_PRIORITY="required" PKG_SECTION="system" PKG_SHORTDESC="systemd: a system and session manager" @@ -35,18 +35,19 @@ PKG_AUTORECONF="yes" # libgcrypt is needed actually only for autoreconf PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libgcrypt" -# TODO: use cpp directly to avoid using 'gcc -E' in Makefiles -# export CPP=${TARGET_PREFIX}cpp - PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ KMOD=/usr/bin/kmod \ --disable-nls \ --disable-gtk-doc \ --disable-gtk-doc-html \ --disable-gtk-doc-pdf \ + --disable-python-devel \ + --disable-dbus \ + --disable-compat-libs \ --disable-coverage \ --enable-kmod \ --enable-blkid \ + --disable-seccomp \ --disable-ima \ --disable-chkconfig \ --disable-selinux \ @@ -76,7 +77,10 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ --disable-localed \ --disable-coredump \ --disable-polkit \ + --disable-multi-seat-x \ + --disable-networkd \ --disable-efi \ + --disable-kdbus \ --disable-myhostname \ --enable-gudev \ --disable-manpages \ @@ -88,7 +92,11 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ --with-sysvinit-path= \ --with-sysvrcnd-path= \ --with-tty-gid=5 \ - --with-rootprefix= \ + --with-dbuspolicydir=/etc/dbus-1/system.d \ + --with-dbussessionservicedir=/usr/share/dbus-1/services \ + --with-dbussystemservicedir=/usr/share/dbus-1/system-services \ + --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \ + --with-rootprefix=/usr \ --with-rootlibdir=/lib" pre_make_target() { @@ -104,13 +112,13 @@ post_makeinstall_target() { rm -rf $INSTALL/usr/lib/rpm rm -f $INSTALL/usr/bin/kernel-install - rm -f $INSTALL/lib/udev/hwdb.d/20-OUI.hwdb - rm -f $INSTALL/lib/udev/hwdb.d/20-acpi-vendor.hwdb - rm -f $INSTALL/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb - rm -f $INSTALL/lib/udev/hwdb.d/20-pci-classes.hwdb - rm -f $INSTALL/lib/udev/hwdb.d/20-pci-vendor-model.hwdb - rm -f $INSTALL/lib/udev/hwdb.d/20-usb-classes.hwdb - rm -f $INSTALL/lib/udev/hwdb.d/20-usb-vendor-model.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-OUI.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-acpi-vendor.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-pci-classes.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-pci-vendor-model.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-usb-classes.hwdb + rm -f $INSTALL/usr/lib/udev/hwdb.d/20-usb-vendor-model.hwdb # tune journald.conf sed -e "s,^.*Compress=.*$,Compress=no,g" -i $INSTALL/etc/systemd/journald.conf @@ -121,67 +129,59 @@ post_makeinstall_target() { sed -e "s,^.*SystemMaxUse=.*$,SystemMaxUse=10M,g" -i $INSTALL/etc/systemd/journald.conf # replace systemd-machine-id-setup with ours - mkdir -p $INSTALL/bin - rm -rf $INSTALL/bin/systemd-machine-id-setup - cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/bin + mkdir -p $INSTALL/usr/bin + rm -rf $INSTALL/usr/bin/systemd-machine-id-setup + cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/usr/bin # copy openelec helper scripts mkdir -p $INSTALL/usr/lib/openelec cp $PKG_DIR/scripts/openelec-userconfig $INSTALL/usr/lib/openelec/ # provide 'halt', 'shutdown', 'reboot' & co. - mkdir -p $INSTALL/sbin - ln -sf /bin/systemctl $INSTALL/sbin/halt - ln -sf /bin/systemctl $INSTALL/sbin/poweroff - ln -sf /bin/systemctl $INSTALL/sbin/reboot - ln -sf /bin/systemctl $INSTALL/sbin/runlevel - ln -sf /bin/systemctl $INSTALL/sbin/shutdown - ln -sf /bin/systemctl $INSTALL/sbin/telinit mkdir -p $INSTALL/usr/sbin - ln -sf /bin/systemctl $INSTALL/usr/sbin/halt - ln -sf /bin/systemctl $INSTALL/usr/sbin/poweroff - ln -sf /bin/systemctl $INSTALL/usr/sbin/reboot - ln -sf /bin/systemctl $INSTALL/usr/sbin/runlevel - ln -sf /bin/systemctl $INSTALL/usr/sbin/shutdown - ln -sf /bin/systemctl $INSTALL/usr/sbin/telinit - ln -sf /bin/udevadm $INSTALL/sbin/udevadm + ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/halt + ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/poweroff + ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/reboot + ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/runlevel + ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/shutdown + ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/telinit # remove Network adaper renaming rule, this is confusing - rm -rf $INSTALL/lib/udev/rules.d/80-net-name-slot.rules + rm -rf $INSTALL/usr/lib/udev/rules.d/80-net-name-slot.rules # remove debug-shell.service, we install our own - rm -rf $INSTALL/lib/systemd/system/debug-shell.service + rm -rf $INSTALL/usr/lib/systemd/system/debug-shell.service # remove systemd-update-utmp. pointless - rm -rf $INSTALL/lib/systemd/systemd-update-utmp - rm -rf $INSTALL/lib/systemd/system/systemd-update-utmp-runlevel.service - rm -rf $INSTALL/lib/systemd/system/systemd-update-utmp.service - rm -rf $INSTALL/lib/systemd/system/sysinit.target.wants/systemd-update-utmp.service + rm -rf $INSTALL/usr/lib/systemd/systemd-update-utmp + rm -rf $INSTALL/usr/lib/systemd/system/systemd-update-utmp-runlevel.service + rm -rf $INSTALL/usr/lib/systemd/system/systemd-update-utmp.service + rm -rf $INSTALL/usr/lib/systemd/system/sysinit.target.wants/systemd-update-utmp.service # remove systemd-ask-password. pointless - rm -rf $INSTALL/lib/systemd/system/systemd-ask-password-wall.service - rm -rf $INSTALL/lib/systemd/system/systemd-ask-password-wall.path - rm -rf $INSTALL/lib/systemd/system/systemd-ask-password-console.path - rm -rf $INSTALL/lib/systemd/system/systemd-ask-password-console.service - rm -rf $INSTALL/bin/systemd-ask-password - rm -rf $INSTALL/bin/systemd-tty-ask-password-agent - rm -rf $INSTALL/lib/systemd/system/sysinit.target.wants/systemd-ask-password-console.path - rm -rf $INSTALL/lib/systemd/system/multi-user.target.wants/systemd-ask-password-wall.path + rm -rf $INSTALL/usr/lib/systemd/system/systemd-ask-password-wall.service + rm -rf $INSTALL/usr/lib/systemd/system/systemd-ask-password-wall.path + rm -rf $INSTALL/usr/lib/systemd/system/systemd-ask-password-console.path + rm -rf $INSTALL/usr/lib/systemd/system/systemd-ask-password-console.service + rm -rf $INSTALL/usr/bin/systemd-ask-password + rm -rf $INSTALL/usr/bin/systemd-tty-ask-password-agent + rm -rf $INSTALL/usr/lib/systemd/system/sysinit.target.wants/systemd-ask-password-console.path + rm -rf $INSTALL/usr/lib/systemd/system/multi-user.target.wants/systemd-ask-password-wall.path # remove some generators we never use - rm -rf $INSTALL/lib/systemd/system-generators/systemd-fstab-generator + rm -rf $INSTALL/usr/lib/systemd/system-generators/systemd-fstab-generator # remove getty units, we dont want a console - rm -rf $INSTALL/lib/systemd/system/autovt@.service - rm -rf $INSTALL/lib/systemd/system/console-getty.service - rm -rf $INSTALL/lib/systemd/system/console-shell.service - rm -rf $INSTALL/lib/systemd/system/getty@.service - rm -rf $INSTALL/lib/systemd/system/getty.target - rm -rf $INSTALL/lib/systemd/system/multi-user.target.wants/getty.target + rm -rf $INSTALL/usr/lib/systemd/system/autovt@.service + rm -rf $INSTALL/usr/lib/systemd/system/console-getty.service + rm -rf $INSTALL/usr/lib/systemd/system/console-shell.service + rm -rf $INSTALL/usr/lib/systemd/system/getty@.service + rm -rf $INSTALL/usr/lib/systemd/system/getty.target + rm -rf $INSTALL/usr/lib/systemd/system/multi-user.target.wants/getty.target # remove rootfs fsck - rm -rf $INSTALL/lib/systemd/system/systemd-fsck-root.service - rm -rf $INSTALL/lib/systemd/system/local-fs.target.wants/systemd-fsck-root.service + rm -rf $INSTALL/usr/lib/systemd/system/systemd-fsck-root.service + rm -rf $INSTALL/usr/lib/systemd/system/local-fs.target.wants/systemd-fsck-root.service mkdir -p $INSTALL/usr/config cp -PR $PKG_DIR/config/* $INSTALL/usr/config diff --git a/packages/sysutils/systemd/patches/systemd-01_openelec-user-udev-rules.patch b/packages/sysutils/systemd/patches/systemd-01_openelec-user-udev-rules.patch index 26e6d40a4f..7e08d03cbc 100644 --- a/packages/sysutils/systemd/patches/systemd-01_openelec-user-udev-rules.patch +++ b/packages/sysutils/systemd/patches/systemd-01_openelec-user-udev-rules.patch @@ -1,18 +1,11 @@ -commit 7723509e9fbc1a215bb72810b1de8366673f3ad0 -Author: Stefan Saraev -Date: Sun Sep 15 19:25:27 2013 +0300 - - openelec user udev rules - -diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c -index f14158b..eba2807 100644 ---- a/src/udev/udev-rules.c -+++ b/src/udev/udev-rules.c -@@ -1619,6 +1619,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) - rules->dirs = strv_new("/etc/udev/rules.d", - "/run/udev/rules.d", - UDEVLIBEXECDIR "/rules.d", -+ "/storage/.config/udev.rules.d", - NULL); - if (!rules->dirs) { - log_error("failed to build config directory array"); +diff -Naur systemd-209/src/udev/udev-rules.c systemd-209.patch/src/udev/udev-rules.c +--- systemd-209/src/udev/udev-rules.c 2014-02-18 21:07:20.000000000 +0100 ++++ systemd-209.patch/src/udev/udev-rules.c 2014-02-20 13:46:47.885370802 +0100 +@@ -50,6 +50,7 @@ + "/etc/udev/rules.d", + "/run/udev/rules.d", + UDEVLIBEXECDIR "/rules.d", ++ "/storage/.config/udev.rules.d", + NULL}; + + struct udev_rules { diff --git a/packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch b/packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch deleted file mode 100644 index e1baf85d86..0000000000 --- a/packages/sysutils/systemd/patches/systemd-02_order-remote-mounts-from-mountinfo-before-remote-.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 77009452cfd25208509b14ea985e81fdf9f7d40e Mon Sep 17 00:00:00 2001 -From: Zbigniew Jędrzejewski-Szmek -Date: Fri, 04 Oct 2013 02:15:08 +0000 -Subject: systemd: order remote mounts from mountinfo before remote-fs.target - -Usually the network is stopped before filesystems are umounted. -Ordering network filesystems before remote-fs.target means that their -unmounting will be performed earlier, and can terminate sucessfully. - -https://bugs.freedesktop.org/show_bug.cgi?id=70002 ---- -(limited to 'src/core/mount.c') - -diff --git a/src/core/mount.c b/src/core/mount.c -index 3d46557..93bfa99 100644 ---- a/src/core/mount.c -+++ b/src/core/mount.c -@@ -1440,6 +1440,9 @@ static int mount_add_one( - - u = manager_get_unit(m, e); - if (!u) { -+ const char* const target = -+ fstype_is_network(fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; -+ - delete = true; - - u = unit_new(m, sizeof(Mount)); -@@ -1466,7 +1469,7 @@ static int mount_add_one( - goto fail; - } - -- r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true); -+ r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true); - if (r < 0) - goto fail; - --- -cgit v0.9.0.2-2-gbebe diff --git a/packages/sysutils/systemd/patches/systemd-04_move-hwdb.bin-to-run.patch b/packages/sysutils/systemd/patches/systemd-04_move-hwdb.bin-to-run.patch index 6ebe5859c5..54b1f41841 100644 --- a/packages/sysutils/systemd/patches/systemd-04_move-hwdb.bin-to-run.patch +++ b/packages/sysutils/systemd/patches/systemd-04_move-hwdb.bin-to-run.patch @@ -1,54 +1,43 @@ -From d7a9ce1ab7fb5aa2f3715c66c12047561bdff95b Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Tue, 22 Oct 2013 19:40:25 +0300 -Subject: [PATCH] move hwdb.bin to /run - ---- - src/libudev/libudev-hwdb.c | 12 ++++++------ - src/udev/udevadm-hwdb.c | 2 +- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c -index de1cb83..bac85ff 100644 ---- a/src/libudev/libudev-hwdb.c -+++ b/src/libudev/libudev-hwdb.c -@@ -275,30 +275,30 @@ _public_ struct udev_hwdb *udev_hwdb_new(struct udev *udev) { +diff -Naur systemd-209/src/libudev/libudev-hwdb.c systemd-209.patch/src/libudev/libudev-hwdb.c +--- systemd-209/src/libudev/libudev-hwdb.c 2014-02-13 03:42:33.000000000 +0100 ++++ systemd-209.patch/src/libudev/libudev-hwdb.c 2014-02-20 13:53:24.578683125 +0100 +@@ -275,30 +275,30 @@ hwdb->refcount = 1; udev_list_init(udev, &hwdb->properties_list, true); - hwdb->f = fopen("/etc/udev/hwdb.bin", "re"); + hwdb->f = fopen("/run/hwdb.bin", "re"); if (!hwdb->f) { -- log_debug("error reading /etc/udev/hwdb.bin: %m"); -+ log_debug("error reading /run/hwdb.bin: %m"); +- udev_dbg(udev, "error reading /etc/udev/hwdb.bin: %m"); ++ udev_dbg(udev, "error reading /run/hwdb.bin: %m"); udev_hwdb_unref(hwdb); return NULL; } if (fstat(fileno(hwdb->f), &hwdb->st) < 0 || (size_t)hwdb->st.st_size < offsetof(struct trie_header_f, strings_len) + 8) { -- log_debug("error reading /etc/udev/hwdb.bin: %m"); -+ log_debug("error reading /run/hwdb.bin: %m"); +- udev_dbg(udev, "error reading /etc/udev/hwdb.bin: %m"); ++ udev_dbg(udev, "error reading /run/hwdb.bin: %m"); udev_hwdb_unref(hwdb); return NULL; } hwdb->map = mmap(0, hwdb->st.st_size, PROT_READ, MAP_SHARED, fileno(hwdb->f), 0); if (hwdb->map == MAP_FAILED) { -- log_debug("error mapping /etc/udev/hwdb.bin: %m"); -+ log_debug("error mapping /run/hwdb.bin: %m"); +- udev_dbg(udev, "error mapping /etc/udev/hwdb.bin: %m"); ++ udev_dbg(udev, "error mapping /run/hwdb.bin: %m"); udev_hwdb_unref(hwdb); return NULL; } if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 || (size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) { -- log_debug("error recognizing the format of /etc/udev/hwdb.bin"); -+ log_debug("error recognizing the format of /run/hwdb.bin"); +- udev_dbg(udev, "error recognizing the format of /etc/udev/hwdb.bin"); ++ udev_dbg(udev, "error recognizing the format of /run/hwdb.bin"); udev_hwdb_unref(hwdb); return NULL; } -@@ -358,7 +358,7 @@ bool udev_hwdb_validate(struct udev_hwdb *hwdb) { +@@ -358,7 +358,7 @@ return false; if (!hwdb->f) return false; @@ -57,12 +46,11 @@ index de1cb83..bac85ff 100644 return true; if (timespec_load(&hwdb->st.st_mtim) != timespec_load(&st.st_mtim)) return true; -diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c -index e4b4a27..31101f9 100644 ---- a/src/udev/udevadm-hwdb.c -+++ b/src/udev/udevadm-hwdb.c -@@ -629,7 +629,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { - log_debug("strings dedup'ed: %8zu bytes (%8zu)\n", +diff -Naur systemd-209/src/udev/udevadm-hwdb.c systemd-209.patch/src/udev/udevadm-hwdb.c +--- systemd-209/src/udev/udevadm-hwdb.c 2014-02-19 17:53:50.000000000 +0100 ++++ systemd-209.patch/src/udev/udevadm-hwdb.c 2014-02-20 13:50:53.827568058 +0100 +@@ -624,7 +624,7 @@ + log_debug("strings dedup'ed: %8zu bytes (%8zu)", trie->strings->dedup_len, trie->strings->dedup_count); - if (asprintf(&hwdb_bin, "%s/etc/udev/hwdb.bin", root) < 0) { @@ -70,6 +58,3 @@ index e4b4a27..31101f9 100644 rc = EXIT_FAILURE; goto out; } --- -1.7.2.5 - diff --git a/packages/sysutils/systemd/system.d/machine-id.service b/packages/sysutils/systemd/system.d/machine-id.service index 8fa728ec8b..24a14069e5 100644 --- a/packages/sysutils/systemd/system.d/machine-id.service +++ b/packages/sysutils/systemd/system.d/machine-id.service @@ -6,7 +6,7 @@ Before=systemd-journald.service [Service] Type=oneshot -ExecStart=/bin/systemd-machine-id-setup +ExecStart=/usr/bin/systemd-machine-id-setup RemainAfterExit=yes [Install]