diff --git a/2251.patch b/2251.patch new file mode 100644 index 0000000000000000000000000000000000000000..f625932baf5336c940ce1bdefa2bfca235379a8f --- /dev/null +++ b/2251.patch @@ -0,0 +1,264 @@ +From 8b36444f447949c3ab477f2c43b45a94c30ee7bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:42:14 +0200 +Subject: [PATCH 1/4] fadvise: (test) dynamically calculate expected test + values +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Thomas Weißschuh +--- + tests/ts/fadvise/drop | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 7c7eee5dc2..86c0d5b0a3 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -16,7 +16,7 @@ ts_check_prog "sleep" + ts_cd "$TS_OUTDIR" + + FILE="ddtest" +-BS=4k ++BS=4096 + COUNT=8 + + FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")" +@@ -41,22 +41,22 @@ create_file() { + echo + + create_file +- echo "offset: 8192" +- "$TS_CMD_FADVISE" -o 8192 "$FILE" ++ echo "offset: $(( 2 * $BS ))" ++ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE" + echo status: $? + "$TS_CMD_FINCORE" "$FILE" + echo + + create_file +- echo "length: 16384" +- "$TS_CMD_FADVISE" -l 16384 "$FILE" ++ echo "length: $(( 4 * $BS ))" ++ "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE" + echo status: $? + "$TS_CMD_FINCORE" "$FILE" + echo + + create_file +- echo "offset: 8192, length: 16384 fd: 42" +- "$TS_CMD_FADVISE" -o 8192 -l 16384 --fd 42 42<"$FILE" ++ echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42" ++ "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE" + echo status: $? + "$TS_CMD_FINCORE" "$FILE" + echo + +From e5009e773fc801eca887dd43b721cd1b1aa327be Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:43:38 +0200 +Subject: [PATCH 2/4] fadvise: (tests) factor out calls to "fincore" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This will make it easier to pass argument later. + +Signed-off-by: Thomas Weißschuh +--- + tests/ts/fadvise/drop | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 86c0d5b0a3..8869b7da4d 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -28,37 +28,41 @@ create_file() { + dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null + } + ++do_fincore() { ++ "$TS_CMD_FINCORE" "$FILE" ++} ++ + { + create_file +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "whole file" + "$TS_CMD_FADVISE" "$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "offset: $(( 2 * $BS ))" + "$TS_CMD_FADVISE" -o $(( 2 * $BS )) "$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "length: $(( 4 * $BS ))" + "$TS_CMD_FADVISE" -l $(( 4 * $BS )) "$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + create_file + echo "offset: $(( 2 * $BS )), length: $(( 4 * $BS )) fd: 42" + "$TS_CMD_FADVISE" -o $(( 2 * $BS )) -l $(( 4 * $BS )) --fd 42 42<"$FILE" + echo status: $? +- "$TS_CMD_FINCORE" "$FILE" ++ do_fincore + echo + + rm "$FILE" + +From 33980996d0b429fc59c40f8352633c0a21a0f96a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:44:20 +0200 +Subject: [PATCH 3/4] fadvise: (test) don't compare fincore page counts +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These depend on the machines pagesize and are therefore not a good +comparision. + +Signed-off-by: Thomas Weißschuh +--- + tests/expected/fadvise/drop | 20 ++++++++++---------- + tests/ts/fadvise/drop | 2 +- + 2 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop +index f2360b56fb..25f23e050a 100644 +--- a/tests/expected/fadvise/drop ++++ b/tests/expected/fadvise/drop +@@ -1,23 +1,23 @@ +- RES PAGES SIZE FILE +- 32K 8 32K ddtest ++ RES SIZE FILE ++ 32K 32K ddtest + + whole file + status: 0 +-RES PAGES SIZE FILE +- 0B 0 32K ddtest ++RES SIZE FILE ++ 0B 32K ddtest + + offset: 8192 + status: 0 +-RES PAGES SIZE FILE +- 8K 2 32K ddtest ++RES SIZE FILE ++ 8K 32K ddtest + + length: 16384 + status: 0 +- RES PAGES SIZE FILE +- 16K 4 32K ddtest ++ RES SIZE FILE ++ 16K 32K ddtest + + offset: 8192, length: 16384 fd: 42 + status: 0 +- RES PAGES SIZE FILE +- 16K 4 32K ddtest ++ RES SIZE FILE ++ 16K 32K ddtest + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 8869b7da4d..6c4298e872 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -29,7 +29,7 @@ create_file() { + } + + do_fincore() { +- "$TS_CMD_FINCORE" "$FILE" ++ "$TS_CMD_FINCORE" -o RES,SIZE,FILE "$FILE" + } + + { + +From c0f31b79f5d1c665cdc057fb32f4d161d28aa5b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= +Date: Sun, 21 May 2023 21:45:10 +0200 +Subject: [PATCH 4/4] fadvise: (test) test with 64k blocks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This will allow the tests to also pass on systems with 64k pagesizes. + +Closes #2249 +Signed-off-by: Thomas Weißschuh +--- + tests/expected/fadvise/drop | 26 +++++++++++++------------- + tests/ts/fadvise/drop | 2 +- + 2 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/tests/expected/fadvise/drop b/tests/expected/fadvise/drop +index 25f23e050a..e7bb26b6e2 100644 +--- a/tests/expected/fadvise/drop ++++ b/tests/expected/fadvise/drop +@@ -1,23 +1,23 @@ +- RES SIZE FILE +- 32K 32K ddtest ++ RES SIZE FILE ++ 512K 512K ddtest + + whole file + status: 0 +-RES SIZE FILE +- 0B 32K ddtest ++RES SIZE FILE ++ 0B 512K ddtest + +-offset: 8192 ++offset: 131072 + status: 0 +-RES SIZE FILE +- 8K 32K ddtest ++ RES SIZE FILE ++ 128K 512K ddtest + +-length: 16384 ++length: 262144 + status: 0 +- RES SIZE FILE +- 16K 32K ddtest ++ RES SIZE FILE ++ 256K 512K ddtest + +-offset: 8192, length: 16384 fd: 42 ++offset: 131072, length: 262144 fd: 42 + status: 0 +- RES SIZE FILE +- 16K 32K ddtest ++ RES SIZE FILE ++ 256K 512K ddtest + +diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop +index 6c4298e872..45dcb9110b 100755 +--- a/tests/ts/fadvise/drop ++++ b/tests/ts/fadvise/drop +@@ -16,7 +16,7 @@ ts_check_prog "sleep" + ts_cd "$TS_OUTDIR" + + FILE="ddtest" +-BS=4096 ++BS=65536 + COUNT=8 + + FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")" diff --git a/util-linux-2.38.1-harlink-test.patch b/util-linux-2.38.1-harlink-test.patch deleted file mode 100644 index 29b252399a76e56df05b5748022fac1823538651..0000000000000000000000000000000000000000 --- a/util-linux-2.38.1-harlink-test.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 1b5fc3fe13947baab133bd426f3377e2eb5ccc90 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Wed, 8 Jun 2022 11:50:04 +0200 -Subject: [PATCH] tests: (hardlink) remove runtime depend output - -The Method: field depends on kernel crypto support, otherwise hardlink -falls back to memcpy(). - -Fixes: https://github.com/util-linux/util-linux/issues/1710 -Signed-off-by: Karel Zak ---- - .../expected/hardlink/options-maximum-size-8191 | 2 +- - .../expected/hardlink/options-maximum-size-8192 | 2 +- - tests/ts/hardlink/options | 16 ++++++++++++---- - 3 files changed, 14 insertions(+), 6 deletions(-) - -diff --git a/tests/expected/hardlink/options-maximum-size-8191 b/tests/expected/hardlink/options-maximum-size-8191 -index 30fe1acad4..d57c92ae94 100644 ---- a/tests/expected/hardlink/options-maximum-size-8191 -+++ b/tests/expected/hardlink/options-maximum-size-8191 -@@ -1,6 +1,6 @@ - Number of test files: 26 - Mode: real --Method: sha256 -+Method: [Redacted] - Files: 26 - Linked: 0 files - Compared: 0 xattrs -diff --git a/tests/expected/hardlink/options-maximum-size-8192 b/tests/expected/hardlink/options-maximum-size-8192 -index 723811e9ee..c571adf52d 100644 ---- a/tests/expected/hardlink/options-maximum-size-8192 -+++ b/tests/expected/hardlink/options-maximum-size-8192 -@@ -1,6 +1,6 @@ - Number of test files: 26 - Mode: real --Method: sha256 -+Method: [Redacted] - Files: 26 - Linked: 18 files - Compared: 0 xattrs -diff --git a/tests/ts/hardlink/options b/tests/ts/hardlink/options -index fc1a0d6525..2a1c919a28 100755 ---- a/tests/ts/hardlink/options -+++ b/tests/ts/hardlink/options -@@ -40,6 +40,14 @@ show_srcdir() - find "$SRCDIR" -type f -printf "%P\t%n\t%s\t%Ts\t%m\n" | sort - } - -+summary_clean() -+{ -+ sed -i \ -+ -e 's/^Duration:.*/Duration: [Redacted]/' \ -+ -e 's/^Method:.*/Method: [Redacted]/' \ -+ $TS_OUTPUT -+} -+ - create_srcdir - - ts_init_subtest "orig" # just list original dir -@@ -80,16 +88,16 @@ ts_finalize_subtest - ts_init_subtest "maximum-size-8191" - create_srcdir - echo "Number of test files: $(find "$SRCDIR" -type f | wc -l)" >> $TS_OUTPUT --$TS_CMD_HARDLINK --maximum-size 8191 "$SRCDIR" | \ -- sed 's/^Duration:.*/Duration: [Redacted]/' >> $TS_OUTPUT 2>> $TS_ERRLOG -+$TS_CMD_HARDLINK --maximum-size 8191 "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG -+summary_clean - show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG - ts_finalize_subtest - - ts_init_subtest "maximum-size-8192" - create_srcdir - echo "Number of test files: $(find "$SRCDIR" -type f | wc -l)" >> $TS_OUTPUT --$TS_CMD_HARDLINK --maximum-size 8192 "$SRCDIR" | \ -- sed 's/^Duration:.*/Duration: [Redacted]/' >> $TS_OUTPUT 2>> $TS_ERRLOG -+$TS_CMD_HARDLINK --maximum-size 8192 "$SRCDIR" >> $TS_OUTPUT 2>> $TS_ERRLOG -+summary_clean - show_srcdir >> $TS_OUTPUT 2>> $TS_ERRLOG - ts_finalize_subtest - diff --git a/util-linux-2.38.1.tar.xz b/util-linux-2.39.2.tar.xz similarity index 48% rename from util-linux-2.38.1.tar.xz rename to util-linux-2.39.2.tar.xz index e99a8156eebf5538d69205a3ce720e730ce144dd..4a84420b4c0966dc628ecdc5ff03036dc7a033e4 100644 Binary files a/util-linux-2.38.1.tar.xz and b/util-linux-2.39.2.tar.xz differ diff --git a/util-linux-disable-conflict-man-pages.patch b/util-linux-disable-conflict-man-pages.patch new file mode 100644 index 0000000000000000000000000000000000000000..427fca91c0b2f2061bdd00575f9a544a269f5439 --- /dev/null +++ b/util-linux-disable-conflict-man-pages.patch @@ -0,0 +1,16 @@ +--- util-linux-2.39.1/po-man/po4a.cfg.orig 2023-07-31 12:35:59.261051700 +0800 ++++ util-linux-2.39.1/po-man/po4a.cfg 2023-07-31 12:36:29.365355000 +0800 +@@ -50,13 +50,11 @@ + [type:asciidoc] ../login-utils/last.1.adoc $lang:$lang/last.1.adoc + [type:asciidoc] ../login-utils/login.1.adoc $lang:$lang/login.1.adoc + [type:asciidoc] ../login-utils/lslogins.1.adoc $lang:$lang/lslogins.1.adoc +-[type:asciidoc] ../login-utils/newgrp.1.adoc $lang:$lang/newgrp.1.adoc + [type:asciidoc] ../login-utils/nologin.8.adoc $lang:$lang/nologin.8.adoc + [type:asciidoc] ../login-utils/runuser.1.adoc $lang:$lang/runuser.1.adoc + [type:asciidoc] ../login-utils/su.1.adoc $lang:$lang/su.1.adoc + [type:asciidoc] ../login-utils/sulogin.8.adoc $lang:$lang/sulogin.8.adoc + [type:asciidoc] ../login-utils/utmpdump.1.adoc $lang:$lang/utmpdump.1.adoc +-[type:asciidoc] ../login-utils/vipw.8.adoc $lang:$lang/vipw.8.adoc + + [type:asciidoc] ../misc-utils/blkid.8.adoc $lang:$lang/blkid.8.adoc + [type:asciidoc] ../misc-utils/cal.1.adoc $lang:$lang/cal.1.adoc diff --git a/util-linux.spec b/util-linux.spec index d0341f4f770350d78f911a99f1dd120b67428ea4..470ce0ced76af3b16194b78c50d0b13e6ef6d2e9 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -1,10 +1,10 @@ %define anolis_release 1 -%global upstream_version 2.38.1 -%global major_version v2.38 +%global upstream_version 2.39.2 +%global major_version v2.39 %global compldir %{_datadir}/bash-completion/completions/ Name: util-linux -Version: 2.38.1 +Version: 2.39.2 Release: %{anolis_release}%{?dist} Summary: Collection of basic system utilities @@ -20,8 +20,10 @@ Source12: util-linux-su.pamd Source13: util-linux-su-l.pamd Source14: util-linux-runuser.pamd Source15: util-linux-runuser-l.pamd -# https://github.com/util-linux/util-linux/commit/1b5fc3fe13947baab133bd426f3377e2eb5ccc90.patch -Patch0: util-linux-2.38.1-harlink-test.patch +# https://github.com/util-linux/util-linux/pull/2251 +Patch0: https://patch-diff.githubusercontent.com/raw/util-linux/util-linux/pull/2251.patch +# Disable conflicts man pages with shadow-utils +Patch1: util-linux-disable-conflict-man-pages.patch BuildRequires: make BuildRequires: audit-libs-devel @@ -39,11 +41,8 @@ Buildrequires: libuser-devel BuildRequires: libcap-ng-devel BuildRequires: python3-devel BuildRequires: gcc -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: bison BuildRequires: rubygem-asciidoctor +BuildRequires: po4a Provides: /sbin/nologin Provides: /sbin/findfs @@ -247,8 +246,6 @@ chfn and chsh utilities with dependence on libuser %autosetup -n %{name}-%{upstream_version} -p1 %build -./autogen.sh - export CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $RPM_OPT_FLAGS" export SUID_CFLAGS="-fpie" export SUID_LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" @@ -278,7 +275,7 @@ export DAEMON_LDFLAGS="$SUID_LDFLAGS" %make_build %check -make check +make check "TESTS_PARALLEL=--parallel=1" %install @@ -319,7 +316,7 @@ ln -sf ../proc/self/mounts %{buildroot}/etc/mtab rm -f $RPM_BUILD_ROOT%{_libdir}/lib{uuid,blkid,mount,smartcols,fdisk}.a rm -f $RPM_BUILD_ROOT%{compldir}/{mount,umount} -%find_lang %name +%find_lang %name --all-name --with-man mv %{name}.lang %{name}.files @@ -389,6 +386,7 @@ fi %{_bindir}/eject %{_bindir}/fallocate %{_bindir}/fincore +%{_bindir}/fadvise %{_bindir}/getopt %{_bindir}/hexdump %{_bindir}/irqtop @@ -408,6 +406,7 @@ fi %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/namei +%{_bindir}/pipesz %{_bindir}/prlimit %{_bindir}/rename %{_bindir}/rev @@ -422,6 +421,7 @@ fi %{_bindir}/utmpdump %{_bindir}/uuidgen %{_bindir}/uuidparse +%{_bindir}/waitpid %{_bindir}/wall %{_bindir}/wdctl %{_bindir}/whereis @@ -432,6 +432,7 @@ fi %{_mandir}/man1/colrm.1* %{_mandir}/man1/column.1* %{_mandir}/man1/eject.1* +%{_mandir}/man1/fadvise.1* %{_mandir}/man1/fallocate.1* %{_mandir}/man1/fincore.1* %{_mandir}/man1/getopt.1* @@ -450,6 +451,7 @@ fi %{_mandir}/man1/mcookie.1* %{_mandir}/man1/mesg.1* %{_mandir}/man1/namei.1* +%{_mandir}/man1/pipesz.1* %{_mandir}/man1/prlimit.1* %{_mandir}/man1/rename.1* %{_mandir}/man1/rev.1* @@ -465,6 +467,7 @@ fi %{_mandir}/man1/utmpdump.1.* %{_mandir}/man1/uuidgen.1* %{_mandir}/man1/uuidparse.1* +%{_mandir}/man1/waitpid.1* %{_mandir}/man1/wall.1* %{_mandir}/man1/whereis.1* %{_mandir}/man1/write.1* @@ -472,6 +475,7 @@ fi %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/addpart.8* %{_mandir}/man8/blkdiscard.8* +%{_mandir}/man8/blkpr.8* %{_mandir}/man8/blkzone.8* %{_mandir}/man8/chcpu.8* %{_mandir}/man8/chmem.8* @@ -505,6 +509,7 @@ fi %{_mandir}/man8/zramctl.8* %{_sbindir}/addpart %{_sbindir}/blkdiscard +%{_sbindir}/blkpr %{_sbindir}/blkzone %{_sbindir}/chcpu %{_sbindir}/ctrlaltdel @@ -544,6 +549,7 @@ fi %{compldir}/ctrlaltdel %{compldir}/delpart %{compldir}/eject +%{compldir}/fadvise %{compldir}/fallocate %{compldir}/fdisk %{compldir}/fincore @@ -574,6 +580,7 @@ fi %{compldir}/mkfs.cramfs %{compldir}/mkfs.minix %{compldir}/namei +%{compldir}/pipesz %{compldir}/pivot_root %{compldir}/prlimit %{compldir}/readprofile @@ -596,6 +603,7 @@ fi %{compldir}/utmpdump %{compldir}/uuidgen %{compldir}/uuidparse +%{compldir}/waitpid %{compldir}/wall %{compldir}/wdctl %{compldir}/whereis @@ -799,6 +807,9 @@ fi %{python3_sitearch}/libmount %changelog +* Thu Aug 17 2023 Funda Wang - 2.39.2-1 +- New version 2.39.2 + * Thu Dec 1 2022 Funda Wang - 2.38.1-1 - New version 2.38.1