summaryrefslogtreecommitdiffstats
path: root/debian/patches/upstream
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/upstream')
-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
10 files changed, 499 insertions, 0 deletions
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},