All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks
@ 2022-05-11 11:06 Quentin Schulz
  2022-05-11 11:06 ` [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs Quentin Schulz
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Quentin Schulz @ 2022-05-11 11:06 UTC (permalink / raw)
  To: buildroot; +Cc: Quentin Schulz, Quentin Schulz, Thomas De Schampheleire

From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

While reading the docs to find hooks, I completely missed the
LIBFOO_TARGET_FINALIZE_HOOKS one which was actually matching my
use-case.

Though it is documented in a subsection a few lines below, let's also
have it in the list of supported hooks so it's not hidden away.

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

diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
index 0ce79f8907..741b71ca29 100644
--- a/docs/manual/adding-packages-hooks.txt
+++ b/docs/manual/adding-packages-hooks.txt
@@ -46,6 +46,8 @@ The following hook points are available:
 * +LIBFOO_PRE_LEGAL_INFO_HOOKS+
 * +LIBFOO_POST_LEGAL_INFO_HOOKS+
 
+* +LIBFOO_TARGET_FINALIZE_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:
-- 
2.35.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs
  2022-05-11 11:06 [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
@ 2022-05-11 11:06 ` Quentin Schulz
  2022-06-04  9:36   ` Yann E. MORIN
  2022-05-31 10:13 ` [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2022-05-11 11:06 UTC (permalink / raw)
  To: buildroot; +Cc: Quentin Schulz, Quentin Schulz, Thomas De Schampheleire

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(+)

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks
  2022-05-11 11:06 [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
  2022-05-11 11:06 ` [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs Quentin Schulz
@ 2022-05-31 10:13 ` Quentin Schulz
  2022-06-04  9:31 ` Yann E. MORIN
  2022-06-07 15:04 ` Peter Korsgaard
  3 siblings, 0 replies; 6+ messages in thread
From: Quentin Schulz @ 2022-05-31 10:13 UTC (permalink / raw)
  To: Quentin Schulz, buildroot; +Cc: Thomas De Schampheleire

Hi all,

Any feedback to offer on this patch series?

Cheers,
Quentin

On 5/11/22 13:06, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> 
> While reading the docs to find hooks, I completely missed the
> LIBFOO_TARGET_FINALIZE_HOOKS one which was actually matching my
> use-case.
> 
> Though it is documented in a subsection a few lines below, let's also
> have it in the list of supported hooks so it's not hidden away.
> 
> Cc: Quentin Schulz <foss+buildroot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> ---
>   docs/manual/adding-packages-hooks.txt | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
> index 0ce79f8907..741b71ca29 100644
> --- a/docs/manual/adding-packages-hooks.txt
> +++ b/docs/manual/adding-packages-hooks.txt
> @@ -46,6 +46,8 @@ The following hook points are available:
>   * +LIBFOO_PRE_LEGAL_INFO_HOOKS+
>   * +LIBFOO_POST_LEGAL_INFO_HOOKS+
>   
> +* +LIBFOO_TARGET_FINALIZE_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:
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks
  2022-05-11 11:06 [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
  2022-05-11 11:06 ` [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs Quentin Schulz
  2022-05-31 10:13 ` [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
@ 2022-06-04  9:31 ` Yann E. MORIN
  2022-06-07 15:04 ` Peter Korsgaard
  3 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-06-04  9:31 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: Quentin Schulz, Thomas De Schampheleire, buildroot

Quentin, All,

On 2022-05-11 13:06 +0200, Quentin Schulz spake thusly:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> 
> While reading the docs to find hooks, I completely missed the
> LIBFOO_TARGET_FINALIZE_HOOKS one which was actually matching my
> use-case.
> 
> Though it is documented in a subsection a few lines below, let's also
> have it in the list of supported hooks so it's not hidden away.
> 
> Cc: Quentin Schulz <foss+buildroot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  docs/manual/adding-packages-hooks.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/docs/manual/adding-packages-hooks.txt b/docs/manual/adding-packages-hooks.txt
> index 0ce79f8907..741b71ca29 100644
> --- a/docs/manual/adding-packages-hooks.txt
> +++ b/docs/manual/adding-packages-hooks.txt
> @@ -46,6 +46,8 @@ The following hook points are available:
>  * +LIBFOO_PRE_LEGAL_INFO_HOOKS+
>  * +LIBFOO_POST_LEGAL_INFO_HOOKS+
>  
> +* +LIBFOO_TARGET_FINALIZE_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:
> -- 
> 2.35.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs
  2022-05-11 11:06 ` [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs Quentin Schulz
@ 2022-06-04  9:36   ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2022-06-04  9:36 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: Quentin Schulz, Thomas De Schampheleire, buildroot

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

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks
  2022-05-11 11:06 [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
                   ` (2 preceding siblings ...)
  2022-06-04  9:31 ` Yann E. MORIN
@ 2022-06-07 15:04 ` Peter Korsgaard
  3 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2022-06-07 15:04 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: Quentin Schulz, Thomas De Schampheleire, buildroot

>>>>> "Quentin" == Quentin Schulz <foss+buildroot@0leil.net> writes:

 > From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
 > While reading the docs to find hooks, I completely missed the
 > LIBFOO_TARGET_FINALIZE_HOOKS one which was actually matching my
 > use-case.

 > Though it is documented in a subsection a few lines below, let's also
 > have it in the list of supported hooks so it's not hidden away.

 > Cc: Quentin Schulz <foss+buildroot@0leil.net>
 > Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Committed to 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-06-07 15:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 11:06 [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
2022-05-11 11:06 ` [Buildroot] [PATCH 2/2] manual: add LIBFOO_ROOTFS_PRE_CMD_HOOKS docs Quentin Schulz
2022-06-04  9:36   ` Yann E. MORIN
2022-05-31 10:13 ` [Buildroot] [PATCH 1/2] manual: add _TARGET_FINALIZE_HOOKS in the list of hooks Quentin Schulz
2022-06-04  9:31 ` Yann E. MORIN
2022-06-07 15:04 ` Peter Korsgaard

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.