diff mbox series

[v2,1/2] package/busybox: handle LIBFOO_BUSYBOX_CONFIG_FIXUPS

Message ID 20240920181212.3572055-2-francois.perrad@gadz.org
State Superseded
Headers show
Series lynis | expand

Commit Message

Francois Perrad Sept. 20, 2024, 6:12 p.m. UTC
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 docs/manual/adding-packages-generic.adoc | 6 ++++++
 package/busybox/busybox.mk               | 1 +
 package/pkg-generic.mk                   | 3 +++
 3 files changed, 10 insertions(+)

Comments

Adam Duskett Oct. 7, 2024, 2:53 p.m. UTC | #1
test-by: adam duskett <aduskett@gmail.com>

On Fri, Sep 20, 2024 at 8:13 PM Francois Perrad
<francois.perrad@gadz.org> wrote:
>
> Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> ---
>  docs/manual/adding-packages-generic.adoc | 6 ++++++
>  package/busybox/busybox.mk               | 1 +
>  package/pkg-generic.mk                   | 3 +++
>  3 files changed, 10 insertions(+)
>
> diff --git a/docs/manual/adding-packages-generic.adoc b/docs/manual/adding-packages-generic.adoc
> index 89fc70045..f0b0508f5 100644
> --- a/docs/manual/adding-packages-generic.adoc
> +++ b/docs/manual/adding-packages-generic.adoc
> @@ -631,6 +631,12 @@ different steps of the build process.
>    This is seldom used, as package usually have no strict requirements on
>    the kernel options.
>
> +* +LIBFOO_BUSYBOX_CONFIG_FIXUPS+ lists the Busybox configuration
> +  options that are needed to use this package especially in some scripts,
> +  or at contrario the useless options. This shall be a set of
> +  calls to one of the kconfig tweaking option: `KCONFIG_ENABLE_OPT`,
> +  `KCONFIG_DISABLE_OPT`, or `KCONFIG_SET_OPT`.
> +
>  The preferred way to define these variables is:
>
>  ----
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index 204ebe010..ef5521105 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -411,6 +411,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
>         $(BUSYBOX_SET_SELINUX)
>         $(BUSYBOX_SET_LESS_FLAGS)
>         $(BUSYBOX_SET_INDIVIDUAL_BINARIES)
> +       $(PACKAGES_BUSYBOX_CONFIG_FIXUPS)
>  endef
>
>  define BUSYBOX_BUILD_CMDS
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 171163dcb..fecb68fc6 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -1237,6 +1237,9 @@ endif
>  ifneq ($$($(2)_USERS),)
>  PACKAGES_USERS += $$($(2)_USERS)$$(sep)
>  endif
> +ifneq ($$($(2)_BUSYBOX_CONFIG_FIXUPS),)
> +PACKAGES_BUSYBOX_CONFIG_FIXUPS += $$($(2)_BUSYBOX_CONFIG_FIXUPS)$$(sep)
> +endif
>  ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
>  PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
>  endif
> --
> 2.43.0
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Adam Duskett Oct. 7, 2024, 2:54 p.m. UTC | #2
tested-by: adam duskett <aduskett@gmail.com>

On Mon, Oct 7, 2024 at 4:53 PM Adam Duskett <aduskett@gmail.com> wrote:
>
> test-by: adam duskett <aduskett@gmail.com>
>
> On Fri, Sep 20, 2024 at 8:13 PM Francois Perrad
> <francois.perrad@gadz.org> wrote:
> >
> > Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
> > ---
> >  docs/manual/adding-packages-generic.adoc | 6 ++++++
> >  package/busybox/busybox.mk               | 1 +
> >  package/pkg-generic.mk                   | 3 +++
> >  3 files changed, 10 insertions(+)
> >
> > diff --git a/docs/manual/adding-packages-generic.adoc b/docs/manual/adding-packages-generic.adoc
> > index 89fc70045..f0b0508f5 100644
> > --- a/docs/manual/adding-packages-generic.adoc
> > +++ b/docs/manual/adding-packages-generic.adoc
> > @@ -631,6 +631,12 @@ different steps of the build process.
> >    This is seldom used, as package usually have no strict requirements on
> >    the kernel options.
> >
> > +* +LIBFOO_BUSYBOX_CONFIG_FIXUPS+ lists the Busybox configuration
> > +  options that are needed to use this package especially in some scripts,
> > +  or at contrario the useless options. This shall be a set of
> > +  calls to one of the kconfig tweaking option: `KCONFIG_ENABLE_OPT`,
> > +  `KCONFIG_DISABLE_OPT`, or `KCONFIG_SET_OPT`.
> > +
> >  The preferred way to define these variables is:
> >
> >  ----
> > diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> > index 204ebe010..ef5521105 100644
> > --- a/package/busybox/busybox.mk
> > +++ b/package/busybox/busybox.mk
> > @@ -411,6 +411,7 @@ define BUSYBOX_KCONFIG_FIXUP_CMDS
> >         $(BUSYBOX_SET_SELINUX)
> >         $(BUSYBOX_SET_LESS_FLAGS)
> >         $(BUSYBOX_SET_INDIVIDUAL_BINARIES)
> > +       $(PACKAGES_BUSYBOX_CONFIG_FIXUPS)
> >  endef
> >
> >  define BUSYBOX_BUILD_CMDS
> > diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> > index 171163dcb..fecb68fc6 100644
> > --- a/package/pkg-generic.mk
> > +++ b/package/pkg-generic.mk
> > @@ -1237,6 +1237,9 @@ endif
> >  ifneq ($$($(2)_USERS),)
> >  PACKAGES_USERS += $$($(2)_USERS)$$(sep)
> >  endif
> > +ifneq ($$($(2)_BUSYBOX_CONFIG_FIXUPS),)
> > +PACKAGES_BUSYBOX_CONFIG_FIXUPS += $$($(2)_BUSYBOX_CONFIG_FIXUPS)$$(sep)
> > +endif
> >  ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
> >  PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
> >  endif
> > --
> > 2.43.0
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/docs/manual/adding-packages-generic.adoc b/docs/manual/adding-packages-generic.adoc
index 89fc70045..f0b0508f5 100644
--- a/docs/manual/adding-packages-generic.adoc
+++ b/docs/manual/adding-packages-generic.adoc
@@ -631,6 +631,12 @@  different steps of the build process.
   This is seldom used, as package usually have no strict requirements on
   the kernel options.
 
+* +LIBFOO_BUSYBOX_CONFIG_FIXUPS+ lists the Busybox configuration
+  options that are needed to use this package especially in some scripts,
+  or at contrario the useless options. This shall be a set of
+  calls to one of the kconfig tweaking option: `KCONFIG_ENABLE_OPT`,
+  `KCONFIG_DISABLE_OPT`, or `KCONFIG_SET_OPT`.
+
 The preferred way to define these variables is:
 
 ----
diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
index 204ebe010..ef5521105 100644
--- a/package/busybox/busybox.mk
+++ b/package/busybox/busybox.mk
@@ -411,6 +411,7 @@  define BUSYBOX_KCONFIG_FIXUP_CMDS
 	$(BUSYBOX_SET_SELINUX)
 	$(BUSYBOX_SET_LESS_FLAGS)
 	$(BUSYBOX_SET_INDIVIDUAL_BINARIES)
+	$(PACKAGES_BUSYBOX_CONFIG_FIXUPS)
 endef
 
 define BUSYBOX_BUILD_CMDS
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 171163dcb..fecb68fc6 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1237,6 +1237,9 @@  endif
 ifneq ($$($(2)_USERS),)
 PACKAGES_USERS += $$($(2)_USERS)$$(sep)
 endif
+ifneq ($$($(2)_BUSYBOX_CONFIG_FIXUPS),)
+PACKAGES_BUSYBOX_CONFIG_FIXUPS += $$($(2)_BUSYBOX_CONFIG_FIXUPS)$$(sep)
+endif
 ifneq ($$($(2)_LINUX_CONFIG_FIXUPS),)
 PACKAGES_LINUX_CONFIG_FIXUPS += $$($(2)_LINUX_CONFIG_FIXUPS)$$(sep)
 endif