085f826676a69bcce012023ce7296df9db70711c
Invoking %systemd_tmpfiles (in %post) without any arguments, while possible, will cause systemd-tmpfiles to process the entire system configuration, rather than just the newly installed configuration files. In https://github.com/systemd/systemd/pull/12048, it was established that processing everything constitutes unusual practice, and should be flagged as a mistake at build time. Furthermore, invoking %systemd_post without any arguments will cause the underlying `systemctl preset` to outright return an error ("Too few arguments") when run. This can be flagged during build time in the same manner. As I have found no ways to successfully nest %if clauses inside a macro[1], I am helping myself by reusing the recursive variable expansion technique pioneered in [2]. Now, when %systemd_post or %systemd_tmpfiles is incorrectly used, rpm gives accurate line number reporting, too: error: This macro requires some arguments error: line 11: %{systemd_post} error: This macro requires two arguments error: line 13: %{tmpfiles_create_package meh more more} [1] what has been tried: %{expand:%%if "%#" == 0 \\\ %%{error:you have given me %# args} \\\ %%endif} [2] http://git.savannah.gnu.org/cgit/automake.git/commit/?id=e0bd4af16da88e4c2c61bde42675660eff7dff51
systemd - System and Service Manager
Details
General information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
Languages
C
88.5%
Shell
5.7%
Python
4.6%
Meson
1.1%