rpm-software-management / spec-cleaner

spec-cleaner
BSD 3-Clause "New" or "Revised" License
27 stars 33 forks source link

curly brace addition breaks build when macro %apparmor_reload is used #309

Closed ilmanzo closed 1 year ago

ilmanzo commented 1 year ago

I ran spec-cleaner over this file https://build.opensuse.org/package/view_file/network:telephony/galene/galene.spec

and it puts curly braces around the macro %apparmor_reload, transforming it into %{apparmor_reload}. Unfortunately, this breaks the macro as it drops the parameter, resulting in a malformed build spec. In detail:

%apparmor_reload %{_sysconfdir}/apparmor.d/usr.sbin.galene gets expanded to

/sbin/apparmor_parser -r -T -W /etc/apparmor.d/usr.sbin.galene &> /dev/null || :

while %{apparmor_reload} %{_sysconfdir}/apparmor.d/usr.sbin.galene results in

/sbin/apparmor_parser -r -T -W  &> /dev/null || :

I'm not sure yet if the issue is on the macro parameter handling; in the meantime maybe it's worth an ad-hoc exclusion?

tacerus commented 1 year ago

This issue exists with some systemd macros as well.