| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| %listfiles(i:x:) %{expand: |
| %if %{lua: print(string.len(rpm.expand("%{?-i*}%{?listfiles_include}%*")))} |
| listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u) |
| %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}" |
| done <<< "${listfiles_include}" |
| %else |
| echo "${listfiles_include}" |
| %endif |
| %endif |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| %writevars(f:) %{lua: |
| local fedora = require "fedora.common" |
| local macrofile = rpm.expand("%{-f*}") |
| local rpmvars = {} |
| for i = 1, rpm.expand("%#") do |
| table.insert(rpmvars, rpm.expand("%" .. i)) |
| end |
| fedora.writevars(macrofile,rpmvars) |
| } |
| |
| |
| %gpgverify(k:s:d:) %{lua: |
| local script = rpm.expand("%{_rpmconfigdir}/redhat/gpgverify ") |
| local keyring = rpm.expand("%{-k*}") |
| local signature = rpm.expand("%{-s*}") |
| local data = rpm.expand("%{-d*}") |
| print(script) |
| if keyring ~= "" then |
| print(rpm.expand("--keyring='%{SOURCE" .. keyring .. "}' ")) |
| end |
| if signature ~= "" then |
| print(rpm.expand("--signature='%{SOURCE" .. signature .. "}' ")) |
| end |
| if data ~= "" then |
| print(rpm.expand("--data='%{SOURCE" .. data .. "}' ")) |
| end |
| } |
| |
| |
| %gpgverify(k:s:d:) %{lua: |
| local script = rpm.expand("%{_rpmconfigdir}/redhat/gpgverify ") |
| local keyring = rpm.expand("%{-k*}") |
| local signature = rpm.expand("%{-s*}") |
| local data = rpm.expand("%{-d*}") |
| print(script) |
| if keyring ~= "" then |
| print(rpm.expand("--keyring='%{SOURCE" .. keyring .. "}' ")) |
| end |
| if signature ~= "" then |
| print(rpm.expand("--signature='%{SOURCE" .. signature .. "}' ")) |
| end |
| if data ~= "" then |
| print(rpm.expand("--data='%{SOURCE" .. data .. "}' ")) |
| end |
| } |