All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: Norbert Lange <nolange79@gmail.com>, buildroot@buildroot.org
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Subject: Re: [Buildroot] [PATCH v3 3/7] package/systemd: use current tool for generating HWDB
Date: Thu, 28 Jul 2022 21:09:36 +0200	[thread overview]
Message-ID: <ee71cbb7-223d-2803-fbe6-7efd9750a043@mind.be> (raw)
In-Reply-To: <20220222102211.74573-4-nolange79@gmail.com>



On 22/02/2022 11:22, Norbert Lange wrote:
> 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.

  This is one thing.

> 
> 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

  And this is something else. So I split the patch in two.

  It also lead us to observe that:

- there's some leftover code in eudev.mk that can be removed;
- we should do the same in eudev (i.e. also delete /usr/lib/udev/hwdb.d) - or 
rather, we should do the same regardless of the device manager used.

  I'm going to send separate patches for those. Especially the second I'm not 
100% sure of, but it seems weird to not delete them if there's no hwdb.


  Regards,
  Arnout


> 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 \
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-07-28 19:09 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 ` [Buildroot] [PATCH v3 3/7] package/systemd: use current tool for generating HWDB Norbert Lange
2022-07-28 19:09   ` Arnout Vandecappelle [this message]
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=ee71cbb7-223d-2803-fbe6-7efd9750a043@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=nolange79@gmail.com \
    --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.