PATH:
usr
/
lib
/
rpm
/
macros.d
# Fedora macros, safe to use after the SRPM build stage # Lists files matching inclusion globs, excluding files matching exclusion # globs # – globs are space-separated lists of shell globs. Such lists require # %{quote:} use when passed as rpm arguments or flags. # Control variables, flags and arguments: # %{listfiles_include} inclusion globs # %{listfiles_exclude} exclusion globs # -i <globs> inclusion globs # -x <globs> 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 # Writes the contents of a list of rpm variables to a macro file # Control variables, flags and arguments: # -f <filename> the macro file to process: # – it must contain 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 }
[-] macros.environment-modules
[open]
[-] macros.java-srpm
[open]
[-] macros.fedora-misc
[open]
[-] macros.aaa-pyproject-srpm
[open]
[-] macros.python2
[open]
[-] macros.go-srpm
[open]
[+]
..
[-] macros.ghc-srpm
[open]
[-] macros.mono-srpm
[open]
[-] macros.rust-srpm
[open]
[-] macros.vpath
[open]
[-] macros.ocaml-srpm
[open]
[-] macros.perl-srpm
[open]
[-] macros.python-srpm
[open]
[-] macros.ldconfig
[open]
[-] macros.openblas-srpm
[open]
[-] macros.lua-srpm
[open]
[-] macros.forge
[open]
[-] macros.dwz
[open]
[-] macros.ruby
[open]
[-] macros.nodejs-srpm
[open]
[-] macros.sysusers
[open]
[-] macros.qt5-srpm
[open]
[-] macros.systemd
[open]
[-] macros.fedora-misc-srpm
[open]
[-] macros.fonts-srpm
[open]
[-] macros.systemtap
[open]
[-] macros.efi-srpm
[open]
[-] macros.valgrind-srpm
[open]
[-] macros.kernel-srpm
[open]
[-] macros.kmp
[open]
[-] macros.selinux-policy
[open]
[-] macros.dist
[open]
[-] macros.vim
[open]
[-] macros.perl
[open]
[-] macros.ldc-srpm
[open]
[-] macros.pkgconf
[open]