public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/7zip] epel10: Respect %_prefix
Date: Mon, 15 Jun 2026 18:21:46 GMT	[thread overview]
Message-ID: <178154770631.1.10489053452390822050.rpms-7zip-97e37af60bde@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/7zip
            Branch : epel10
            Commit : 97e37af60bde0470561f02e257e42f7feb2c619f
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2026-02-10T22:40:32-05:00
            Stats  : +4/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/7zip/c/97e37af60bde0470561f02e257e42f7feb2c619f?branch=epel10

            Log:
            Respect %_prefix

For example, when built for flatpaks, the /app prefix is used.

---
diff --git a/7zip-find-so-in-libexec.diff b/7zip-find-so-in-libexec.diff
index f63e141..bcb6845 100644
--- a/7zip-find-so-in-libexec.diff
+++ b/7zip-find-so-in-libexec.diff
@@ -8,8 +8,8 @@ index 7fe18fb..4b79e2d 100644
    s = fas2fs(g_ModuleDirPrefix);
 -  if (s.IsEmpty())
 -    s = FTEXT(".") FSTRING_PATH_SEPARATOR;
-+  if (s.IsEmpty() || s.IsPrefixedBy("/usr/bin"))
-+    s = FTEXT("/usr/libexec/7zip") FSTRING_PATH_SEPARATOR;
++  if (s.IsEmpty() || s.IsPrefixedBy("__Z7_PREFIX__/bin"))
++    s = FTEXT("__Z7_PREFIX__/libexec/7zip") FSTRING_PATH_SEPARATOR;
    return s;
    /*
    setenv("_7ZIP_HOME_DIR", "/test/", 0);

diff --git a/7zip.spec b/7zip.spec
index 53cfad2..873a7dc 100644
--- a/7zip.spec
+++ b/7zip.spec
@@ -80,6 +80,8 @@ Summary:        Standalone version of 7-Zip console that supports all formats
 
 # avoid failures due to new warnings in latest GCC
 sed -i -e 's|-Werror||' CPP/7zip/7zip_gcc.mak
+# from 7zip-find-so-in-libexec.diff
+sed -i -e 's|__Z7_PREFIX__|%{_prefix}|g' CPP/7zip/UI/Common/ArchiveCommandLine.cpp
 
 
 %build

                 reply	other threads:[~2026-06-15 18:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178154770631.1.10489053452390822050.rpms-7zip-97e37af60bde@fedoraproject.org \
    --to=yselkowi@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox