lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f65f1d49-8c6f-45e9-a4b2-30d4cfff10b1@t-8ch.de>
Date: Wed, 7 Aug 2024 18:40:55 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Jose Fernandez <jose.fernandez@...ux.dev>, 
	Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, 
	Christian Heusel <christian@...sel.eu>, Peter Jung <ptr1337@...hyos.org>, linux-kbuild@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kbuild: control extra pacman packages with
 PACMAN_EXTRAPACKAGES

On 2024-08-07 22:37:47+0000, Masahiro Yamada wrote:
> On Wed, Aug 7, 2024 at 11:28 AM Jose Fernandez <jose.fernandez@...ux.dev> wrote:
> >
> > Introduce a new variable, PACMAN_EXTRAPACKAGES, in the Makefile.package
> > to control the creation of additional packages by the pacman-pkg target.
> >
> > The headers and api-headers packages will be included by default if
> > PACMAN_EXTRAPACKAGES is not set. This changes the previous behavior
> > where api-headers was always included, and headers was conditionally
> > included if CONFIG_MODULES=y. Now, this decision is delegated to the
> > user.
> >
> > To disable extra packages, set PACMAN_EXTRAPACKAGES to an empty value:
> >
> > make pacman-pkg PACMAN_EXTRAPACKAGES=
> >
> > or
> >
> > make pacman-pkg PACMAN_EXTRAPACKAGES=""
> >
> > Signed-off-by: Jose Fernandez <jose.fernandez@...ux.dev>
> > Reviewed-by: Peter Jung <ptr1337@...hyos.org>
> > ---
> > v1 -> v2: Build all extra packages by default. Remove unnecessary lines.
> 
> 
> I see only the main package built by default.

Same.

Do we even need PACMAN_EXTRAPACKAGES in the Makefile?
IMO having it in the PKGBUILD would be enough.
It can still be overriden from the commandline.

> >
> > In a previous patch, there was concern that adding a new debug package
> > would increase the package time. To address this concern and provide
> > more flexibility, this change has been added to allow users to decide
> > which extra packages to include before introducing an optional debug
> > package [1].
> >
> > [1] https://lore.kernel.org/lkml/20240801192008.GA3923315@thelio-3990X/T/
> >
> >  scripts/Makefile.package |  2 ++
> >  scripts/package/PKGBUILD | 11 +++++++----
> >  2 files changed, 9 insertions(+), 4 deletions(-)
> >
> > diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> > index 4a80584ec771..ccdf8ba41f0b 100644
> > --- a/scripts/Makefile.package
> > +++ b/scripts/Makefile.package
> > @@ -144,6 +144,8 @@ snap-pkg:
> >  # pacman-pkg
> >  # ---------------------------------------------------------------------------
> >
> > +PACMAN_EXTRAPACKAGES ?= headers api-headers
> 
> Meaningless line.
> 
> 
> Since 'export' is missing,
> this default line is not propagated to PKGBUILD.
> 
> 
> Nathan also mentioned 'export' would be needed if you wanted to
> describe this here.
> 
> https://lore.kernel.org/linux-kbuild/20240806025853.GB1570554@thelio-3990X/

Same as above.

> > +
> >  PHONY += pacman-pkg
> >  pacman-pkg:
> >         @ln -srf $(srctree)/scripts/package/PKGBUILD $(objtree)/PKGBUILD
> > diff --git a/scripts/package/PKGBUILD b/scripts/package/PKGBUILD
> > index 663ce300dd06..8de869f9b1d4 100644
> > --- a/scripts/package/PKGBUILD
> > +++ b/scripts/package/PKGBUILD
> > @@ -3,10 +3,13 @@
> >  # Contributor: Jan Alexander Steffens (heftig) <heftig@...hlinux.org>
> >
> >  pkgbase=${PACMAN_PKGBASE:-linux-upstream}
> > -pkgname=("${pkgbase}" "${pkgbase}-api-headers")
> > -if grep -q CONFIG_MODULES=y include/config/auto.conf; then
> > -       pkgname+=("${pkgbase}-headers")
> > -fi
> > +pkgname=("${pkgbase}")
> > +
> > +_extrapackages=${PACMAN_EXTRAPACKAGES:-}
> 
> 
> Instead of adding inconsistent defaults in two places,
> I would write like this:
> 
> _extrapackages=${PACMAN_EXTRAPACKAGES-headers api-headers}

Agreed.

> Lastly, I will never accept new error messages
> with CONFIG_MODULES=n.

Could you elaborate?
For me this works fine with CONFIG_MODULES=n.
(After having fixed the above issues so all subpackages are built)

> > +for pkg in $_extrapackages; do
> > +       pkgname+=("${pkgbase}-${pkg}")
> > +done
> > +
> >  pkgver="${KERNELRELEASE//-/_}"
> >  # The PKGBUILD is evaluated multiple times.
> >  # Running scripts/build-version from here would introduce inconsistencies.
> > --
> > 2.46.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ