summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ohai/plugins/rpm.rb14
-rw-r--r--spec/unit/plugins/rpm_spec.rb2
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/ohai/plugins/rpm.rb b/lib/ohai/plugins/rpm.rb
index 7f4870b1..c131ad50 100644
--- a/lib/ohai/plugins/rpm.rb
+++ b/lib/ohai/plugins/rpm.rb
@@ -91,17 +91,27 @@ Ohai.plugin(:Rpm) do
value = ""
lines[macros_start_idx + 1..macros_end_idx - 1].each do |line|
if line.start_with?("-")
+ # new macros are always prefixed by a dash
if name
+ # if we had parsed a macro before, store it
rpm[:macros][name] = value
name = nil
value = ""
- else
- _prefix, name, value = line.split(" ", 3)
end
+
+ # parse the new macro definition
+ _prefix, name, value = line.split(" ", 3)
else
+ # continuations have no prefix and just append to the previous one
value += "\n#{line}"
end
end
+
+ # Once we're done parsing all lines, we might have a parsed definition
+ # we haven't stored - if so, store it.
+ if name
+ rpm[:macros][name] = value
+ end
else
logger.trace("Plugin RPM: Could not find rpm. Skipping plugin.")
end
diff --git a/spec/unit/plugins/rpm_spec.rb b/spec/unit/plugins/rpm_spec.rb
index e225cd49..ecee15f8 100644
--- a/spec/unit/plugins/rpm_spec.rb
+++ b/spec/unit/plugins/rpm_spec.rb
@@ -36,7 +36,7 @@ describe Ohai::System, "rpm plugin" do
expect(plugin[:rpm].to_hash).to eq({
"arch_os" => { "build_arch" => "x86_64", "build_os" => "Linux", "compatible_archs" => %w{x86_64 amd64 em64t athlon noarch i686 i586 i486 i386 fat}, "compatible_build_archs" => %w{x86_64 noarch}, "compatible_build_oses" => ["Linux"], "compatible_oses" => ["Linux"], "install_arch" => "x86_64", "install_os" => "Linux" },
"features" => { "rpmlib(BuiltinLuaScripts)" => "4.2.2-1", "rpmlib(CaretInVersions)" => "4.15.0-1", "rpmlib(CompressedFileNames)" => "3.0.4-1", "rpmlib(ConcurrentAccess)" => "4.1-1", "rpmlib(DynamicBuildRequires)" => "4.15.0-1", "rpmlib(ExplicitPackageProvide)" => "4.0-1", "rpmlib(FileCaps)" => "4.6.1-1", "rpmlib(FileDigests)" => "4.6.0-1", "rpmlib(HeaderLoadSortsTags)" => "4.0.1-1", "rpmlib(LargeFiles)" => "4.12.0-1", "rpmlib(PartialHardlinkSets)" => "4.0.4-1", "rpmlib(PayloadFilesHavePrefix)" => "4.0-1", "rpmlib(PayloadIsBzip2)" => "3.0.5-1", "rpmlib(PayloadIsLzma)" => "4.4.2-1", "rpmlib(PayloadIsXz)" => "5.2-1", "rpmlib(PayloadIsZstd)" => "5.4.18-1", "rpmlib(RichDependencies)" => "4.12.0-1", "rpmlib(ScriptletExpansion)" => "4.9.0-1", "rpmlib(ScriptletInterpreterArgs)" => "4.0.3-1", "rpmlib(TildeInVersions)" => "4.10.0-1", "rpmlib(VersionedDependencies)" => "3.0.3-1" },
- "macros" => { "GNAT_arches" => "%{GPRbuild_arches} ia64 ppc alpha", "Main" => "loop\nif processall then\n for _,s in pairs(fedora.getsuffixes(\"goipath\")) do\n process(s)\n end\nelse\n process(rpm.expand(\"%{-z*}\"))\nend\n}", "P" => "<builtin>", "__7zip" => "/usr/bin/7za", "___build_cmd" => "%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}", "___build_pre" => "\n RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\n RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\n RPM_OPT_FLAGS=\"%{optflags}\"\n RPM_LD_FLAGS=\"%{?build_ldflags}\"\n RPM_ARCH=\"%{_arch}\"\n RPM_OS=\"%{_os}\"\n RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\n export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\n RPM_DOC_DIR=\"%{_docdir}\"\n export RPM_DOC_DIR\n RPM_PACKAGE_NAME=\"%{NAME}\"\n RPM_PACKAGE_VERSION=\"%{VERSION}\"\n RPM_PACKAGE_RELEASE=\"%{RELEASE}\"\n export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\n LANG=C\n export LANG\n unset CDPATH DISPLAY ||:\n %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\n export RPM_BUILD_ROOT}\n %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\n export CLASSPATH}\n PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\n export PKG_CONFIG_PATH\n CONFIG_SITE=${CONFIG_SITE:-NONE}\n export CONFIG_SITE\n \n %[%{verbose}?\"set -x\":\"\"]\n umask 022\n cd \"%{u2p:%{_builddir}}\"", "___build_template" => "#!%{___build_shell}\n%{___build_pre}\n%{nil}", "__ar" => "ar", "__as" => "as", "__bootstrap" => "~bootstrap", "__brp_check_rpaths" => "/usr/lib/rpm/check-rpaths", "__brp_elfperms" => "%{_rpmconfigdir}/brp-elfperms", "__brp_ldconfig" => "/usr/lib/rpm/redhat/brp-ldconfig", "__brp_mangle_shebangs" => "/usr/lib/rpm/redhat/brp-mangle-shebangs %{?__brp_mangle_shebangs_exclude:--shebangs \"%{?__brp_mangle_shebangs_exclude}\"} %{?__brp_mangle_shebangs_exclude_file:--shebangs-from \"%{__brp_mangle_shebangs_exclude_file}\"} %{?__brp_mangle_shebangs_exclude_from:--files \"%{?__brp_mangle_shebangs_exclude_from}\"} %{?__brp_mangle_shebangs_exclude_from_file:--files-from \"%{__brp_mangle_shebangs_exclude_from_file}\"}", "__brp_python_hardlink" => "%{_rpmconfigdir}/redhat/brp-python-hardlink", "__brp_strip" => "/usr/lib/rpm/brp-strip %{__strip}", "__brp_strip_lto" => "/usr/lib/rpm/redhat/brp-strip-lto %{__strip}", "__bzip2" => "/usr/bin/bzip2", "__cargo_skip_build" => "%{lua:\nlocal crate = rpm.expand('%{crate}')\nlocal build_crate = false\nfor w in rpm.expand('%{?_build_crates}'):gmatch('%S+') do\n if w == crate then\n build_crate = true\n break\n end\nend\nif (rpm.expand('%{defined _module_build}') ~= '0' and not build_crate) then\n print(1)\nelse\n print(0)\nend}", "__cc" => "%{expand:%%{__cc_%{toolchain}}}", "__cc_gcc" => "gcc", "__cflags_arch_x86_64" => "%[0%{?rhel} >= 9 ? \"-march=x86-64-v2\" : \"\"]", "__chmod" => "/usr/bin/chmod", "__cmake" => "/usr/bin/cmake", "__cmake_path" => "^(%{_libdir}|%{_datadir})/cmake/.*/.*(Config.cmake|-config.cmake)$", "__cmake_requires" => "%{_rpmconfigdir}/cmake.req", "__cpp" => "%{expand:%%{__cpp_%{toolchain}}}", "__cpp_gcc" => "gcc -E", "__ctest" => "/usr/bin/ctest", "__cxx_clang" => "clang++", "__debug_install_post" => "\n %{__find_debuginfo} \\\n %{?_smp_build_ncpus:-j%{_smp_build_ncpus}} \\\n %{?_missing_build_ids_terminate_build:--strict-build-id} \\\n %{?_no_recompute_build_ids:-n} \\\n %{?_include_minidebuginfo:-m} \\\n %{?_include_gdb_index:-i} \\\n %{?_unique_build_ids:--build-id-seed \"%{VERSION}-%{RELEASE}\"} \\\n %{?_unique_debug_names:--unique-debug-suffix \"-%{VERSION}-%{RELEASE}.%{_arch}\"} \\\n %{?_unique_debug_srcs:--unique-debug-src-base \"%{name}-%{VERSION}-%{RELEASE}.%{_arch}\"} \\\n %{?_find_debuginfo_dwz_opts} \\\n %{?_find_debuginfo_opts} \\\n %{?_debugsource_packages:-S debugsourcefiles.list} \\\n \"%{_builddir}/%{?buildsubdir}\"\n%{nil}", "__debuginfo_provides" => "%{lua:\n local file = rpm.expand(\"%1\")\n local b1, b2 = file:match(\"/([0-9a-f]+)/([0-9a-f]+).debug$\")\n print(string.format(\"debuginfo(build-id) = %s%s\\n\", b1, b2))\n}", "__default_python3_version" => "3.10", "__desktop_provides" => "%{lua:\n local executable = false\n local mimetypes = nil\n for line in io.lines(rpm.expand(\"%1\")) do\n if line:match(\"^Type%s*=%s*Application$\") or line:match(\"^Exec%s*=\") then\n executable = true\n elseif line:match(\"^MimeType%s*=\") then\n mimetypes = line:match(\"=%s*(.+)\")\n end\n end\n if executable then\n print(\"application()\\n\")\n print(string.format(\"application(%s)\\n\", rpm.expand(\"%{basename:%1}\")))\n if mimetypes then\n for mimetype in mimetypes:gmatch(\"([^;]+)\") do\n print(string.format(\"mimehandler(%s)\\n\", mimetype))\n end\n end\n end\n}", "__elf_magic" => "^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$", "__elf_requires" => "%{_rpmconfigdir}/elfdeps --requires", "__file" => "/usr/bin/file", "__find_provides" => "%{_rpmconfigdir}/find-provides", "__font_magic" => "[Ff]ont?( (program|collection))?( (text|data))", "__font_requires" => "%{nil}", "__git" => "/usr/bin/git", "__global_compiler_flags" => "%{_general_options} %{_warning_options} %{_preprocessor_defines} %{_hardened_cflags} %{_annotation_cflags} %{_legacy_options}", "__global_fcflags" => "%{build_fflags}", "__global_ldflags" => "%{build_ldflags}", "__global_requires_exclude_from" => "%{?_docdir:%{_docdir}}", "__go_path" => "^%{gopath}/src/.+/.goipath$", "__go_requires" => "go-rpm-integration requires --prefix \"%{buildroot}\" --go-path \"%{gopath}\" %{?goreqflags}", "__gobundled_flags" => "magic_and_path", "__gobundled_path" => "^%{gopath}/src/.+/vendor/.+/.*$", "__godevelinstall(-i:v)" => "%{expand:\n(\n%define __godevelinstall_ipath %{-i*}\ncd \"%{gobuilddir}/src/%{__godevelinstall_ipath}\"\n%define listfiles_include %{?currentgosupfiles}\n%define listfiles_exclude %{?currentgosupfilesex}\nIFS= gosupfiles=$(%listfiles\n)\nmapfile -t gosupfilesA <<< \"${gosupfiles}\"\ngo-rpm-integration install -i \"%{__godevelinstall_ipath}\" \\\n -b \"%{gobuilddir}/bin\" \\\n -s \"%{gobuilddir}\" \\\n -o \"%{currentgodevelfilelist}\" \\\n -O \"%{goworkdir}\" \\\n -V \"%{version}-%{release}\" \\\n %{?currenttag: -T \"%{?currenttag}\"} \\\n %{?currentcommit: -C \"%{?currentcommit}\"} \\\n %{?currentbranch: -B \"%{?currentbranch}\"} \\\n -p \"%{buildroot}\" \\\n -g \"%{gopath}\" \\\n %{?currentgoipathsex} \\\n %{?currentgoextensions} \\\n %{?goinstallflags} \\\n %{-v} ${gosupfilesA[@]:+\"${gosupfilesA[@]}\"}\n)\n}", "__gosymlink_flags" => "magic_and_path", "__gosymlink_path" => "^%{gopath}/src/.*$", "__gosymlink_requires" => "%{_rpmconfigdir}/gosymlink.deps requires --prefix \"%{buildroot}\" --go-path \"%{gopath}\"", "__gpg_reserved_space" => "4096", "__grep" => "/usr/bin/grep", "__gstreamer1_provides" => "%{_rpmconfigdir}/gstreamer1.prov", "__hg" => "/usr/bin/hg", "__id_u" => "%{__id} -u", "__isa" => "%{__isa_name}-%{__isa_bits}", "__isa_name" => "x86", "__kmod_provides" => "%{lua:\n function basename(fn)\n return string.gsub(fn, \"(.*/)(.*)\", \"%2\")\n end\n function printdep(mod)\n print(\"kmod(\"..mod..\")\")\n end\n local fn = rpm.expand(\"%{1}\")\n local bn = basename(fn)\n if bn == \"modules.builtin\" then\n for l in io.lines(fn) do\n printdep(basename(l))\n end\n else\n local mod = string.match(bn, \"%g+.ko\")\n if mod then\n printdep(mod)\n end\n end\n}", "__libsymlink_flags" => "magic_and_path", "__libsymlink_path" => "^.*.so$", "__ln_s" => "ln -s", "__lzip" => "/usr/bin/lzip", "__meson" => "/usr/bin/meson", "__meson_wrap_mode" => "nodownload", "__metainfo_provides" => "%{lua:\n print(\"metainfo()\\n\")\n print(string.format(\"metainfo(%s)\\n\", rpm.expand(\"%{basename:%1}\")))\n}", "__mkdir_p" => "/usr/bin/mkdir -p", "__ninja" => "/usr/bin/ninja", "__nodejs" => "%{_bindir}/node", "__nodejs_native_requires" => "%{_rpmconfigdir}/nodejs_native.req", "__nodejs_provides" => "%{_rpmconfigdir}/nodejs.prov", "__nodejs_suggests" => "%{_rpmconfigdir}/nodejs.req --optional", "__ocaml_flags" => "magic_and_path", "__ocaml_path" => ".(cma|cmi|cmo|cmx|cmxa|cmxs)$", "__ocaml_requires" => "%{_rpmconfigdir}/ocamldeps.sh --requires", "__os_install_post_python" => "\n %{?py_auto_byte_compile:%{?__brp_python_bytecompile}} \n %{?py_reproducible_pyc_path:%{?__brp_fix_pyc_reproducibility} \"%{py_reproducible_pyc_path}\"} \n %{?__brp_python_hardlink} \n%{nil}", "__perl" => "%{_bindir}/perl", "__pkgconfig_provides" => "%{_rpmconfigdir}/pkgconfigdeps.sh --provides", "__plugindir" => "%{_libdir}/rpm-plugins", "__psdriver_path" => "^(/usr/lib/cups/driver/.*|%{_datadir}/cups/drv/.*.drv)$", "__pypi_default_extension" => "tar.gz", "__pytest" => "/usr/bin/pytest%(test %{python3_pkgversion} == 3 || echo -%{python3_version})", "__python2" => "/usr/bin/python2", "__python_path" => "^((%{_prefix}/lib(64)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$", "__python_requires" => "%{lua:\n -- Match buildroot paths of the form\n -- /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and\n -- /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/\n -- generating a line of the form:\n -- python(abi) = MAJOR.MINOR\n local path = rpm.expand('%1')\n if path:match('/usr/lib%d*/python%d+%.%d+/.*') then\n local requires = path:gsub('.*/usr/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1')\n print(requires)\n end\n}", "__pythondist_provides" => "%{_rpmconfigdir}/pythondistdeps.py --provides --normalized-names-format pep503 --package-name %{name} --normalized-names-provide-both --majorver-provides-versions %{__default_python3_version}", "__pythonname_path" => "^/", "__quilt" => "/usr/bin/quilt", "__scm" => "patch", "__scm_apply_gendiff(qp:m:)" => "\n%{__patch} %{-p:-p%{-p*}} %{-q:-s} --fuzz=%{_default_patch_fuzz} %{_default_patch_flags} -b --suffix \".%{2}\"", "__scm_apply_git_am(qp:m:)" => "\n%{__git} am --reject %{-q} %{-p:-p%{-p*}}", "__scm_apply_patch(qp:m:)" => "\n%{__patch} %{-p:-p%{-p*}} %{-q:-s} --fuzz=%{_default_patch_fuzz} %{_default_patch_flags}", "__scm_author" => "%{__scm_username} %{__scm_usermail}", "__scm_setup_gendiff(q)" => "%{nil}", "__scm_setup_git_am(q)" => "\n%{expand:%__scm_setup_git %{-q}}", "__scm_setup_patch(q)" => "%{nil}", "__scm_usermail" => "<rpm-build>", "__script_flags" => "exeonly", "__script_requires" => "%{_rpmconfigdir}/script.req", "__spec_build_args" => "%{___build_args}", "__spec_build_cmd" => "%{___build_cmd}", "__spec_build_pre" => "%{___build_pre}", "__spec_build_template" => "#!%{__spec_build_shell}\n%{__spec_build_pre}\n%{nil}", "__spec_buildrequires_body" => "%{___build_body}", "__spec_buildrequires_post" => "%{___build_post}", "__spec_buildrequires_shell" => "%{___build_shell}", "__spec_check_args" => "%{___build_args}", "__spec_check_cmd" => "%{___build_cmd}", "__spec_check_pre" => "%{___build_pre}", "__spec_check_template" => "#!%{__spec_check_shell}\n%{__spec_check_pre}\n%{nil}", "__spec_clean_body" => "%{___build_body}", "__spec_clean_post" => "%{___build_post}", "__spec_clean_shell" => "%{___build_shell}", "__spec_install_args" => "%{___build_args}", "__spec_install_cmd" => "%{___build_cmd}", "__spec_install_pre" => "%{___build_pre}\n [ \"$RPM_BUILD_ROOT\" != \"/\" ] && rm -rf \"${RPM_BUILD_ROOT}\"\n mkdir -p \"`dirname \"$RPM_BUILD_ROOT\"`\"\n mkdir \"$RPM_BUILD_ROOT\"\n%{nil}", "__spec_install_template" => "#!%{__spec_install_shell}\n%{__spec_install_pre}\n%{nil}", "__spec_prep_body" => "%{___build_body}", "__spec_prep_post" => "%{___build_post}", "__spec_prep_shell" => "%{___build_shell}", "__spec_rmbuild_args" => "%{___build_args}", "__spec_rmbuild_cmd" => "%{___build_cmd}", "__spec_rmbuild_pre" => "%{___build_pre}", "__spec_rmbuild_template" => "#!%{__spec_rmbuild_shell}\n%{__spec_rmbuild_pre}\n%{nil}", "__systemd_someargs_0(:)" => "%{error:The %%%1 macro requires some arguments}", "__sysusers_path" => "^%{_sysusersdir}/.*\\.conf$", "__tar" => "/usr/bin/tar", "__transaction_dbus_announce" => "%{__plugindir}/dbus_announce.so", "__transaction_fsverity" => "%{__plugindir}/fsverity.so", "__transaction_prioreset" => "%{__plugindir}/prioreset.so", "__transaction_syslog" => "%{__plugindir}/syslog.so", "__unzip" => "/usr/bin/unzip", "__urlhelpercmd" => "/usr/bin/curl", "__vsflags" => "0xf0000", "__zstd" => "/usr/bin/zstd", "_annobin_gcc_plugin" => "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1", "_annotation_cflags" => "%[ \"%{_target_cpu}\" == \"armv7hl\" ? \"\" : \"%{_annotation_plugin}\" ]", "_annotation_plugin" => "%{?_annotated_build:%{expand:%%{_annobin_%{toolchain}_plugin}}}", "_binaries_in_noarch_packages_terminate_build" => "1", "_binary_payload" => "w19.zstdio", "_binfmtdir" => "/usr/lib/binfmt.d", "_build_alias" => "%{_host_alias}", "_build_cpu" => "%{_host_cpu}", "_build_name_fmt" => "%%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm", "_build_vendor" => "%{_host_vendor}", "_buildrootdir" => "%{_topdir}/BUILDROOT", "_changelog_trimage" => "%{expr:2*365*24*60*60}", "_clang_lto_cflags" => "-flto", "_cmake_shared_libs" => "-DBUILD_SHARED_LIBS:BOOL=ON", "_cmake_version" => "3.21.3", "_color_output" => "never", "_configure" => "./configure", "_configure_libtool_hardening_hack" => "1", "_datarootdir" => "%{_prefix}/share", "_dbpath" => "%{_var}/lib/rpm", "_debuginfo_subpackages" => "1", "_debugsource_packages" => "1", "_default_patch_flags" => "--no-backup-if-mismatch -f", "_defaultdocdir" => "%{_datadir}/doc", "_disable_source_fetch" => "1", "_duplicate_files_terminate_build" => "0", "_dwz_low_mem_die_limit" => "10000000", "_dwz_low_mem_die_limit_armv7hl" => "4000000", "_dwz_max_die_limit_armv5tel" => "10000000", "_dwz_max_die_limit_x86_64" => "110000000", "_empty_manifest_terminate_build" => "1", "_environmentdir" => "/usr/lib/environment.d", "_exec_prefix" => "%{_prefix}", "_file_context_file_pre" => "%{_localstatedir}/lib/rpm-state/file_contexts.pre", "_file_custom_defined_booleans_tmp" => "%{_selinux_store_policy_path}/rpmbooleans.custom.tmp", "_find_debuginfo_dwz_opts" => "--run-dwz\\\n --dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\\\n --dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit}", "_fixperms" => "%{__chmod} -Rf a+rX,u+w,g-w,o-w", "_fontbasedir" => "/usr/share/fonts", "_fontconfig_masterdir" => "/etc/fonts", "_gcc_lto_cflags" => "-flto=auto -ffat-lto-objects", "_gnu" => "-gnu", "_hardened_cflags" => "%{?_hardened_build:%{_hardening_cflags}}", "_hardening_cflags" => "%{expand:%%{_hardening_%{toolchain}_cflags}} -fstack-protector-strong", "_hardening_gcc_cflags" => "-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1", "_hkp_keyserver" => "http://pgp.mit.edu", "_host" => "x86_64-redhat-linux-gnu", "_host_cpu" => "x86_64", "_host_vendor" => "redhat", "_include_gdb_index" => "1", "_includedir" => "%{_prefix}/include", "_initddir" => "%{_sysconfdir}/rc.d/init.d", "_install_langs" => "all", "_invalid_encoding_terminates_build" => "1", "_ivyxmldir" => "%{_datadir}/ivy-xmls", "_javadir" => "%{_datadir}/java", "_jnidir" => "%{_prefix}/lib/java", "_jvmcommondatadir" => "%{_datadir}/jvm-common", "_jvmcommonsysconfdir" => "%{_sysconfdir}/jvm-common", "_jvmdir" => "%{_prefix}/lib/jvm", "_jvmprivdir" => "%{_prefix}/lib/jvm-private", "_keyring" => "rpmdb", "_keyringsdir" => "%_datadir/keyrings", "_ld_as_needed_flags" => "%{?_ld_as_needed:-Wl,--as-needed}", "_legacy_options" => "%{?_legacy_common_support: -fcommon}", "_libdir" => "%{_prefix}/lib64", "_localstatedir" => "/var", "_make_output_sync" => "%(! %{__make} --version -O >/dev/null 2>&1 || echo -O)", "_mandir" => "%{_datarootdir}/man", "_metainfodir" => "%{_datadir}/metainfo", "_missing_doc_files_terminate_build" => "1", "_modulesloaddir" => "/usr/lib/modules-load.d", "_monogacdir" => "%{_monodir}/gac", "_os" => "linux", "_pam_libdir" => "%{_libdir}", "_pam_secconfdir" => "%{_sysconfdir}/security", "_pkgdocdir" => "%{_docdir}/%{name}", "_pkgverify_level" => "digest", "_preprocessor_defines" => "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS", "_pyproject_builddir" => "%{_builddir}%{?buildsubdir:/%{buildsubdir}}/.pyproject-builddir", "_pyproject_modules" => "%{_builddir}/pyproject-modules", "_pyproject_wheeldir" => "%{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-wheeldir", "_python_bytecompile_extra" => "0", "_qt5_epoch" => "0", "_qt5_version" => "5.15.2", "_query_selector_match" => "default", "_rpmdir" => "%{_topdir}/RPMS", "_rpmlock_path" => "%{_dbpath}/.rpm.lock", "_rpmmacrodir" => "%{_rpmconfigdir}/macros.d", "_sbindir" => "%{_exec_prefix}/sbin", "_selinux_store_path" => "/var/lib/selinux", "_set_pytest_addopts" => "%global __pytest_addopts --ignore=%{_pyproject_builddir}", "_sharedstatedir" => "/var/lib", "_smp_build_nthreads" => "%{_smp_build_ncpus}", "_source_filedigest_algorithm" => "8", "_specdir" => "%{_topdir}/SPECS", "_swidtagdir" => "%{_prefix}/lib/swidtag/fedoraproject.org", "_sysconfdir" => "/etc", "_systemd_system_env_generator_dir" => "/usr/lib/systemd/system-environment-generators", "_systemd_util_dir" => "/usr/lib/systemd", "_systemdusergeneratordir" => "/usr/lib/systemd/user-generators", "_target" => "x86_64-linux", "_target_cpu" => "x86_64", "_target_platform" => "%{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}", "_texmf" => "/usr/share/texlive/texmf-local", "_texmf_main" => "/usr/share/texlive/texmf-dist", "_texmf_vendor" => "/usr/share/texlive/texmf-dist", "_tmppath" => "%{_var}/tmp", "_transaction_color" => "3", "_udevrulesdir" => "/usr/lib/udev/rules.d", "_unique_debug_names" => "1", "_unitdir" => "/usr/lib/systemd/system", "_urlhelper" => "%{__urlhelpercmd} %{?__urlhelper_localopts} %{?__urlhelper_proxyopts} %{__urlhelperopts}", "_userpresetdir" => "/usr/lib/systemd/user-preset", "_usr" => "/usr", "_var" => "/var", "_vpath_builddir" => "%{_vendor}-%{_target_os}-build", "_vsflags_build" => "%{__vsflags}", "_vsflags_install" => "%{__vsflags}", "_vsflags_rebuilddb" => "0xc0c00", "_warning_options" => "-Wall -Werror=format-security", "alpha" => "alpha alphaev56 alphaev6 alphaev67", "arm" => "%{arm32}", "arm64" => "aarch64", "autopatch(vp:m:M:)" => "%{lua:\nif #arg == 0 then\n local lo = tonumber(rpm.expand(\"%{-m:%{-m*}}\"))\n local hi = tonumber(rpm.expand(\"%{-M:%{-M*}}\"))\n for i, n in ipairs(patch_nums) do\n if ((not lo or n >= lo) and (not hi or n <= hi)) then\n table.insert(arg, n)\n end\n end\nend\nlocal options = rpm.expand(\"%{!-v:-q} %{-p:-p%{-p*}} \")\nlocal bynum = {}\nfor i, p in ipairs(patches) do\n bynum[patch_nums[i]] = p\nend\nfor i, a in ipairs(arg) do\n local p = bynum[a]\n if p then\n print(rpm.expand(\"%__apply_patch -m %{basename:\"..p..\"} \"..options..p..\" \"..i..\"\\n\"))\n else\n macros.error({\"no such patch \"..a})\n end\nend\n}", "autosetup(a:b:cDn:TvNS:p:)" => "\n%setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q}\n%{-S:%global __scm %{-S*}}\n%{expand:%__scm_setup_%{__scm} %{!-v:-q}}\n%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}", "bcond_with" => "%{expand:%%{?_with_%{1}:%%global with_%{1} 1}}", "binfmt_apply" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# binfmt_apply}} \n[ -x /usr/lib/systemd/systemd-binfmt ] && /usr/lib/systemd/systemd-binfmt %{?*} || : \n%{nil}", "build_cflags" => "%{optflags}", "build_cxx" => "%{__cxx}", "build_fflags" => "%{optflags} -I%{_fmoddir}", "buildroot" => "%{_buildrootdir}/%{NAME}-%{VERSION}-%{RELEASE}.%{_arch}", "cmake" => "\n%if 0%{?set_build_flags:1} \n %set_build_flags \n%else \n CFLAGS=\"${CFLAGS:-%optflags}\" ; export CFLAGS ; \n CXXFLAGS=\"${CXXFLAGS:-%optflags}\" ; export CXXFLAGS ; \n FFLAGS=\"${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}\" ; export FFLAGS ; \n FCFLAGS=\"${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}\" ; export FCFLAGS ; \n %{?__global_ldflags:LDFLAGS=\"${LDFLAGS:-%__global_ldflags}\" ; export LDFLAGS ;} \n%endif \n %__cmake \\\n %{!?__cmake_in_source_build:-S \"%{_vpath_srcdir}\"} \\\n %{!?__cmake_in_source_build:-B \"%{__cmake_builddir}\"} \\\n -DCMAKE_C_FLAGS_RELEASE:STRING=\"-DNDEBUG\" \\\n -DCMAKE_CXX_FLAGS_RELEASE:STRING=\"-DNDEBUG\" \\\n -DCMAKE_Fortran_FLAGS_RELEASE:STRING=\"-DNDEBUG\" \\\n -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\n -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\n -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\n -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\n -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\n -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\n -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\n%if \"%{?_lib}\" == \"lib64\" \n %{?_cmake_lib_suffix64} \\\n%endif \n %{?_cmake_shared_libs}", "cmake3_build" => "%cmake_build", "cmake_build" => "\n %__cmake --build \"%{__cmake_builddir}\" %{?_smp_mflags} --verbose", "configure" => "\n %{set_build_flags}; \n [ \"%{_lto_cflags}\"x != x ] && %{_fix_broken_configure_for_lto}; \n [ \"%_configure_gnuconfig_hack\" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \n [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \n done ; \n [ \"%_configure_libtool_hardening_hack\" = 1 ] && [ x != \"x%{_hardened_ldflags}\" ] && \n for i in $(find . -name ltmain.sh) ; do \n %{__sed} -i.backup -e 's~compiler_flags=$~compiler_flags=\"%{_hardened_ldflags}\"~' $i \n done ; \n %{_configure} --build=%{_build} --host=%{_host} \\\n\t--program-prefix=%{?_program_prefix} \\\n\t--disable-dependency-tracking \\\n\t%{?_configure_disable_silent_rules:--disable-silent-rules} \\\n\t--prefix=%{_prefix} \\\n\t--exec-prefix=%{_exec_prefix} \\\n\t--bindir=%{_bindir} \\\n\t--sbindir=%{_sbindir} \\\n\t--sysconfdir=%{_sysconfdir} \\\n\t--datadir=%{_datadir} \\\n\t--includedir=%{_includedir} \\\n\t--libdir=%{_libdir} \\\n\t--libexecdir=%{_libexecdir} \\\n\t--localstatedir=%{_localstatedir} \\\n\t--sharedstatedir=%{_sharedstatedir} \\\n\t--mandir=%{_mandir} \\\n\t--infodir=%{_infodir}", "ctest(:-:)" => "\n cd \"%{__cmake_builddir}\" \n %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %{**} \n cd -", "debug_package" => "\n%ifnarch noarch\n%global __debug_package 1\n%_debuginfo_template\n%{?_debugsource_packages:%_debugsource_template}\n%endif\n%{nil}", "define" => "<builtin>", "dirname" => "<builtin>", "dnl" => "<builtin>", "echo" => "<builtin>", "efi_alt_arch" => "%{expand:%{_efi_srpm_macros_setup}}%{?_efi_alt_arch}%{nil}", "efi_arch" => "%{expand:%{_efi_srpm_macros_setup}}%{_efi_arch}", "efi_build_requires" => "bash coreutils", "efi_esp_dir" => "%{expand:%{_efi_srpm_macros_setup}}%{efi_esp_efi}/%{efi_vendor}", "efi_esp_root" => "/boot/efi", "efi_has_arch" => "%{expand:%{_efi_srpm_macros_setup}}0%{_efi_has_arch}", "efi_vendor" => "%{expand:%{_efi_srpm_macros_setup}}%{expand:%{_efi_vendor}}", "exists" => "<builtin>", "expr" => "<builtin>", "extension_cxxflags" => "%{__extension_strip_flags cxxflags}", "extension_ldflags" => "%{__extension_strip_flags ldflags}", "fedora" => "35", "filter_from_requires" => "%{expand: \n%global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \n}", "filter_requires_in(P)" => "%{expand: \n%global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \n}", "find_lang" => "%{_rpmconfigdir}/find-lang.sh %{buildroot}", "fontcontact" => "fonts@lists.fedoraproject.org", "fontmetapkg(n:s:d:z:)" => "%{lua:\nlocal fonts = require \"fedora.srpm.fonts\"\nlocal name = rpm.expand(\"%{?-n*}\")\nlocal summary = rpm.expand(\"%{?-s*}\")\nif (summary ~= \"\") then\n summary = \"%{\" .. summary .. \"}\"\nend\nlocal description = rpm.expand(\"%{?-d*}\")\nif (description ~= \"\") then\n description = \"%{\" .. description .. \"}\"\nend\nlocal suffixes = rpm.expand(\"%{?-z*}\")\nfonts.metapkg(name, summary, description, suffixes)\n}", "fontpkg(z:avms)" => "%{lua:\nlocal fonts = require \"fedora.srpm.fonts\"\nlocal suffix = rpm.expand(\"%{?-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\nlocal forcemain = (rpm.expand(\"%{-m}\") ~= \"\")\nlocal forcesub = (rpm.expand(\"%{-s}\") ~= \"\")\nfonts.pkg(forcemain, forcesub, suffix, processall, verbose)\n}", "forgeautosetup(z:vNS:p:q)" => "%{lua:\nprint(rpm.expand(\"%autosetup %{-v} %{-N} %{?-S} %{?-p} %{?forgesetupargs\" .. rpm.expand(\"%{-z*}\") .. \"}\\n\"))\n}", "forgesetup(z:va)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nif (rpm.expand(\"%{-z}\") == \"\") and (rpm.expand(\"%{-a}\") ~= \"\") then\n for _,s in pairs(fedora.getsuffixes(\"forgesetupargs\")) do\n print(rpm.expand(\"%setup %{!-v:-q} %{?forgesetupargs\" .. s .. \"}\\n\"))\n end\nelse\n print( rpm.expand(\"%setup %{!-v:-q} %{?forgesetupargs\" .. rpm.expand(\"%{-z*}\") .. \"}\\n\"))\nend\n}", "gccgo_arches" => "mips mipsel mipsr6 mipsr6el mips64 mips64el mips64r6 mips64r6el", "getconfdir" => "<builtin>", "getncpus" => "<builtin>", "ghc_arches_with_ghci" => "%{ix86} x86_64 armv7hl ppc64 ppc64le aarch64 s390 s390x %{mips}", "global" => "<builtin>", "go_compiler" => "1", "goaltfiles(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.files(\"alt\", suffix, processall, verbose)\n}", "goaltpkg(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.pkg(\"alt\", suffix, processall, verbose)\n}", "gobuildflags" => "%{expand:%{gocompilerflags} -tags=\\\"rpm_crashtraceback \\\" -ldflags \\\"${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -extldflags '%__global_ldflags %{?__golang_extldflags}'\\\" -a -v -x}", "gocheck(z:ai:b:s:vd:t:rV:T:C:B:p:g:w)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal myenvflags = rpm.expand('%{?-i} %{?-v} %{?-V} %{?-T} %{?-C} %{?-B}')\nlocal mycheckflags = rpm.expand('%{!-i:-i \"%%{currentgoipath}\" }' ..\n '%{!-b:-b \"%%{gobuilddir}/bin\" }' ..\n '%{!-s:-s \"%%{gobuilddir}\" }' ..\n '%{!-V:-V \"%{version}-%{release}\" }' ..\n '%{!-T:%%{?currenttag: -T \"%%{?currenttag}\" }}' ..\n '%{!-C:%%{?currentcommit: -C \"%%{?currentcommit}\" }}' ..\n '%{!-B:%%{?currentbranch: -B \"%%{?currentbranch}\" }}' ..\n '%{!-p:-p \"%{buildroot}\" }' ..\n '%{!-g:-g \"%{gopath}\" }' ..\n '%{?gocheckflags} %{?**}')", "gochecks(z:ai:b:s:vd:t:rV:T:C:B:p:g:w)" => "%{expand:\n%{warn:%%gochecks is obsolete, use %%gocheck in %%check instead!}\n%gocheck %{-z} %{-a} %{-i} %{-b} %{-s} %{-v} %{-d} %{-t} %{-r} %{-V} %{-T} %{-C} %{-B} %{-p} %{-g} %{-w}\n}", "gocompilerflags" => "-buildmode pie -compiler gc", "godevelfiles(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.files(\"devel\", suffix, processall, verbose)\n}", "godevelpkg(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.pkg(\"devel\", suffix, processall, verbose)\n}", "gofilelist" => "devel.file-list", "goinstall(z:ai:b:s:o:O:ve:d:t:rV:T:C:B:p:g:)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal myenvflags = rpm.expand('%{?-i} %{?-v} %{?-V} %{?-T} %{?-C} %{?-B}')\nlocal myinstallflags = rpm.expand('%{!-i:-i \"%%{currentgoipath}\" }' ..\n '%{!-b:-b \"%%{gobuilddir}/bin\" }' ..\n '%{!-s:-s \"%%{gobuilddir}\" }' ..\n '%{!-o:-o \"%%{thisgofilelist}\" }' ..\n '%{!-O:-O \"%%{goworkdir}\" }' ..\n '%{!-V:-V \"%{version}-%{release}\" }' ..\n '%{!-T:%%{?currenttag: -T \"%%{?currenttag}\" }}' ..\n '%{!-C:%%{?currentcommit: -C \"%%{?currentcommit}\" }}' ..\n '%{!-B:%%{?currentbranch: -B \"%%{?currentbranch}\" }}' ..\n '%{!-p:-p \"%{buildroot}\" }' ..\n '%{!-g:-g \"%{gopath}\" }' ..\n '%{?goinstallflags} %{?**}')", "golang_arches" => "i386 i486 i586 i686 pentium3 pentium4 athlon geode x86_64 armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64 ppc64le s390x", "gomkdir(z:i:b:s:kv)" => "%{expand:\n%goenv %{?-z} %{?-i} %{?-v}\n%define mybuilddir %{?-b*}%{!-b:%{gobuilddir}}\n%define mygoipath %{?-i*}%{!-i:%{currentgoipath}}\n%define mysourcedir %{?-s*}%{!-s:%{currentgosourcedir}}\n%{!?-k:rm -fr \"%{mysourcedir}/vendor\"}\nif [[ ! -e \"%{mybuilddir}/bin\" ]] ; then\n install -m 0755 -vd \"%{mybuilddir}/bin\"\n export GOPATH=\"%{mybuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}\"\nfi\nif [[ ! -e \"%{mybuilddir}/src/%{mygoipath}\" ]] ; then\n install -m 0755 -vd \"$(dirname %{mybuilddir}/src/%{mygoipath})\"\n ln -fs \"%{mysourcedir}\" \"%{mybuilddir}/src/%{mygoipath}\"\nfi\ncd \"%{mybuilddir}/src/%{mygoipath}\"\n}", "gopath" => "/usr/share/gocode", "gopkgfiles(av)" => "%{expand:\n%godevelfiles -a %{-v}\n%goaltfiles -a %{-v}\n}", "goprep(z:ai:b:s:kerv)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal extract = (rpm.expand(\"%{-e}\") == \"\")\nlocal installdeps = (rpm.expand(\"%{-r}\") == \"\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal setupflags = rpm.expand(\"%{!-v:-q}\")\nlocal gomkdirflags = rpm.expand(\"%{?-i} %{?-b} %{?-s} %{-k} %{-v}\")\nlocal buildrequires = {}\nlocal function process(suffix)\n local zsuffix = \"\"\n if (suffix ~= \"\") and (suffix ~= nil) then\n zsuffix = \"-z \" .. suffix .. \" \"\n end\n if extract then\n print(rpm.expand(\"%setup \" .. setupflags .. \" %{?forgesetupargs\" .. suffix .. \"}\\n\"))\n end\n print( rpm.expand(\"%gomkdir \" .. zsuffix .. gomkdirflags .. \"\\n\"))\nend", "goprovflags" => "%{godefaultflags}", "gorpmname(c:)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nprint(go.rpmname(\"%1\", \"%{-c*}\"))\n}", "gotestextldflags" => "%__global_ldflags %{?__golang_extldflags}", "gpgverify(k:s:d:)" => "%{lua:\nlocal script = rpm.expand(\"%{_rpmconfigdir}/redhat/gpgverify \")\nlocal keyring = rpm.expand(\"%{-k*}\")\nlocal signature = rpm.expand(\"%{-s*}\")\nlocal data = rpm.expand(\"%{-d*}\")\nprint(script)\nif keyring ~= \"\" then\n print(rpm.expand(\"--keyring='%{SOURCE\" .. keyring .. \"}' \"))\nend\nif signature ~= \"\" then\n print(rpm.expand(\"--signature='%{SOURCE\" .. signature .. \"}' \"))\nend\nif data ~= \"\" then\n print(rpm.expand(\"--data='%{SOURCE\" .. data .. \"}' \"))\nend\n}", "ix86" => "i386 i486 i586 i686 pentium3 pentium4 athlon geode", "java" => "%(. /usr/share/java-utils/java-functions; set_javacmd; echo $JAVACMD)", "javac" => "%{java_home}/bin/javac", "journal_catalog_update" => "%{nil}", "kernel_arches" => "x86_64 s390x ppc64le aarch64 %{arm}", "ldconfig_post(n:)" => "%{?ldconfig:%post -p %ldconfig %{?*} %{-n:-n %{-n*}}\n%end}", "ldconfig_scriptlets(n:)" => "%{?ldconfig:\n%ldconfig_post %{?*} %{-n:-n %{-n*}}\n%ldconfig_postun %{?*} %{-n:-n %{-n*}}\n}", "listfiles(i:x:)" => "%{expand:\n%if %{lua: print(string.len(rpm.expand(\"%{?-i*}%{?listfiles_include}%*\")))}\n listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u)\n %if %{lua: print(string.len(rpm.expand(\"%{?-x*}%{?listfiles_exclude}\")))}\n while IFS= read -r finc ; do\n realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\\n | sort -u | grep -q \"${finc}\" || echo \"${finc}\"\n done <<< \"${listfiles_include}\"\n %else\n echo \"${listfiles_include}\"\n %endif\n%endif\n}", "lua" => "<builtin>", "lua_version" => "%{lua: print(string.sub(_VERSION, 5))}", "make_build" => "%{__make} %{_make_output_sync} %{?_smp_mflags} %{_make_verbose}", "makeinstall" => "\n echo \"warning: %%makeinstall is deprecated, try %%make_install instead\" 1>&2\n %{__make} \\\n\tprefix=%{?buildroot:%{buildroot}}%{_prefix} \\\n\texec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\n\tbindir=%{?buildroot:%{buildroot}}%{_bindir} \\\n\tsbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\n\tsysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\n\tdatadir=%{?buildroot:%{buildroot}}%{_datadir} \\\n\tincludedir=%{?buildroot:%{buildroot}}%{_includedir} \\\n\tlibdir=%{?buildroot:%{buildroot}}%{_libdir} \\\n\tlibexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\n\tlocalstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\n\tsharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\n\tmandir=%{?buildroot:%{buildroot}}%{_mandir} \\\n\tinfodir=%{?buildroot:%{buildroot}}%{_infodir} \\\n install", "meson_build" => "\n %{shrink:%{__meson} compile \n -C %{_vpath_builddir} \n -j %{_smp_build_ncpus} \n --verbose \n %{nil}}", "meson_test" => "\n %{shrink:%{__meson} test \n -C %{_vpath_builddir} \n --num-processes %{_smp_build_ncpus} \n --print-errorlogs \n %{nil}}", "mips32" => "mips mipsel mipsr6 mipsr6el", "mipseb" => "mips mipsr6 mips64 mips64r6", "mono_arches" => "%{ix86} x86_64 sparc sparcv9 ia64 %{arm} aarch64 alpha s390x ppc ppc64 ppc64le", "nil" => "%{!?nil}", "ninja_build" => "\n %{__ninja} %{__ninja_common_opts}", "ninja_test" => "\n %{__ninja} test %{__ninja_common_opts}", "nodejs_default_filter" => "%{expand: \n%global __provides_exclude_from ^%{nodejs_sitearch}/.*\\.node$\n}", "nodejs_fixdep" => "%{_rpmconfigdir}/nodejs-fixdep", "nodejs_sitearch" => "%{nodejs_sitelib}", "nodejs_symlink_deps" => "%{_rpmconfigdir}/nodejs-symlink-deps %{nodejs_sitelib}", "ocaml_natdynlink" => "aarch64 %{arm} %{ix86} ppc ppc64 ppc64le riscv64 s390x sparc sparcv9 x86_64", "ocaml_native_profiling" => "%{nil}", "optflags" => "%{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection", "pkgconfig_personalitydir" => "/usr/share/pkgconfig/personality.d", "py2_build" => "%{expand:\\\n sleep 1\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} build --executable=\"%{__python2} %{py2_shbang_opts}\" %{?*}\n sleep 1\n}", "py2_build_wheel" => "%{expand:\\\n sleep 1\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}\n sleep 1\n}", "py2_install" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py2_install_wheel" => "%{expand:\\\n %{__python2} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n for distinfo in %{buildroot}%{python2_sitelib}/*.dist-info %{buildroot}%{python2_sitearch}/*.dist-info; do\n if [ -f ${distinfo}/direct_url.json ]; then\n rm -fv ${distinfo}/direct_url.json\n sed -i '/direct_url.json/d' ${distinfo}/RECORD\n fi\n done\n}", "py2_shbang_opts_nodash" => "%(opts=%{py2_shbang_opts}; echo ${opts#-})", "py2_shebang_flags" => "%(opts=%{py2_shbang_opts}; echo ${opts#-})", "py3_build_egg" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}\n}", "py3_check_import(e:tf:)" => "%{expand:\\\n PATH=\"%{buildroot}%{_bindir}:$PATH\"\\\n PYTHONPATH=\"${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}\"\\\n _PYTHONSITE=\"%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}\"\\\n PYTHONDONTWRITEBYTECODE=1\\\n %{lua:\n local command = \"%{__python3} \"\n if rpm.expand(\"%{?py3_shebang_flags}\") ~= \"\" then\n command = command .. \"-%{py3_shebang_flags}\"\n end\n command = command .. \" %{_rpmconfigdir}/redhat/import_all_modules.py \"\n -- handle multiline arguments correctly, see https://bugzilla.redhat.com/2018809\n local args=rpm.expand('%{?**}'):gsub(\"[%s\\\\]*%s+\", \" \")\n print(command .. args)\n }\n}", "py3_install" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py3_install_wheel" => "%{expand:\\\n %{__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n for distinfo in %{buildroot}%{python3_sitelib}/*.dist-info %{buildroot}%{python3_sitearch}/*.dist-info; do\n if [ -f ${distinfo}/direct_url.json ]; then\n rm -fv ${distinfo}/direct_url.json\n sed -i '/direct_url.json/d' ${distinfo}/RECORD\n fi\n done\n}", "py3_shbang_opts_nodash" => "%(opts=%{py3_shbang_opts}; echo ${opts#-})", "py3_shebang_flags" => "%(opts=%{py3_shbang_opts}; echo ${opts#-})", "py_auto_byte_compile" => "1", "py_build_egg" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python} %{py_setup} %{?py_setup_args} bdist_egg %{?*}\n}", "py_byte_compile" => "\npy2_byte_compile () {\n python_binary=\"env PYTHONHASHSEED=0 %1\"\n bytecode_compilation_path=\"%2\"\n failure=0\n find $bytecode_compilation_path -type f -a -name \"*.py\" -print0 | xargs -0 $python_binary -s -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition(\"'\"$RPM_BUILD_ROOT\"'\")[2], doraise=True) for f in sys.argv[1:]]' || failure=1\n find $bytecode_compilation_path -type f -a -name \"*.py\" -print0 | xargs -0 $python_binary -s -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition(\"'\"$RPM_BUILD_ROOT\"'\")[2], doraise=True) for f in sys.argv[1:]]' || failure=1\n test $failure -eq 0\n}\n\npy3_byte_compile () {\n python_binary=\"env PYTHONHASHSEED=0 %1\"\n bytecode_compilation_path=\"%2\"\n PYTHONPATH=\"%{_rpmconfigdir}/redhat\" $python_binary -s -B -m compileall2 -o 0 -o 1 -s $RPM_BUILD_ROOT -p / $bytecode_compilation_path \n}\n\npy39_byte_compile () {\n python_binary=\"env PYTHONHASHSEED=0 %1\"\n bytecode_compilation_path=\"%2\"\n $python_binary -s -B -m compileall -o 0 -o 1 -s $RPM_BUILD_ROOT -p / $bytecode_compilation_path \n}\n\n# Path to intepreter should not contain any arguments \n[[ \"%1\" =~ \" -\" ]] && echo \"ERROR py_byte_compile: Path to interpreter should not contain any arguments\" >&2 && exit 1 \n# Get version without a dot (36 instead of 3.6), bash doesn't compare floats well \npython_version=$(%1 -c \"import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))\") \n# compileall2 is an enhanced fork of stdlib compileall module for Python >= 3.4 \n# and it was merged back to stdlib in Python >= 3.9 \nif [ \"$python_version\" -ge 39 ]; then \npy39_byte_compile \"%1\" \"%2\"; \nelif [ \"$python_version\" -ge 34 ]; then \npy3_byte_compile \"%1\" \"%2\"; \nelse \npy2_byte_compile \"%1\" \"%2\"; \nfi", "py_dist_name" => "%{lua:\n name = rpm.expand(\"%{?1:%{1}}\");\n canonical = string.gsub(string.lower(name), \"[^%w%[%]]+\", \"-\");\n print(canonical);\n}", "py_install_egg" => "%{expand:\\\n mkdir -p %{buildroot}%{python_sitelib}\n %{__python} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python_version}.egg %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py_provides" => "%{lua:\n local python = require 'fedora.srpm.python'\n local name = rpm.expand('%1')\n if name == '%1' then\n rpm.expand('%{error:%%py_provides requires at least 1 argument, the name to provide}')\n end\n local evr = rpm.expand('%2')\n if evr == '%2' then\n evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}')\n end\n print('Provides: ' .. name .. ' = ' .. evr .. '\\n')\n local provides = python.python_altprovides(name, evr)\n for i, provide in ipairs(provides) do\n print('Provides: ' .. provide .. '\\n')\n end\n}", "py_shbang_opts" => "-s", "py_shebang_fix" => "%{expand:\\\n if [ -f /usr/bin/pathfix%{python_version}.py ]; then\n pathfix=/usr/bin/pathfix%{python_version}.py\n else\n # older versions of Python don't have it and must BR /usr/bin/pathfix.py from python3-devel explicitly\n pathfix=/usr/bin/pathfix.py\n fi\n if [ -z \"%{?py_shebang_flags}\" ]; then\n shebang_flags=\"-k\"\n else\n shebang_flags=\"-ka%{py_shebang_flags}\"\n fi\n $pathfix -pni %{__python} $shebang_flags}", "pycached" => "%{lua:\n path = rpm.expand(\"%{?*}\")\n if (string.sub(path, \"-3\") ~= \".py\") then\n rpm.expand(\"%{error:%%pycached can only be used with paths explicitly ending with .py}\")\n else\n print(path)\n pyminor = path:match(\"/python3.(%d+)/\") or \"*\"\n dirname = path:match(\"(.*/)\")\n modulename = path:match(\".*/([^/]+).py\")\n print(\"\\n\" .. dirname .. \"__pycache__/\" .. modulename .. \".cpython-3\" .. pyminor .. \"{,.opt-?}.pyc\")\n end\n}", "pyproject_buildrequires(rxtNe:)" => "%{expand:\\\n%{-N:\n%{-r:%{error:The -N and -r options are mutually exclusive}}\n%{-x:%{error:The -N and -x options are mutually exclusive}}\n%{-e:%{error:The -N and -e options are mutually exclusive}}\n%{-t:%{error:The -N and -t options are mutually exclusive}}\n}\n%{-e:%{expand:%global toxenv %(%{__python3} -s %{_rpmconfigdir}/redhat/pyproject_construct_toxenv.py %{?**})}}\necho 'python%{python3_pkgversion}-devel'\necho 'python%{python3_pkgversion}dist(pip) >= 19'\necho 'python%{python3_pkgversion}dist(packaging)'\n%{!-N:if [ -f pyproject.toml ]; then\n echo 'python%{python3_pkgversion}dist(toml)'\nelif [ -f setup.py ]; then\n # Note: If the default requirements change, also change them in the script!\n echo 'python%{python3_pkgversion}dist(setuptools) >= 40.8'\n echo 'python%{python3_pkgversion}dist(wheel)'\nelse\n echo 'ERROR: Neither pyproject.toml nor setup.py found, consider using %%%%pyproject_buildrequires -N <requirements-file> if this is not a Python package.' >&2\n exit 1\nfi}\n# setuptools assumes no pre-existing dist-info\nrm -rfv *.dist-info/ >&2\nif [ -f %{__python3} ]; then\n RPM_TOXENV=\"%{toxenv}\" HOSTNAME=\"rpmbuild\" %{__python3} -s %{_rpmconfigdir}/redhat/pyproject_buildrequires.py %{?!_python_no_extras_requires:--generate-extras} --python3_pkgversion %{python3_pkgversion} %{?**}\nfi\n}", "pyproject_extras_subpkg(n:i:f:F)" => "%{expand:%{?python_extras_subpkg:%{python_extras_subpkg%{?!-i:%{?!-f:%{?!-F: -f %{_pyproject_ghost_distinfo}}}} %**}}}", "pyproject_install" => "%{expand:\\\nspecifier=$(ls %{_pyproject_wheeldir}/*.whl | xargs basename --multiple | sed -E 's/([^-]+)-([^-]+)-.+\\.whl/\\1==\\2/')\nTMPDIR=\"%{_pyproject_builddir}\" %{__python3} -m pip install --root %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links %{_pyproject_wheeldir} $specifier\nif [ -d %{buildroot}%{_bindir} ]; then\n %py3_shebang_fix %{buildroot}%{_bindir}/*\n rm -rfv %{buildroot}%{_bindir}/__pycache__\nfi\nrm -f %{_pyproject_ghost_distinfo}\nsite_dirs=()\n# Process %%{python3_sitelib} if exists\nif [ -d %{buildroot}%{python3_sitelib} ]; then\n site_dirs+=( \"%{python3_sitelib}\" )\nfi\n# Process %%{python3_sitearch} if exists and does not equal to %%{python3_sitelib}\nif [ %{buildroot}%{python3_sitearch} != %{buildroot}%{python3_sitelib} ] && [ -d %{buildroot}%{python3_sitearch} ]; then\n site_dirs+=( \"%{python3_sitearch}\" )\nfi\n# Process all *.dist-info dirs in sitelib/sitearch\nfor site_dir in ${site_dirs[@]}; do\n for distinfo in %{buildroot}$site_dir/*.dist-info; do\n echo \"%ghost ${distinfo#%{buildroot}}\" >> %{_pyproject_ghost_distinfo}\n sed -i 's/pip/rpm/' ${distinfo}/INSTALLER\n PYTHONPATH=%{_rpmconfigdir}/redhat \\\n %{__python3} -B %{_rpmconfigdir}/redhat/pyproject_preprocess_record.py \\\n --buildroot %{buildroot} --record ${distinfo}/RECORD --output %{_pyproject_record}\n rm -fv ${distinfo}/RECORD\n rm -fv ${distinfo}/REQUESTED\n done\ndone\nlines=$(wc -l %{_pyproject_ghost_distinfo} | cut -f1 -d\" \")\nif [ $lines -ne 1 ]; then\n echo -e \"\\n\\nWARNING: %%%%pyproject_extras_subpkg won't work without explicit -i or -F, found $lines dist-info directories.\\n\\n\" >&2\n rm %{_pyproject_ghost_distinfo} # any attempt to use this will fail\nfi\n}", "pyproject_wheel" => "%{expand:\\\n%_set_pytest_addopts\nmkdir -p \"%{_pyproject_builddir}\"\nCFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\" TMPDIR=\"%{_pyproject_builddir}\" \\\n%{__python3} -m pip wheel --wheel-dir %{_pyproject_wheeldir} --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --no-clean --progress-bar off --verbose .\n}", "python" => "%__python", "python2_platform" => "%(%{__python2} -Esc \"import sysconfig; print(sysconfig.get_platform())\")", "python2_sitelib" => "%(%{__python2} -Esc \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")", "python2_version_nodots" => "%(%{__python2} -Esc \"import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))\")", "python3_ext_suffix" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))\")", "python3_platform" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_platform())\")", "python3_sitearch" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_path('platlib'))\")", "python3_version" => "%(%{__python3} -Ic \"import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))\")", "python_disable_dependency_generator" => "\n%undefine __pythondist_requires \n%{nil}", "python_extras_subpkg(n:i:f:F)" => "%{expand:%{lua:\n local option_n = '-n (name of the base package)'\n local option_i = '-i (buildroot path to metadata)'\n local option_f = '-f (builddir path to a filelist)'\n local option_F = '-F (skip %%files section)'\n local value_n = rpm.expand('%{-n*}')\n local value_i = rpm.expand('%{-i*}')\n local value_f = rpm.expand('%{-f*}')\n local value_F = rpm.expand('%{-F}')\n local args = rpm.expand('%{*}')\n if value_n == '' then\n rpm.expand('%{error:%%%0: missing option ' .. option_n .. '}')\n end\n if value_i == '' and value_f == '' and value_F == '' then\n rpm.expand('%{error:%%%0: missing option ' .. option_i .. ' or ' .. option_f .. ' or ' .. option_F .. '}')\n end\n if value_i ~= '' and value_f ~= '' then\n rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_f .. ' options are not possible}')\n end\n if value_i ~= '' and value_F ~= '' then\n rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_F .. ' options are not possible}')\n end\n if value_f ~= '' and value_F ~= '' then\n rpm.expand('%{error:%%%0: simultaneous ' .. option_f .. ' and ' .. option_F .. ' options are not possible}')\n end\n if args == '' then\n rpm.expand('%{error:%%%0 requires at least one argument with \"extras\" name}')\n end\n local requires = 'Requires: ' .. value_n .. ' = %{?epoch:%{epoch}:}%{version}-%{release}'\n for extras in args:gmatch('[^%s,]+') do\n local rpmname = value_n .. '+' .. extras\n local pkgdef = '%package -n ' .. rpmname\n local summary = 'Summary: Metapackage for ' .. value_n .. ': ' .. extras .. ' extras'\n local description = '%description -n ' .. rpmname .. '\\n'\n local current_line = 'This is a metapackage bringing in'\n for _, word in ipairs({extras, 'extras', 'requires', 'for', value_n .. '.'}) do\n local line = current_line .. ' ' .. word\n if line:len() > 79 then\n description = description .. current_line .. '\\n'\n current_line = word\n else\n current_line = line\n end\n end\n description = description .. current_line .. '\\n' ..\n 'It makes sure the dependencies are installed.\\n'\n local files = ''\n if value_i ~= '' then\n files = '%files -n ' .. rpmname .. '\\n' .. '%ghost ' .. value_i\n elseif value_f ~= '' then\n files = '%files -n ' .. rpmname .. ' -f ' .. value_f\n end\n for i, line in ipairs({pkgdef, summary, requires, description, files, ''}) do\n print(line .. '\\n')\n end\n end\n}}", "python_platform_triplet" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))\")", "python_sitearch" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_path('platlib'))\")", "python_version" => "%(%{__python} -Esc \"import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))\")", "python_wheel_dir" => "%{_datadir}/%{python_wheel_pkg_prefix}-wheels", "qt5_qtwebengine_arches" => "%{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el", "riscv" => "%{riscv32} %{riscv64} %{riscv128}", "riscv32" => "riscv32", "rpmmacrodir" => "/usr/lib/rpm/macros.d", "selinux_modules_install(\"s:p:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n %{_sbindir}/semodule -n -s ${_policytype} -X %{!-p:200}%{-p*} -i %* || : \n %{_sbindir}/selinuxenabled && %{_sbindir}/load_policy || : \nfi \n%{nil}", "selinux_relabel_post(\"s:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif %{_sbindir}/selinuxenabled && [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n if [ -f %{_file_context_file_pre} ]; then \n %{_sbindir}/fixfiles -C %{_file_context_file_pre} restore &> /dev/null \n rm -f %{_file_context_file_pre} \n fi \nfi \n%{nil}", "selinux_requires" => "\nRequires: selinux-policy >= %{_selinux_policy_version} \nBuildRequires: pkgconfig(systemd) \nBuildRequires: selinux-policy \nBuildRequires: selinux-policy-devel \nRequires(post): selinux-policy-base >= %{_selinux_policy_version} \nRequires(post): libselinux-utils \nRequires(post): policycoreutils \n%if 0%{?fedora} || 0%{?rhel} > 7\nRequires(post): policycoreutils-python-utils \n%else \nRequires(post): policycoreutils-python \n%endif \n%{nil}", "selinux_unset_booleans(\"s:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif [ -d \"%{_selinux_store_policy_path}\" ]; then \n semanage_import='' \n for boolean in %*; do \n boolean_name=${boolean%=*} \n boolean_customized_string=$(grep \"$boolean_name$\" %_file_custom_defined_booleans | tail -n 1) \n if [ -n \"$boolean_customized_string\" ]; then \n awk \"/$boolean_customized_string/ && !f{f=1; next} 1\" %_file_custom_defined_booleans > %_file_custom_defined_booleans_tmp && mv %_file_custom_defined_booleans_tmp %_file_custom_defined_booleans \n if ! grep -q \"$boolean_name$\" %_file_custom_defined_booleans; then \n semanage_import=\"${semanage_import}\\n${boolean_customized_string}\" \n fi \n fi \n done; \n if %{_sbindir}/selinuxenabled && [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n /bin/echo -e \"$semanage_import\" | %{_sbindir}/semanage import -S \"${_policytype}\" \n elif test -d /usr/share/selinux/\"${_policytype}\"/base.lst; then \n /bin/echo -e \"$semanage_import\" | %{_sbindir}/semanage import -S \"${_policytype}\" -N \n fi \nfi \n%{nil}", "shrink" => "<builtin>", "sources" => "%{lua: for i, s in ipairs(sources) do print(s..\" \") end}", "suffix" => "<builtin>", "systemd_ordering" => "\nOrderWithRequires(post): systemd \nOrderWithRequires(preun): systemd \nOrderWithRequires(postun): systemd \n%{nil}", "systemd_postun" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun}} \n%{nil}", "systemd_preun" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_preun}} \nif [ $1 -eq 0 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Package removal, not upgrade \n /usr/lib/systemd/systemd-update-helper remove-system-units %{?*} || : \nfi \n%{nil}", "systemd_user_post" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_post}} \nif [ $1 -eq 1 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Initial installation \n /usr/lib/systemd/systemd-update-helper install-user-units %{?*} || : \nfi \n%{nil}", "systemd_user_postun_with_restart" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_postun_with_restart}} \nif [ $1 -ge 1 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Package upgrade, not uninstall \n /usr/lib/systemd/systemd-update-helper mark-restart-user-units %{?*} || : \nfi \n%{nil}", "sysusers_create" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \ncommand -v systemd-sysusers >/dev/null && systemd-sysusers %{?*} || : \n%{nil}", "sysusers_create_inline" => "\ncommand -v systemd-sysusers >/dev/null && systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \n%{?*} \nSYSTEMD_INLINE_EOF\n%{nil}", "sysusers_requires_compat" => "Requires(pre): shadow-utils", "texlive_posttrans" => "\nif [ -e /var/run/texlive/run-texhash ] && [ -e %{_bindir}/texhash ]; then %{_bindir}/texhash 2> /dev/null; rm -f /var/run/texlive/run-texhash; fi \nif [ -e /var/run/texlive/run-mtxrun ]; then export TEXMF=/usr/share/texlive/texmf-dist; export TEXMFCNF=/usr/share/texlive/texmf-dist/web2c; export TEXMFCACHE=/var/lib/texmf; %{_bindir}/mtxrun --generate &> /dev/null; rm -f /var/run/texlive/run-mtxrun; fi \n:", "tmpfiles_create" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# tmpfiles_create}} \ncommand -v systemd-tmpfiles >/dev/null && systemd-tmpfiles --create %{?*} || : \n%{nil}", "toolchain" => "gcc", "toxenv" => "%{default_toxenv}", "u2p" => "<builtin>", "udev_rules_update" => "%{nil}", "undefine" => "<builtin>", "url2path" => "<builtin>", "valgrind_arches" => "%{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64", "version_no_tilde" => "%{lua:\n local sep = rpm.expand('%1')\n local ver = rpm.expand('%2')\n\n if sep == '%1' then\n sep = '-'\n end\n\n if ver == '%2' then\n ver = rpm.expand('%version')\n end\n ver = ver:gsub('~', sep)\n\n print(ver)\n}", "warn" => "<builtin>", "without" => "%{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}" },
+ "macros" => { "GNAT_arches" => "%{GPRbuild_arches} ia64 ppc alpha", "GPRbuild_arches" => "%{ix86} x86_64 %{power64} s390x %{arm} aarch64", "Main" => "loop\nif processall then\n for _,s in pairs(fedora.getsuffixes(\"goipath\")) do\n process(s)\n end\nelse\n process(rpm.expand(\"%{?-z*}\"))\nend\n}", "P" => "<builtin>", "S" => "<builtin>", "__7zip" => "/usr/bin/7za", "___build_args" => "-e", "___build_cmd" => "%{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}", "___build_post" => "\n RPM_EC=$?\n for pid in $(jobs -p); do kill -9 ${pid} || continue; done\n exit ${RPM_EC}\n%{nil}", "___build_pre" => "\n RPM_SOURCE_DIR=\"%{u2p:%{_sourcedir}}\"\n RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\n RPM_OPT_FLAGS=\"%{optflags}\"\n RPM_LD_FLAGS=\"%{?build_ldflags}\"\n RPM_ARCH=\"%{_arch}\"\n RPM_OS=\"%{_os}\"\n RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\n export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\n RPM_DOC_DIR=\"%{_docdir}\"\n export RPM_DOC_DIR\n RPM_PACKAGE_NAME=\"%{NAME}\"\n RPM_PACKAGE_VERSION=\"%{VERSION}\"\n RPM_PACKAGE_RELEASE=\"%{RELEASE}\"\n export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE\n LANG=C\n export LANG\n unset CDPATH DISPLAY ||:\n %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\n export RPM_BUILD_ROOT}\n %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\n export CLASSPATH}\n PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\n export PKG_CONFIG_PATH\n CONFIG_SITE=${CONFIG_SITE:-NONE}\n export CONFIG_SITE\n \n %[%{verbose}?\"set -x\":\"\"]\n umask 022\n cd \"%{u2p:%{_builddir}}\"", "___build_shell" => "%{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh}", "___build_template" => "#!%{___build_shell}\n%{___build_pre}\n%{nil}", "__apply_patch(qp:m:)" => "\n%{lua:\nlocal file = rpm.expand(\"%{1}\")\nlocal num = rpm.expand(\"%{2}\")\nif posix.access(file, \"r\") then\n local options = rpm.expand(\"%{-q} %{-p:-p%{-p*}} %{-m:-m%{-m*}}\")\n local scm_apply = rpm.expand(\"%__scm_apply_%{__scm}\")\n print(rpm.expand(\"%{uncompress:\"..file..\"} | \"..scm_apply..\" \"..options..\" \"..file..\" \"..num..\"\\n\"))\nelse\n print(\"echo 'Cannot read \"..file..\"'; exit 1;\"..\"\\n\")\nend}", "__ar" => "ar", "__arch_install_post" => "/usr/lib/rpm/check-buildroot", "__as" => "as", "__awk" => "gawk", "__bootstrap" => "~bootstrap", "__brp_boot_efi_times" => "/usr/lib/rpm/brp-boot-efi-times", "__brp_check_rpaths" => "/usr/lib/rpm/check-rpaths", "__brp_compress" => "/usr/lib/rpm/brp-compress", "__brp_elfperms" => "%{_rpmconfigdir}/brp-elfperms", "__brp_fix_pyc_reproducibility" => "%{_rpmconfigdir}/redhat/brp-fix-pyc-reproducibility", "__brp_ldconfig" => "/usr/lib/rpm/redhat/brp-ldconfig", "__brp_llvm_compile_lto_elf" => "/usr/lib/rpm/redhat/brp-llvm-compile-lto-elf %{build_cflags} %{build_ldflags}", "__brp_mangle_shebangs" => "/usr/lib/rpm/redhat/brp-mangle-shebangs %{?__brp_mangle_shebangs_exclude:--shebangs \"%{?__brp_mangle_shebangs_exclude}\"} %{?__brp_mangle_shebangs_exclude_file:--shebangs-from \"%{__brp_mangle_shebangs_exclude_file}\"} %{?__brp_mangle_shebangs_exclude_from:--files \"%{?__brp_mangle_shebangs_exclude_from}\"} %{?__brp_mangle_shebangs_exclude_from_file:--files-from \"%{__brp_mangle_shebangs_exclude_from_file}\"}", "__brp_python_bytecompile" => "%{_rpmconfigdir}/redhat/brp-python-bytecompile \"\" \"%{?_python_bytecompile_errors_terminate_build}\" \"%{?_python_bytecompile_extra}\"", "__brp_python_hardlink" => "%{_rpmconfigdir}/redhat/brp-python-hardlink", "__brp_remove_la_files" => "%{_rpmconfigdir}/brp-remove-la-files", "__brp_strip" => "/usr/lib/rpm/brp-strip %{__strip}", "__brp_strip_comment_note" => "/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}", "__brp_strip_lto" => "/usr/lib/rpm/redhat/brp-strip-lto %{__strip}", "__brp_strip_static_archive" => "/usr/lib/rpm/brp-strip-static-archive %{__strip}", "__bzip2" => "/usr/bin/bzip2", "__bzr" => "/usr/bin/bzr", "__cargo_skip_build" => "%{lua:\nlocal crate = rpm.expand('%{crate}')\nlocal build_crate = false\nfor w in rpm.expand('%{?_build_crates}'):gmatch('%S+') do\n if w == crate then\n build_crate = true\n break\n end\nend\nif (rpm.expand('%{defined _module_build}') ~= '0' and not build_crate) then\n print(1)\nelse\n print(0)\nend}", "__cat" => "/usr/bin/cat", "__cc" => "%{expand:%%{__cc_%{toolchain}}}", "__cc_clang" => "clang", "__cc_gcc" => "gcc", "__cflags_arch_s390x" => "%[0%{?rhel} >= 8 ? \"-march=z13 -mtune=z14\" : \"-march=zEC12 -mtune=z13\"]", "__cflags_arch_x86_64" => "%[0%{?rhel} >= 9 ? \"-march=x86-64-v2\" : \"\"]", "__check_files" => "%{_rpmconfigdir}/check-files %{buildroot}", "__chmod" => "/usr/bin/chmod", "__chown" => "/usr/bin/chown", "__cmake" => "/usr/bin/cmake", "__cmake_builddir" => "%{!?__cmake_in_source_build:%{_vpath_builddir}}%{?__cmake_in_source_build:.}", "__cmake_path" => "^(%{_libdir}|%{_datadir})/cmake/.*/.*(Config.cmake|-config.cmake)$", "__cmake_provides" => "%{_rpmconfigdir}/cmake.prov", "__cmake_requires" => "%{_rpmconfigdir}/cmake.req", "__cp" => "/usr/bin/cp", "__cpp" => "%{expand:%%{__cpp_%{toolchain}}}", "__cpp_clang" => "clang-cpp", "__cpp_gcc" => "gcc -E", "__crates_url" => "https://crates.io/api/v1/crates/", "__ctest" => "/usr/bin/ctest", "__cxx" => "%{expand:%%{__cxx_%{toolchain}}}", "__cxx_clang" => "clang++", "__cxx_gcc" => "g++", "__debug_install_post" => "\n %{__find_debuginfo} \\\n %{?_smp_build_ncpus:-j%{_smp_build_ncpus}} \\\n %{?_missing_build_ids_terminate_build:--strict-build-id} \\\n %{?_no_recompute_build_ids:-n} \\\n %{?_include_minidebuginfo:-m} \\\n %{?_include_gdb_index:-i} \\\n %{?_unique_build_ids:--build-id-seed \"%{VERSION}-%{RELEASE}\"} \\\n %{?_unique_debug_names:--unique-debug-suffix \"-%{VERSION}-%{RELEASE}.%{_arch}\"} \\\n %{?_unique_debug_srcs:--unique-debug-src-base \"%{name}-%{VERSION}-%{RELEASE}.%{_arch}\"} \\\n %{?_find_debuginfo_dwz_opts} \\\n %{?_find_debuginfo_opts} \\\n %{?_debugsource_packages:-S debugsourcefiles.list} \\\n \"%{_builddir}/%{?buildsubdir}\"\n%{nil}", "__debuginfo_path" => "^/usr/lib/debug/.build-id/[^/]+/[^/]+\\.debug$", "__debuginfo_provides" => "%{lua:\n local file = rpm.expand(\"%1\")\n local b1, b2 = file:match(\"/([0-9a-f]+)/([0-9a-f]+).debug$\")\n print(string.format(\"debuginfo(build-id) = %s%s\\n\", b1, b2))\n}", "__default_python3_pkgversion" => "%__default_python3_version", "__default_python3_version" => "3.10", "__desktop_path" => "^%{_datadir}/applications/.*\\.desktop$", "__desktop_provides" => "%{lua:\n local executable = false\n local mimetypes = nil\n for line in io.lines(rpm.expand(\"%1\")) do\n if line:match(\"^Type%s*=%s*Application$\") or line:match(\"^Exec%s*=\") then\n executable = true\n elseif line:match(\"^MimeType%s*=\") then\n mimetypes = line:match(\"=%s*(.+)\")\n end\n end\n if executable then\n print(\"application()\\n\")\n print(string.format(\"application(%s)\\n\", rpm.expand(\"%{basename:%1}\")))\n if mimetypes then\n for mimetype in mimetypes:gmatch(\"([^;]+)\") do\n print(string.format(\"mimehandler(%s)\\n\", mimetype))\n end\n end\n end\n}", "__docdir_path" => "%{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{_datadir}/gnome/help:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man", "__elf_magic" => "^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$", "__elf_provides" => "%{_rpmconfigdir}/elfdeps --provides", "__elf_requires" => "%{_rpmconfigdir}/elfdeps --requires", "__extension_strip_flags" => "%{lua:\nlocal name = rpm.expand(\"%{1}\")\nlocal value = \" \" .. rpm.expand(\"%{build_\" .. name .. \"}\")\nlocal specs_pattern = \"%s+-specs=[^%s]+\"\nlocal lto_flags_pattern = rpm.expand(\"%{?_lto_cflags}\"):gsub(\"[%-%.]\", \"%%%1\")\nlocal result = value:gsub(specs_pattern, \" \"):gsub(lto_flags_pattern, \"\")\nprint(result)\n}", "__file" => "/usr/bin/file", "__find_debuginfo" => "/usr/bin/find-debuginfo", "__find_provides" => "%{_rpmconfigdir}/find-provides", "__find_requires" => "%{_rpmconfigdir}/find-requires", "__font_magic" => "[Ff]ont?( (program|collection))?( (text|data))", "__font_provides" => "%{_rpmconfigdir}/fontconfig.prov", "__font_requires" => "%{nil}", "__gem" => "/usr/bin/gem", "__git" => "/usr/bin/git", "__global_cflags" => "%{build_cflags}", "__global_compiler_flags" => "%{_general_options} %{_warning_options} %{_preprocessor_defines} %{_hardened_cflags} %{_annotation_cflags} %{_legacy_options}", "__global_cxxflags" => "%{build_cxxflags}", "__global_fcflags" => "%{build_fflags}", "__global_fflags" => "%{build_fflags}", "__global_ldflags" => "%{build_ldflags}", "__global_provides_exclude_from" => "%{?_docdir:%{_docdir}}", "__global_requires_exclude_from" => "%{?_docdir:%{_docdir}}", "__go_flags" => "path", "__go_path" => "^%{gopath}/src/.+/.goipath$", "__go_provides" => "go-rpm-integration provides --prefix \"%{buildroot}\" --go-path \"%{gopath}\" %{?goprovflags}", "__go_requires" => "go-rpm-integration requires --prefix \"%{buildroot}\" --go-path \"%{gopath}\" %{?goreqflags}", "__goaltinstall" => "%{expand:\ninstall -m 0755 -d \"%{buildroot}%{gopath}/src/%(dirname %{currentgoaltipath})\"\nln -rs \"%{buildroot}%{gopath}/src/%{currentgocanonipath}\" \"%{buildroot}%{gopath}/src/%{currentgoaltipath}\"\necho \"%{gopath}/src/%{currentgoaltipath}\" >> \"%{goworkdir}/%{currentgoaltfilelist}\"\n}", "__gobundled_flags" => "magic_and_path", "__gobundled_magic" => "^(.*, )?directory$", "__gobundled_path" => "^%{gopath}/src/.+/vendor/.+/.*$", "__gobundled_provides" => "%{_rpmconfigdir}/gobundled.prov", "__godevelinstall(-i:v)" => "%{expand:\n(\n%define __godevelinstall_ipath %{-i*}\ncd \"%{gobuilddir}/src/%{__godevelinstall_ipath}\"\n%define listfiles_include %{?currentgosupfiles}\n%define listfiles_exclude %{?currentgosupfilesex}\nIFS= gosupfiles=$(%listfiles\n)\nmapfile -t gosupfilesA <<< \"${gosupfiles}\"\ngo-rpm-integration install -i \"%{__godevelinstall_ipath}\" \\\n -b \"%{gobuilddir}/bin\" \\\n -s \"%{gobuilddir}\" \\\n -o \"%{currentgodevelfilelist}\" \\\n -O \"%{goworkdir}\" \\\n -V \"%{version}-%{release}\" \\\n %{?currenttag: -T \"%{?currenttag}\"} \\\n %{?currentcommit: -C \"%{?currentcommit}\"} \\\n %{?currentbranch: -B \"%{?currentbranch}\"} \\\n -p \"%{buildroot}\" \\\n -g \"%{gopath}\" \\\n %{?currentgoipathsex} \\\n %{?currentgoextensions} \\\n %{?goinstallflags} \\\n %{-v} ${gosupfilesA[@]:+\"${gosupfilesA[@]}\"}\n)\n}", "__godevelinstalldoc" => "%{expand:\n(\n%define listfiles_include %{?currentgodocs}\n%define listfiles_exclude %{?currentgodocsex}\nIFS= godocs=$(%listfiles\n)\nif [[ -n \"${godocs}\" ]] ; then\n while IFS= read -r f ; do\n echo %doc \\\"\"${f}\"\\\" >> \"%{goworkdir}/%{currentgodevelfilelist}\"\n done <<< \"${godocs}\"\nfi\n)\n(\n%define listfiles_include %{?currentgolicenses}\n%define listfiles_exclude %{?currentgolicensesex}\nIFS= golicenses=$(%listfiles\n)\nif [[ -n \"${golicenses}\" ]] ; then\n while IFS= read -r f; do\n echo \"%\"license \\\"\"${f}\"\\\" >> \"%{goworkdir}/%{currentgodevelfilelist}\"\n done <<< \"${golicenses}\"\nfi\n)\n}", "__gosymlink_flags" => "magic_and_path", "__gosymlink_magic" => "^(.*, )?(broken )?symbolic link to .*$", "__gosymlink_path" => "^%{gopath}/src/.*$", "__gosymlink_provides" => "%{_rpmconfigdir}/gosymlink.deps provides --prefix \"%{buildroot}\" --go-path \"%{gopath}\"", "__gosymlink_requires" => "%{_rpmconfigdir}/gosymlink.deps requires --prefix \"%{buildroot}\" --go-path \"%{gopath}\"", "__gpg" => "/usr/bin/gpg2", "__gpg_reserved_space" => "4096", "__gpg_sign_cmd" => "%{__gpg} \n\tgpg --no-verbose --no-armor \n\t%{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}} \n\t--no-secmem-warning \n\t%{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} \n\t-u \"%{_gpg_name}\" -sbo %{__signature_filename} %{__plaintext_filename}", "__grep" => "/usr/bin/grep", "__gstreamer1_path" => "^%{_libdir}/gstreamer-1.*/.*.so$", "__gstreamer1_provides" => "%{_rpmconfigdir}/gstreamer1.prov", "__gzip" => "/usr/bin/gzip", "__hg" => "/usr/bin/hg", "__id" => "/usr/bin/id", "__id_u" => "%{__id} -u", "__install" => "/usr/bin/install", "__isa" => "%{__isa_name}-%{__isa_bits}", "__isa_bits" => "64", "__isa_name" => "x86", "__kmod_path" => "^/lib/modules/.*/(modules.builtin|.*ko)", "__kmod_provides" => "%{lua:\n function basename(fn)\n return string.gsub(fn, \"(.*/)(.*)\", \"%2\")\n end\n function printdep(mod)\n print(\"kmod(\"..mod..\")\")\n end\n local fn = rpm.expand(\"%{1}\")\n local bn = basename(fn)\n if bn == \"modules.builtin\" then\n for l in io.lines(fn) do\n printdep(basename(l))\n end\n else\n local mod = string.match(bn, \"%g+.ko\")\n if mod then\n printdep(mod)\n end\n end\n}", "__ld" => "/usr/bin/ld", "__libsymlink_flags" => "magic_and_path", "__libsymlink_magic" => "^symbolic link to .*lib.*.so..*$", "__libsymlink_path" => "^.*.so$", "__libsymlink_requires" => "%{_rpmconfigdir}/elfdeps --provides --soname-only", "__ln_s" => "ln -s", "__lrzip" => "/usr/bin/lrzip", "__lzip" => "/usr/bin/lzip", "__make" => "/usr/bin/make", "__meson" => "/usr/bin/meson", "__meson_auto_features" => "enabled", "__meson_wrap_mode" => "nodownload", "__metainfo_path" => "^%{_datadir}/(appdata|metainfo)/.*\\.(appdata|metainfo)\\.xml$", "__metainfo_provides" => "%{lua:\n print(\"metainfo()\\n\")\n print(string.format(\"metainfo(%s)\\n\", rpm.expand(\"%{basename:%1}\")))\n}", "__mkdir" => "/usr/bin/mkdir", "__mkdir_p" => "/usr/bin/mkdir -p", "__mv" => "/usr/bin/mv", "__ninja" => "/usr/bin/ninja", "__ninja_common_opts" => "-v %{?_smp_mflags}", "__nodejs" => "%{_bindir}/node", "__nodejs_native_path" => "^/usr/lib.*/node_modules/.*\\.node$", "__nodejs_native_requires" => "%{_rpmconfigdir}/nodejs_native.req", "__nodejs_path" => "^/usr/lib(64)?/node_modules/[^/]+/package\\.json$", "__nodejs_provides" => "%{_rpmconfigdir}/nodejs.prov", "__nodejs_requires" => "%{_rpmconfigdir}/nodejs.req", "__nodejs_suggests" => "%{_rpmconfigdir}/nodejs.req --optional", "__objdump" => "/usr/bin/objdump", "__ocaml_flags" => "magic_and_path", "__ocaml_magic" => "^(ELF|Objective caml|OCaml) .*$", "__ocaml_path" => ".(cma|cmi|cmo|cmx|cmxa|cmxs)$", "__ocaml_provides" => "%{_rpmconfigdir}/ocamldeps.sh --provides", "__ocaml_requires" => "%{_rpmconfigdir}/ocamldeps.sh --requires", "__os_install_post" => "\n %[ \"%{toolchain}\" == \"clang\" ? \"%{?__brp_llvm_compile_lto_elf}\" : \"%{nil}\" ] \n %{?__brp_ldconfig} \n %{?__brp_compress} \n %{!?__debug_package:\n %{?__brp_strip} \n %{?__brp_strip_comment_note} \n } \n %{?__brp_strip_lto} \n %{?__brp_strip_static_archive} \n %{?__brp_check_rpaths} \n %{?__brp_mangle_shebangs} \n %{__os_install_post_python} \n%{nil}", "__os_install_post_python" => "\n %{?py_auto_byte_compile:%{?__brp_python_bytecompile}} \n %{?py_reproducible_pyc_path:%{?__brp_fix_pyc_reproducibility} \"%{py_reproducible_pyc_path}\"} \n %{?__brp_python_hardlink} \n%{nil}", "__patch" => "/usr/bin/patch", "__perl" => "%{_bindir}/perl", "__pkgconfig_path" => "^((%{_libdir}|%{_datadir})/pkgconfig/.*.pc|%{_bindir}/pkg-config)$", "__pkgconfig_provides" => "%{_rpmconfigdir}/pkgconfigdeps.sh --provides", "__pkgconfig_requires" => "%{_rpmconfigdir}/pkgconfigdeps.sh --requires", "__plugindir" => "%{_libdir}/rpm-plugins", "__psdriver_magic" => "^PPD file.*$", "__psdriver_path" => "^(/usr/lib/cups/driver/.*|%{_datadir}/cups/drv/.*.drv)$", "__psdriver_provides" => "%{_rpmconfigdir}/postscriptdriver.prov", "__pypi_default_extension" => "tar.gz", "__pypi_url" => "https://files.pythonhosted.org/packages/source/", "__pytest" => "/usr/bin/pytest%(test %{python3_pkgversion} == 3 || echo -%{python3_version})", "__python" => "%{error:attempt to use unversioned python, define %%__python to %{__python2} or %{__python3} explicitly}", "__python2" => "/usr/bin/python2", "__python3" => "/usr/bin/python3", "__python_path" => "^((%{_prefix}/lib(64)?/python[[:digit:]]+\\.[[:digit:]]+/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\\.[[:digit:]]+))$", "__python_provides" => "%{lua:\n -- Match buildroot/payload paths of the form\n -- /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR\n -- generating a line of the form\n -- python(abi) = MAJOR.MINOR\n -- (Don't match against -config tools e.g. /usr/bin/python2.6-config)\n local path = rpm.expand('%1')\n if path:match('/usr/bin/python%d+%.%d+$') then\n local provides = path:gsub('.*/usr/bin/python(%d+%.%d+)', 'python(abi) = %1')\n print(provides)\n end\n}", "__python_requires" => "%{lua:\n -- Match buildroot paths of the form\n -- /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and\n -- /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/\n -- generating a line of the form:\n -- python(abi) = MAJOR.MINOR\n local path = rpm.expand('%1')\n if path:match('/usr/lib%d*/python%d+%.%d+/.*') then\n local requires = path:gsub('.*/usr/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1')\n print(requires)\n end\n}", "__pythondist_path" => "^/usr/lib(64)?/python[3-9]\\.[[:digit:]]+/site-packages/[^/]+\\.(dist-info|egg-info|egg-link)$", "__pythondist_provides" => "%{_rpmconfigdir}/pythondistdeps.py --provides --normalized-names-format pep503 --package-name %{name} --normalized-names-provide-both --majorver-provides-versions %{__default_python3_version}", "__pythondist_requires" => "%{_rpmconfigdir}/pythondistdeps.py --requires --normalized-names-format pep503 --package-name %{name} %{?!_python_no_extras_requires:--require-extras-subpackages} --console-scripts-nodep-setuptools-since 3.10", "__pythonname_path" => "^/", "__pythonname_provides" => "%{lua:\n local python = require 'fedora.srpm.python'\n -- this macro is called for each file in a package, the path being in %1\n -- but we don't need to know the path, so we would get for each file: Macro %1 defined but not used within scope\n -- in here, we expand %name conditionally on %1 to suppress the warning\n local name = rpm.expand('%{?1:%{name}}')\n local evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}')\n local provides = python.python_altprovides_once(name, evr)\n -- provides is either an array/table or nil\n -- nil means the function was already called with the same arguments:\n -- either with another file in %1 or manually via %py_provide\n if provides then\n for i, provide in ipairs(provides) do\n print(provide .. ' ')\n end\n end\n}", "__quilt" => "/usr/bin/quilt", "__rm" => "/usr/bin/rm", "__scm" => "patch", "__scm_apply_bzr(qp:m:)" => "\n%{__patch} %{-p:-p%{-p*}} %{-q:-s}\n%{__bzr} commit %{-q} -m %{-m*}", "__scm_apply_gendiff(qp:m:)" => "\n%{__patch} %{-p:-p%{-p*}} %{-q:-s} --fuzz=%{_default_patch_fuzz} %{_default_patch_flags} -b --suffix \".%{2}\"", "__scm_apply_git(qp:m:)" => "\n%{__git} apply --index --reject %{-p:-p%{-p*}} -\n%{__git} commit %{-q} -m %{-m*} --author \"%{__scm_author}\"", "__scm_apply_git_am(qp:m:)" => "\n%{__git} am --reject %{-q} %{-p:-p%{-p*}}", "__scm_apply_hg(qp:m:)" => "\n%{__hg} import - %{-p:-p%{-p*}} %{-q} -m %{-m*} --user \"%{__scm_author}\"", "__scm_apply_patch(qp:m:)" => "\n%{__patch} %{-p:-p%{-p*}} %{-q:-s} --fuzz=%{_default_patch_fuzz} %{_default_patch_flags}", "__scm_apply_quilt(qp:m:)" => "\n%{__quilt} import %{-p:-p%{-p*}} %{1} && %{__quilt} push %{-q}", "__scm_author" => "%{__scm_username} %{__scm_usermail}", "__scm_setup_bzr(q)" => "\n%{__bzr} init %{-q}\n%{__bzr} whoami --branch \"%{__scm_author}\"\n%{__bzr} add .\n%{__bzr} commit %{-q} -m \"%{NAME}-%{VERSION} base\"", "__scm_setup_gendiff(q)" => "%{nil}", "__scm_setup_git(q)" => "\n%{__git} init %{-q}\n%{__git} config user.name \"%{__scm_username}\"\n%{__git} config user.email \"%{__scm_usermail}\"\n%{__git} config gc.auto 0\n%{__git} add --force .\n%{__git} commit %{-q} --allow-empty -a\\\n\t--author \"%{__scm_author}\" -m \"%{NAME}-%{VERSION} base\"", "__scm_setup_git_am(q)" => "\n%{expand:%__scm_setup_git %{-q}}", "__scm_setup_hg(q)" => "\n%{__hg} init %{-q} .\n%{__hg} add %{-q} .\n%{__hg} commit %{-q} --user \"%{__scm_author}\" -m \"%{NAME}-%{VERSION} base\"", "__scm_setup_patch(q)" => "%{nil}", "__scm_setup_quilt(q)" => "%{nil}", "__scm_usermail" => "<rpm-build>", "__scm_username" => "rpm-build", "__script_flags" => "exeonly", "__script_magic" => "^.* script[, ].*$", "__script_requires" => "%{_rpmconfigdir}/script.req", "__sed" => "/usr/bin/sed", "__spec_build_args" => "%{___build_args}", "__spec_build_body" => "%{___build_body}", "__spec_build_cmd" => "%{___build_cmd}", "__spec_build_post" => "%{___build_post}", "__spec_build_pre" => "%{___build_pre}", "__spec_build_shell" => "%{___build_shell}", "__spec_build_template" => "#!%{__spec_build_shell}\n%{__spec_build_pre}\n%{nil}", "__spec_buildrequires_args" => "%{___build_args}", "__spec_buildrequires_body" => "%{___build_body}", "__spec_buildrequires_cmd" => "%{___build_cmd}", "__spec_buildrequires_post" => "%{___build_post}", "__spec_buildrequires_pre" => "%{___build_pre}", "__spec_buildrequires_shell" => "%{___build_shell}", "__spec_buildrequires_template" => "#!%{__spec_buildrequires_shell}\n%{__spec_buildrequires_pre}\n%{nil}", "__spec_check_args" => "%{___build_args}", "__spec_check_body" => "%{___build_body}", "__spec_check_cmd" => "%{___build_cmd}", "__spec_check_post" => "%{___build_post}", "__spec_check_pre" => "%{___build_pre}", "__spec_check_shell" => "%{___build_shell}", "__spec_check_template" => "#!%{__spec_check_shell}\n%{__spec_check_pre}\n%{nil}", "__spec_clean_args" => "%{___build_args}", "__spec_clean_body" => "%{___build_body}", "__spec_clean_cmd" => "%{___build_cmd}", "__spec_clean_post" => "%{___build_post}", "__spec_clean_pre" => "%{___build_pre}", "__spec_clean_shell" => "%{___build_shell}", "__spec_clean_template" => "#!%{__spec_clean_shell}\n%{__spec_clean_pre}\n%{nil}", "__spec_install_args" => "%{___build_args}", "__spec_install_body" => "%{___build_body}", "__spec_install_cmd" => "%{___build_cmd}", "__spec_install_post" => "\n %{?__debug_package:%{__debug_install_post}}\n %{__arch_install_post}\n %{__os_install_post}\n%{nil}", "__spec_install_pre" => "%{___build_pre}\n [ \"$RPM_BUILD_ROOT\" != \"/\" ] && rm -rf \"${RPM_BUILD_ROOT}\"\n mkdir -p \"`dirname \"$RPM_BUILD_ROOT\"`\"\n mkdir \"$RPM_BUILD_ROOT\"\n%{nil}", "__spec_install_shell" => "%{___build_shell}", "__spec_install_template" => "#!%{__spec_install_shell}\n%{__spec_install_pre}\n%{nil}", "__spec_prep_args" => "%{___build_args}", "__spec_prep_body" => "%{___build_body}", "__spec_prep_cmd" => "%{___build_cmd}", "__spec_prep_post" => "%{___build_post}", "__spec_prep_pre" => "%{___build_pre}", "__spec_prep_shell" => "%{___build_shell}", "__spec_prep_template" => "#!%{__spec_prep_shell}\n%{__spec_prep_pre}\n%{nil}", "__spec_rmbuild_args" => "%{___build_args}", "__spec_rmbuild_body" => "%{___build_body}", "__spec_rmbuild_cmd" => "%{___build_cmd}", "__spec_rmbuild_post" => "%{___build_post}", "__spec_rmbuild_pre" => "%{___build_pre}", "__spec_rmbuild_shell" => "%{___build_shell}", "__spec_rmbuild_template" => "#!%{__spec_rmbuild_shell}\n%{__spec_rmbuild_pre}\n%{nil}", "__strip" => "/usr/bin/strip", "__systemd_someargs_0(:)" => "%{error:The %%%1 macro requires some arguments}", "__systemd_twoargs_2" => "%{nil}", "__sysusers_path" => "^%{_sysusersdir}/.*\\.conf$", "__sysusers_provides" => "%{_rpmconfigdir}/sysusers.prov", "__tar" => "/usr/bin/tar", "__transaction_audit" => "%{__plugindir}/audit.so", "__transaction_dbus_announce" => "%{__plugindir}/dbus_announce.so", "__transaction_fapolicyd" => "%{__plugindir}/fapolicyd.so", "__transaction_fsverity" => "%{__plugindir}/fsverity.so", "__transaction_ima" => "%{__plugindir}/ima.so", "__transaction_prioreset" => "%{__plugindir}/prioreset.so", "__transaction_selinux" => "%{__plugindir}/selinux.so", "__transaction_syslog" => "%{__plugindir}/syslog.so", "__transaction_systemd_inhibit" => "%{__plugindir}/systemd_inhibit.so", "__unzip" => "/usr/bin/unzip", "__urlhelper_proxyopts" => "%{?_httpproxy:--proxy %{_httpproxy}%{?_httpport::%{_httpport}}}%{!?_httpproxy:%{nil}}", "__urlhelpercmd" => "/usr/bin/curl", "__urlhelperopts" => "--silent --show-error --fail --globoff --location -o", "__vsflags" => "0xf0000", "__xz" => "/usr/bin/xz", "__zstd" => "/usr/bin/zstd", "_annobin_clang_plugin" => "%dnl-fplugin=/usr/lib64/clang/`clang -dumpversion`/lib/annobin.so", "_annobin_gcc_plugin" => "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1", "_annotated_build" => "1", "_annotation_cflags" => "%[ \"%{_target_cpu}\" == \"armv7hl\" ? \"\" : \"%{_annotation_plugin}\" ]", "_annotation_ldflags" => "%{?_lto_cflags:%{_annotation_cflags}}", "_annotation_plugin" => "%{?_annotated_build:%{expand:%%{_annobin_%{toolchain}_plugin}}}", "_arch" => "x86_64", "_binaries_in_noarch_packages_terminate_build" => "1", "_binary_filedigest_algorithm" => "8", "_binary_payload" => "w19.zstdio", "_bindir" => "%{_exec_prefix}/bin", "_binfmtdir" => "/usr/lib/binfmt.d", "_build" => "%{_host}", "_build_alias" => "%{_host_alias}", "_build_arch" => "x86_64", "_build_cpu" => "%{_host_cpu}", "_build_id_links" => "compat", "_build_name_fmt" => "%%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm", "_build_os" => "%{_host_os}", "_build_vendor" => "%{_host_vendor}", "_builddir" => "%{_topdir}/BUILD", "_buildrootdir" => "%{_topdir}/BUILDROOT", "_buildshell" => "/bin/sh", "_changelog_trimage" => "%{expr:2*365*24*60*60}", "_changelog_trimtime" => "0", "_clang_lto_cflags" => "-flto", "_cmake_lib_suffix64" => "-DLIB_SUFFIX=64", "_cmake_shared_libs" => "-DBUILD_SHARED_LIBS:BOOL=ON", "_cmake_skip_rpath" => "-DCMAKE_SKIP_RPATH:BOOL=ON", "_cmake_version" => "3.21.3", "_cmmscolordir" => "%_colordir/cmms", "_color_output" => "never", "_colordir" => "%_datadir/color", "_configure" => "./configure", "_configure_gnuconfig_hack" => "1", "_configure_libtool_hardening_hack" => "1", "_datadir" => "%{_datarootdir}", "_datarootdir" => "%{_prefix}/share", "_db_backend" => "sqlite", "_dbpath" => "%{_var}/lib/rpm", "_dbpath_rebuild" => "%{_dbpath}", "_debuginfo_subpackages" => "1", "_debuginfo_template" => "\n%package debuginfo\nSummary: Debug information for package %{name}\nGroup: Development/Debug\nAutoReq: 0\nAutoProv: 1\n%description debuginfo\nThis package provides debug information for package %{name}.\nDebug information is useful when developing applications that use this\npackage or when debugging this package.\n%files debuginfo -f debugfiles.list\n%{nil}", "_debugsource_packages" => "1", "_debugsource_template" => "\n%package debugsource\nSummary: Debug sources for package %{name}\nGroup: Development/Debug\nAutoReqProv: 0\n%description debugsource\nThis package provides debug sources for package %{name}.\nDebug sources are useful when developing applications that use this\npackage or when debugging this package.\n%files debugsource -f debugsourcefiles.list\n%{nil}", "_default_patch_flags" => "--no-backup-if-mismatch -f", "_default_patch_fuzz" => "0", "_defaultdocdir" => "%{_datadir}/doc", "_defaultlicensedir" => "%{_datadir}/licenses", "_disable_source_fetch" => "1", "_docdir_fmt" => "%%{NAME}", "_duplicate_files_terminate_build" => "0", "_dwz_limit" => "%{expand:%%{?%{1}_%{_arch}}%%{!?%{1}_%{_arch}:%%%{1}}}", "_dwz_low_mem_die_limit" => "10000000", "_dwz_low_mem_die_limit_armv5tel" => "4000000", "_dwz_low_mem_die_limit_armv7hl" => "4000000", "_dwz_max_die_limit" => "50000000", "_dwz_max_die_limit_armv5tel" => "10000000", "_dwz_max_die_limit_armv7hl" => "10000000", "_dwz_max_die_limit_x86_64" => "110000000", "_efi_srpm_macros_setup" => "%{expand:%{lua:\n -- test if our arch matches\n local function arch(archmacro)\n local target = rpm.expand(\" %{_target_cpu} \")\n local arches = rpm.expand(\" \" .. archmacro .. \" \")\n local match = string.match(arches, target)\n return (match ~= nil)\n end\n -- give us the arch...\n local function getarch()\n if arch(\"ia64\") then\n return(\"ia64\")\n elseif arch(\"x86_64\") then\n return(\"x64\")\n elseif arch(\"%{ix86}\") then\n return(\"ia32\")\n elseif arch(\"aarch64\") then\n return(\"aa64\")\n elseif arch(\"%{arm}\") then\n return(\"arm\")\n else\n return(\"none\")\n end\n end\n -- alt arch\n local function getaltarch()\n if arch(\"x86_64\") then\n return(\"ia32\")\n else\n return(\"none\")\n end\n end\n -- make some macros\n local done = rpm.expand(\"%{?_efi}\")\n if done == nil or done == \"\" then\n local arch = getarch()\n local alt = getaltarch()\n print(\"%global _efi x86_64 aarch64 armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl i386 i486 i586 i686 pentium3 pentium4 athlon geode\\n\")\n print(\"%global _efi_vendor fedora\\n\")\n if arch == \"none\" then\n print(\"%global _efi_has_arch 0\\n\")\n else\n print(\"%global _efi_has_arch 1\\n\")\n end\n print(\"%global _efi_arch \" .. getarch() .. \"\\n\")\n print(\"%global _efi_arch_upper \" .. string.upper(getarch()) .. \"\\n\")\n if alt == \"none\" then\n print(\"%global _efi_has_alt_arch 0\\n\")\n else\n print(\"%global _efi_has_alt_arch 1\\n\")\n end\n print(\"%global _efi_alt_arch \" .. alt .. \"\\n\")\n print(\"%global _efi_alt_arch_upper \" .. string.upper(alt) .. \"\\n\")\n end\n}}", "_empty_manifest_terminate_build" => "1", "_enable_debug_packages" => "1", "_environmentdir" => "/usr/lib/environment.d", "_environmnentdir" => "%{warn:Use %%_environmentdir instead}%_environmentdir", "_exec_prefix" => "%{_prefix}", "_file_context_file" => "%{_sysconfdir}/selinux/${SELINUXTYPE}/contexts/files/file_contexts", "_file_context_file_pre" => "%{_localstatedir}/lib/rpm-state/file_contexts.pre", "_file_custom_defined_booleans" => "%{_selinux_store_policy_path}/rpmbooleans.custom", "_file_custom_defined_booleans_tmp" => "%{_selinux_store_policy_path}/rpmbooleans.custom.tmp", "_fileattrsdir" => "%{_rpmconfigdir}/fileattrs", "_find_debuginfo_dwz_opts" => "--run-dwz\\\n --dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\\\n --dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit}", "_fix_broken_configure_for_lto" => "\n for file in $(find . -type f -name configure -print); do \n %{__sed} -r --in-place=.backup 's/^char \\(\\*f\\) \\(\\) = /__attribute__ ((used)) char (*f) () = /g' $file; \n diff -u $file.backup $file && mv $file.backup $file \n %{__sed} -r --in-place=.backup 's/^char \\(\\*f\\) \\(\\);/__attribute__ ((used)) char (*f) ();/g' $file; \n diff -u $file.backup $file && mv $file.backup $file \n %{__sed} -r --in-place=.backup 's/^char \\$2 \\(\\);/__attribute__ ((used)) char \\$2 ();/g' $file; \n diff -u $file.backup $file && mv $file.backup $file \n %{__sed} --in-place=.backup '1{$!N;$!N};$!N;s/int x = 1;\\nint y = 0;\\nint z;\\nint nan;/volatile int x = 1; volatile int y = 0; volatile int z, nan;/;P;D' $file; \n diff -u $file.backup $file && mv $file.backup $file \n %{__sed} --in-place=.backup 's#^lt_cv_sys_global_symbol_to_cdecl=.*#lt_cv_sys_global_symbol_to_cdecl=\"sed -n -e '\"'\"'s/^T .* \\\\(.*\\\\)$/extern int \\\\1();/p'\"'\"' -e '\"'\"'s/^$symcode* .* \\\\(.*\\\\)$/extern char \\\\1;/p'\"'\"'\"#' $file; \n diff -u $file.backup $file && mv $file.backup $file \n done", "_fixperms" => "%{__chmod} -Rf a+rX,u+w,g-w,o-w", "_fmoddir" => "%{_libdir}/gfortran/modules", "_fontbasedir" => "/usr/share/fonts", "_fontconfig_confdir" => "/etc/fonts/conf.d", "_fontconfig_masterdir" => "/etc/fonts", "_fontconfig_templatedir" => "/usr/share/fontconfig/conf.avail", "_gcc_lto_cflags" => "-flto=auto -ffat-lto-objects", "_general_options" => "-O2 %{?_lto_cflags} -fexceptions -g -grecord-gcc-switches -pipe", "_gnu" => "-gnu", "_hardened_build" => "1", "_hardened_cflags" => "%{?_hardened_build:%{_hardening_cflags}}", "_hardened_ldflags" => "%{?_hardened_build:%{_hardening_ldflags}}", "_hardening_cflags" => "%{expand:%%{_hardening_%{toolchain}_cflags}} -fstack-protector-strong", "_hardening_clang_cflags" => "--config /usr/lib/rpm/redhat/redhat-hardened-clang.cfg", "_hardening_gcc_cflags" => "-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1", "_hardening_ldflags" => "-Wl,-z,now %[ \"%{toolchain}\" == \"gcc\" ? \"-specs=/usr/lib/rpm/redhat/redhat-hardened-ld\" : \"\" ]", "_hkp_keyserver" => "http://pgp.mit.edu", "_hkp_keyserver_query" => "%{_hkp_keyserver}:11371/pks/lookup?op=get&search=0x", "_host" => "x86_64-redhat-linux-gnu", "_host_alias" => "x86_64-redhat-linux-gnu%{nil}", "_host_cpu" => "x86_64", "_host_os" => "linux", "_host_vendor" => "redhat", "_icccolordir" => "%_colordir/icc", "_include_gdb_index" => "1", "_include_minidebuginfo" => "1", "_includedir" => "%{_prefix}/include", "_infodir" => "%{_datarootdir}/info", "_initddir" => "%{_sysconfdir}/rc.d/init.d", "_initrddir" => "%{_initddir}", "_install_langs" => "all", "_install_script_path" => "/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin", "_invalid_encoding_terminates_build" => "1", "_isa" => "%{?__isa:(%{__isa})}%{!?__isa:%{nil}}", "_ivyxmldir" => "%{_datadir}/ivy-xmls", "_javaconfdir" => "%{_sysconfdir}/java", "_javadir" => "%{_datadir}/java", "_javadocdir" => "%{_datadir}/javadoc", "_jnidir" => "%{_prefix}/lib/java", "_journalcatalogdir" => "/usr/lib/systemd/catalog", "_jvmcommondatadir" => "%{_datadir}/jvm-common", "_jvmcommonlibdir" => "%{_prefix}/lib/jvm-common", "_jvmcommonsysconfdir" => "%{_sysconfdir}/jvm-common", "_jvmdatadir" => "%{_datadir}/jvm", "_jvmdir" => "%{_prefix}/lib/jvm", "_jvmlibdir" => "%{_prefix}/lib/jvm", "_jvmprivdir" => "%{_prefix}/lib/jvm-private", "_jvmsysconfdir" => "%{_sysconfdir}/jvm", "_keyring" => "rpmdb", "_keyringpath" => "%{_dbpath}/pubkeys/", "_keyringsdir" => "%_datadir/keyrings", "_ld_as_needed" => "1", "_ld_as_needed_flags" => "%{?_ld_as_needed:-Wl,--as-needed}", "_ld_symbols_flags" => "%{?_ld_strict_symbol_defs:-Wl,-z,defs}", "_legacy_options" => "%{?_legacy_common_support: -fcommon}", "_lib" => "lib64", "_libdir" => "%{_prefix}/lib64", "_libexecdir" => "%{_exec_prefix}/libexec", "_localstatedir" => "/var", "_lto_cflags" => "%{expand:%%{_%{toolchain}_lto_cflags}}", "_make_output_sync" => "%(! %{__make} --version -O >/dev/null 2>&1 || echo -O)", "_make_verbose" => "V=1 VERBOSE=1", "_mandir" => "%{_datarootdir}/man", "_mavenpomdir" => "%{_datadir}/maven-poms", "_metainfodir" => "%{_datadir}/metainfo", "_missing_build_ids_terminate_build" => "1", "_missing_doc_files_terminate_build" => "1", "_modprobedir" => "/usr/lib/modprobe.d", "_modulesloaddir" => "/usr/lib/modules-load.d", "_monodir" => "%{_prefix}/lib/mono", "_monogacdir" => "%{_monodir}/gac", "_oldincludedir" => "/usr/include", "_os" => "linux", "_pam_confdir" => "%{_sysconfdir}/pam.d", "_pam_libdir" => "%{_libdir}", "_pam_moduledir" => "%{_libdir}/security", "_pam_secconfdir" => "%{_sysconfdir}/security", "_pam_vendordir" => "%{_datadir}/pam.d", "_pkgdocdir" => "%{_docdir}/%{name}", "_pkgverify_flags" => "0x0", "_pkgverify_level" => "digest", "_prefix" => "/usr", "_preprocessor_defines" => "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS", "_presetdir" => "/usr/lib/systemd/system-preset", "_pyproject_builddir" => "%{_builddir}%{?buildsubdir:/%{buildsubdir}}/.pyproject-builddir", "_pyproject_ghost_distinfo" => "%{_builddir}/pyproject-ghost-distinfo", "_pyproject_modules" => "%{_builddir}/pyproject-modules", "_pyproject_record" => "%{_builddir}/pyproject-record", "_pyproject_wheeldir" => "%{_builddir}%{?buildsubdir:/%{buildsubdir}}/pyproject-wheeldir", "_python_bytecompile_errors_terminate_build" => "1", "_python_bytecompile_extra" => "0", "_qt5" => "qt5-qtbase", "_qt5_epoch" => "0", "_qt5_evr" => "5.15.2-28.fc35", "_qt5_version" => "5.15.2", "_query_all_fmt" => "%%{nvra}", "_query_selector_match" => "default", "_rpmconfigdir" => "%{getconfdir}", "_rpmdir" => "%{_topdir}/RPMS", "_rpmfilename" => "%{_build_name_fmt}", "_rpmlock_path" => "%{_dbpath}/.rpm.lock", "_rpmluadir" => "%{_rpmconfigdir}/lua", "_rpmmacrodir" => "%{_rpmconfigdir}/macros.d", "_rundir" => "/run", "_sbindir" => "%{_exec_prefix}/sbin", "_selinux_policy_version" => "35.5-1.fc35", "_selinux_store_path" => "/var/lib/selinux", "_selinux_store_policy_path" => "%{_selinux_store_path}/${_policytype}", "_set_pytest_addopts" => "%global __pytest_addopts --ignore=%{_pyproject_builddir}", "_settingscolordir" => "%_colordir/settings", "_sharedstatedir" => "/var/lib", "_smp_build_ncpus" => "%([ -z \"$RPM_BUILD_NCPUS\" ] \\\n\t&& RPM_BUILD_NCPUS=\"%{getncpus}\"; \\\n ncpus_max=%{?_smp_ncpus_max}; \\\n if [ -n \"$ncpus_max\" ] && [ \"$ncpus_max\" -gt 0 ] && [ \"$RPM_BUILD_NCPUS\" -gt \"$ncpus_max\" ]; then RPM_BUILD_NCPUS=\"$ncpus_max\"; fi; \\\n echo \"$RPM_BUILD_NCPUS\";)", "_smp_build_nthreads" => "%{_smp_build_ncpus}", "_smp_mflags" => "-j%{_smp_build_ncpus}", "_source_filedigest_algorithm" => "8", "_sourcedir" => "%{_topdir}/SOURCES", "_specdir" => "%{_topdir}/SPECS", "_srcrpmdir" => "%{_topdir}/SRPMS", "_swidtagdir" => "%{_prefix}/lib/swidtag/fedoraproject.org", "_syscolordir" => "%_colordir", "_sysconfdir" => "/etc", "_sysctldir" => "/usr/lib/sysctl.d", "_systemd_system_env_generator_dir" => "/usr/lib/systemd/system-environment-generators", "_systemd_user_env_generator_dir" => "/usr/lib/systemd/user-environment-generators", "_systemd_util_dir" => "/usr/lib/systemd", "_systemdgeneratordir" => "/usr/lib/systemd/system-generators", "_systemdusergeneratordir" => "/usr/lib/systemd/user-generators", "_sysusersdir" => "/usr/lib/sysusers.d", "_target" => "x86_64-linux", "_target_alias" => "%{_host_alias}", "_target_cpu" => "x86_64", "_target_os" => "linux", "_target_platform" => "%{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}", "_target_vendor" => "%{_host_vendor}", "_texmf" => "/usr/share/texlive/texmf-local", "_texmf_conf" => "/usr/share/texlive/texmf-config", "_texmf_main" => "/usr/share/texlive/texmf-dist", "_texmf_var" => "/var/lib/texmf", "_texmf_vendor" => "/usr/share/texlive/texmf-dist", "_tmpfilesdir" => "/usr/lib/tmpfiles.d", "_tmppath" => "%{_var}/tmp", "_topdir" => "%{getenv:HOME}/rpmbuild", "_transaction_color" => "3", "_udevhwdbdir" => "/usr/lib/udev/hwdb.d", "_udevrulesdir" => "/usr/lib/udev/rules.d", "_unique_build_ids" => "1", "_unique_debug_names" => "1", "_unique_debug_srcs" => "1", "_unitdir" => "/usr/lib/systemd/system", "_unpackaged_files_terminate_build" => "1", "_urlhelper" => "%{__urlhelpercmd} %{?__urlhelper_localopts} %{?__urlhelper_proxyopts} %{__urlhelperopts}", "_use_internal_dependency_generator" => "1", "_userpresetdir" => "/usr/lib/systemd/user-preset", "_userunitdir" => "/usr/lib/systemd/user", "_usr" => "/usr", "_usrsrc" => "%{_usr}/src", "_var" => "/var", "_vendor" => "redhat", "_vpath_builddir" => "%{_vendor}-%{_target_os}-build", "_vpath_srcdir" => ".", "_vsflags_build" => "%{__vsflags}", "_vsflags_erase" => "%{__vsflags}", "_vsflags_install" => "%{__vsflags}", "_vsflags_query" => "%{__vsflags}", "_vsflags_rebuilddb" => "0xc0c00", "_vsflags_verify" => "%{__vsflags}", "_warning_options" => "-Wall -Werror=format-security", "_wrong_version_format_terminate_build" => "1", "alpha" => "alpha alphaev56 alphaev6 alphaev67", "ant" => "%{?jpb_env} JAVA_HOME=%{java_home} ant", "arm" => "%{arm32}", "arm32" => "armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl", "arm64" => "aarch64", "autochangelog" => "%{lua:\n locale = os.setlocale(nil)\n os.setlocale(\"C.utf8\")\n date = os.date(\"%a %b %d %Y\")\n os.setlocale(locale)\n packager = rpm.expand(\"%{?packager}%{!?packager:John Doe <packager@example.com>}\")\n evr = rpm.expand(\"%{?epoch:%{epoch}:}%{version}-%{release}\")\n print(\"* \" .. date .. \" \" .. packager .. \" - \" .. evr .. \"\\n\")\n print(\"- local build\")\n}", "autopatch(vp:m:M:)" => "%{lua:\nif #arg == 0 then\n local lo = tonumber(rpm.expand(\"%{-m:%{-m*}}\"))\n local hi = tonumber(rpm.expand(\"%{-M:%{-M*}}\"))\n for i, n in ipairs(patch_nums) do\n if ((not lo or n >= lo) and (not hi or n <= hi)) then\n table.insert(arg, n)\n end\n end\nend\nlocal options = rpm.expand(\"%{!-v:-q} %{-p:-p%{-p*}} \")\nlocal bynum = {}\nfor i, p in ipairs(patches) do\n bynum[patch_nums[i]] = p\nend\nfor i, a in ipairs(arg) do\n local p = bynum[a]\n if p then\n print(rpm.expand(\"%__apply_patch -m %{basename:\"..p..\"} \"..options..p..\" \"..i..\"\\n\"))\n else\n macros.error({\"no such patch \"..a})\n end\nend\n}", "autorelease(e:s:pb:)" => "%{?-p:0.}%{lua:\n release_number = tonumber(rpm.expand(\"%{?_rpmautospec_release_number}%{!?_rpmautospec_release_number:1}\"));\n base_release_number = tonumber(rpm.expand(\"%{?-b*}%{!?-b:1}\"));\n print(release_number + base_release_number - 1);\n}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist}", "autosetup(a:b:cDn:TvNS:p:)" => "\n%setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q}\n%{-S:%global __scm %{-S*}}\n%{expand:%__scm_setup_%{__scm} %{!-v:-q}}\n%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}", "basename" => "<builtin>", "bcond_with" => "%{expand:%%{?_with_%{1}:%%global with_%{1} 1}}", "bcond_without" => "%{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}", "binfmt_apply" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# binfmt_apply}} \n[ -x /usr/lib/systemd/systemd-binfmt ] && /usr/lib/systemd/systemd-binfmt %{?*} || : \n%{nil}", "build_cc" => "%{__cc}", "build_cflags" => "%{optflags}", "build_cpp" => "%{__cpp}", "build_cxx" => "%{__cxx}", "build_cxxflags" => "%{optflags}", "build_fflags" => "%{optflags} -I%{_fmoddir}", "build_ldflags" => "-Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ \"%{toolchain}\" == \"clang\" ? \"%{?_lto_cflags}\" : \"\" ]", "buildroot" => "%{_buildrootdir}/%{NAME}-%{VERSION}-%{RELEASE}.%{_arch}", "clamp_mtime_to_source_date_epoch" => "0", "cmake" => "\n%if 0%{?set_build_flags:1} \n %set_build_flags \n%else \n CFLAGS=\"${CFLAGS:-%optflags}\" ; export CFLAGS ; \n CXXFLAGS=\"${CXXFLAGS:-%optflags}\" ; export CXXFLAGS ; \n FFLAGS=\"${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}\" ; export FFLAGS ; \n FCFLAGS=\"${FCFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}\" ; export FCFLAGS ; \n %{?__global_ldflags:LDFLAGS=\"${LDFLAGS:-%__global_ldflags}\" ; export LDFLAGS ;} \n%endif \n %__cmake \\\n %{!?__cmake_in_source_build:-S \"%{_vpath_srcdir}\"} \\\n %{!?__cmake_in_source_build:-B \"%{__cmake_builddir}\"} \\\n -DCMAKE_C_FLAGS_RELEASE:STRING=\"-DNDEBUG\" \\\n -DCMAKE_CXX_FLAGS_RELEASE:STRING=\"-DNDEBUG\" \\\n -DCMAKE_Fortran_FLAGS_RELEASE:STRING=\"-DNDEBUG\" \\\n -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\n -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\n -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\n -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\n -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\n -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\n -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\n%if \"%{?_lib}\" == \"lib64\" \n %{?_cmake_lib_suffix64} \\\n%endif \n %{?_cmake_shared_libs}", "cmake3" => "%cmake", "cmake3_build" => "%cmake_build", "cmake3_install" => "%cmake_install", "cmake_build" => "\n %__cmake --build \"%{__cmake_builddir}\" %{?_smp_mflags} --verbose", "cmake_install" => "\n DESTDIR=\"%{buildroot}\" %__cmake --install \"%{__cmake_builddir}\"", "configure" => "\n %{set_build_flags}; \n [ \"%{_lto_cflags}\"x != x ] && %{_fix_broken_configure_for_lto}; \n [ \"%_configure_gnuconfig_hack\" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \n [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \n done ; \n [ \"%_configure_libtool_hardening_hack\" = 1 ] && [ x != \"x%{_hardened_ldflags}\" ] && \n for i in $(find . -name ltmain.sh) ; do \n %{__sed} -i.backup -e 's~compiler_flags=$~compiler_flags=\"%{_hardened_ldflags}\"~' $i \n done ; \n %{_configure} --build=%{_build} --host=%{_host} \\\n\t--program-prefix=%{?_program_prefix} \\\n\t--disable-dependency-tracking \\\n\t%{?_configure_disable_silent_rules:--disable-silent-rules} \\\n\t--prefix=%{_prefix} \\\n\t--exec-prefix=%{_exec_prefix} \\\n\t--bindir=%{_bindir} \\\n\t--sbindir=%{_sbindir} \\\n\t--sysconfdir=%{_sysconfdir} \\\n\t--datadir=%{_datadir} \\\n\t--includedir=%{_includedir} \\\n\t--libdir=%{_libdir} \\\n\t--libexecdir=%{_libexecdir} \\\n\t--localstatedir=%{_localstatedir} \\\n\t--sharedstatedir=%{_sharedstatedir} \\\n\t--mandir=%{_mandir} \\\n\t--infodir=%{_infodir}", "crates_source" => "%{lua:\n local crate = rpm.expand('%1')\n local version = rpm.expand('%2')\n local url = rpm.expand('%__crates_url')\n\n if crate == '%1' then\n crate = rpm.expand('%real_crate')\n end\n if crate == '%real_crate' then\n crate = rpm.expand('%crate')\n end\n if crate == '%crate' then\n crate = rpm.expand('%name')\n end\n\n if version == '%2' then\n version = rpm.expand('%version')\n end\n version = version:gsub('~', '-')\n\n print(url .. crate .. '/' .. version .. '/download#/' .. crate .. '-' .. version .. '.crate')\n}", "ctest(:-:)" => "\n cd \"%{__cmake_builddir}\" \n %__ctest --output-on-failure --force-new-ctest-process %{?_smp_mflags} %{**} \n cd -", "ctest3(:-:)" => "%ctest %{**}", "debug_package" => "\n%ifnarch noarch\n%global __debug_package 1\n%_debuginfo_template\n%{?_debugsource_packages:%_debugsource_template}\n%endif\n%{nil}", "default_toxenv" => "py%{python3_version_nodots}", "define" => "<builtin>", "defined" => "%{expand:%%{?%{1}:1}%%{!?%{1}:0}}", "dirname" => "<builtin>", "dist" => "%{!?distprefix0:%{?distprefix}}%{expand:%{lua:for i=0,9999 do print(\"%{?distprefix\" .. i ..\"}\") end}}.fc%{fedora}%{?with_bootstrap:~bootstrap}", "dnl" => "<builtin>", "dump" => "<builtin>", "echo" => "<builtin>", "efi" => "%{expand:%{_efi_srpm_macros_setup}}%{expand:%{_efi}}", "efi_alt_arch" => "%{expand:%{_efi_srpm_macros_setup}}%{?_efi_alt_arch}%{nil}", "efi_alt_arch_upper" => "%{expand:%{_efi_srpm_macros_setup}}%{?_efi_alt_arch_upper}%{nil}", "efi_arch" => "%{expand:%{_efi_srpm_macros_setup}}%{_efi_arch}", "efi_arch_upper" => "%{expand:%{_efi_srpm_macros_setup}}%{_efi_arch_upper}", "efi_build_requires" => "bash coreutils", "efi_esp_boot" => "%{efi_esp_efi}/BOOT", "efi_esp_dir" => "%{expand:%{_efi_srpm_macros_setup}}%{efi_esp_efi}/%{efi_vendor}", "efi_esp_efi" => "%{efi_esp_root}/EFI", "efi_esp_root" => "/boot/efi", "efi_has_alt_arch" => "%{expand:%{_efi_srpm_macros_setup}}0%{_efi_has_alt_arch}", "efi_has_arch" => "%{expand:%{_efi_srpm_macros_setup}}0%{_efi_has_arch}", "efi_srpm_macros_version" => "%{expand:%{_efi_srpm_macros_setup}}5", "efi_vendor" => "%{expand:%{_efi_srpm_macros_setup}}%{expand:%{_efi_vendor}}", "error" => "<builtin>", "exists" => "<builtin>", "expand" => "<builtin>", "expr" => "<builtin>", "extension_cflags" => "%{__extension_strip_flags cflags}", "extension_cxxflags" => "%{__extension_strip_flags cxxflags}", "extension_fflags" => "%{__extension_strip_flags fflags}", "extension_ldflags" => "%{__extension_strip_flags ldflags}", "fc35" => "1", "fedora" => "35", "filter_from_provides" => "%{expand: \n%global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \n}", "filter_from_requires" => "%{expand: \n%global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \n}", "filter_provides_in(P)" => "%{expand: \n%global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \n}", "filter_requires_in(P)" => "%{expand: \n%global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \n}", "filter_setup" => "%{expand: \n%global _use_internal_dependency_generator 0 \n%global __deploop() while read FILE; do echo \"${FILE}\" | /usr/lib/rpm/rpmdeps -%{1}; done | /bin/sort -u \n%global __find_provides /bin/sh -c \"%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}\" \n%global __find_requires /bin/sh -c \"%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}\" \n}", "find_lang" => "%{_rpmconfigdir}/find-lang.sh %{buildroot}", "firewalld_reload" => "\ntest -x %{_bindir}/firewall-cmd && firewall-cmd --reload --quiet || : \n%{nil}", "fontcontact" => "fonts@lists.fedoraproject.org", "fontenv(z:vf:F:c:C:s:S:d:D:l:L:)" => "%{lua:\nlocal fonts = require \"fedora.srpm.fonts\"\nlocal suffix = rpm.expand(\"%{?-z*}\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\nlocal globvalues = {}\nfor g,_ in pairs(fonts.globargs) do\n globvalues[g] = rpm.expand(\"%{?-\" .. fonts.globargs[g] .. \"*}\")\nend\nfonts.env(suffix, verbose, globvalues)\n}", "fontmetapkg(n:s:d:z:)" => "%{lua:\nlocal fonts = require \"fedora.srpm.fonts\"\nlocal name = rpm.expand(\"%{?-n*}\")\nlocal summary = rpm.expand(\"%{?-s*}\")\nif (summary ~= \"\") then\n summary = \"%{\" .. summary .. \"}\"\nend\nlocal description = rpm.expand(\"%{?-d*}\")\nif (description ~= \"\") then\n description = \"%{\" .. description .. \"}\"\nend\nlocal suffixes = rpm.expand(\"%{?-z*}\")\nfonts.metapkg(name, summary, description, suffixes)\n}", "fontorg" => "org.fedoraproject", "fontpkg(z:avms)" => "%{lua:\nlocal fonts = require \"fedora.srpm.fonts\"\nlocal suffix = rpm.expand(\"%{?-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\nlocal forcemain = (rpm.expand(\"%{-m}\") ~= \"\")\nlocal forcesub = (rpm.expand(\"%{-s}\") ~= \"\")\nfonts.pkg(forcemain, forcesub, suffix, processall, verbose)\n}", "fontrpmname" => "%{lua:\nlocal fonts = require \"fedora.srpm.fonts\"\nprint(fonts.rpmname(rpm.expand(\"%1\")))\n}", "forgeautosetup(z:vNS:p:q)" => "%{lua:\nprint(rpm.expand(\"%autosetup %{-v} %{-N} %{?-S} %{?-p} %{?forgesetupargs\" .. rpm.expand(\"%{-z*}\") .. \"}\\n\"))\n}", "forgemeta(z:isva)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal forge = require \"fedora.srpm.forge\"\nlocal verbose = rpm.expand(\"%{-v}\") ~= \"\"\nlocal informative = rpm.expand(\"%{-i}\") ~= \"\"\nlocal silent = rpm.expand(\"%{-s}\") ~= \"\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nif processall then\n for _,s in pairs(fedora.getsuffixes(\"forgeurl\")) do\n forge.meta(s,verbose,informative,silent)\n end\nelse\n forge.meta(rpm.expand(\"%{-z*}\"),verbose,informative,silent)\nend\n}", "forgesetup(z:va)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nif (rpm.expand(\"%{-z}\") == \"\") and (rpm.expand(\"%{-a}\") ~= \"\") then\n for _,s in pairs(fedora.getsuffixes(\"forgesetupargs\")) do\n print(rpm.expand(\"%setup %{!-v:-q} %{?forgesetupargs\" .. s .. \"}\\n\"))\n end\nelse\n print( rpm.expand(\"%setup %{!-v:-q} %{?forgesetupargs\" .. rpm.expand(\"%{-z*}\") .. \"}\\n\"))\nend\n}", "fpc_arches" => "%{ix86} %{arm} x86_64 ppc64le aarch64", "gccgo_arches" => "mips mipsel mipsr6 mipsr6el mips64 mips64el mips64r6 mips64r6el", "gccgo_min_vers" => "5.0.0", "getconfdir" => "<builtin>", "getenv" => "<builtin>", "getncpus" => "<builtin>", "ghc_arches" => "%{ix86} x86_64 armv7hl ppc64 ppc64le aarch64 s390 s390x", "ghc_arches_with_ghci" => "%{ix86} x86_64 armv7hl ppc64 ppc64le aarch64 s390 s390x %{mips}", "ghc_devel_prof" => "prof", "global" => "<builtin>", "go_arches" => "%{golang_arches} %{gccgo_arches}", "go_compiler" => "1", "go_generate_buildrequires(z:ai:)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal forcedgoipath = rpm.expand(\"%{?-i}\")\nlocal golistargs = \"\"\nif processall then\n for _, s in pairs(fedora.getsuffixes(\"goipath\")) do\n golistargs = golistargs .. \" --package-path %{goipath\" .. s .. \"}\"\n end\n golistargs = string.gsub(golistargs, \"^ \", \"\")\nelseif forcedgoipath ~= \"\" then\n golistargs = \"--package-path \" .. forcedgoipath\nelse\n golistargs = \"--package-path %{goipath\" .. rpm.expand(\"%{?-z*}\") .. \"}\"\nend\nprint(rpm.expand('GOPATH=\"%{?gobuilddir:%{gobuilddir}:}${GOPATH:+${GOPATH}:}%{?gopath}\" ' ..\n 'GO111MODULE=off ' ..\n \"golist --imported \" .. golistargs ..\n \" --template 'golang({{.}})\\\\n'\" ..\n \" --with-tests --skip-self\\n\"))\n}", "goaltfiles(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.files(\"alt\", suffix, processall, verbose)\n}", "goaltinstall(z:av)" => "%{lua:\nlocal go = require \"fedora.rpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.install(\"alt\", suffix, processall, verbose)\n}", "goaltpkg(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.pkg(\"alt\", suffix, processall, verbose)\n}", "gobuild(o:)" => "%{expand:\n # https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12\n %global _dwz_low_mem_die_limit 0\n %{?gobuilddir:GOPATH=\"%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}\"} %{?gomodulesmode} \\\n go build %{?gocompilerflags} -tags=\"rpm_crashtraceback ${BUILDTAGS:-}\" -ldflags \"${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -extldflags '%__global_ldflags %{?__golang_extldflags}'\" -a -v -x %{?**};\n}", "gobuildflags" => "%{expand:%{gocompilerflags} -tags=\\\"rpm_crashtraceback \\\" -ldflags \\\"${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -extldflags '%__global_ldflags %{?__golang_extldflags}'\\\" -a -v -x}", "gobuildroot" => "%{expand:\n%{warn:%%gobuildroot is obsolete, use %%goprep in %%prep instead!}\n%goenv -z 0\n%gomkdir -k\nln -fs \"%{gobuilddir}/bin\" _bin\n}", "gocheck(z:ai:b:s:vd:t:rV:T:C:B:p:g:w)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal myenvflags = rpm.expand('%{?-i} %{?-v} %{?-V} %{?-T} %{?-C} %{?-B}')\nlocal mycheckflags = rpm.expand('%{!-i:-i \"%%{currentgoipath}\" }' ..\n '%{!-b:-b \"%%{gobuilddir}/bin\" }' ..\n '%{!-s:-s \"%%{gobuilddir}\" }' ..\n '%{!-V:-V \"%{version}-%{release}\" }' ..\n '%{!-T:%%{?currenttag: -T \"%%{?currenttag}\" }}' ..\n '%{!-C:%%{?currentcommit: -C \"%%{?currentcommit}\" }}' ..\n '%{!-B:%%{?currentbranch: -B \"%%{?currentbranch}\" }}' ..\n '%{!-p:-p \"%{buildroot}\" }' ..\n '%{!-g:-g \"%{gopath}\" }' ..\n '%{?gocheckflags} %{?**}')", "gocheckflags" => "%{godefaultflags}", "gochecks(z:ai:b:s:vd:t:rV:T:C:B:p:g:w)" => "%{expand:\n%{warn:%%gochecks is obsolete, use %%gocheck in %%check instead!}\n%gocheck %{-z} %{-a} %{-i} %{-b} %{-s} %{-v} %{-d} %{-t} %{-r} %{-V} %{-T} %{-C} %{-B} %{-p} %{-g} %{-w}\n}", "gochecksflags" => "%{gocheckflags}", "gocompilerflags" => "-buildmode pie -compiler gc", "godefaultflags" => "%{goignoreflags_examples}", "godevelfiles(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.files(\"devel\", suffix, processall, verbose)\n}", "godevelinstall(z:av)" => "%{lua:\nlocal go = require \"fedora.rpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.install(\"devel\", suffix, processall, verbose)\n}", "godevelpkg(z:av)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nlocal suffix = rpm.expand(\"%{-z*}\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\ngo.pkg(\"devel\", suffix, processall, verbose)\n}", "goenv(z:i:vV:T:C:B:)" => "%{lua:\nlocal go = require \"fedora.rpm.go\"\nlocal suffix = rpm.expand(\"%{?-z*}\")\nlocal goipath = rpm.expand(\"%{?-i*}\")\nlocal verbose = (rpm.expand(\"%{-v}\") ~= \"\")\nlocal margs = { version = \"V\", tag = \"T\", commit = \"C\", branch = \"B\", }\nlocal mvalues = {}\nfor m,_ in pairs(margs) do\n local v = rpm.expand(\"%{?-\" .. margs[m] .. \"*}\")\n if (v ~= \"\") then mvalues[m] = v end\nend\ngo.env(suffix, goipath, verbose, mvalues)\n}", "gofilelist" => "devel.file-list", "goignoreflags_examples" => "-r '.*example.*'", "goinstall(z:ai:b:s:o:O:ve:d:t:rV:T:C:B:p:g:)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal myenvflags = rpm.expand('%{?-i} %{?-v} %{?-V} %{?-T} %{?-C} %{?-B}')\nlocal myinstallflags = rpm.expand('%{!-i:-i \"%%{currentgoipath}\" }' ..\n '%{!-b:-b \"%%{gobuilddir}/bin\" }' ..\n '%{!-s:-s \"%%{gobuilddir}\" }' ..\n '%{!-o:-o \"%%{thisgofilelist}\" }' ..\n '%{!-O:-O \"%%{goworkdir}\" }' ..\n '%{!-V:-V \"%{version}-%{release}\" }' ..\n '%{!-T:%%{?currenttag: -T \"%%{?currenttag}\" }}' ..\n '%{!-C:%%{?currentcommit: -C \"%%{?currentcommit}\" }}' ..\n '%{!-B:%%{?currentbranch: -B \"%%{?currentbranch}\" }}' ..\n '%{!-p:-p \"%{buildroot}\" }' ..\n '%{!-g:-g \"%{gopath}\" }' ..\n '%{?goinstallflags} %{?**}')", "goinstallflags" => "%{godefaultflags}", "golang_arches" => "i386 i486 i586 i686 pentium3 pentium4 athlon geode x86_64 armv3l armv4b armv4l armv4tl armv5tl armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl aarch64 ppc64le s390x", "gometa(az:svi)" => "%{lua:\nprint( \"BuildRequires: go-rpm-macros\\n\")\nprint(rpm.expand(\"ExclusiveArch: %{go_arches}\\n\"))\nlocal fedora = require \"fedora.common\"\nlocal go = require \"fedora.srpm.go\"\nlocal verbose = rpm.expand(\"%{-v}\") ~= \"\"\nlocal informative = rpm.expand(\"%{-i}\") ~= \"\"\nlocal silent = rpm.expand(\"%{-s}\") ~= \"\"\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nif processall then\n for _,s in pairs(fedora.getsuffixes(\"goipath\")) do\n go.meta(s,verbose,informative,silent)\n end\nelse\n go.meta(rpm.expand(\"%{-z*}\"),verbose,informative,silent)\nend\n}", "gomkdir(z:i:b:s:kv)" => "%{expand:\n%goenv %{?-z} %{?-i} %{?-v}\n%define mybuilddir %{?-b*}%{!-b:%{gobuilddir}}\n%define mygoipath %{?-i*}%{!-i:%{currentgoipath}}\n%define mysourcedir %{?-s*}%{!-s:%{currentgosourcedir}}\n%{!?-k:rm -fr \"%{mysourcedir}/vendor\"}\nif [[ ! -e \"%{mybuilddir}/bin\" ]] ; then\n install -m 0755 -vd \"%{mybuilddir}/bin\"\n export GOPATH=\"%{mybuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}\"\nfi\nif [[ ! -e \"%{mybuilddir}/src/%{mygoipath}\" ]] ; then\n install -m 0755 -vd \"$(dirname %{mybuilddir}/src/%{mygoipath})\"\n ln -fs \"%{mysourcedir}\" \"%{mybuilddir}/src/%{mygoipath}\"\nfi\ncd \"%{mybuilddir}/src/%{mygoipath}\"\n}", "gomodulesmode" => "GO111MODULE=off", "gopath" => "/usr/share/gocode", "gopkg(av)" => "%{expand:\n%godevelpkg -a %{-v}\n%goaltpkg -a %{-v}\n}", "gopkgfiles(av)" => "%{expand:\n%godevelfiles -a %{-v}\n%goaltfiles -a %{-v}\n}", "gopkginstall(av)" => "%{expand:\n%godevelinstall -a %{-v}\n%goaltinstall -a %{-v}\n}", "goprep(z:ai:b:s:kerv)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal extract = (rpm.expand(\"%{-e}\") == \"\")\nlocal installdeps = (rpm.expand(\"%{-r}\") == \"\")\nlocal processall = (rpm.expand(\"%{-a}\") ~= \"\") and (rpm.expand(\"%{-z}\") == \"\")\nlocal setupflags = rpm.expand(\"%{!-v:-q}\")\nlocal gomkdirflags = rpm.expand(\"%{?-i} %{?-b} %{?-s} %{-k} %{-v}\")\nlocal buildrequires = {}\nlocal function process(suffix)\n local zsuffix = \"\"\n if (suffix ~= \"\") and (suffix ~= nil) then\n zsuffix = \"-z \" .. suffix .. \" \"\n end\n if extract then\n print(rpm.expand(\"%setup \" .. setupflags .. \" %{?forgesetupargs\" .. suffix .. \"}\\n\"))\n end\n print( rpm.expand(\"%gomkdir \" .. zsuffix .. gomkdirflags .. \"\\n\"))\nend", "goprovflags" => "%{godefaultflags}", "goreqflags" => "%{godefaultflags}", "gorpmname(c:)" => "%{lua:\nlocal go = require \"fedora.srpm.go\"\nprint(go.rpmname(\"%1\", \"%{-c*}\"))\n}", "gotest" => "%{?gomodulesmode} go test %{gotestflags} -ldflags \"${LDFLAGS:-} %{?currentgoldflags} -extldflags '%{gotestextldflags}'\" %{?**};", "gotestextldflags" => "%__global_ldflags %{?__golang_extldflags}", "gotestflags" => "%{gocompilerflags}", "gpgverify(k:s:d:)" => "%{lua:\nlocal script = rpm.expand(\"%{_rpmconfigdir}/redhat/gpgverify \")\nlocal keyring = rpm.expand(\"%{-k*}\")\nlocal signature = rpm.expand(\"%{-s*}\")\nlocal data = rpm.expand(\"%{-d*}\")\nprint(script)\nif keyring ~= \"\" then\n print(rpm.expand(\"--keyring='%{SOURCE\" .. keyring .. \"}' \"))\nend\nif signature ~= \"\" then\n print(rpm.expand(\"--signature='%{SOURCE\" .. signature .. \"}' \"))\nend\nif data ~= \"\" then\n print(rpm.expand(\"--data='%{SOURCE\" .. data .. \"}' \"))\nend\n}", "install" => "%{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\n%%install\n%{nil}", "ix86" => "i386 i486 i586 i686 pentium3 pentium4 athlon geode", "jar" => "%{java_home}/bin/jar", "java" => "%(. /usr/share/java-utils/java-functions; set_javacmd; echo $JAVACMD)", "java_home" => "%(. /usr/share/java-utils/java-functions; set_jvm; echo $JAVA_HOME)", "javac" => "%{java_home}/bin/javac", "javadoc" => "%{java_home}/bin/javadoc", "journal_catalog_update" => "%{nil}", "jpackage_script" => "\ninstall -d -m 755 %{buildroot}%{_bindir} \ncat > %{buildroot}%{_bindir}/%5 << EOF \n#!/bin/bash\n#\n# %{name} script\n# JPackage Project <http://www.jpackage.org/>\n\n# Source functions library\n_prefer_jre=\"%{?6}\"\n. /usr/share/java-utils/java-functions\n\n# Source system prefs\nif [ -f %{_sysconfdir}/java/%{name}.conf ] ; then\n . %{_sysconfdir}/java/%{name}.conf\nfi\n\n# Source user prefs\nif [ -f \\$HOME/.%{name}rc ] ; then\n . \\$HOME/.%{name}rc\nfi\n\n# Configuration\nMAIN_CLASS=%1\nBASE_FLAGS=%2\nBASE_OPTIONS=%3\nBASE_JARS=\"%(echo %4 | sed -e 's,:, ,g')\"\n\n# Set parameters\nset_jvm\nset_classpath \\$BASE_JARS\nset_flags \\$BASE_FLAGS\nset_options \\$BASE_OPTIONS\n\n# Let's start\nrun \"\\$@\"\nEOF\nchmod 755 %{buildroot}%{_bindir}/%5\n%{nil}", "kernel_arches" => "x86_64 s390x ppc64le aarch64 %{arm}", "ldc_arches" => "%{ix86} x86_64 %{arm} aarch64", "ldconfig_post(n:)" => "%{?ldconfig:%post -p %ldconfig %{?*} %{-n:-n %{-n*}}\n%end}", "ldconfig_postun(n:)" => "%{?ldconfig:%postun -p %ldconfig %{?*} %{-n:-n %{-n*}}\n%end}", "ldconfig_scriptlets(n:)" => "%{?ldconfig:\n%ldconfig_post %{?*} %{-n:-n %{-n*}}\n%ldconfig_postun %{?*} %{-n:-n %{-n*}}\n}", "limit_build(m:)" => "%{lua:\n local mem_per_process=rpm.expand(\"%{-m*}\")\n if mem_per_process == \"\" then\n mem_per_process = 1024\n else\n mem_per_process = tonumber(mem_per_process)\n end\n local mem_total = 0\n for line in io.lines('/proc/meminfo') do\n if line:sub(1, 9) == \"MemTotal:\" then\n local tokens = {}\n for token in line:gmatch(\"%w+\") do\n tokens[#tokens + 1] = token\n end\n mem_total = tonumber(tokens[2])\n break\n end\n end\n local max_jobs = mem_total // (mem_per_process * 1024)\n if max_jobs < 1 then\n max_jobs = 1\n end\n cur_max_jobs=tonumber(rpm.expand(\"%{_smp_build_ncpus}\"))\n if cur_max_jobs > max_jobs then\n print(\"-j\" .. max_jobs)\n end\n}", "listfiles(i:x:)" => "%{expand:\n%if %{lua: print(string.len(rpm.expand(\"%{?-i*}%{?listfiles_include}%*\")))}\n listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u)\n %if %{lua: print(string.len(rpm.expand(\"%{?-x*}%{?listfiles_exclude}\")))}\n while IFS= read -r finc ; do\n realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\\n | sort -u | grep -q \"${finc}\" || echo \"${finc}\"\n done <<< \"${listfiles_include}\"\n %else\n echo \"${listfiles_include}\"\n %endif\n%endif\n}", "load" => "<builtin>", "lua" => "<builtin>", "lua_requires" => "\n%if 0%{?fedora} || 0%{?rhel} >= 7 \nRequires: lua(abi) = %{lua_version} \n%else \nRequires: lua >= %{lua_version} \nRequires: lua < %{lua: os.setlocale('C'); print(string.sub(_VERSION, 5) + 0.1)} \n%endif \n%{nil}", "lua_version" => "%{lua: print(string.sub(_VERSION, 5))}", "macrobody" => "<builtin>", "make_build" => "%{__make} %{_make_output_sync} %{?_smp_mflags} %{_make_verbose}", "make_install" => "%{__make} install DESTDIR=%{?buildroot} INSTALL=\"%{__install} -p\"", "makeinstall" => "\n echo \"warning: %%makeinstall is deprecated, try %%make_install instead\" 1>&2\n %{__make} \\\n\tprefix=%{?buildroot:%{buildroot}}%{_prefix} \\\n\texec_prefix=%{?buildroot:%{buildroot}}%{_exec_prefix} \\\n\tbindir=%{?buildroot:%{buildroot}}%{_bindir} \\\n\tsbindir=%{?buildroot:%{buildroot}}%{_sbindir} \\\n\tsysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir} \\\n\tdatadir=%{?buildroot:%{buildroot}}%{_datadir} \\\n\tincludedir=%{?buildroot:%{buildroot}}%{_includedir} \\\n\tlibdir=%{?buildroot:%{buildroot}}%{_libdir} \\\n\tlibexecdir=%{?buildroot:%{buildroot}}%{_libexecdir} \\\n\tlocalstatedir=%{?buildroot:%{buildroot}}%{_localstatedir} \\\n\tsharedstatedir=%{?buildroot:%{buildroot}}%{_sharedstatedir} \\\n\tmandir=%{?buildroot:%{buildroot}}%{_mandir} \\\n\tinfodir=%{?buildroot:%{buildroot}}%{_infodir} \\\n install", "meson" => "\n %set_build_flags \n %{shrink:%{__meson} \n --buildtype=plain \n --prefix=%{_prefix} \n --libdir=%{_libdir} \n --libexecdir=%{_libexecdir} \n --bindir=%{_bindir} \n --sbindir=%{_sbindir} \n --includedir=%{_includedir} \n --datadir=%{_datadir} \n --mandir=%{_mandir} \n --infodir=%{_infodir} \n --localedir=%{_datadir}/locale \n --sysconfdir=%{_sysconfdir} \n --localstatedir=%{_localstatedir} \n --sharedstatedir=%{_sharedstatedir} \n --wrap-mode=%{__meson_wrap_mode} \n --auto-features=%{__meson_auto_features} \n %{_vpath_srcdir} %{_vpath_builddir} \n %{nil}}", "meson_build" => "\n %{shrink:%{__meson} compile \n -C %{_vpath_builddir} \n -j %{_smp_build_ncpus} \n --verbose \n %{nil}}", "meson_install" => "\n %{shrink:DESTDIR=%{buildroot} %{__meson} install \n -C %{_vpath_builddir} \n --no-rebuild \n %{nil}}", "meson_test" => "\n %{shrink:%{__meson} test \n -C %{_vpath_builddir} \n --num-processes %{_smp_build_ncpus} \n --print-errorlogs \n %{nil}}", "mips" => "%{mips32} %{mips64}", "mips32" => "mips mipsel mipsr6 mipsr6el", "mips64" => "mips64 mips64el mips64r6 mips64r6el", "mipseb" => "mips mipsr6 mips64 mips64r6", "mipsel" => "mipsel mipsr6el mips64el mips64r6el", "mono_arches" => "%{ix86} x86_64 sparc sparcv9 ia64 %{arm} aarch64 alpha s390x ppc ppc64 ppc64le", "new_package(n:v)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal pkg_name = fedora.readflag(\"n\")\nlocal verbose = fedora.hasflag(\"v\")\nlocal name_suffix = fedora.read(\"1\")\nlocal source_name = fedora.read(\"source_name\")\nlocal first = not ( fedora.read(\"name\") or fedora.read(\"currentname\") )\nfedora.new_package(source_name, pkg_name, name_suffix, first, verbose)\n}", "nil" => "%{!?nil}", "nim_arches" => "%{ix86} x86_64", "ninja_build" => "\n %{__ninja} %{__ninja_common_opts}", "ninja_install" => "\n DESTDIR=%{buildroot} %{__ninja} install %{__ninja_common_opts}", "ninja_test" => "\n %{__ninja} test %{__ninja_common_opts}", "nodejs_arches" => "%{ix86} x86_64 %{arm} aarch64 %{power64} s390x", "nodejs_default_filter" => "%{expand: \n%global __provides_exclude_from ^%{nodejs_sitearch}/.*\\.node$\n}", "nodejs_find_provides_and_requires" => "%{nil}", "nodejs_fixdep" => "%{_rpmconfigdir}/nodejs-fixdep", "nodejs_setversion" => "%{_rpmconfigdir}/nodejs-setversion", "nodejs_sitearch" => "%{nodejs_sitelib}", "nodejs_sitelib" => "%{_prefix}/lib/node_modules", "nodejs_symlink_deps" => "%{_rpmconfigdir}/nodejs-symlink-deps %{nodejs_sitelib}", "nodejs_version" => "%(%{__nodejs} -v | sed s/v//)", "ocaml_natdynlink" => "aarch64 %{arm} %{ix86} ppc ppc64 ppc64le riscv64 s390x sparc sparcv9 x86_64", "ocaml_native_compiler" => "aarch64 %{arm} %{ix86} ppc ppc64 ppc64le riscv64 s390x sparc sparcv9 x86_64", "ocaml_native_profiling" => "%{nil}", "openblas_arches" => "x86_64 %{ix86} armv7hl %{power64} aarch64 s390x", "optflags" => "%{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection", "patches" => "%{lua: for i, p in ipairs(patches) do print(p..\" \") end}", "pkgconfig_personalitydir" => "/usr/share/pkgconfig/personality.d", "power64" => "ppc64 ppc64p7 ppc64le", "py2_build" => "%{expand:\\\n sleep 1\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} build --executable=\"%{__python2} %{py2_shbang_opts}\" %{?*}\n sleep 1\n}", "py2_build_egg" => "%{expand:\\\n sleep 1\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} bdist_egg %{?*}\n sleep 1\n}", "py2_build_wheel" => "%{expand:\\\n sleep 1\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}\n sleep 1\n}", "py2_dist" => "%{lua:\n args = {}\n arg = 1\n while (true) do\n name = rpm.expand(\"%{?\" .. arg .. \":%{\" .. arg .. \"}}\");\n if (name == nil or name == '') then\n break\n end\n args[arg] = name\n arg = arg + 1\n end\n for arg, name in ipairs(args) do\n canonical = rpm.expand(\"%py_dist_name \" .. name);\n print(\"python2dist(\" .. canonical .. \") \");\n end\n}", "py2_install" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python2} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py2_install_egg" => "%{expand:\\\n mkdir -p %{buildroot}%{python2_sitelib}\n %{__python2} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python2_version}.egg %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py2_install_wheel" => "%{expand:\\\n %{__python2} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n for distinfo in %{buildroot}%{python2_sitelib}/*.dist-info %{buildroot}%{python2_sitearch}/*.dist-info; do\n if [ -f ${distinfo}/direct_url.json ]; then\n rm -fv ${distinfo}/direct_url.json\n sed -i '/direct_url.json/d' ${distinfo}/RECORD\n fi\n done\n}", "py2_shbang_opts" => "-s", "py2_shbang_opts_nodash" => "%(opts=%{py2_shbang_opts}; echo ${opts#-})", "py2_shebang_fix" => "%{expand:\\\n if [ -z \"%{?py_shebang_flags}\" ]; then\n shebang_flags=\"-k\"\n else\n shebang_flags=\"-ka%{py2_shebang_flags}\"\n fi\n /usr/bin/pathfix.py -pni %{__python2} $shebang_flags}", "py2_shebang_flags" => "%(opts=%{py2_shbang_opts}; echo ${opts#-})", "py3_build" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python3} %{py_setup} %{?py_setup_args} build --executable=\"%{__python3} %{py3_shbang_opts}\" %{?*}\n}", "py3_build_egg" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python3} %{py_setup} %{?py_setup_args} bdist_egg %{?*}\n}", "py3_build_wheel" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python3} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}\n}", "py3_check_import(e:tf:)" => "%{expand:\\\n PATH=\"%{buildroot}%{_bindir}:$PATH\"\\\n PYTHONPATH=\"${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}\"\\\n _PYTHONSITE=\"%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}\"\\\n PYTHONDONTWRITEBYTECODE=1\\\n %{lua:\n local command = \"%{__python3} \"\n if rpm.expand(\"%{?py3_shebang_flags}\") ~= \"\" then\n command = command .. \"-%{py3_shebang_flags}\"\n end\n command = command .. \" %{_rpmconfigdir}/redhat/import_all_modules.py \"\n -- handle multiline arguments correctly, see https://bugzilla.redhat.com/2018809\n local args=rpm.expand('%{?**}'):gsub(\"[%s\\\\]*%s+\", \" \")\n print(command .. args)\n }\n}", "py3_dist" => "%{lua:\n python3_pkgversion = rpm.expand(\"%python3_pkgversion\");\n args = {}\n arg = 1\n while (true) do\n name = rpm.expand(\"%{?\" .. arg .. \":%{\" .. arg .. \"}}\");\n if (name == nil or name == '') then\n break\n end\n args[arg] = name\n arg = arg + 1\n end\n for arg, name in ipairs(args) do\n canonical = rpm.expand(\"%py_dist_name \" .. name);\n print(\"python\" .. python3_pkgversion .. \"dist(\" .. canonical .. \") \");\n end\n}", "py3_install" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py3_install_egg" => "%{expand:\\\n mkdir -p %{buildroot}%{python3_sitelib}\n %{__python3} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py3_install_wheel" => "%{expand:\\\n %{__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n for distinfo in %{buildroot}%{python3_sitelib}/*.dist-info %{buildroot}%{python3_sitearch}/*.dist-info; do\n if [ -f ${distinfo}/direct_url.json ]; then\n rm -fv ${distinfo}/direct_url.json\n sed -i '/direct_url.json/d' ${distinfo}/RECORD\n fi\n done\n}", "py3_shbang_opts" => "-s", "py3_shbang_opts_nodash" => "%(opts=%{py3_shbang_opts}; echo ${opts#-})", "py3_shebang_fix" => "%{expand:\\\n if [ -f /usr/bin/pathfix%{python3_version}.py ]; then\n pathfix=/usr/bin/pathfix%{python3_version}.py\n else\n # older versions of Python don't have it and must BR /usr/bin/pathfix.py from python3-devel explicitly\n pathfix=/usr/bin/pathfix.py\n fi\n if [ -z \"%{?py3_shebang_flags}\" ]; then\n shebang_flags=\"-k\"\n else\n shebang_flags=\"-ka%{py3_shebang_flags}\"\n fi\n $pathfix -pni %{__python3} $shebang_flags}", "py3_shebang_flags" => "%(opts=%{py3_shbang_opts}; echo ${opts#-})", "py3dir" => "%{_builddir}/python3-%{name}-%{version}-%{release}", "py_auto_byte_compile" => "1", "py_build" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python} %{py_setup} %{?py_setup_args} build --executable=\"%{__python} %{py_shbang_opts}\" %{?*}\n}", "py_build_egg" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python} %{py_setup} %{?py_setup_args} bdist_egg %{?*}\n}", "py_build_wheel" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python} %{py_setup} %{?py_setup_args} bdist_wheel %{?*}\n}", "py_byte_compile" => "\npy2_byte_compile () {\n python_binary=\"env PYTHONHASHSEED=0 %1\"\n bytecode_compilation_path=\"%2\"\n failure=0\n find $bytecode_compilation_path -type f -a -name \"*.py\" -print0 | xargs -0 $python_binary -s -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition(\"'\"$RPM_BUILD_ROOT\"'\")[2], doraise=True) for f in sys.argv[1:]]' || failure=1\n find $bytecode_compilation_path -type f -a -name \"*.py\" -print0 | xargs -0 $python_binary -s -O -c 'import py_compile, sys; [py_compile.compile(f, dfile=f.partition(\"'\"$RPM_BUILD_ROOT\"'\")[2], doraise=True) for f in sys.argv[1:]]' || failure=1\n test $failure -eq 0\n}\n\npy3_byte_compile () {\n python_binary=\"env PYTHONHASHSEED=0 %1\"\n bytecode_compilation_path=\"%2\"\n PYTHONPATH=\"%{_rpmconfigdir}/redhat\" $python_binary -s -B -m compileall2 -o 0 -o 1 -s $RPM_BUILD_ROOT -p / $bytecode_compilation_path \n}\n\npy39_byte_compile () {\n python_binary=\"env PYTHONHASHSEED=0 %1\"\n bytecode_compilation_path=\"%2\"\n $python_binary -s -B -m compileall -o 0 -o 1 -s $RPM_BUILD_ROOT -p / $bytecode_compilation_path \n}\n\n# Path to intepreter should not contain any arguments \n[[ \"%1\" =~ \" -\" ]] && echo \"ERROR py_byte_compile: Path to interpreter should not contain any arguments\" >&2 && exit 1 \n# Get version without a dot (36 instead of 3.6), bash doesn't compare floats well \npython_version=$(%1 -c \"import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))\") \n# compileall2 is an enhanced fork of stdlib compileall module for Python >= 3.4 \n# and it was merged back to stdlib in Python >= 3.9 \nif [ \"$python_version\" -ge 39 ]; then \npy39_byte_compile \"%1\" \"%2\"; \nelif [ \"$python_version\" -ge 34 ]; then \npy3_byte_compile \"%1\" \"%2\"; \nelse \npy2_byte_compile \"%1\" \"%2\"; \nfi", "py_check_import(e:tf:)" => "%{expand:\\\n PATH=\"%{buildroot}%{_bindir}:$PATH\"\\\n PYTHONPATH=\"${PYTHONPATH:-%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}}\"\\\n _PYTHONSITE=\"%{buildroot}%{python_sitearch}:%{buildroot}%{python_sitelib}\"\\\n PYTHONDONTWRITEBYTECODE=1\\\n %{lua:\n local command = \"%{__python} \"\n if rpm.expand(\"%{?py_shebang_flags}\") ~= \"\" then\n command = command .. \"-%{py_shebang_flags}\"\n end\n command = command .. \" %{_rpmconfigdir}/redhat/import_all_modules.py \"\n -- handle multiline arguments correctly, see https://bugzilla.redhat.com/2018809\n local args=rpm.expand('%{?**}'):gsub(\"[%s\\\\]*%s+\", \" \")\n print(command .. args)\n }\n}", "py_dist_name" => "%{lua:\n name = rpm.expand(\"%{?1:%{1}}\");\n canonical = string.gsub(string.lower(name), \"[^%w%[%]]+\", \"-\");\n print(canonical);\n}", "py_install" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n %{__python} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py_install_egg" => "%{expand:\\\n mkdir -p %{buildroot}%{python_sitelib}\n %{__python} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python_version}.egg %{?*}\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n}", "py_install_wheel" => "%{expand:\\\n %{__python} -m pip install -I dist/%{1} --root %{buildroot} --no-deps --no-index --no-warn-script-location\n rm -rfv %{buildroot}%{_bindir}/__pycache__\n for distinfo in %{buildroot}%{python_sitelib}/*.dist-info %{buildroot}%{python_sitearch}/*.dist-info; do\n if [ -f ${distinfo}/direct_url.json ]; then\n rm -fv ${distinfo}/direct_url.json\n sed -i '/direct_url.json/d' ${distinfo}/RECORD\n fi\n done\n}", "py_provides" => "%{lua:\n local python = require 'fedora.srpm.python'\n local name = rpm.expand('%1')\n if name == '%1' then\n rpm.expand('%{error:%%py_provides requires at least 1 argument, the name to provide}')\n end\n local evr = rpm.expand('%2')\n if evr == '%2' then\n evr = rpm.expand('%{?epoch:%{epoch}:}%{version}-%{release}')\n end\n print('Provides: ' .. name .. ' = ' .. evr .. '\\n')\n local provides = python.python_altprovides(name, evr)\n for i, provide in ipairs(provides) do\n print('Provides: ' .. provide .. '\\n')\n end\n}", "py_setup" => "setup.py", "py_shbang_opts" => "-s", "py_shbang_opts_nodash" => "%(opts=%{py_shbang_opts}; echo ${opts#-})", "py_shebang_fix" => "%{expand:\\\n if [ -f /usr/bin/pathfix%{python_version}.py ]; then\n pathfix=/usr/bin/pathfix%{python_version}.py\n else\n # older versions of Python don't have it and must BR /usr/bin/pathfix.py from python3-devel explicitly\n pathfix=/usr/bin/pathfix.py\n fi\n if [ -z \"%{?py_shebang_flags}\" ]; then\n shebang_flags=\"-k\"\n else\n shebang_flags=\"-ka%{py_shebang_flags}\"\n fi\n $pathfix -pni %{__python} $shebang_flags}", "py_shebang_flags" => "%(opts=%{py_shbang_opts}; echo ${opts#-})", "pycached" => "%{lua:\n path = rpm.expand(\"%{?*}\")\n if (string.sub(path, \"-3\") ~= \".py\") then\n rpm.expand(\"%{error:%%pycached can only be used with paths explicitly ending with .py}\")\n else\n print(path)\n pyminor = path:match(\"/python3.(%d+)/\") or \"*\"\n dirname = path:match(\"(.*/)\")\n modulename = path:match(\".*/([^/]+).py\")\n print(\"\\n\" .. dirname .. \"__pycache__/\" .. modulename .. \".cpython-3\" .. pyminor .. \"{,.opt-?}.pyc\")\n end\n}", "pypi_source" => "%{lua:\n local src = rpm.expand('%1')\n local ver = rpm.expand('%2')\n local ext = rpm.expand('%3')\n local url = rpm.expand('%__pypi_url')\n\n -- If no first argument, try %srcname, then %pypi_name, then %name\n -- Note that rpm leaves macros unchanged if they are not defined.\n if src == '%1' then\n src = rpm.expand('%srcname')\n end\n if src == '%srcname' then\n src = rpm.expand('%pypi_name')\n end\n if src == '%pypi_name' then\n src = rpm.expand('%name')\n end\n\n -- If no second argument, use %version\n if ver == '%2' then\n ver = rpm.expand('%version'):gsub('~', '')\n end\n\n -- If no third argument, use the preset default extension\n if ext == '%3' then\n ext = rpm.expand('%__pypi_default_extension')\n end\n\n local first = string.sub(src, 1, 1)\n\n print(url .. first .. '/' .. src .. '/' .. src .. '-' .. ver .. '.' .. ext)\n}", "pyproject_buildrequires(rxtNe:)" => "%{expand:\\\n%{-N:\n%{-r:%{error:The -N and -r options are mutually exclusive}}\n%{-x:%{error:The -N and -x options are mutually exclusive}}\n%{-e:%{error:The -N and -e options are mutually exclusive}}\n%{-t:%{error:The -N and -t options are mutually exclusive}}\n}\n%{-e:%{expand:%global toxenv %(%{__python3} -s %{_rpmconfigdir}/redhat/pyproject_construct_toxenv.py %{?**})}}\necho 'python%{python3_pkgversion}-devel'\necho 'python%{python3_pkgversion}dist(pip) >= 19'\necho 'python%{python3_pkgversion}dist(packaging)'\n%{!-N:if [ -f pyproject.toml ]; then\n echo 'python%{python3_pkgversion}dist(toml)'\nelif [ -f setup.py ]; then\n # Note: If the default requirements change, also change them in the script!\n echo 'python%{python3_pkgversion}dist(setuptools) >= 40.8'\n echo 'python%{python3_pkgversion}dist(wheel)'\nelse\n echo 'ERROR: Neither pyproject.toml nor setup.py found, consider using %%%%pyproject_buildrequires -N <requirements-file> if this is not a Python package.' >&2\n exit 1\nfi}\n# setuptools assumes no pre-existing dist-info\nrm -rfv *.dist-info/ >&2\nif [ -f %{__python3} ]; then\n RPM_TOXENV=\"%{toxenv}\" HOSTNAME=\"rpmbuild\" %{__python3} -s %{_rpmconfigdir}/redhat/pyproject_buildrequires.py %{?!_python_no_extras_requires:--generate-extras} --python3_pkgversion %{python3_pkgversion} %{?**}\nfi\n}", "pyproject_check_import(e:t)" => "%{expand:\\\nif [ ! -f \"%{_pyproject_modules}\" ]; then\n echo 'ERROR: %%%%pyproject_check_import only works when %%%%pyproject_save_files is used' >&2\n exit 1\nfi\n%py3_check_import -f \"%{_pyproject_modules}\" %{?**}\n}", "pyproject_extras_subpkg(n:i:f:F)" => "%{expand:%{?python_extras_subpkg:%{python_extras_subpkg%{?!-i:%{?!-f:%{?!-F: -f %{_pyproject_ghost_distinfo}}}} %**}}}", "pyproject_files" => "%{_builddir}/pyproject-files", "pyproject_install" => "%{expand:\\\nspecifier=$(ls %{_pyproject_wheeldir}/*.whl | xargs basename --multiple | sed -E 's/([^-]+)-([^-]+)-.+\\.whl/\\1==\\2/')\nTMPDIR=\"%{_pyproject_builddir}\" %{__python3} -m pip install --root %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location --no-index --no-cache-dir --find-links %{_pyproject_wheeldir} $specifier\nif [ -d %{buildroot}%{_bindir} ]; then\n %py3_shebang_fix %{buildroot}%{_bindir}/*\n rm -rfv %{buildroot}%{_bindir}/__pycache__\nfi\nrm -f %{_pyproject_ghost_distinfo}\nsite_dirs=()\n# Process %%{python3_sitelib} if exists\nif [ -d %{buildroot}%{python3_sitelib} ]; then\n site_dirs+=( \"%{python3_sitelib}\" )\nfi\n# Process %%{python3_sitearch} if exists and does not equal to %%{python3_sitelib}\nif [ %{buildroot}%{python3_sitearch} != %{buildroot}%{python3_sitelib} ] && [ -d %{buildroot}%{python3_sitearch} ]; then\n site_dirs+=( \"%{python3_sitearch}\" )\nfi\n# Process all *.dist-info dirs in sitelib/sitearch\nfor site_dir in ${site_dirs[@]}; do\n for distinfo in %{buildroot}$site_dir/*.dist-info; do\n echo \"%ghost ${distinfo#%{buildroot}}\" >> %{_pyproject_ghost_distinfo}\n sed -i 's/pip/rpm/' ${distinfo}/INSTALLER\n PYTHONPATH=%{_rpmconfigdir}/redhat \\\n %{__python3} -B %{_rpmconfigdir}/redhat/pyproject_preprocess_record.py \\\n --buildroot %{buildroot} --record ${distinfo}/RECORD --output %{_pyproject_record}\n rm -fv ${distinfo}/RECORD\n rm -fv ${distinfo}/REQUESTED\n done\ndone\nlines=$(wc -l %{_pyproject_ghost_distinfo} | cut -f1 -d\" \")\nif [ $lines -ne 1 ]; then\n echo -e \"\\n\\nWARNING: %%%%pyproject_extras_subpkg won't work without explicit -i or -F, found $lines dist-info directories.\\n\\n\" >&2\n rm %{_pyproject_ghost_distinfo} # any attempt to use this will fail\nfi\n}", "pyproject_save_files" => "%{expand:\\\n%{__python3} %{_rpmconfigdir}/redhat/pyproject_save_files.py \\\n --output-files \"%{pyproject_files}\" \\\n --output-modules \"%{_pyproject_modules}\" \\\n --buildroot \"%{buildroot}\" \\\n --sitelib \"%{python3_sitelib}\" \\\n --sitearch \"%{python3_sitearch}\" \\\n --python-version \"%{python3_version}\" \\\n --pyproject-record \"%{_pyproject_record}\" \\\n %{*}\n}", "pyproject_wheel" => "%{expand:\\\n%_set_pytest_addopts\nmkdir -p \"%{_pyproject_builddir}\"\nCFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\" TMPDIR=\"%{_pyproject_builddir}\" \\\n%{__python3} -m pip wheel --wheel-dir %{_pyproject_wheeldir} --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --no-clean --progress-bar off --verbose .\n}", "pytest" => "%{expand:\\\n CFLAGS=\"${CFLAGS:-${RPM_OPT_FLAGS}}\" LDFLAGS=\"${LDFLAGS:-${RPM_LD_FLAGS}}\"\\\n PATH=\"%{buildroot}%{_bindir}:$PATH\"\\\n PYTHONPATH=\"${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}\"\\\n PYTHONDONTWRITEBYTECODE=1\\\n %{?__pytest_addopts:PYTEST_ADDOPTS=\"${PYTEST_ADDOPTS:-} %{__pytest_addopts}\"}\\\n %__pytest}", "python" => "%__python", "python2" => "%__python2", "python2_platform" => "%(%{__python2} -Esc \"import sysconfig; print(sysconfig.get_platform())\")", "python2_sitearch" => "%(%{__python2} -Esc \"from distutils.sysconfig import get_python_lib; print(get_python_lib(1))\")", "python2_sitelib" => "%(%{__python2} -Esc \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")", "python2_version" => "%(%{__python2} -Esc \"import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))\")", "python2_version_nodots" => "%(%{__python2} -Esc \"import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))\")", "python3" => "%__python3", "python3_ext_suffix" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))\")", "python3_pkgversion" => "3", "python3_platform" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_platform())\")", "python3_platform_triplet" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))\")", "python3_sitearch" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_path('platlib'))\")", "python3_sitelib" => "%(%{__python3} -Ic \"import sysconfig; print(sysconfig.get_path('purelib'))\")", "python3_version" => "%(%{__python3} -Ic \"import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))\")", "python3_version_nodots" => "%(%{__python3} -Ic \"import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))\")", "python_disable_dependency_generator" => "\n%undefine __pythondist_requires \n%{nil}", "python_ext_suffix" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))\")", "python_extras_subpkg(n:i:f:F)" => "%{expand:%{lua:\n local option_n = '-n (name of the base package)'\n local option_i = '-i (buildroot path to metadata)'\n local option_f = '-f (builddir path to a filelist)'\n local option_F = '-F (skip %%files section)'\n local value_n = rpm.expand('%{-n*}')\n local value_i = rpm.expand('%{-i*}')\n local value_f = rpm.expand('%{-f*}')\n local value_F = rpm.expand('%{-F}')\n local args = rpm.expand('%{*}')\n if value_n == '' then\n rpm.expand('%{error:%%%0: missing option ' .. option_n .. '}')\n end\n if value_i == '' and value_f == '' and value_F == '' then\n rpm.expand('%{error:%%%0: missing option ' .. option_i .. ' or ' .. option_f .. ' or ' .. option_F .. '}')\n end\n if value_i ~= '' and value_f ~= '' then\n rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_f .. ' options are not possible}')\n end\n if value_i ~= '' and value_F ~= '' then\n rpm.expand('%{error:%%%0: simultaneous ' .. option_i .. ' and ' .. option_F .. ' options are not possible}')\n end\n if value_f ~= '' and value_F ~= '' then\n rpm.expand('%{error:%%%0: simultaneous ' .. option_f .. ' and ' .. option_F .. ' options are not possible}')\n end\n if args == '' then\n rpm.expand('%{error:%%%0 requires at least one argument with \"extras\" name}')\n end\n local requires = 'Requires: ' .. value_n .. ' = %{?epoch:%{epoch}:}%{version}-%{release}'\n for extras in args:gmatch('[^%s,]+') do\n local rpmname = value_n .. '+' .. extras\n local pkgdef = '%package -n ' .. rpmname\n local summary = 'Summary: Metapackage for ' .. value_n .. ': ' .. extras .. ' extras'\n local description = '%description -n ' .. rpmname .. '\\n'\n local current_line = 'This is a metapackage bringing in'\n for _, word in ipairs({extras, 'extras', 'requires', 'for', value_n .. '.'}) do\n local line = current_line .. ' ' .. word\n if line:len() > 79 then\n description = description .. current_line .. '\\n'\n current_line = word\n else\n current_line = line\n end\n end\n description = description .. current_line .. '\\n' ..\n 'It makes sure the dependencies are installed.\\n'\n local files = ''\n if value_i ~= '' then\n files = '%files -n ' .. rpmname .. '\\n' .. '%ghost ' .. value_i\n elseif value_f ~= '' then\n files = '%files -n ' .. rpmname .. ' -f ' .. value_f\n end\n for i, line in ipairs({pkgdef, summary, requires, description, files, ''}) do\n print(line .. '\\n')\n end\n end\n}}", "python_platform" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_platform())\")", "python_platform_triplet" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))\")", "python_provide" => "%{lua:\n local python = require \"fedora.srpm.python\"\n function string.starts(String,Start)\n return string.sub(String,1,string.len(Start))==Start\n end\n local package = rpm.expand(\"%{?1}\")\n local vr = rpm.expand(\"%{?epoch:%{epoch}:}%{version}-%{release}\")\n local provides = python.python_altprovides(package, vr)\n local default_python3_pkgversion = rpm.expand(\"%{__default_python3_pkgversion}\")\n if (string.starts(package, \"python3-\")) then\n for i, provide in ipairs(provides) do\n print(\"\\nProvides: \" .. provide)\n end\n --Obsoleting the previous default python package (if it doesn't have isa)\n if (string.sub(package, \"-1\") ~= \")\") then\n print(\"\\nObsoletes: python-\")\n print(string.sub(package,9,string.len(package)))\n print(\" < \" .. vr)\n end\n elseif (string.starts(package, \"python\" .. default_python3_pkgversion .. \"-\")) then\n for i, provide in ipairs(provides) do\n print(\"\\nProvides: \" .. provide)\n end\n --Obsoleting the previous default python package (if it doesn't have isa)\n if (string.sub(package, \"-1\") ~= \")\") then\n print(\"\\nObsoletes: python-\")\n print(string.sub(package,8+string.len(default_python3_pkgversion),string.len(package)))\n print(\" < \" .. vr)\n end\n elseif (string.starts(package, \"python\")) then\n --No unversioned provides as other python3 cases are not the default\n elseif (string.starts(package, \"pypy\")) then\n --No unversioned provides as pypy is not default either\n else\n print(\"%python_provide: ERROR: \")\n print(package)\n print(\" not recognized.\")\n end\n}", "python_sitearch" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_path('platlib'))\")", "python_sitelib" => "%(%{__python} -Esc \"import sysconfig; print(sysconfig.get_path('purelib'))\")", "python_version" => "%(%{__python} -Esc \"import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))\")", "python_version_nodots" => "%(%{__python} -Esc \"import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))\")", "python_wheel_dir" => "%{_datadir}/%{python_wheel_pkg_prefix}-wheels", "python_wheel_pkg_prefix" => "python%{?rhel:%{!?eln:%{python3_pkgversion}}}", "qt5_qtwebengine_arches" => "%{ix86} x86_64 %{arm} aarch64 mips mipsel mips64el", "quote" => "<builtin>", "riscv" => "%{riscv32} %{riscv64} %{riscv128}", "riscv128" => "riscv128", "riscv32" => "riscv32", "riscv64" => "riscv64", "rpmmacrodir" => "/usr/lib/rpm/macros.d", "rust_arches" => "x86_64 %{ix86} armv7hl aarch64 ppc64 ppc64le riscv64 s390x", "selinux_modules_install(\"s:p:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n %{_sbindir}/semodule -n -s ${_policytype} -X %{!-p:200}%{-p*} -i %* || : \n %{_sbindir}/selinuxenabled && %{_sbindir}/load_policy || : \nfi \n%{nil}", "selinux_modules_uninstall(\"s:p:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif [ $1 -eq 0 ]; then \n if [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n %{_sbindir}/semodule -n -X %{!-p:200}%{-p*} -s ${_policytype} -r %* &> /dev/null || : \n %{_sbindir}/selinuxenabled && %{_sbindir}/load_policy || : \n fi \nfi \n%{nil}", "selinux_relabel_post(\"s:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif %{_sbindir}/selinuxenabled && [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n if [ -f %{_file_context_file_pre} ]; then \n %{_sbindir}/fixfiles -C %{_file_context_file_pre} restore &> /dev/null \n rm -f %{_file_context_file_pre} \n fi \nfi \n%{nil}", "selinux_relabel_pre(\"s:\")" => "\nif %{_sbindir}/selinuxenabled; then \n if [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \n fi \n _policytype=%{-s*} \n if [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \n fi \n if [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n [ -f %{_file_context_file_pre} ] || cp -f %{_file_context_file} %{_file_context_file_pre} \n fi \nfi \n%{nil}", "selinux_requires" => "\nRequires: selinux-policy >= %{_selinux_policy_version} \nBuildRequires: pkgconfig(systemd) \nBuildRequires: selinux-policy \nBuildRequires: selinux-policy-devel \nRequires(post): selinux-policy-base >= %{_selinux_policy_version} \nRequires(post): libselinux-utils \nRequires(post): policycoreutils \n%if 0%{?fedora} || 0%{?rhel} > 7\nRequires(post): policycoreutils-python-utils \n%else \nRequires(post): policycoreutils-python \n%endif \n%{nil}", "selinux_set_booleans(\"s:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif [ -d \"%{_selinux_store_policy_path}\" ]; then \n LOCAL_MODIFICATIONS=$(%{_sbindir}/semanage boolean -E) \n if [ ! -f %_file_custom_defined_booleans ]; then \n /bin/echo \"# This file is managed by macros.selinux-policy. Do not edit it manually\" > %_file_custom_defined_booleans \n fi \n semanage_import='' \n for boolean in %*; do \n boolean_name=${boolean%=*} \n boolean_value=${boolean#*=} \n boolean_local_string=$(grep \"$boolean_name$\" <<<$LOCAL_MODIFICATIONS) \n if [ -n \"$boolean_local_string\" ]; then \n semanage_import=\"${semanage_import}\\nboolean -m -$boolean_value $boolean_name\" \n boolean_customized_string=$(grep \"$boolean_name$\" %_file_custom_defined_booleans | tail -n 1) \n if [ -n \"$boolean_customized_string\" ]; then \n /bin/echo $boolean_customized_string >> %_file_custom_defined_booleans \n else \n /bin/echo $boolean_local_string >> %_file_custom_defined_booleans \n fi \n else \n semanage_import=\"${semanage_import}\\nboolean -m -$boolean_value $boolean_name\" \n boolean_default_value=$(LC_ALL=C %{_sbindir}/semanage boolean -l | grep \"^$boolean_name \" | sed 's/[^(]*([^,]*, *\\(on\\|off\\).*/\\1/') \n /bin/echo \"boolean -m --$boolean_default_value $boolean_name\" >> %_file_custom_defined_booleans \n fi \n done; \n if %{_sbindir}/selinuxenabled && [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n /bin/echo -e \"$semanage_import\" | %{_sbindir}/semanage import -S \"${_policytype}\" \n elif test -d /usr/share/selinux/\"${_policytype}\"/base.lst; then \n /bin/echo -e \"$semanage_import\" | %{_sbindir}/semanage import -S \"${_policytype}\" -N \n fi \nfi \n%{nil}", "selinux_unset_booleans(\"s:\")" => "\nif [ -e /etc/selinux/config ]; then \n . /etc/selinux/config \nfi \n_policytype=%{-s*} \nif [ -z \"${_policytype}\" ]; then \n _policytype=\"targeted\" \nfi \nif [ -d \"%{_selinux_store_policy_path}\" ]; then \n semanage_import='' \n for boolean in %*; do \n boolean_name=${boolean%=*} \n boolean_customized_string=$(grep \"$boolean_name$\" %_file_custom_defined_booleans | tail -n 1) \n if [ -n \"$boolean_customized_string\" ]; then \n awk \"/$boolean_customized_string/ && !f{f=1; next} 1\" %_file_custom_defined_booleans > %_file_custom_defined_booleans_tmp && mv %_file_custom_defined_booleans_tmp %_file_custom_defined_booleans \n if ! grep -q \"$boolean_name$\" %_file_custom_defined_booleans; then \n semanage_import=\"${semanage_import}\\n${boolean_customized_string}\" \n fi \n fi \n done; \n if %{_sbindir}/selinuxenabled && [ \"${SELINUXTYPE}\" = \"${_policytype}\" ]; then \n /bin/echo -e \"$semanage_import\" | %{_sbindir}/semanage import -S \"${_policytype}\" \n elif test -d /usr/share/selinux/\"${_policytype}\"/base.lst; then \n /bin/echo -e \"$semanage_import\" | %{_sbindir}/semanage import -S \"${_policytype}\" -N \n fi \nfi \n%{nil}", "set_build_flags" => "\n CFLAGS=\"${CFLAGS:-%{build_cflags}}\" ; export CFLAGS ; \n CXXFLAGS=\"${CXXFLAGS:-%{build_cxxflags}}\" ; export CXXFLAGS ; \n FFLAGS=\"${FFLAGS:-%{build_fflags}}\" ; export FFLAGS ; \n FCFLAGS=\"${FCFLAGS:-%{build_fflags}}\" ; export FCFLAGS ; \n LDFLAGS=\"${LDFLAGS:-%{build_ldflags}}\" ; export LDFLAGS ; \n LT_SYS_LIBRARY_PATH=\"${LT_SYS_LIBRARY_PATH:-%_libdir:}\" ; export LT_SYS_LIBRARY_PATH ; \n CC=\"${CC:-%{__cc}}\" ; export CC ; \n CXX=\"${CXX:-%{__cxx}}\" ; export CXX", "shrink" => "<builtin>", "source_date_epoch_from_changelog" => "1", "sources" => "%{lua: for i, s in ipairs(sources) do print(s..\" \") end}", "sparc" => "sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v", "suffix" => "<builtin>", "sysctl_apply" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysctl_apply}} \n[ -x /usr/lib/systemd/systemd-sysctl ] && /usr/lib/systemd/systemd-sysctl %{?*} || : \n%{nil}", "systemd_ordering" => "\nOrderWithRequires(post): systemd \nOrderWithRequires(preun): systemd \nOrderWithRequires(postun): systemd \n%{nil}", "systemd_post" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_post}} \nif [ $1 -eq 1 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Initial installation \n /usr/lib/systemd/systemd-update-helper install-system-units %{?*} || : \nfi \n%{nil}", "systemd_postun" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun}} \n%{nil}", "systemd_postun_with_restart" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun_with_restart}} \nif [ $1 -ge 1 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Package upgrade, not uninstall \n /usr/lib/systemd/systemd-update-helper mark-restart-system-units %{?*} || : \nfi \n%{nil}", "systemd_preun" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_preun}} \nif [ $1 -eq 0 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Package removal, not upgrade \n /usr/lib/systemd/systemd-update-helper remove-system-units %{?*} || : \nfi \n%{nil}", "systemd_requires" => "\nRequires(post): systemd \nRequires(preun): systemd \nRequires(postun): systemd \n%{nil}", "systemd_user_post" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_post}} \nif [ $1 -eq 1 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Initial installation \n /usr/lib/systemd/systemd-update-helper install-user-units %{?*} || : \nfi \n%{nil}", "systemd_user_postun" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_postun}} \n%{nil}", "systemd_user_postun_with_restart" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_postun_with_restart}} \nif [ $1 -ge 1 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Package upgrade, not uninstall \n /usr/lib/systemd/systemd-update-helper mark-restart-user-units %{?*} || : \nfi \n%{nil}", "systemd_user_preun" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_preun}} \nif [ $1 -eq 0 ] && [ -x \"/usr/lib/systemd/systemd-update-helper\" ]; then \n # Package removal, not upgrade \n /usr/lib/systemd/systemd-update-helper remove-user-units %{?*} || : \nfi \n%{nil}", "sysusers_create" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \ncommand -v systemd-sysusers >/dev/null && systemd-sysusers %{?*} || : \n%{nil}", "sysusers_create_compat" => "\n%(%{_rpmconfigdir}/sysusers.generate-pre.sh %{?*}) \n%{nil}", "sysusers_create_inline" => "\ncommand -v systemd-sysusers >/dev/null && systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \n%{?*} \nSYSTEMD_INLINE_EOF\n%{nil}", "sysusers_create_package" => "\n%{expand:%%{?!__systemd_twoargs_%#:%%{error:The %%%%sysusers_create_package macro requires two arguments}}} \nsystemd-sysusers --replace=%_sysusersdir/%1.conf - <<SYSTEMD_INLINE_EOF || : \n%(cat %2) \nSYSTEMD_INLINE_EOF\n%{nil}", "sysusers_requires_compat" => "Requires(pre): shadow-utils", "texlive_post" => "\nmkdir -p /var/run/texlive \ntouch /var/run/texlive/run-texhash \ntouch /var/run/texlive/run-mtxrun \n:", "texlive_posttrans" => "\nif [ -e /var/run/texlive/run-texhash ] && [ -e %{_bindir}/texhash ]; then %{_bindir}/texhash 2> /dev/null; rm -f /var/run/texlive/run-texhash; fi \nif [ -e /var/run/texlive/run-mtxrun ]; then export TEXMF=/usr/share/texlive/texmf-dist; export TEXMFCNF=/usr/share/texlive/texmf-dist/web2c; export TEXMFCACHE=/var/lib/texmf; %{_bindir}/mtxrun --generate &> /dev/null; rm -f /var/run/texlive/run-mtxrun; fi \n:", "texlive_postun" => "\nif [ $1 == 1 ]; then \n mkdir -p /var/run/texlive \n touch /var/run/run-texhash \nelse \n %{_bindir}/texhash 2> /dev/null \nfi \n:", "tmpfiles_create" => "\n%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# tmpfiles_create}} \ncommand -v systemd-tmpfiles >/dev/null && systemd-tmpfiles --create %{?*} || : \n%{nil}", "tmpfiles_create_package" => "\n%{expand:%%{?!__systemd_twoargs_%#:%%{error:The %%%%tmpfiles_create_package macro requires two arguments}}} \nsystemd-tmpfiles --replace=%_tmpfilesdir/%1.conf --create - <<SYSTEMD_INLINE_EOF || : \n%(cat %2) \nSYSTEMD_INLINE_EOF\n%{nil}", "toolchain" => "gcc", "tox(e:)" => "%{expand:\\\nTOX_TESTENV_PASSENV=\"${TOX_TESTENV_PASSENV:-*}\" \\\nPYTHONDONTWRITEBYTECODE=1 \\\nPATH=\"%{buildroot}%{_bindir}:$PATH\" \\\nPYTHONPATH=\"${PYTHONPATH:-%{buildroot}%{python3_sitearch}:%{buildroot}%{python3_sitelib}}\" \\\n%{?__pytest_addopts:PYTEST_ADDOPTS=\"${PYTEST_ADDOPTS:-} %{__pytest_addopts}\"} \\\nHOSTNAME=\"rpmbuild\" \\\n%{__python3} -m tox --current-env -q --recreate -e \"%{-e:%{-e*}}%{!-e:%{toxenv}}\" %{?*}\n}", "toxenv" => "%{default_toxenv}", "trace" => "<builtin>", "u2p" => "<builtin>", "udev_hwdb_update" => "%{nil}", "udev_rules_update" => "%{nil}", "uncompress" => "<builtin>", "undefine" => "<builtin>", "undefined" => "%{expand:%%{?%{1}:0}%%{!?%{1}:1}}", "url2path" => "<builtin>", "use_source_date_epoch_as_buildtime" => "0", "valgrind_arches" => "%{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64", "verbose" => "<builtin>", "version_no_tilde" => "%{lua:\n local sep = rpm.expand('%1')\n local ver = rpm.expand('%2')\n\n if sep == '%1' then\n sep = '-'\n end\n\n if ver == '%2' then\n ver = rpm.expand('%version')\n end\n ver = ver:gsub('~', sep)\n\n print(ver)\n}", "vimfiles_root" => "%{_datadir}/vim/vimfiles", "warn" => "<builtin>", "with" => "%{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}}", "without" => "%{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}}", "wordwrap(v:)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal variable = \"%{?\" .. rpm.expand(\"%{-v*}%{!-v:_description}\") .. \"}\"\nprint(fedora.wordwrap(variable))\n}", "writevars(f:)" => "%{lua:\nlocal fedora = require \"fedora.common\"\nlocal macrofile = rpm.expand(\"%{-f*}\")\nlocal rpmvars = {}\nfor i = 1, rpm.expand(\"%#\") do\n table.insert(rpmvars, rpm.expand(\"%\" .. i))\nend\nfedora.writevars(macrofile,rpmvars)\n}" },
"macro_path" => ["/usr/lib/rpm/macros", "/usr/lib/rpm/macros.d/macros.*", "/usr/lib/rpm/platform/%{_target}/macros", "/usr/lib/rpm/fileattrs/*.attr", "/usr/lib/rpm/redhat/macros", "/etc/rpm/macros.*", "/etc/rpm/macros", "/etc/rpm/%{_target}/macros", "~/.rpmmacros"],
"rpmrc" => { "archcolor" => "2", "optflags" => "%{__global_compiler_flags} -m64 %{__cflags_arch_x86_64} -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" },
"version" => "4.17.0",