-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Tue, 2018-01-30 at 09:49 +0000, Jonathan Wakely wrote:
On 30/01/18 10:04 +0100, Igor Gnatenko wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> For those who didn't check Change page since today's morning: Thanks to
> Jason
> Tibbits (tibbs) who proposed %ldconfig_scriptlets macro and its
> implementation.
>
> Now we have 4 macros you could use: %ldconfig, %ldconfig_post,
> %ldconfig_postun, %ldconfig_scriptlets.
>
> So long story short:
> * If you have %post -p /sbin/ldconfig and %postun -p /sbin/ldconfig,
> replace it
> with %ldconfig_scriptlets
> * If you have just one of those, replace it with %ldconfig_post or
> %ldconfig_postun accordingly
> * If you just call to /sbin/ldconfig from one of your scriptlets in shell,
> just
> replace it with %?ldconfig
>
> However, if you are not interested to support distro versions less than
> F28,
> then just remove scriptlets 😉 Although on F28+, those macro expand t
> o nothin
> g so it's just matter of having 1-2 additional lines in spec file.
Is there any way to use the macros for subpackages?
Sure!
The boost package has lots of subpackages that install shared libs,
so
each one does:
%post foo -p /sbin/ldconfig
%postun foo -p /sbin/ldconfig
%post bar -p /sbin/ldconfig
%postun bar -p /sbin/ldconfig
%ldconfig_scriptlets foo
%ldconfig_scriptlets bar
(Although for Boost we don't have a single spec file that works
for
all distro versions, so I can just remove them entirely in rawhide,
and keep them in older branches).
It also accepts -n, so %ldconfig_scriptlets -n foo-bar would work as well!
- --
- -Igor Gnatenko
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlpwQ6UACgkQaVcUvRu8
X0wPLRAAmzXRfDQuCLGeGTcUHajpXcThH/t6df0/gEN/RFRK2EygZSg9kDcmbBA0
hsPWjn8wFRUcWawGC7CbMEOWzPswjdsnikKs74YK2t4R7/HRCC1YnEeXRvP44ELg
20eaPOLmOG4DIPoEf4hldQKU8p/sI6udGt3npIHyYoWIci3e/yscLI83YxOvNuCU
QNNaFUng7zBQVoMKwdiIdh1vpwX0jazPUr7ZySS97zQepFUXmWT1ahj1055s5An9
Zl90UlnAjJU1KjrNT3PbglLl5V2bDcMmTBCoug3LFPxYVEPfeI1t1DSDB9rhec59
+tbdktX0LYE9mXzTGqQ4W00XjRVw1LGgj6+xQFLkJWtPcGt2EEB4TEiz2gXGJCLv
fu9BxZh9XNUCaxpIBGQziJpFjlap3Xb4OG6hG8+sndRZ6EVqbEF+DppTKdF7PoK8
leuKuD4eVnF3zNpIdmepPwJ9ASZDZfH7eKQhphblaMKSCuzK0RkxfFqitwMG1nz8
T9ehF2SL3g3kS9x7R+Hy8LsTI5Enc7QU8O0pEjmvvW0qyCIBpA4Zr7j3zWzA0jRl
ow07rMTLaqB8oX3+XvkPhmclPX22bjevQY/c8q1A5zRcy+oG3SouJ04NtbE5Gcka
y2mHVW/P3n1LcVrxOCc4CpbaQ9SI6/ylJf7UbNEr5j9BLtB29v0=
=bKQP
-----END PGP SIGNATURE-----