/usr/lib/rpm/macros.d
NameSizeModeActions
macros.alt-python31120820644editdlrm
macros.dwz18060644editdlrm
macros.efi-srpm30750644editdlrm
macros.environment-modules750644editdlrm
macros.fedora-misc28290644editdlrm
macros.fedora-misc-srpm2390644editdlrm
macros.firewalld2390644editdlrm
macros.forge127330644editdlrm
macros.ghc-srpm4140644editdlrm
macros.go-srpm73420644editdlrm
macros.info3900644editdlrm
macros.kernel-srpm1160644editdlrm
macros.ldc-srpm730644editdlrm
macros.ldconfig3070644editdlrm
macros.mono-srpm1810644editdlrm
macros.nodejs-srpm3240644editdlrm
macros.ocaml-srpm7370644editdlrm
macros.openblas-srpm1040644editdlrm
macros.perl51840644editdlrm
macros.perl-srpm7940644editdlrm
macros.pybytecompile8860644editdlrm
macros.python34390644editdlrm
macros.python-srpm60930644editdlrm
macros.python337140644editdlrm
macros.rust-srpm610644editdlrm
macros.scl138570644editdlrm
macros.selinux-policy67660644editdlrm
macros.systemd41260644editdlrm
macros.systemtap2060644editdlrm
macros.valgrind-srpm1270644editdlrm
macros.vim400644editdlrm
macros.vpath2280644editdlrm
Edit: /usr/lib/rpm/macros.d/macros.fedora-misc (2829B)
# Some miscellaneous Fedora-related macros # List files matching inclusion globs, excluding files matching exclusion blogs # Optional parameters: # – -i "" inclusion globs # – -x "" exclusion globs # Globs are space-separated lists of shell globs. Such lists require %{quote:} # use for safe rpm argument passing. # Alternatively, set the following rpm variables before calling the macro: # – “listfiles_include” inclusion globs # — “listfiles_exclude” exclusion globs # Arguments passed to the macro without flags will be interpreted as inclusion # globs. %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 } # https://github.com/rpm-software-management/rpm/issues/581 # Write the contents of a list of rpm variables to a macro file. # The target file must contain the corresponding anchors. # For example %writevars -f myfile foo bar will replace: # @@FOO@@ with the rpm evaluation of %{foo} and # @@BAR@@ with the rpm evaluation of %{bar} # in myfile %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 verifies signed sources. There is documentation in the script. %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 verifies signed sources. There is documentation in the script. %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 }