#441 Please recommend usage of RPM macros for sysctl and binfmt activation
Closed: Fixed None Opened 5 years ago by lennart.

I'd like the following recommendations for packages that drop in files into /usr/lib/sysctl.d/ and /usr/lib/binfmt.d/:

"If you install a sysctl configuration snippet foobar.conf into /usr/lib/sysctl.d/ please consider invoking in your %post section:

%sysctl_apply fooar.conf

This has the effect of activating the new file immediately, similar to what a system boot-up would do."


"If you install a binfmt configuration snippet waldo.conf into /usr/lib/binfmt.d/ please consider invoking in your %post section:

%binfmt_apply waldo.conf

This has the effect of registering your new binary fomrat into the kernel immediately, and not delay it until next boot."

Also see #439, for a similar macro for tmpfiles.d.

Oh, and while we are at, please consider recommending to please these snippets in %{_sysctldir} and %{_tmpfilesdir}.

Lennart's binfmt and sysctl macro usage, as a MUST, with macro definitions (+1:7, 0:0, -1:0)

Not sure we discussed where these would go, but I'm writing up all these tickets and decided to rename the tmpfiles.d section to "binfmt.d, sysctl.d and tmpfiles.d" and add the above information to it. Note that at least on my F20 systems there doesn't seem to be any definition of %{_binfmtdir} or the like, so I only referenced %{_sysctldir}.

Announcement text:

Guidelines were added for use of %{_sysctldir} (/usr/lib/sysctl.d) and /usr/lib/binfmt.d: https://fedoraproject.org/wiki/Packaging:Guidelines#binfmt.d.2C_sysctl.d_and_tmpfiles.d

Login to comment on this ticket.