diff mbox series

[2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs

Message ID 20220511110619.1610327-2-foss+buildroot@0leil.net
State Rejected
Headers show
Series [1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks | expand

Commit Message

Quentin Schulz May 11, 2022, 11:06 a.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Even though it's barely used in packages, let's list the hook in the
list of supported hooks.

Also add a specific section to explain what's its use and how it
differs from LIBFOO_TARGET_FINALIZE_HOOKS.

Cc: Quentin Schulz <foss+buildroot@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 docs/manual/adding-packages-hooks.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Yann E. MORIN June 4, 2022, 9:36 a.m. UTC | #1
On 2022-05-11 13:06 +0200, Quentin Schulz spake thusly:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> Even though it's barely used in packages, let's list the hook in the
> list of supported hooks.

When this was intriduced, this was not documented on purpose:

    4628b6f3b451 fs: add pre- and post-command hooks
    ...
    Those hooks are not documented on-purpose; they are probably going to
    only ever be used by systemd.

So yes, we now have three places where they are used, but it is still
very systemd-centric. The only exception is eudev, which is still 50%
systemd-specific.

So I still prefer that this is not documented.

If we eventually have more valid users, then we can revisit that later
on.

Regards,
Yann E. MORIN.

> Also add a specific section to explain what's its use and how it
> differs from LIBFOO_TARGET_FINALIZE_HOOKS.
> 
> Cc: Quentin Schulz <foss+buildroot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
>  docs/manual/adding-packages-hooks.txt | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
> index 741b71ca29..9dd77bece3 100644
> --- a/docs/manual/adding-packages-hooks.txt
> +++ b/docs/manual/adding-packages-hooks.txt
> @@ -48,6 +48,8 @@ The following hook points are available:
>  
>  * +LIBFOO_TARGET_FINALIZE_HOOKS+
>  
> +* +LIBFOO_ROOTFS_PRE_CMD_HOOKS+
> +
>  These variables are 'lists' of variable names containing actions to be
>  performed at this hook point. This allows several hooks to be
>  registered at a given hook point. Here is an example:
> @@ -87,3 +89,12 @@ Packages may also register hooks in +LIBFOO_TARGET_FINALIZE_HOOKS+.
>  These hooks are run after all packages are built, but before the
>  filesystem images are generated. They are seldom used, and your
>  package probably do not need them.
> +
> +==== Rootfs pre-hook
> +
> +Packages may also register hooks in +LIBFOO_ROOTFS_PRE_CMD_HOOKS+.
> +These hooks are run after all packages are built, but before the
> +filesystem images are generated. They are run under fakeroot, in a
> +temporary directory and after all +*_TARGET_FINALIZE_HOOKS+ have
> +been run.
> +They are seldom used, and your package probably do not need them.
> -- 
> 2.35.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
index 741b71ca29..9dd77bece3 100644
--- a/docs/manual/adding-packages-hooks.txt
+++ b/docs/manual/adding-packages-hooks.txt
@@ -48,6 +48,8 @@  The following hook points are available:
 
 * +LIBFOO_TARGET_FINALIZE_HOOKS+
 
+* +LIBFOO_ROOTFS_PRE_CMD_HOOKS+
+
 These variables are 'lists' of variable names containing actions to be
 performed at this hook point. This allows several hooks to be
 registered at a given hook point. Here is an example:
@@ -87,3 +89,12 @@  Packages may also register hooks in +LIBFOO_TARGET_FINALIZE_HOOKS+.
 These hooks are run after all packages are built, but before the
 filesystem images are generated. They are seldom used, and your
 package probably do not need them.
+
+==== Rootfs pre-hook
+
+Packages may also register hooks in +LIBFOO_ROOTFS_PRE_CMD_HOOKS+.
+These hooks are run after all packages are built, but before the
+filesystem images are generated. They are run under fakeroot, in a
+temporary directory and after all +*_TARGET_FINALIZE_HOOKS+ have
+been run.
+They are seldom used, and your package probably do not need them.