From 77f0f17c86b4a5adc023691e90d710247e9565ff Mon Sep 17 00:00:00 2001 From: Liquor <1692257904@qq.com> Date: Thu, 17 Dec 2020 15:43:46 +0800 Subject: [PATCH] Add check to resolve uname26-version test failed --- ...-resolve-uname26-version-test-failed.patch | 34 +++++++++++++++++++ util-linux.spec | 10 +++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 Add-check-to-resolve-uname26-version-test-failed.patch diff --git a/Add-check-to-resolve-uname26-version-test-failed.patch b/Add-check-to-resolve-uname26-version-test-failed.patch new file mode 100644 index 0000000..193c6ed --- /dev/null +++ b/Add-check-to-resolve-uname26-version-test-failed.patch @@ -0,0 +1,34 @@ +From 72466ac801928c205604b99fe01f830809bda930 Mon Sep 17 00:00:00 2001 +From: Liquor +Date: Thu, 17 Dec 2020 15:04:56 +0800 +Subject: [PATCH] Add check to resolve uname26-version test failed + +The uname command is modified in packages uname-build-checks, +but the uname26-version test case needs to use the uname -r query +result.As a result,the test fails. +So we add a judgment to check whether uname-build-checks is installed. +--- + tests/ts/misc/setarch | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/tests/ts/misc/setarch b/tests/ts/misc/setarch +index 7c99cca..25d02c1 100755 +--- a/tests/ts/misc/setarch ++++ b/tests/ts/misc/setarch +@@ -77,7 +77,12 @@ ts_finalize_subtest "$finmsg" + # conditional subtest + if [ "$uname26_seems_supported" = "yes" ]; then + ts_init_subtest uname26-version +- tmp=$($TS_CMD_SETARCH $ARCH --uname-2.6 uname -r) ++ rpm -qa | grep -q "uname-build-checks" ++ if [ $? -eq 0 ]; then ++ tmp=$($TS_CMD_SETARCH $ARCH --uname-2.6 uname.bin -r) ++ else ++ tmp=$($TS_CMD_SETARCH $ARCH --uname-2.6 uname -r) ++ fi + if echo "$tmp" | grep -q "^2\.6\."; then + echo "kernel version changed to 2.6" >> $TS_OUTPUT + else +-- +2.27.0 + diff --git a/util-linux.spec b/util-linux.spec index 2b8d4b3..102675f 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -3,7 +3,7 @@ Name: util-linux Version: 2.36 -Release: 2 +Release: 3 Summary: A random collection of Linux utilities License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git @@ -39,6 +39,8 @@ Patch0: 2.36-login-lastlog-create.patch Patch1: 0001-libfdisk-fix-last-free-sector-detection-if-partition.patch Patch2: Do-not-excute-Utmp-testcases.patch +Patch9000: Add-check-to-resolve-uname26-version-test-failed.patch + %description The util-linux package contains a random collection of files that implements some low-level basic linux utilities. @@ -385,6 +387,12 @@ fi %{_mandir}/man8/{swapoff.8*,swapon.8*,switch_root.8*,umount.8*,wdctl.8.gz,wipefs.8*,zramctl.8*} %changelog +* Thu Dec 17 2020 Liquor - 2.36-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Add check to resolve uname26-version test failed + * Sun Nov 28 2020 yangzhuangzhuang - 2.36-2 - Type:enhancement - ID:NA