summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/debian/hardlink-tests-known-failed.patch23
-rw-r--r--debian/patches/debian/lsfd-usrbin.patch21
-rw-r--r--debian/patches/debian/man-getopt-examples.patch23
-rw-r--r--debian/patches/debian/sensible-pager.patch22
-rw-r--r--debian/patches/debian/verbose-tests.patch45
-rw-r--r--debian/patches/series15
-rw-r--r--debian/patches/upstream/build-only-build-test_enosys-if-an-audit-arch-exists.patch84
-rw-r--r--debian/patches/upstream/cfdisk-fix-menu-behavior-after-writing-changes.patch38
-rw-r--r--debian/patches/upstream/enosys-fix-build-on-hppa.patch29
-rw-r--r--debian/patches/upstream/fadvise-test-don-t-compare-fincore-page-counts.patch67
-rw-r--r--debian/patches/upstream/fadvise-test-dynamically-calculate-expected-test-values.patch54
-rw-r--r--debian/patches/upstream/fadvise-test-test-with-64k-blocks.patch70
-rw-r--r--debian/patches/upstream/fadvise-tests-factor-out-calls-to-fincore.patch65
-rw-r--r--debian/patches/upstream/fincore-tests-also-use-nosize-error-file.patch25
-rw-r--r--debian/patches/upstream/fincore-tests-fix-double-log-output.patch41
-rw-r--r--debian/patches/upstream/setarch-add-riscv64-riscv32-support.patch26
16 files changed, 648 insertions, 0 deletions
diff --git a/debian/patches/debian/hardlink-tests-known-failed.patch b/debian/patches/debian/hardlink-tests-known-failed.patch
new file mode 100644
index 0000000..31ab6b6
--- /dev/null
+++ b/debian/patches/debian/hardlink-tests-known-failed.patch
@@ -0,0 +1,23 @@
+From: Chris Hofstaedtler <zeha@debian.org>
+Date: Tue, 12 Apr 2022 20:35:57 +0000
+Subject: hardlink tests: set known failed
+
+sha256 cannot be initialized on some archs / buildds.
+---
+ tests/ts/hardlink/options | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tests/ts/hardlink/options b/tests/ts/hardlink/options
+index 1000714..7cf9ff9 100755
+--- a/tests/ts/hardlink/options
++++ b/tests/ts/hardlink/options
+@@ -27,6 +27,9 @@ ts_check_prog xz
+ ts_check_prog tar
+ ts_check_prog wc
+
++# on some archs sha256 cannot be used
++TS_KNOWN_FAIL="yes"
++
+ SRCDIR="$TS_OUTDIR/testdir1"
+
+ create_srcdir()
diff --git a/debian/patches/debian/lsfd-usrbin.patch b/debian/patches/debian/lsfd-usrbin.patch
new file mode 100644
index 0000000..8ba6ffe
--- /dev/null
+++ b/debian/patches/debian/lsfd-usrbin.patch
@@ -0,0 +1,21 @@
+From: Chris Hofstaedtler <zeha@debian.org>
+Date: Thu, 14 Apr 2022 11:47:20 +0000
+Subject: Install lsfd into /usr/bin
+
+---
+ misc-utils/Makemodule.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am
+index 71548c9..67af544 100644
+--- a/misc-utils/Makemodule.am
++++ b/misc-utils/Makemodule.am
+@@ -248,7 +248,7 @@ hardlink_CFLAGS = $(AM_CFLAGS)
+ endif
+
+ if BUILD_LSFD
+-bin_PROGRAMS += lsfd
++usrbin_exec_PROGRAMS += lsfd
+ MANPAGES += misc-utils/lsfd.1
+ dist_noinst_DATA += misc-utils/lsfd.1.adoc
+ lsfd_SOURCES = \
diff --git a/debian/patches/debian/man-getopt-examples.patch b/debian/patches/debian/man-getopt-examples.patch
new file mode 100644
index 0000000..aac4a79
--- /dev/null
+++ b/debian/patches/debian/man-getopt-examples.patch
@@ -0,0 +1,23 @@
+From: Matthew Vernon <matthew@debian.org>
+Date: Tue, 6 Nov 2018 11:49:21 +0000
+Subject: util-linux: getopt(1) should point to where examples are on a Debian
+ system
+
+Debian BTS #913049
+---
+ misc-utils/getopt.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/misc-utils/getopt.1 b/misc-utils/getopt.1
+index 4921add..89adecf 100644
+--- a/misc-utils/getopt.1
++++ b/misc-utils/getopt.1
+@@ -155,7 +155,7 @@ In compatibility mode, leading \*(Aq\fB\-\fP\*(Aq and \*(Aq\fB+\fP\*(Aq characte
+ \fBgetopt\fP returns error code \fB0\fP for successful parsing, \fB1\fP if \fBgetopt\fP(3) returns errors, \fB2\fP if it does not understand its own parameters, \fB3\fP if an internal error occurs like out\-of\-memory, and \fB4\fP if it is called with \fB\-T\fP.
+ .SH "EXAMPLES"
+ .sp
+-Example scripts for (ba)sh and (t)csh are provided with the \fBgetopt\fP(1) distribution, and are installed in \fI/usr/share/doc/util\-linux\fP directory.
++Example scripts for (ba)sh and (t)csh are provided with the \fBgetopt\fP(1) distribution, and are installed in \fI/usr/share/doc/util\-linux/examples/\fP directory.
+ .SH "ENVIRONMENT"
+ .sp
+ \fBPOSIXLY_CORRECT\fP
diff --git a/debian/patches/debian/sensible-pager.patch b/debian/patches/debian/sensible-pager.patch
new file mode 100644
index 0000000..7c0ae6f
--- /dev/null
+++ b/debian/patches/debian/sensible-pager.patch
@@ -0,0 +1,22 @@
+From: Chris Hofstaedtler <zeha@debian.org>
+Date: Thu, 14 Jul 2022 09:54:01 +0000
+Subject: Use sensible-pager
+
+Closes: #1014368
+---
+ lib/pager.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/pager.c b/lib/pager.c
+index 9429032..f6dfd44 100644
+--- a/lib/pager.c
++++ b/lib/pager.c
+@@ -219,7 +219,7 @@ static void __setup_pager(void)
+ return;
+
+ if (!pager)
+- pager = "less";
++ pager = "sensible-pager";
+ else if (!*pager || !strcmp(pager, "cat"))
+ return;
+
diff --git a/debian/patches/debian/verbose-tests.patch b/debian/patches/debian/verbose-tests.patch
new file mode 100644
index 0000000..1dfc2da
--- /dev/null
+++ b/debian/patches/debian/verbose-tests.patch
@@ -0,0 +1,45 @@
+From: Andreas Henriksson <andreas@fatal.se>
+Date: Wed, 30 Jul 2014 14:28:17 +0200
+Subject: verbose-tests
+
+Enable verbose tests and print content of failing tests output file.
+---
+ tests/Makemodule.am | 2 +-
+ tests/functions.sh | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/tests/Makemodule.am b/tests/Makemodule.am
+index d5422be..a3462fb 100644
+--- a/tests/Makemodule.am
++++ b/tests/Makemodule.am
+@@ -13,7 +13,7 @@ clean-local-tests:
+
+ CLEAN_LOCALS += clean-local-tests
+
+-TESTS_OPTIONS = --nonroot --show-diff
++TESTS_OPTIONS = --nonroot --show-diff --verbose --parallel=1
+ TESTS_PARALLEL = --parallel
+ TESTS_COMMAND = $(top_srcdir)/tests/run.sh \
+ --srcdir=$(abs_top_srcdir) \
+diff --git a/tests/functions.sh b/tests/functions.sh
+index 5a562a3..493c1d7 100644
+--- a/tests/functions.sh
++++ b/tests/functions.sh
+@@ -183,6 +183,17 @@ function ts_failed_subtest {
+ ts_report " $msg ($1)"
+ fi
+
++ if [ "$TS_VERBOSE" = "yes" ]; then
++ echo ========= script: $TS_SCRIPT =================
++ echo ================= OUTPUT =====================
++ cat -n $TS_OUTPUT
++ echo ================= EXPECTED ===================
++ cat -n $TS_EXPECTED
++ echo ================= O/E diff ===================
++ diff -u $TS_OUTPUT $TS_EXPECTED
++ echo ==============================================
++ fi
++
+ return $ret
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..79a5537
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,15 @@
+debian/man-getopt-examples.patch
+debian/verbose-tests.patch
+debian/hardlink-tests-known-failed.patch
+debian/lsfd-usrbin.patch
+debian/sensible-pager.patch
+upstream/fincore-tests-fix-double-log-output.patch
+upstream/enosys-fix-build-on-hppa.patch
+upstream/fadvise-test-dynamically-calculate-expected-test-values.patch
+upstream/fadvise-tests-factor-out-calls-to-fincore.patch
+upstream/fadvise-test-don-t-compare-fincore-page-counts.patch
+upstream/fadvise-test-test-with-64k-blocks.patch
+upstream/setarch-add-riscv64-riscv32-support.patch
+upstream/cfdisk-fix-menu-behavior-after-writing-changes.patch
+upstream/fincore-tests-also-use-nosize-error-file.patch
+upstream/build-only-build-test_enosys-if-an-audit-arch-exists.patch
diff --git a/debian/patches/upstream/build-only-build-test_enosys-if-an-audit-arch-exists.patch b/debian/patches/upstream/build-only-build-test_enosys-if-an-audit-arch-exists.patch
new file mode 100644
index 0000000..0bb9992
--- /dev/null
+++ b/debian/patches/upstream/build-only-build-test_enosys-if-an-audit-arch-exists.patch
@@ -0,0 +1,84 @@
+From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Fri, 1 Dec 2023 09:35:02 +0100
+Subject: build: only build test_enosys if an audit arch exists
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Link: https://lore.kernel.org/util-linux/9211accf8670f28778166a1acdc186e8dd28f2e8.camel@physik.fu-berlin.de/
+Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
+---
+ configure.ac | 13 +++++++++++++
+ meson.build | 13 ++++++++-----
+ tests/helpers/Makemodule.am | 2 ++
+ 3 files changed, 23 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 36c24b4..c84d295 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1878,6 +1878,19 @@ UL_REQUIRES_LINUX([waitpid])
+ UL_REQUIRES_SYSCALL_CHECK([waitpid], [UL_CHECK_SYSCALL([pidfd_open])], [pidfd_open])
+ AM_CONDITIONAL([BUILD_WAITPID], [test "x$build_waitpid" = xyes])
+
++UL_BUILD_INIT([test_enosys], [check])
++UL_REQUIRES_LINUX([test_enosys])
++AS_IF([test "x$build_test_enosys" = xyes], [
++ AC_MSG_CHECKING([for valid audit arch])
++ AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM([[#include "${srcdir}/include/audit-arch.h"]])],
++ [AC_MSG_RESULT([yes])],
++ [AC_MSG_RESULT([no])
++ build_test_enosys=no
++ ])
++])
++AM_CONDITIONAL([BUILD_TEST_ENOSYS], [test "x$build_test_enosys" = xyes])
++
+ UL_BUILD_INIT([getopt], [yes])
+ AM_CONDITIONAL([BUILD_GETOPT], [test "x$build_getopt" = xyes])
+
+diff --git a/meson.build b/meson.build
+index baca755..b10028f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -3,6 +3,7 @@ project('util-linux', 'c',
+ meson_version: '>=0.57.0',
+ license : 'GPLv2+')
+
++fs = import('fs')
+ pkgconfig = import('pkgconfig')
+
+ libblkid_version = '1.1.0'
+@@ -3285,11 +3286,13 @@ if LINUX
+ exes += exe
+ endif
+
+-exe = executable(
+- 'test_enosys',
+- 'tests/helpers/test_enosys.c',
+- include_directories : includes)
+-exes += exe
++if cc.compiles(fs.read('include/audit-arch.h'), name : 'has AUDIT_ARCH_NATIVE')
++ exe = executable(
++ 'test_enosys',
++ 'tests/helpers/test_enosys.c',
++ include_directories : includes)
++ exes += exe
++endif
+
+ ############################################################
+
+diff --git a/tests/helpers/Makemodule.am b/tests/helpers/Makemodule.am
+index 2b1df3c..6705eaf 100644
+--- a/tests/helpers/Makemodule.am
++++ b/tests/helpers/Makemodule.am
+@@ -34,7 +34,9 @@ test_uuid_namespace_SOURCES = tests/helpers/test_uuid_namespace.c \
+ if LINUX
+ check_PROGRAMS += test_mkfds
+ test_mkfds_SOURCES = tests/helpers/test_mkfds.c
++endif
+
++if BUILD_TEST_ENOSYS
+ check_PROGRAMS += test_enosys
+ test_enosys_SOURCES = tests/helpers/test_enosys.c
+ endif
diff --git a/debian/patches/upstream/cfdisk-fix-menu-behavior-after-writing-changes.patch b/debian/patches/upstream/cfdisk-fix-menu-behavior-after-writing-changes.patch
new file mode 100644
index 0000000..71d466c
--- /dev/null
+++ b/debian/patches/upstream/cfdisk-fix-menu-behavior-after-writing-changes.patch
@@ -0,0 +1,38 @@
+From: Karel Zak <kzak@redhat.com>
+Date: Mon, 26 Jun 2023 13:25:11 +0200
+Subject: cfdisk: fix menu behavior after writing changes
+
+Florian wrote:
+ after a successful write, cfdisk remains on the "Write" cursor and
+ furthermore when navigating to "Quit" will continue to show
+ "...without writing changes", despite there were writes. This patch
+ addresses that.
+
+Based on patch from Florian Zimmermann <florian.zimmermann@gmail.com>
+
+Signed-off-by: Karel Zak <kzak@redhat.com>
+Closes: #927041
+---
+ disk-utils/cfdisk.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c
+index fde2029..3fe852a 100644
+--- a/disk-utils/cfdisk.c
++++ b/disk-utils/cfdisk.c
+@@ -2525,11 +2525,15 @@ static int main_menu_action(struct cfdisk *cf, int key)
+ if (rc)
+ warn = _("Failed to write disklabel.");
+ else {
++ size_t q_idx = 0;
++
+ if (cf->device_is_used)
+ fdisk_reread_changes(cf->cxt, cf->original_layout);
+ else
+ fdisk_reread_partition_table(cf->cxt);
+ info = _("The partition table has been altered.");
++ if (menu_get_menuitem_by_key(cf, 'q', &q_idx))
++ ui_menu_goto(cf, q_idx);
+ }
+ cf->nwrites++;
+ break;
diff --git a/debian/patches/upstream/enosys-fix-build-on-hppa.patch b/debian/patches/upstream/enosys-fix-build-on-hppa.patch
new file mode 100644
index 0000000..a4739f5
--- /dev/null
+++ b/debian/patches/upstream/enosys-fix-build-on-hppa.patch
@@ -0,0 +1,29 @@
+From: John David Anglin <dave@parisc-linux.org>
+Date: Mon, 7 Aug 2023 15:37:17 +0000
+Subject: enosys: fix build on hppa
+
+The following patch fixes the definition of SECCOMP_ARCH_NATIVE
+on hppa.
+
+Signed-off-by: John David Anglin <dave.anglin@bell.net>
+---
+ include/audit-arch.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/include/audit-arch.h b/include/audit-arch.h
+index db14560..679964f 100644
+--- a/include/audit-arch.h
++++ b/include/audit-arch.h
+@@ -59,6 +59,12 @@
+ # else
+ # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64
+ # endif
++#elif __hppa__
++# if __SIZEOF_POINTER__ == 4
++# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PARISC
++# else
++# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PARISC64
++# endif
+ #else
+ # error Unknown target architecture
+ #endif
diff --git a/debian/patches/upstream/fadvise-test-don-t-compare-fincore-page-counts.patch b/debian/patches/upstream/fadvise-test-don-t-compare-fincore-page-counts.patch
new file mode 100644
index 0000000..ef2801c
--- /dev/null
+++ b/debian/patches/upstream/fadvise-test-don-t-compare-fincore-page-counts.patch
@@ -0,0 +1,67 @@
+From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 21 May 2023 21:44:20 +0200
+Subject: 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 <thomas@t-8ch.de>
+---
+ 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 f2360b5..25f23e0 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 8869b7d..6c4298e 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"
+ }
+
+ {
diff --git a/debian/patches/upstream/fadvise-test-dynamically-calculate-expected-test-values.patch b/debian/patches/upstream/fadvise-test-dynamically-calculate-expected-test-values.patch
new file mode 100644
index 0000000..bd84ee5
--- /dev/null
+++ b/debian/patches/upstream/fadvise-test-dynamically-calculate-expected-test-values.patch
@@ -0,0 +1,54 @@
+From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 21 May 2023 21:42:14 +0200
+Subject: 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 <thomas@t-8ch.de>
+---
+ 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 7c7eee5..86c0d5b 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
diff --git a/debian/patches/upstream/fadvise-test-test-with-64k-blocks.patch b/debian/patches/upstream/fadvise-test-test-with-64k-blocks.patch
new file mode 100644
index 0000000..772784c
--- /dev/null
+++ b/debian/patches/upstream/fadvise-test-test-with-64k-blocks.patch
@@ -0,0 +1,70 @@
+From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 21 May 2023 21:45:10 +0200
+Subject: 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 <thomas@t-8ch.de>
+---
+ 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 25f23e0..e7bb26b 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 6c4298e..45dcb91 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/debian/patches/upstream/fadvise-tests-factor-out-calls-to-fincore.patch b/debian/patches/upstream/fadvise-tests-factor-out-calls-to-fincore.patch
new file mode 100644
index 0000000..a2ed7c3
--- /dev/null
+++ b/debian/patches/upstream/fadvise-tests-factor-out-calls-to-fincore.patch
@@ -0,0 +1,65 @@
+From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Sun, 21 May 2023 21:43:38 +0200
+Subject: 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 <thomas@t-8ch.de>
+---
+ 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 86c0d5b..8869b7d 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"
diff --git a/debian/patches/upstream/fincore-tests-also-use-nosize-error-file.patch b/debian/patches/upstream/fincore-tests-also-use-nosize-error-file.patch
new file mode 100644
index 0000000..80a1ef1
--- /dev/null
+++ b/debian/patches/upstream/fincore-tests-also-use-nosize-error-file.patch
@@ -0,0 +1,25 @@
+From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <thomas@t-8ch.de>
+Date: Mon, 13 Nov 2023 21:05:59 +0100
+Subject: fincore: (tests) also use nosize error file
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Link: https://lore.kernel.org/util-linux/b8cafd0d89878949705782312dfe800ec2779035.camel@physik.fu-berlin.de/
+Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
+---
+ tests/ts/fincore/count | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/ts/fincore/count b/tests/ts/fincore/count
+index c89ad9f..caf9c3a 100755
+--- a/tests/ts/fincore/count
++++ b/tests/ts/fincore/count
+@@ -107,6 +107,7 @@ if test -f "$TS_EXPECTED.$PAGE_SIZE"; then
+ OUT_COLUMNS="PAGES,SIZE,FILE"
+ else
+ TS_EXPECTED+=".nosize"
++ TS_EXPECTED_ERR+=".nosize"
+ OUT_COLUMNS="PAGES,FILE"
+ fi
+
diff --git a/debian/patches/upstream/fincore-tests-fix-double-log-output.patch b/debian/patches/upstream/fincore-tests-fix-double-log-output.patch
new file mode 100644
index 0000000..0cb738a
--- /dev/null
+++ b/debian/patches/upstream/fincore-tests-fix-double-log-output.patch
@@ -0,0 +1,41 @@
+From: Chris Hofstaedtler <zeha@debian.org>
+Date: Tue, 18 Jul 2023 23:34:51 +0200
+Subject: fincore: (tests) fix double log output
+
+The fincore tests call ts_log_both inside an output redirection of both stdout
+and stderr, leading to the ts_log_both output ending up twice in both stdout
+and stderr.
+Call ts_log_both before setting up the output redirection.
+
+Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
+---
+ tests/ts/fincore/count | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/ts/fincore/count b/tests/ts/fincore/count
+index ba5f6cd..c89ad9f 100755
+--- a/tests/ts/fincore/count
++++ b/tests/ts/fincore/count
+@@ -119,11 +119,11 @@ check_dd_fs_feat
+ INPUT=
+ input=
+
++ts_log_both "[ NO EXCITING FILE ]"
+ {
+ input=no_such_file
+ INPUT="${INPUT} ${input}"
+
+- ts_log_both "[ NO EXCITING FILE ]"
+ $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes --noheadings $input
+ footer "$?"
+ } >> $TS_OUTPUT 2>> $TS_ERRLOG
+@@ -220,8 +220,8 @@ input=
+ "oflag=append seek=$hole_count"
+ } >> $TS_OUTPUT 2>> $TS_ERRLOG
+
++ts_log_both "[ MULTIPLE FILES ]"
+ {
+- ts_log_both "[ MULTIPLE FILES ]"
+ $TS_CMD_FINCORE --output $OUT_COLUMNS --bytes $INPUT
+ footer "$?"
+ } >> $TS_OUTPUT 2>> $TS_ERRLOG
diff --git a/debian/patches/upstream/setarch-add-riscv64-riscv32-support.patch b/debian/patches/upstream/setarch-add-riscv64-riscv32-support.patch
new file mode 100644
index 0000000..c0daa0f
--- /dev/null
+++ b/debian/patches/upstream/setarch-add-riscv64-riscv32-support.patch
@@ -0,0 +1,26 @@
+From: Michal Biesek <michalbiesek@gmail.com>
+Date: Mon, 14 Aug 2023 02:37:45 +0200
+Subject: setarch: add riscv64/riscv32 support
+
+Signed-off-by: Michal Biesek <michalbiesek@gmail.com>
+---
+ sys-utils/setarch.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/sys-utils/setarch.c b/sys-utils/setarch.c
+index 1a255e4..0a6af83 100644
+--- a/sys-utils/setarch.c
++++ b/sys-utils/setarch.c
+@@ -270,6 +270,12 @@ static struct arch_domain *init_arch_domains(void)
+ {PER_LINUX32, "arm", "arm"},
+ {PER_LINUX, "arm64", "aarch64"},
+ {PER_LINUX, "aarch64", "aarch64"},
++#endif
++#if defined(__riscv)
++ {PER_LINUX32, "riscv32", "riscv32"},
++ {PER_LINUX32, "rv32", "riscv32"},
++ {PER_LINUX, "riscv64", "riscv64"},
++ {PER_LINUX, "rv64", "riscv64"},
+ #endif
+ /* place holder, will be filled up at runtime */
+ {-1, NULL, NULL},