From bf92570214534abc16751be29f6e5c45aef5f63e Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Thu, 11 Apr 2019 20:00:37 +0100 Subject: [PATCH] systemd: update hwdb.bin patch --- .../systemd-0002-move-hwdb.bin-to-run.patch | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/sysutils/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch b/packages/sysutils/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch index f51f25efa0..eafb7e9b7e 100644 --- a/packages/sysutils/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch +++ b/packages/sysutils/systemd/patches/systemd-0002-move-hwdb.bin-to-run.patch @@ -1,53 +1,53 @@ -From 73f401a5a33ad3e647791685a9af14e69c7a89f6 Mon Sep 17 00:00:00 2001 -From: Stefan Saraev -Date: Fri, 7 Aug 2015 13:25:23 +0300 -Subject: [PATCH 3/8] move hwdb.bin to /run +From bf2776b7f9403057cb82c2697e4fca8b554db4bd Mon Sep 17 00:00:00 2001 +From: MilhouseVH +Date: Thu, 11 Apr 2019 20:00:05 +0100 +Subject: [PATCH] move hwdb.bin to /run --- - src/hwdb/hwdb.c | 2 +- - src/libsystemd/sd-hwdb/sd-hwdb.c | 2 +- - src/udev/udevadm-hwdb.c | 2 +- + src/libsystemd/sd-hwdb/hwdb-util.c | 2 +- + src/libsystemd/sd-hwdb/sd-hwdb.c | 2 +- + units/systemd-hwdb-update.service.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c -index 446de3a..be91bfe 100644 ---- a/src/hwdb/hwdb.c -+++ b/src/hwdb/hwdb.c -@@ -38,7 +38,7 @@ - * Uses a Patricia/radix trie to index all matches for efficient lookup. - */ - --static const char *arg_hwdb_bin_dir = "/etc/udev"; -+static const char *arg_hwdb_bin_dir = "/run"; - static const char *arg_root = ""; +diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c +index c83575c..6285f3d 100644 +--- a/src/libsystemd/sd-hwdb/hwdb-util.c ++++ b/src/libsystemd/sd-hwdb/hwdb-util.c +@@ -20,7 +20,7 @@ + #include "strv.h" + #include "tmpfile-util.h" +-static const char *default_hwdb_bin_dir = "/etc/udev"; ++static const char *default_hwdb_bin_dir = "/run"; static const char * const conf_file_dirs[] = { + "/etc/udev/hwdb.d", + UDEVLIBEXECDIR "/hwdb.d", diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c -index 61c7b44..6e1de7d 100644 +index 79fe1a8..0acbf71 100644 --- a/src/libsystemd/sd-hwdb/sd-hwdb.c +++ b/src/libsystemd/sd-hwdb/sd-hwdb.c -@@ -269,7 +269,7 @@ +@@ -299,7 +299,7 @@ static int trie_search_f(sd_hwdb *hwdb, const char *search) { static const char hwdb_bin_paths[] = "/etc/systemd/hwdb/hwdb.bin\0" - "/etc/udev/hwdb.bin\0" + "/run/hwdb.bin\0" "/usr/lib/systemd/hwdb/hwdb.bin\0" - #ifdef HAVE_SPLIT_USR + #if HAVE_SPLIT_USR "/lib/systemd/hwdb/hwdb.bin\0" -diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c -index d65e40c..8889df7 100644 ---- a/src/udev/udevadm-hwdb.c -+++ b/src/udev/udevadm-hwdb.c -@@ -562,7 +562,7 @@ static int adm_hwdb(struct udev *udev, int argc, char *argv[]) { - }; - 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/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in +index 259fe0d..18d617f 100644 +--- a/units/systemd-hwdb-update.service.in ++++ b/units/systemd-hwdb-update.service.in +@@ -16,7 +16,7 @@ After=systemd-remount-fs.service + Before=sysinit.target shutdown.target systemd-update-done.service + ConditionNeedsUpdate=/etc + ConditionPathExists=|!@udevlibexecdir@/hwdb.bin +-ConditionPathExists=|/etc/udev/hwdb.bin ++ConditionPathExists=|/run/hwdb.bin + ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/ + + [Service] -- -1.7.10.4 +2.14.1