Skip to content
ᴀɴᴛᴏɴ ɴᴏᴠᴏᴊɪʟᴏᴠ edited this page Jun 23, 2024 · 5 revisions

Description

Checks all scriptlets for using paths instead of macroses.

Problematic code

%install
rm -rf %{buildroot}

install -pm 644 file %{buildroot}/etc/myapp.conf

Correct code

%install
rm -rf %{buildroot}

install -pm 644 file %{buildroot}%{_sysconfdir}/myapp.conf

Rationale

The macros for build system invocations (for example, %configure, %cmake, or %meson) use the values defined by RPM to set installation paths for packages. So, it's usually preferable to not hard-code these paths in spec files either, but use the same macros for consistency.

Links

Clone this wiki locally