Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] fs/common.mk: move BR2_ROOTFS_POST_FAKEROOT_SCRIPT after pre cmd hooks
Date: Mon, 14 Sep 2020 23:20:08 +0200	[thread overview]
Message-ID: <20200914212008.GC19902@scaer> (raw)
In-Reply-To: <20200911003002.5895-1-charles.hardin@chargepoint.com>

Charles, All,

On 2020-09-10 17:30 -0700, Charles Hardin spake thusly:
> From: Charles Hardin <ckhardin@gmail.com>
> 
> The fakeroot script does not appear to be used in any of the checked
> in defconfig targets, but it seems that most often the post
> fakeroot script should be done after all the packages rules have
> been applied instead of before.
> 
> Given that a change in systemd moved the SYSTEMD_PRESET_ALL hook to
> a ROOTFS_PRE_CMD_HOOKS, there was no way to use a FAKEROOT script
> to disable a service or fixup a systemd configuration. The systemd
> move makes sense, and this just tries to preserve the same ability
> to fixup a rootfs after all the cmd hooks are processed.
> 
> Refer to commit 65b63785a642bbc565924edf365b5d7c080f961c for
> the change that instigated this reordering.
> 
> Signed-off-by: Charles Hardin <ckhardin@gmail.com>

Did you verify that our run-time testing still works:

    support/testing/tests/core/test_post_scripts.py

which can be tested with:

    ./support/testing/run-tests \
        -o /path/to/where/you/want/temp/stuff \
        -d /path/to/BR2_DL_DIR \
        -k \
        tests.core.test_post_scripts

Otherwise, this change does make sense, because we do want to allow
users to be able to override the internal decisions.

Regards,
Yann E. MORIN.

> ---
>  fs/common.mk | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/common.mk b/fs/common.mk
> index ec6aa831d1..84e13d1b7e 100644
> --- a/fs/common.mk
> +++ b/fs/common.mk
> @@ -173,11 +173,11 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
>  	echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
>  	PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(ROOTFS_FULL_USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT)
>  	echo "$$(HOST_DIR)/bin/makedevs -d $$(ROOTFS_FULL_DEVICES_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
> +	$$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
> +		$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
>  	$$(foreach s,$$(call qstrip,$$(BR2_ROOTFS_POST_FAKEROOT_SCRIPT)),\
>  		echo "echo '$$(TERM_BOLD)>>>   Executing fakeroot script $$(s)$$(TERM_RESET)'" >> $$(FAKEROOT_SCRIPT); \
>  		echo $$(EXTRA_ENV) $$(s) $$(TARGET_DIR) $$(BR2_ROOTFS_POST_SCRIPT_ARGS) >> $$(FAKEROOT_SCRIPT)$$(sep))
> -	$$(foreach hook,$$(ROOTFS_PRE_CMD_HOOKS),\
> -		$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))
>  
>  	$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\
>  		$$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep))

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2020-09-14 21:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11  0:30 [Buildroot] [PATCH 1/1] fs/common.mk: move BR2_ROOTFS_POST_FAKEROOT_SCRIPT after pre cmd hooks Charles Hardin
2020-09-14 21:20 ` Yann E. MORIN [this message]
2020-09-14 22:44   ` Charles Hardin
2020-09-27  7:15 ` Yann E. MORIN
2020-10-02  8:39   ` Peter Korsgaard

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=20200914212008.GC19902@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox