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: <20230402033729.GA619325@mit.edu>
Date:   Sat, 1 Apr 2023 23:37:29 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: Change in kernel debian packages between -rc2 and -rc3

I've worked around this in xfstests-bld.

					- Ted

commit e3309f769882397e605f956755dfec30f1f3f196
Author: Theodore Ts'o <tytso@....edu>
Date:   Sat Apr 1 23:22:09 2023 -0400

    kernel-build: work around backwards incompatible change in "make bindeb-pkg"
    
    Starting in v6.3-rc3, "make bindeb-pkg" made an incompatible change in
    how the debian package version is constructed, by dropping
    CONFIG_LOCALVERSION from the package version.  This might make sense
    given that Debian and Ubuntu try to adhere to Stable ABI nonsense with
    their Distribution kernels, but the default version chosen by "make
    bindeb-pkg" isn't compatible with the stable ABI nonsense versioning
    scheme in any case, so the change just breaks upstream developers for
    no good reason.
    
    Fix this by overriding the package version using KDEB_PKGVERSION,
    which is not documented, but hopefully it won't also incompatibly
    change in the future.  :-(
    
    Signed-off-by: Theodore Ts'o <tytso@....edu>

diff --git a/kernel-build/kbuild b/kernel-build/kbuild
index 16dfb7cd..4ab9ea28 100755
--- a/kernel-build/kbuild
+++ b/kernel-build/kbuild
@@ -153,7 +153,25 @@ rm -f "$BLD_DIR/linux-image.deb" "$BLD_DIR/linux-image-dbg.deb" \
 if test -n "$DO_DPKG" ; then
     $NO_ACTION make "${MAKE_ARGS[@]}" prepare
     REL=$(make "${MAKE_ARGS[@]}" kernelrelease | grep -v ^make)
-    $NO_ACTION time nice make "KDEB_SOURCENAME=linux-${REL}" "${MAKE_ARGS[@]}" \
+    MAJOR=$(echo $REL | awk -F. '{print $1}')
+    MINOR=$(echo $REL | awk -F. '{print $2}')
+    if test -f "$BLD_DIR/.version" ; then
+	NUM=$(cat "$BLD_DIR/.version")
+	# Starting in 6.1, how "make bindeb-pkg" handled the
+	# .version numbering randomly changed; accomodate that
+	# here.   Things are broken starting in 6.1-rc1 until 6.1-rc6
+	# but we won't worry about that here.  See commit
+	# 5db8face97f8 ("kbuild: Restore .version auto-increment behaviour
+	# for Debian packages") which fixed the problem but in a way
+	# which was different compared to how 6.0 and earlier kernels
+	# handled things.
+	if test "$MAJOR" -ge 6 -a "$MINOR" -ge 1 ; then
+	    NUM=$(( $NUM + 1 ))
+	fi
+    else
+	NUM=1
+    fi
+    $NO_ACTION time nice make "KDEB_PKGVERSION=$REL-$NUM" "KDEB_SOURCENAME=linux-${REL}" "${MAKE_ARGS[@]}" \
 	 bindeb-pkg "$@"
     err=$?
     d="$BLD_DIR/.."

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ