%_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.
Man pages are usually compressed and gets the .gz extension when
rpmbuild invokes /usr/lib/rpm/brp-compress . But even though %_mandir is
%{_datadir}/man and %_datadir is %{_prefix}/share , brp-compress isn't
informed about the actual _prefix and will always only process /usr .
That seems like a bug. For now, we will work around it.
Building with custom _prefix seems to be essentially what flatpak is
doing, but I don't know if that is an actual problem there. Being able
to build with a custom _prefix seems like a fine goal anyway. It is not
a problem to relax the globs.
This is also documented on
https://docs.fedoraproject.org/en-US/flatpak/troubleshooting/#_uncompressed_manual_pages .
Fix rpmlint issues:
E: env-script-interpreter /usr/share/doc/mercurial/hgweb.cgi /usr/bin/env python3
E: env-script-interpreter /usr/share/doc/mercurial/hgweb.fcgi /usr/bin/env python3
Also be more explicit about which cgi files we ship as documentation.
Address rpmlint problems:
E: summary-too-long A fast client for Mercurial command server running on Unix. It saves time of slow Python startup.
W: summary-ended-with-dot A fast client for Mercurial command server running on Unix. It saves time of slow Python startup.