summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Gorski2023-01-31 19:59:47 +0100
committerPiotr Gorski2023-01-31 19:59:47 +0100
commit8eca1a9302bfa63ce58f102e08d7c7731122adb4 (patch)
tree640b7aa2fcfcde5feffe6c8a75e74adff56c2668
parent2efbf6b0b321b3bc54ce0d2ffcca7633e36ea0f2 (diff)
downloadaur-8eca1a9302bfa63ce58f102e08d7c7731122adb4.tar.gz
Attempting to fix an error related to localversion
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
-rw-r--r--.SRCINFO2
-rw-r--r--0002-setlocalversion-do-not-append-git-commit-hash-if-loc.patch73
-rw-r--r--PKGBUILD2
3 files changed, 77 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7c5229382deb..dfe3796be06d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -16,9 +16,11 @@ pkgbase = linux-next-git
options = !strip
source = git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
source = https://gitlab.com/sirlucjan/kernel-patches/raw/master/6.1/arch-patches/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch
+ source = 0002-setlocalversion-do-not-append-git-commit-hash-if-loc.patch
source = config
sha512sums = SKIP
sha512sums = 3ccb02d9e7a09651351cf379aca5cb66a5402c8e9e890cfaebf8d869b82858eb7e1be5a49f8dcd918ebe4b70cfffd39f6591d30752d7e8c9d1d9bddfe70fb0fd
+ sha512sums = e1570711e53ded89f3dbda989a027cb6b3178ce47bb152e22840430973f11303f5a4068792eaf9ee969ae40337ff0b0549ef5908d785cbec900a850e70547175
sha512sums = f1d1d414e0e3b04846bc17a6bf1d9c91d8a629a8ee5882c7aece723ce690ae899729937b9e15aefec63cf2f943eb8a00c5b0616c938cdc3994e755f0e2c57ac6
pkgname = linux-next-git
diff --git a/0002-setlocalversion-do-not-append-git-commit-hash-if-loc.patch b/0002-setlocalversion-do-not-append-git-commit-hash-if-loc.patch
new file mode 100644
index 000000000000..b26ef9e9312a
--- /dev/null
+++ b/0002-setlocalversion-do-not-append-git-commit-hash-if-loc.patch
@@ -0,0 +1,73 @@
+From 4de392193e1d932255beed40102f2992ec2779c4 Mon Sep 17 00:00:00 2001
+From: Masahiro Yamada <masahiroy@kernel.org>
+Date: Tue, 31 Jan 2023 22:32:53 +0900
+Subject: [PATCH] setlocalversion: do not append git commit hash if
+ localversion* exists
+
+Since commit dcfbcb1033bb ("setlocalversion: use only the correct
+release tag for git-describe"), KERNELRELEASE of linux-next is
+annoyingly long:
+
+ $ make kernelrelease
+ 6.2.0-rc6-next-20230131-09515-g80bd9028feca
+
+The string '-09515-g80bd9028feca' is appended because git-describe now
+uses the v6.2-rc6 tag instead of the next-20230113 tag.
+
+In linux-next, the 'localversion-next' file well specifies the local
+version, so the extra info from git is unneeded.
+
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+---
+ scripts/setlocalversion | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/scripts/setlocalversion b/scripts/setlocalversion
+index e2b2d492ac13..4219a0ca1e62 100755
+--- a/scripts/setlocalversion
++++ b/scripts/setlocalversion
+@@ -113,22 +113,23 @@ if [ -z "${KERNELVERSION}" ]; then
+ exit 1
+ fi
+
+-res="${KERNELVERSION}"
+-
+ # localversion* files in the build and source directory
+-res="${res}$(collect_files localversion*)"
++file_localversion="$(collect_files localversion*)"
+ if test ! "$srctree" -ef .; then
+- res="$res$(collect_files "$srctree"/localversion*)"
++ file_localversion="${file_localversion}$(collect_files "$srctree"/localversion*)"
+ fi
+
+-# CONFIG_LOCALVERSION and LOCALVERSION (if set)
++# CONFIG_LOCALVERSION
+ config_localversion=$(sed -n 's/^CONFIG_LOCALVERSION=\(.*\)$/\1/p' include/config/auto.conf)
+-res="${res}${config_localversion}${LOCALVERSION}"
+
+ # scm version string if not at the kernel version tag
+-if grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
++if [ -n "${file_localversion}" ]; then
++ # If localversion* files exist (like in linux-next), the version is
++ # well specified. Do not append scm_version.
++ scm_version=
++elif grep -q "^CONFIG_LOCALVERSION_AUTO=y$" include/config/auto.conf; then
+ # full scm version string
+- res="$res$(scm_version)"
++ scm_version="$(scm_version)"
+ elif [ "${LOCALVERSION+set}" != "set" ]; then
+ # If the variable LOCALVERSION is not set, append a plus
+ # sign if the repository is not in a clean annotated or
+@@ -137,7 +138,7 @@ elif [ "${LOCALVERSION+set}" != "set" ]; then
+ #
+ # If the variable LOCALVERSION is set (including being set
+ # to an empty string), we don't want to append a plus sign.
+- res="$res$(scm_version --short)"
++ scm_version="$(scm_version --short)"
+ fi
+
+-echo "$res"
++echo "${KERNELVERSION}${file_localversion}${config_localversion}${LOCALVERSION}${scm_version}"
+--
+2.39.0.rc2.1.gbd5df96b79
+
diff --git a/PKGBUILD b/PKGBUILD
index d2cc221c25ad..85de283e8dcd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -62,6 +62,7 @@ _lucjanpath="https://gitlab.com/sirlucjan/kernel-patches/raw/master/${_lucjanver
source=("git://git.kernel.org/pub/scm/linux/kernel/git/next/${_srcname}.git"
"${_lucjanpath}/arch-patches/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch"
+ '0002-setlocalversion-do-not-append-git-commit-hash-if-loc.patch'
# the main kernel config files
'config')
@@ -287,4 +288,5 @@ done
sha512sums=('SKIP'
'3ccb02d9e7a09651351cf379aca5cb66a5402c8e9e890cfaebf8d869b82858eb7e1be5a49f8dcd918ebe4b70cfffd39f6591d30752d7e8c9d1d9bddfe70fb0fd'
+ 'e1570711e53ded89f3dbda989a027cb6b3178ce47bb152e22840430973f11303f5a4068792eaf9ee969ae40337ff0b0549ef5908d785cbec900a850e70547175'
'f1d1d414e0e3b04846bc17a6bf1d9c91d8a629a8ee5882c7aece723ce690ae899729937b9e15aefec63cf2f943eb8a00c5b0616c938cdc3994e755f0e2c57ac6')