From 6c34c472ecd14313b06d39b4349ef8109629763c Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 31 Oct 2014 22:52:19 +0100 Subject: [PATCH] systemd: update to systemd-217 Signed-off-by: Stephan Raue --- packages/sysutils/systemd/package.mk | 16 ++-- .../patches/systemd-03_user-hwdb.d.patch | 24 ------ .../systemd-04_move-hwdb.bin-to-run.patch | 78 +++++-------------- ..._file_preset_all-doing-stupid-things.patch | 15 ++-- 4 files changed, 35 insertions(+), 98 deletions(-) delete mode 100644 packages/sysutils/systemd/patches/systemd-03_user-hwdb.d.patch diff --git a/packages/sysutils/systemd/package.mk b/packages/sysutils/systemd/package.mk index 5e18910668..bcba7db794 100644 --- a/packages/sysutils/systemd/package.mk +++ b/packages/sysutils/systemd/package.mk @@ -17,7 +17,7 @@ ################################################################################ PKG_NAME="systemd" -PKG_VERSION="216" +PKG_VERSION="217" PKG_REV="1" PKG_ARCH="any" PKG_LICENSE="GPL" @@ -40,6 +40,7 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ --disable-gtk-doc-pdf \ --disable-python-devel \ --disable-dbus \ + --disable-utmp \ --disable-compat-libs \ --disable-coverage \ --enable-kmod \ @@ -65,7 +66,6 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ --disable-libidn \ --disable-binfmt \ --disable-vconsole \ - --disable-readahead \ --disable-bootchart \ --disable-quotacheck \ --enable-tmpfiles \ @@ -85,12 +85,12 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_func_malloc_0_nonnull=yes \ --disable-resolved \ --disable-networkd \ --disable-efi \ - --disable-multi-seat-x \ --disable-terminal \ --disable-kdbus \ --disable-myhostname \ --disable-gudev \ --disable-manpages \ + --disable-hibernate \ --disable-ldconfig \ --enable-split-usr \ --disable-tests \ @@ -161,12 +161,6 @@ post_makeinstall_target() { # remove debug-shell.service, we install our own rm -rf $INSTALL/usr/lib/systemd/system/debug-shell.service - # remove systemd-update-utmp. pointless - 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/usr/lib/systemd/system/systemd-ask-password-wall.service rm -rf $INSTALL/usr/lib/systemd/system/systemd-ask-password-wall.path @@ -213,6 +207,10 @@ post_makeinstall_target() { ln -sf /storage/.config/sysctl.d $INSTALL/etc/sysctl.d rm -rf $INSTALL/etc/tmpfiles.d ln -sf /storage/.config/tmpfiles.d $INSTALL/etc/tmpfiles.d + rm -rf $INSTALL/etc/udev/hwdb.d + ln -sf /storage/.config/hwdb.d $INSTALL/etc/udev/hwdb.d + rm -rf $INSTALL/etc/udev/rules.d + ln -sf /storage/.config/udev.rules.d $INSTALL/etc/udev/rules.d } post_install() { diff --git a/packages/sysutils/systemd/patches/systemd-03_user-hwdb.d.patch b/packages/sysutils/systemd/patches/systemd-03_user-hwdb.d.patch deleted file mode 100644 index b0f976c33d..0000000000 --- a/packages/sysutils/systemd/patches/systemd-03_user-hwdb.d.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 086daa1279f896a5f3d7e27938dbb3772fbf9692 Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Mon, 21 Oct 2013 21:50:45 +0300 -Subject: [PATCH] user hwdb.d - ---- - src/udev/udevadm-hwdb.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/udev/udevadm-hwdb.c b/udev/udevadm-hwdb.c -index d9dc73b..e4b4a27 100644 ---- a/src/udev/udevadm-hwdb.c -+++ b/src/udev/udevadm-hwdb.c -@@ -38,6 +38,7 @@ - static const char * const conf_file_dirs[] = { - "/etc/udev/hwdb.d", - UDEVLIBEXECDIR "/hwdb.d", -+ "/storage/.config/hwdb.d", - NULL - }; - --- -1.7.2.5 - 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 54b1f41841..ac3105229c 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,60 +1,24 @@ -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); +diff -Naur systemd-217/src/libudev/libudev-hwdb.c systemd-217.patch/src/libudev/libudev-hwdb.c +--- systemd-217/src/libudev/libudev-hwdb.c 2014-10-28 14:31:25.105131602 +0100 ++++ systemd-217.patch/src/libudev/libudev-hwdb.c 2014-10-31 22:42:05.250433377 +0100 +@@ -257,7 +257,7 @@ + } -- hwdb->f = fopen("/etc/udev/hwdb.bin", "re"); -+ hwdb->f = fopen("/run/hwdb.bin", "re"); - if (!hwdb->f) { -- 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; - } + static const char hwdb_bin_paths[] = +- "/etc/udev/hwdb.bin\0" ++ "/run/hwdb.bin\0" + UDEVLIBEXECDIR "/hwdb.bin\0"; - if (fstat(fileno(hwdb->f), &hwdb->st) < 0 || - (size_t)hwdb->st.st_size < offsetof(struct trie_header_f, strings_len) + 8) { -- 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) { -- 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)) { -- 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 @@ - return false; - if (!hwdb->f) - return false; -- if (stat("/etc/udev/hwdb.bin", &st) < 0) -+ if (stat("/run/hwdb.bin", &st) < 0) - return true; - if (timespec_load(&hwdb->st.st_mtim) != timespec_load(&st.st_mtim)) - return true; -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) { -+ if (asprintf(&hwdb_bin, "%s/run/hwdb.bin", root) < 0) { - rc = EXIT_FAILURE; - goto out; - } +diff -Naur systemd-217/src/udev/udevadm-hwdb.c systemd-217.patch/src/udev/udevadm-hwdb.c +--- systemd-217/src/udev/udevadm-hwdb.c 2014-10-28 14:31:25.105131602 +0100 ++++ systemd-217.patch/src/udev/udevadm-hwdb.c 2014-10-31 22:42:38.656510374 +0100 +@@ -557,7 +557,7 @@ + }; + const char *test = NULL; + const char *root = ""; +- const char *hwdb_bin_dir = "/etc/udev"; ++ const char *hwdb_bin_dir = "/run"; + bool update = false; + struct trie *trie = NULL; + int err, c; diff --git a/packages/sysutils/systemd/patches/systemd-13_stop-unit_file_preset_all-doing-stupid-things.patch b/packages/sysutils/systemd/patches/systemd-13_stop-unit_file_preset_all-doing-stupid-things.patch index 14253cc5a8..27f10202c3 100644 --- a/packages/sysutils/systemd/patches/systemd-13_stop-unit_file_preset_all-doing-stupid-things.patch +++ b/packages/sysutils/systemd/patches/systemd-13_stop-unit_file_preset_all-doing-stupid-things.patch @@ -1,30 +1,29 @@ -From e55ae923fb9d6718ab6db2f7566b9ef4b99ffbd1 Mon Sep 17 00:00:00 2001 +From c75953c2010b9932bd921096523e190cbaf3b578 Mon Sep 17 00:00:00 2001 From: Stefan Saraev -Date: Wed, 20 Aug 2014 20:17:03 +0300 +Date: Tue, 28 Oct 2014 22:32:18 +0200 Subject: [PATCH] stop unit_file_preset_all doing stupid things populating shitload of useless symlinks into /storage/.config/system.d is not so-nice fuckery. and systemctl preset-all is useless on an embedded distro like openelec anyway. --- - src/shared/install.c | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + src/shared/install.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/shared/install.c b/src/shared/install.c -index 03c7a9d..2044042 100644 +index 035b44c..74aa7c5 100644 --- a/src/shared/install.c +++ b/src/shared/install.c -@@ -1927,6 +1927,12 @@ int unit_file_preset_all( +@@ -2043,6 +2043,11 @@ int unit_file_preset_all( UnitFileChange **changes, unsigned *n_changes) { -+ + // meh systemctl preset-all. + // I DONT WANT shitload of symlink populated + // just because systemd "thinks" (o_O) /etc is empty + return 0; + - _cleanup_install_context_done_ InstallContext plus = {}, minus = {}; + _cleanup_(install_context_done) InstallContext plus = {}, minus = {}; _cleanup_lookup_paths_free_ LookupPaths paths = {}; _cleanup_free_ char *config_path = NULL; --