public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/7zip] rawhide: Handle /bin/7z when locating the libexec plugin
@ 2026-06-15 15:56 Byoungchan Lee
  0 siblings, 0 replies; only message in thread
From: Byoungchan Lee @ 2026-06-15 15:56 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/7zip
            Branch : rawhide
            Commit : 6bfdf817e90beb47fde04e709d7eb37c27e39c0b
            Author : Byoungchan Lee <byoungchan.lee@gmx.com>
            Date   : 2026-05-17T15:57:31+09:00
            Stats  : +4/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/7zip/c/6bfdf817e90beb47fde04e709d7eb37c27e39c0b?branch=rawhide

            Log:
            Handle /bin/7z when locating the libexec plugin

Fedora installs the 7zip codec plugin under /usr/libexec/7zip and
patches 7z to load it from there. The patch handled /usr/bin, but not
/bin.

On merged-/usr systems, /bin/7z and /usr/bin/7z are the same file, but
7z derives its module directory from argv[0]. Invoking it as /bin/7z
therefore tried to load /bin/7z.so and could fail with:

  ERROR:
  Unsupported archive type

Treat /bin as an installed frontend path too, so it uses the same
/usr/libexec/7zip plugin directory as /usr/bin.

---
diff --git a/7zip-find-so-in-libexec.diff b/7zip-find-so-in-libexec.diff
index bcb6845..1e8fd71 100644
--- a/7zip-find-so-in-libexec.diff
+++ b/7zip-find-so-in-libexec.diff
@@ -2,13 +2,15 @@ diff --git a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp b/CPP/7zip/UI/Common/Arch
 index 7fe18fb..4b79e2d 100644
 --- a/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
 +++ b/CPP/7zip/UI/Common/ArchiveCommandLine.cpp
-@@ -1780,8 +1780,8 @@ FString GetModuleDirPrefix()
+@@ -1780,8 +1780,10 @@ FString GetModuleDirPrefix()
    FString s;
  
    s = fas2fs(g_ModuleDirPrefix);
 -  if (s.IsEmpty())
 -    s = FTEXT(".") FSTRING_PATH_SEPARATOR;
-+  if (s.IsEmpty() || s.IsPrefixedBy("__Z7_PREFIX__/bin"))
++  if (s.IsEmpty() ||
++      s.IsPrefixedBy("__Z7_PREFIX__/bin/") ||
++      s.IsPrefixedBy("/bin/"))
 +    s = FTEXT("__Z7_PREFIX__/libexec/7zip") FSTRING_PATH_SEPARATOR;
    return s;
    /*

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-15 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 15:56 [rpms/7zip] rawhide: Handle /bin/7z when locating the libexec plugin Byoungchan Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox