From: Richard W.M. Jones Date: Mon, 18 Dec 2023 13:07:12 +0000 (+0000) Subject: stdlib/fedora: Use grep -F when matching %fedora-rebuild-name X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=goals.git stdlib/fedora: Use grep -F when matching %fedora-rebuild-name We don't want regular expression significant characters to confuse this match. --- diff --git a/stdlib/fedora.gl b/stdlib/fedora.gl index 0f6b1fa..a9f43ed 100644 --- a/stdlib/fedora.gl +++ b/stdlib/fedora.gl @@ -64,10 +64,10 @@ predicate is-koji-built (pkg) = { if ! grep -sq "^%%autochangelog" $specfile; then # If the specfile doesn't have the magic string then the # package definitely needs to be rebuilt. - grep -sq %fedora-rebuild-name $specfile || exit 99 + grep -sqF %fedora-rebuild-name $specfile || exit 99 else # Using autochangelog. - git log | grep -sq %fedora-rebuild-name || exit 99 + git log | grep -sqF %fedora-rebuild-name || exit 99 fi # Else we must check Koji itself. @@ -137,7 +137,7 @@ is-koji-built ("%pkg") : # If the specfile doesn't have the magic string then add # that now. - if ! grep -sq %fedora-rebuild-name $specfile; then + if ! grep -sqF %fedora-rebuild-name $specfile; then rpmdev-bumpspec -c "- "%fedora-rebuild-name $rightmost *.spec else rpmdev-bumpspec -c "- Bump release and rebuild" $rightmost *.spec @@ -146,7 +146,7 @@ is-koji-built ("%pkg") : fedpkg commit -c else # Using autochangelog. - if ! git log | grep -sq %fedora-rebuild-name; then + if ! git log | grep -sqF %fedora-rebuild-name; then git commit --allow-empty -m %fedora-rebuild-name else git commit --allow-empty -m "Bump release and rebuild"