From 459d613fff8a5b00ac331eab3ab50b1736fdd0eb Mon Sep 17 00:00:00 2001 From: FeRD (Frank Dana) Date: Nov 24 2025 14:05:54 +0000 Subject: Formatting cleanup --- diff --git a/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc b/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc index 7060d99..4762293 100644 --- a/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc +++ b/guidelines/modules/ROOT/pages/AutoProvidesAndRequiresFiltering.adoc @@ -44,18 +44,18 @@ and help prevent them from being mixed up with other sections. These filters use regular expressions. The regular expression variant used for these filters follows the `POSIX.2` regular expression standard -(see the `+regex(7)` manpage). +(see the `+regex(7)+` manpage). In this variant, -the literal characters `+^.[$()|*+?{+` need to be backslash escaped. +the literal characters `pass:c[^.[$()|*+?{]` need to be backslash escaped. Because rpm interprets backslashes as part of its parsing of spec files, you will need to use a *double backslash* for any escapes. -A literal backslash ("`+\+`") is represented by four backslashes. +A literal backslash (`+\+`) is represented by four backslashes. The regex engine is only passed the final string, after RPM macro expansion. So you can't use unescaped data via RPM macros. For instance, if you generate a list of files to match in a macro and that list contains `+libfoo.so+` -you'll have to use `+libfoo\\.so+` to escape the ("`+.+`"). +you'll have to use `+libfoo\\.so+` to escape the "pass:q[`.`]". Example: [source, rpm-spec] diff --git a/guidelines/modules/ROOT/pages/PkgConfigBuildRequires.adoc b/guidelines/modules/ROOT/pages/PkgConfigBuildRequires.adoc index 22ba4e9..015f340 100644 --- a/guidelines/modules/ROOT/pages/PkgConfigBuildRequires.adoc +++ b/guidelines/modules/ROOT/pages/PkgConfigBuildRequires.adoc @@ -8,7 +8,7 @@ The build infrastructure for a given package will often locate and use required Thus, `+pkgconfig(foo)+` is the true statement of the build dependency, and is how it should be expressed in the spec file. -For historical reasons, many packages seem to have a hard-coded "`+BuildRequires: foo-devel+`", with the name of the package which _currently_ provides the required pkgconfig module. This is fragile and less portable than simply expressing the real dependency. Where package names change, and/or a required pkgconfig module is later provided by a _different_ package, these hard-coded dependencies break. +For historical reasons, many packages seem to have a hard-coded "pass:q[`BuildRequires: foo-devel`]", with the name of the package which _currently_ provides the required pkgconfig module. This is fragile and less portable than simply expressing the real dependency. Where package names change, and/or a required pkgconfig module is later provided by a _different_ package, these hard-coded dependencies break. Note that it shall still be acceptable to require specific packages by name if they are required for some reason _other_ than a `+pkg-config+` module that they provide. diff --git a/guidelines/modules/ROOT/pages/Scriptlets.adoc b/guidelines/modules/ROOT/pages/Scriptlets.adoc index e915691..7f9290a 100644 --- a/guidelines/modules/ROOT/pages/Scriptlets.adoc +++ b/guidelines/modules/ROOT/pages/Scriptlets.adoc @@ -71,12 +71,12 @@ excluding explicit `+exit+` calls (frowned upon with a non-zero argument!), the exit status of the last command in a scriptlet determines its exit status. Most commands in the snippets in this document -have a "`+|| :+`" appended to them, +have a "pass:q[`|| :`]" appended to them, which is a generic trick to force the zero exit status for those commands whether they worked or not. Usually the most important bit is to apply this to the last command executed in a scriptlet, -or to add a separate command such as plain "`+:+`" or "`+exit 0+`" +or to add a separate command such as plain "pass:q[`:`]" or "pass:q[`exit 0`]" as the last one in a scriptlet. Note that depending on the case, other error checking/prevention measures may be more appropriate. diff --git a/guidelines/modules/ROOT/pages/UsersAndGroups.adoc b/guidelines/modules/ROOT/pages/UsersAndGroups.adoc index 6dc7b87..7ea4828 100644 --- a/guidelines/modules/ROOT/pages/UsersAndGroups.adoc +++ b/guidelines/modules/ROOT/pages/UsersAndGroups.adoc @@ -43,7 +43,7 @@ Sites that want to pre-allocate accounts that are needed during an unattended kickstart install have trickier problem. One way for them to accomplish their goals -is to create a customized version of the "`+setup+`" package +is to create a customized version of the `+setup+` package with the desired users and groups along with their chosen UID/GID mappings in the `+/etc/passwd+`, `+/etc/shadow+`, and `+/etc/group+` files. diff --git a/guidelines/modules/ROOT/pages/Versioning.adoc b/guidelines/modules/ROOT/pages/Versioning.adoc index 3decde2..2f8a32c 100644 --- a/guidelines/modules/ROOT/pages/Versioning.adoc +++ b/guidelines/modules/ROOT/pages/Versioning.adoc @@ -198,7 +198,7 @@ Note that `+0.4.1^+` sorts higher than `+0.4.1+`, but lower than both When upstream has never chosen a version, you **must** use `+Version: 0+`. -"`+0+`" sorts lower than any other possible value that upstream might choose. +"0" sorts lower than any other possible value that upstream might choose. If upstream does choose to release "version 0", then just set `+Release:+` higher than the previous value. (When `%autorelease` is used, this happens automatically.)