From 118446cec5c687bce66c81bc36d6f256b180e6d8 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 2 Apr 2025 19:33:34 +0200 Subject: [PATCH] Add lp64d symlink to parent directory on riscv64 On RISCV we typically expect to have /usr/lib64/ directory. Some software is strict about it, and some actually falls back to /usr/lib64. We only support a single ABI - lp64d (the default one). We have it as a symlink back to the parent. That means /usr/lib64 and /usr/lib64/lpd64 both point to the same content. Resolves: RHEL-85871 Signed-off-by: David Abdurachmanov --- filesystem.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/filesystem.spec b/filesystem.spec index 25fbbf7..1245135 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -57,6 +57,9 @@ ln -snf usr/bin bin ln -snf usr/sbin sbin ln -snf usr/lib lib ln -snf usr/%{_lib} %{_lib} +%ifarch riscv64 +ln -snf . usr/%{_lib}/lp64d +%endif ln -snf ../run var/run ln -snf ../run/lock var/lock ln -snf usr/bin usr/lib/debug/bin @@ -152,6 +155,9 @@ posix.symlink("usr/%{_lib}", "/usr/lib/debug/%{_lib}") posix.symlink("../.dwz", "/usr/lib/debug/usr/.dwz") posix.symlink("usr/sbin", "/usr/lib/debug/sbin") posix.symlink("usr/%{_lib}", "/%{_lib}") +if "%{_arch}" == "riscv64" then + posix.symlink(".", "/usr/%{_lib}/lp64d") +end posix.mkdir("/run") posix.mkdir("/proc") posix.mkdir("/sys") @@ -241,11 +247,14 @@ end %ghost /usr/lib/debug/sbin %attr(555,root,root) /usr/lib/games %ifarch x86_64 ppc64 sparc64 s390x aarch64 ppc64le mips64 mips64el riscv64 -%attr(555,root,root) /usr/%{_lib} -%else -%attr(555,root,root) /usr/lib/bpf -%attr(555,root,root) /usr/lib/X11 -%attr(555,root,root) /usr/lib/pm-utils +%dir %attr(555,root,root) /usr/%{_lib} +%attr(555,root,root) /usr/%{_lib}/games +%endif +%attr(555,root,root) /usr/%{_lib}/bpf +%attr(555,root,root) /usr/%{_lib}/X11 +%attr(555,root,root) /usr/%{_lib}/pm-utils +%ifarch riscv64 +/usr/%{_lib}/lp64d %endif /usr/libexec /usr/local