rpm-software-management / spec-cleaner

spec-cleaner
BSD 3-Clause "New" or "Revised" License
28 stars 34 forks source link

Wrong curly bracket placement around macros with arguments #203

Closed ciz closed 6 years ago

ciz commented 6 years ago

spec-cleaner doesn't wrap macros with parameters within the curly brackets properly.

See %check in Apache:Modules/apache2-mod_nss/apache2-mod_nss.spec.

--- apache2-mod_nss.spec        2017-10-23 16:07:34.903811489 +0200
+++ apache2-mod_nss.spec.cleaned        2017-10-23 16:45:54.152742982 +0200
@@ -173,9 +173,9 @@
 EOF
 exit_code=0
 # run apache test instance 
-%apache_test_module_start_apache -m nss -i mod_nss-test.conf
+%{apache_test_module_start_apache} -m nss -i mod_nss-test.conf
 # get test document
-%apache_test_module_curl -r https -d /index.html -o %{apache_test_module_dir}/output.txt
+%{apache_test_module_curl} -r https -d /index.html -o %{apache_test_module_dir}/output.txt
 echo
 echo 'Testing /index.html output'
 grep 'HTTPS HELLO' %{apache_test_module_dir}/output.txt || exit_code=1

The macros are wrapped without their parameters, which results in a build failure.

scarabeusiv commented 6 years ago

We should parse the whole apache macros to grab all the commands I guess.