-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On Sat, 2018-02-17 at 07:08 +0100, Remi Collet wrote:
Le 16/02/2018 à 15:18, Mark Wielaard a écrit :
I had to tweak it a little though so the spec could still be build older RHEL or Fedora (I reuse the spec to build on RHEL and with SCL). Maybe something like the following is better for people who have a spec file they might reuse on systems that might not have this macro:
# Only the latest Fedora and EPEL have these scriptlets, # older, or not up to date, Fedora and plain RHEL don't. %if 0%{?ldconfig_scriptlets:1} %ldconfig_scriptlets libs %ldconfig_scriptlets libelf %else %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %post libelf -p /sbin/ldconfig %postun libelf -p /sbin/ldconfig %endif
Even simpler
%if 0%{?fedora} < 28 %post libs -p /sbin/ldconfig %postun libs - p /sbin/ldconfig %post libelf -p /sbin/ldconfig %postun libelf -p /sbin/ldconfig %endif
This is wrong because. This macro is defined on all EPEL and Fedora, so Mark's way is correct (almost).
Because the ldconfig_scriptlets stuff only work in koji, not in other build system (brew, cbs, ...)
This is not a problem for Fedora. - -- - -Igor Gnatenko