From ac759d82eba522f34ff08e26ce50df1399aff661 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Sat, 11 Jan 2025 11:23:25 +0000 Subject: [PATCH] fix(snap): fix 7zip path in ubuntu package --- snap/snapcraft.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b6986e3a..9ea4f328 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -26,7 +26,7 @@ parts: stage-snaps: - jq stage-packages: - - 7zip + - 7zip-standalone - chafa - fd-find - ffmpeg @@ -58,3 +58,17 @@ parts: - --prefix=/usr build-attributes: - enable-patchelf + + # This is a bit of hack to work around a bug in latest snapcraft. + # This should be done in `override-prime` of the `yazi` part, but doing + # so seems to disable the automatic ELF patching, meaning none of the bins + # work correctly! + # + # Ubuntu's /usr/bin/7zz is a simple bash wrapper that just exec's + # /usr/lib/7zip/7zz - this just shortcuts that and places the actual + # executable at $SNAP/usr/bin/7zz. + fix-7z: + after: [yazi] + plugin: nil + override-prime: | + mv $CRAFT_PRIME/usr/lib/7zip/7zz $CRAFT_PRIME/usr/bin/7zz