From b94d33fc2ff17c72dd78b0d385700badc6d61cab Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 11 Oct 2023 12:09:39 -0400 Subject: [PATCH] Use %_prefix when installing chg %_prefix is usually /usr . But it is a "thing" to build with a custom %_prefix, and that should put all/most files under that prefix instead of /usr . Other macros like %_mandir will change accordingly. There is also %_usr , but that is apparently a pointless macro that always is /usr . We should avoid using %_usr, and use %_prefix instead. Flatpak builds set a custom %_prefix, and when chg was installed into %_usr/bin it failed as described on https://docs.fedoraproject.org/en-US/flatpak/troubleshooting/#_files_outside_of_app . Change the spec to install chg in %_prefix/bin . This change was isolated and documented (and obfuscated?) by Mads Kiilerich. --- mercurial.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mercurial.spec b/mercurial.spec index dabf847..d287bd3 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -197,7 +197,7 @@ done popd pushd contrib/chg -make install DESTDIR=%{buildroot} PREFIX=%{_usr} MANDIR=%{_mandir}/man1 +make install DESTDIR=%{buildroot} PREFIX=%{_prefix} MANDIR=%{_mandir}/man1 popd