diff --git a/macros.fedora-misc b/macros.fedora-misc index a73b7c5..83e455a 100644 --- a/macros.fedora-misc +++ b/macros.fedora-misc @@ -12,9 +12,9 @@ # Arguments passed to the macro without flags will be interpreted as inclusion # globs. %listfiles(i:x:) %{expand: -%if "%{?-i*}%{expand:?listfiles_include}%*" != "" +%if %{lua: print(string.len(rpm.expand("%{?-i*}%{?listfiles_include}%*")))} listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u) - %if "%{?-x*}%{expand:?listfiles_exclude}" != "" + %if %{lua: print(string.len(rpm.expand("%{?-x*}%{?listfiles_exclude}")))} while IFS= read -r finc ; do realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\ | sort -u | grep -q "${finc}" || echo "${finc}" diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 13d4662..9acd12b 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -202,6 +202,7 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %{_rpmconfigdir}/macros.d/macros.kmp %changelog +- listfiles: make it robust against all kinds of “interesting” inputs - wordwrap: make list indenting smarter, to produce something with enough structure that it can be converted into AppStream metadata