From: Norbert Lange <nolange79@gmail.com>
To: buildroot@buildroot.org
Cc: Norbert Lange <nolange79@gmail.com>,
"Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: [Buildroot] [PATCH v3 3/7] package/systemd: use current tool for generating HWDB
Date: Tue, 22 Feb 2022 11:22:06 +0100 [thread overview]
Message-ID: <20220222102211.74573-4-nolange79@gmail.com> (raw)
In-Reply-To: <20220222102211.74573-1-nolange79@gmail.com>
udevadm has been deprecated for a while (for building the DB),
systemd-hwdb should be used in its place.
this tool further has a switch to generate the database in
/usr which is a better place for a one-time created file
than the default /etc/udev.
The HWDB source files have drop-in directories, which means
even if disabled in this package, other packages or users
could drop in stuff. So always delete those
Signed-off-by: Norbert Lange <nolange79@gmail.com>
---
v1 -> v2
- fix removal of service
v2 -> v3
- see https://lists.buildroot.org/pipermail/buildroot/2020-July/286310.html
- use systemd-hwdb with --strict option
- split removal of service in separate patch
- improve commit message
- always delete de HWDB source directories
---
package/systemd/systemd.mk | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index b07fac27d4..d2c28b5b60 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -307,13 +307,9 @@ endif
ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
SYSTEMD_CONF_OPTS += -Dhwdb=true
define SYSTEMD_BUILD_HWDB
- $(HOST_DIR)/bin/udevadm hwdb --update --root $(TARGET_DIR)
+ $(HOST_DIR)/bin/systemd-hwdb update --root $(TARGET_DIR) --strict --usr
endef
SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_BUILD_HWDB
-define SYSTEMD_RM_HWDB_SRV
- rm -rf $(TARGET_DIR)/$(HOST_EUDEV_SYSCONFDIR)/udev/hwdb.d/
-endef
-SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_HWDB_SRV
else
SYSTEMD_CONF_OPTS += -Dhwdb=false
endif
@@ -725,6 +721,11 @@ endef
SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_UPDATE_CATALOGS
endif
+define SYSTEMD_RM_HWDB_DATA
+ rm -rf $(TARGET_DIR)/usr/lib/udev/hwdb.d/ $(TARGET_DIR)/etc/udev/hwdb.d/
+endef
+SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_HWDB_DATA
+
define SYSTEMD_RM_CATALOG_UPDATE_SERVICE
rm -rf $(TARGET_DIR)/usr/lib/systemd/catalog \
$(TARGET_DIR)/usr/lib/systemd/system/systemd-journal-catalog-update.service \
@@ -814,7 +815,7 @@ HOST_SYSTEMD_CONF_OPTS = \
-Dsysusers=false \
-Dtmpfiles=true \
-Dimportd=false \
- -Dhwdb=false \
+ -Dhwdb=true \
-Drfkill=false \
-Dman=false \
-Dhtml=false \
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-02-22 10:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 10:22 [Buildroot] Patch series Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 1/7] package/pkg-cmake.mk: use /run as runtime path Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 2/7] pkg-autotools: optimistically set runstatedir Norbert Lange
2022-09-10 12:35 ` Yann E. MORIN
2022-02-22 10:22 ` Norbert Lange [this message]
2022-07-28 19:09 ` [Buildroot] [PATCH v3 3/7] package/systemd: use current tool for generating HWDB Arnout Vandecappelle
2022-02-22 10:22 ` [Buildroot] [PATCH v3 4/7] package/systemd: remove hwdb-update service Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 5/7] Makefile: remove /usr/lib/rpm directory on target Norbert Lange
2022-02-22 10:22 ` [Buildroot] [PATCH v3 6/7] package/zsh: Enable dynamic modules Norbert Lange
2022-07-28 19:14 ` Arnout Vandecappelle
2022-02-22 10:22 ` [Buildroot] [PATCH v3 7/7] package/zsh: enable static regex module Norbert Lange
2022-07-28 19:16 ` Arnout Vandecappelle
2022-07-28 19:05 ` [Buildroot] Patch series Arnout Vandecappelle
2022-07-29 8:00 ` Norbert Lange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222102211.74573-4-nolange79@gmail.com \
--to=nolange79@gmail.com \
--cc=buildroot@buildroot.org \
--cc=yann.morin.1998@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.