From 456e1caf3023b717987fd1d6513483dd33ed987d Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Mon, 18 Dec 2023 13:07:12 +0000 Subject: [PATCH] stdlib/fedora: Use grep -F when matching %fedora-rebuild-name We don't want regular expression significant characters to confuse this match. --- stdlib/fedora.gl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" -- 1.8.3.1