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: <CAK7LNATtzbCEAPWeDDZOwOsbcODzbe8C+CEwWdacaZS1pBvjdQ@mail.gmail.com>
Date:   Thu, 16 Mar 2023 01:36:40 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Bastian Germann <bage@...utronix.de>
Cc:     Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] kbuild: deb-pkg: Allow parallel build

On Thu, Mar 16, 2023 at 12:51 AM Bastian Germann <bage@...utronix.de> wrote:
>
> Am 15.03.23 um 15:18 schrieb Masahiro Yamada:
> > "dpkb-buildpackage -j<N>" sets not only DEB_BUILD_OPTIONS
> > but also MAKEFLAGS.
> >
> >
> > This is clearly explained in "man dpkb-buildpackage".
> >
> >
> >   -j, --jobs[=jobs|auto]
> >     ...
> >    Will add itself to the MAKEFLAGS environment variable, which should
> >    cause all subsequent make invocations to inherit the option, thus
> >    forcing the parallel setting on the packaging ...
>
> I see. The testing/unstable dpkg-buildpackage version changed the -j behaviour.
> -j only sets DEB_BUILD_OPTIONS=parallel= now.
>
> The man page now says:
>
>         --jobs-force[=jobs|auto]
>         This option (since dpkg 1.21.10) is equivalent to the --jobs option except that
>         it will enable forced parallel mode, by adding the make -j option with the computed
>         number of parallel jobs to the MAKEFLAGS environment variable.
>
> > Your statement sounds like
> >
> >   'MAKEFLAGS=-j<N> dpkg-buildpackage'
> >
> > is the only way to build packages in parallel.
>
> It is in v1.21.10 or later (or using --jobs-force which does the same thing).
>
> > Apparently, dpkg-buildpackage provides a much shorter way
> > and invokes internal Make in parallel.
> >
> >
> >
> >
> >>
> >> So it is not used to run the actual build, just the top level `make -f debian/rules` invocation.
> >> You can set --jobs-force=16, which ends up in MAKEFLAGS but the point of the patch is that one can use
> >> the usual way of parallelizing.
> >
> >
> > What is the "usual" way in this context?
>
> The usual way is dpkg-buildpackage -jN but that does not work with later versions.
>
> > Do you mean
> > 'DEB_BUILD_OPTIONS=parallel=16 dpkg-buildpackage -b'
> > is the usual way for parallel building?
> >
> > If so, I agree. This patch caters to this case.
> >
> >
> > But, I think your code should go to debian/rules
> > instead of scripts/package/deb-build-option.
> > Kbuild's "make clean" works much faster with the parallel option.
> >
> >
> > Also, the commit description should explain the
> > benefit of this patch.
>
> I will clarify the dpkg-buildpackage behaviour change and will move the stuff to debian/rules
> in v2.


Please do so.


Now I understand the point of this patch.
Indeed, my dpkg-buildpackage is old.
(v1.21.1 on Ubuntu 22.04)

Thanks.





--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ