From 6d825ab2d42d3219e49a192bf99f9c09134a0df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 22 Jul 2021 11:22:33 +0200 Subject: rpm: use a helper script to actually invoke systemctl commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of embedding the commands to invoke directly in the macros, let's use a helper script as indirection. This has a couple of advantages: - the macro language is awkward, we need to suffix most commands by "|| :" and "\", which is easy to get wrong. In the new scheme, the macro becomes a single simple command. - in the script we can use normal syntax highlighting, shellcheck, etc. - it's also easier to test the invoked commands by invoking the helper manually. - most importantly, the logic is contained in the helper, i.e. we can update systemd rpm and everything uses the new helper. Before, we would have to rebuild all packages to update the macro definition. This raises the question whether it makes sense to use the lua scriptlets when the real work is done in a bash script. I think it's OK: we still have the efficient lua scripts that do the short scripts, and we use a single shared implementation in bash to do the more complex stuff. The meson version is raised to 0.47 because that's needed for install_mode. We were planning to raise the required version anyway… --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index 0e5c326deb..a8f23a0d5b 100644 --- a/README +++ b/README @@ -193,7 +193,7 @@ REQUIREMENTS: python-jinja2 python-lxml (optional, required to build the indices) python >= 3.5 - meson >= 0.46 (>= 0.49 is required to build position-independent executables) + meson >= 0.47 (>= 0.49 is required to build position-independent executables) ninja gcc, awk, sed, grep, and similar tools clang >= 10.0, llvm >= 10.0 (optional, required to build BPF programs -- cgit v1.2.1