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]
Date:   Tue, 15 Nov 2022 12:36:05 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Marc Zyngier <maz@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Michal Marek <michal.lkml@...kovi.net>,
        Nick Desaulniers <ndesaulniers@...gle.com>
Subject: Re: [PATCH] kbuild: Restore .version auto-increment behaviour for
 Debian/RPM packages

On Tue, Nov 15, 2022 at 9:09 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> On Mon, Nov 14, 2022 at 1:02 AM Marc Zyngier <maz@...nel.org> wrote:
> >
> > diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> > index 60a2a63a5e90..e5c983afddab 100755
> > --- a/scripts/package/mkdebian
> > +++ b/scripts/package/mkdebian
> > @@ -90,7 +90,7 @@ if [ -n "$KDEB_PKGVERSION" ]; then
> >         packageversion=$KDEB_PKGVERSION
> >         revision=${packageversion##*-}
> >  else
> > -       revision=$(cat .version 2>/dev/null||echo 1)
> > +       revision=$(init/build-version)
>
>
> This does not work for out-of-tree builds
> because init/build-version is a check-in source file.
>
>
>
> For example, "make O=/tmp/foo bindeb-pkg" fails with:
> .../linux/scripts/package/mkdebian: 93: init/build-version: not found
>
>
> The correct code is:
>
>
>           revision=$($srctree/init/build-version)
>
>
>
>
> >         packageversion=$version-$revision
> >  fi
> >  sourcename=$KDEB_SOURCENAME
> > diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> > index 70392fd2fd29..9cbd45f497ba 100755
> > --- a/scripts/package/mkspec
> > +++ b/scripts/package/mkspec
> > @@ -42,7 +42,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
> >         Name: kernel
> >         Summary: The Linux Kernel
> >         Version: $__KERNELRELEASE
> > -       Release: $(cat .version 2>/dev/null || echo 1)
> > +       Release: $(init/build-version)
>
>
> Ditto.
>
>           Release: $($srctree/init/build-version)



No, mkspec needs no change because binrpm-pkg builds the kernel
_before_ generating the spec file.

If you increment the .version file here again, you would have
the revision mismatch between the package and the actual vmlinuz.



Please send the change for mkdebian only.



>
>
>
>
> >         License: GPL
> >         Group: System Environment/Kernel
> >         Vendor: The Linux Community
> > --
> > 2.34.1
> >
>
>
> --
> Best Regards
> Masahiro Yamada



--
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ