From 48eae8e80771aad02fac691ed5b86d9fa1c13ae2 Mon Sep 17 00:00:00 2001 From: Benson Muite Date: Oct 25 2024 11:09:51 +0000 Subject: Prevent breaking macro The short first column width for widely used macros breaks _localstatedir and _sharedstatedir at an unusual location, they often appear as _localstate-dir and _shared-statedir --- diff --git a/guidelines/modules/ROOT/pages/RPMMacros.adoc b/guidelines/modules/ROOT/pages/RPMMacros.adoc index 124cd28..d02f0fd 100644 --- a/guidelines/modules/ROOT/pages/RPMMacros.adoc +++ b/guidelines/modules/ROOT/pages/RPMMacros.adoc @@ -45,7 +45,7 @@ by looking at `/usr/lib/rpm/platform/*/macros` for the respective platform. The following table lists macros which are widely used in fedora `.spec` files. -[cols="20%m,30%m,50%",options="header"] +[cols="32%m,28%m,40%",options="header"] |================================= | macro | definition | comment | +%{_sysconfdir}+ | /etc | @@ -69,7 +69,7 @@ Some seldomly used macros are listed below for completeness. Old `.spec` files might still use them, and there might be cases where they are still needed. -[cols="20%m,30%m,50%",options="header"] +[cols="32%m,28%m,40%",options="header"] |================================= | macro | definition | comment | +%{_datarootdir}+ | +%{_prefix}/share+ | default: `/usr/share` @@ -95,7 +95,7 @@ It is used for setting `DESTDIR` in the package's `%install` step. The other macros are usually only used outside `.spec` files. For example, they are set by `fedpkg` to override the default directories. -[cols="20%m,60%m,20%",options="header"] +[cols="25%m,60%m,15%",options="header"] |================================= | macro | definition | comment | +%{buildroot}+ | +%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}+ | same as `$BUILDROOT`