listfiles: make it robust against all kinds of “interesting” input
– restore protection against empty input – handle non-empty inputs, with whitespace, quotes, linebreaks, etc
This commit is contained in:
parent
1f7310110e
commit
b8797dcd02
@ -12,9 +12,9 @@
|
|||||||
# Arguments passed to the macro without flags will be interpreted as inclusion
|
# Arguments passed to the macro without flags will be interpreted as inclusion
|
||||||
# globs.
|
# globs.
|
||||||
%listfiles(i:x:) %{expand:
|
%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)
|
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
|
while IFS= read -r finc ; do
|
||||||
realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\
|
realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\
|
||||||
| sort -u | grep -q "${finc}" || echo "${finc}"
|
| sort -u | grep -q "${finc}" || echo "${finc}"
|
||||||
|
@ -202,6 +202,7 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
|||||||
%{_rpmconfigdir}/macros.d/macros.kmp
|
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
- listfiles: make it robust against all kinds of “interesting” inputs
|
||||||
- wordwrap: make list indenting smarter, to produce something with enough
|
- wordwrap: make list indenting smarter, to produce something with enough
|
||||||
structure that it can be converted into AppStream metadata
|
structure that it can be converted into AppStream metadata
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user