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] [day] [month] [year] [list]
Message-ID: <CAK7LNATwnW_uHZr2CPTKMb2ETm9WxOqTGvWN8GHxXuEAP=Po_Q@mail.gmail.com>
Date: Wed, 12 Mar 2025 21:25:47 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Ben Hutchings <ben@...adent.org.uk>, Nicolas Schier <nicolas@...sle.eu>
Subject: Re: [PATCH] kbuild: deb-pkg: fix versioning for -rc releases

On Wed, Mar 12, 2025 at 4:20 AM Nathan Chancellor <nathan@...nel.org> wrote:
>
> On Wed, Mar 12, 2025 at 04:01:33AM +0900, Masahiro Yamada wrote:
> > The version number with -rc should be considered older than the final
> > release.
> >
> > For example, 6.14-rc1 should be older than 6.14, but to handle this
> > correctly (just like Debian kernel), "-rc" must be replace with "~rc".
> >
> >   $ dpkg --compare-versions 6.14-rc1 lt 6.14
> >   $ echo $?
> >   1
> >   $ dpkg --compare-versions 6.14~rc1 lt 6.14
> >   $ echo $?
> >   0
> >
> > Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>
>
> > ---
> >
> >  scripts/package/mkdebian | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/scripts/package/mkdebian b/scripts/package/mkdebian
> > index 193e33bcb989..80ed96561993 100755
> > --- a/scripts/package/mkdebian
> > +++ b/scripts/package/mkdebian
> > @@ -167,7 +167,9 @@ version=$KERNELRELEASE
> >  if [ "${KDEB_PKGVERSION:+set}" ]; then
> >       packageversion=$KDEB_PKGVERSION
> >  else
> > -     packageversion=$(${srctree}/scripts/setlocalversion --no-local ${srctree})-$($srctree/scripts/build-version)
> > +     upstream_version=$("${srctree}/scripts/setlocalversion" --no-local "${srctree}" | sed 's/-\(rc[1-9]\)/~\1/')
>
> I don't think there has ever been an -rc10 but would it hurt to make it
> [1-9]+?


The current code should work with -rc10 as well.

$ echo 6.14-rc10 | sed 's/-\(rc[1-9]\)/~\1/'
6.14~rc10



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ