Mock Version: 3.1 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target ppc64le --nodeps /builddir/build/SPECS/libtracefs-93f4d523856710929c715f8124b219e17da735df.spec'], chrootPath='/var/lib/mock/opensuse-tumbleweed-ppc64le-1664410592.071542/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.dj3j8rgs:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.dj3j8rgs:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', 'e1a683e42992447ca8e680bb1c64d3b0', '-D', '/var/lib/mock/opensuse-tumbleweed-ppc64le-1664410592.071542/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.dj3j8rgs:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bs --target ppc64le --nodeps /builddir/build/SPECS/libtracefs-93f4d523856710929c715f8124b219e17da735df.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: ppc64le Building for target ppc64le Wrote: /builddir/build/SRPMS/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.src.rpm Child return code was: 0 ENTER ['do_with_status'](['bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target ppc64le --nodeps /builddir/build/SPECS/libtracefs-93f4d523856710929c715f8124b219e17da735df.spec'], chrootPath='/var/lib/mock/opensuse-tumbleweed-ppc64le-1664410592.071542/root'env={'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8'}shell=Falselogger=timeout=0uid=1001gid=135user='mockbuild'nspawn_args=['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.dj3j8rgs:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11']unshare_net=TrueprintOutput=True) Using nspawn with args ['--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.dj3j8rgs:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11'] Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '693240a72313473ea3c7c4deff2ef3e5', '-D', '/var/lib/mock/opensuse-tumbleweed-ppc64le-1664410592.071542/root', '-a', '-u', 'mockbuild', '--capability=cap_ipc_lock', '--rlimit=RLIMIT_NOFILE=10240', '--capability=cap_ipc_lock', '--bind=/tmp/mock-resolv.dj3j8rgs:/etc/resolv.conf', '--bind=/dev/btrfs-control', '--bind=/dev/loop-control', '--bind=/dev/loop0', '--bind=/dev/loop1', '--bind=/dev/loop2', '--bind=/dev/loop3', '--bind=/dev/loop4', '--bind=/dev/loop5', '--bind=/dev/loop6', '--bind=/dev/loop7', '--bind=/dev/loop8', '--bind=/dev/loop9', '--bind=/dev/loop10', '--bind=/dev/loop11', '--console=pipe', '--setenv=TERM=vt100', '--setenv=SHELL=/bin/bash', '--setenv=HOME=/builddir', '--setenv=HOSTNAME=mock', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;\\007"', '--setenv=PS1= \\s-\\v\\$ ', '--setenv=LANG=C.UTF-8', '--resolv-conf=off', 'bash', '--login', '-c', '/usr/bin/rpmbuild -bb --target ppc64le --nodeps /builddir/build/SPECS/libtracefs-93f4d523856710929c715f8124b219e17da735df.spec'] with env {'TERM': 'vt100', 'SHELL': '/bin/bash', 'HOME': '/builddir', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;\\007"', 'PS1': ' \\s-\\v\\$ ', 'LANG': 'C.UTF-8', 'SYSTEMD_NSPAWN_TMPFS_TMP': '0', 'SYSTEMD_SECCOMP': '0'} and shell False Building target platforms: ppc64le Building for target ppc64le Executing(%prep): /usr/bin/bash -e /var/tmp/rpm-tmp.lLskyV + umask 022 + cd /builddir/build/BUILD + cd /builddir/build/BUILD + rm -rf libtracefs-93f4d523856710929c715f8124b219e17da735df + /usr/bin/gzip -dc /builddir/build/SOURCES/libtracefs-93f4d523856710929c715f8124b219e17da735df.tar.gz + /usr/bin/tar -xof - + STATUS=0 + '[' 0 -ne 0 ']' + cd libtracefs-93f4d523856710929c715f8124b219e17da735df + /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w . + RPM_EC=0 ++ jobs -p + exit 0 Executing(%build): /usr/bin/bash -e /var/tmp/rpm-tmp.RESBG8 + umask 022 + cd /builddir/build/BUILD + /usr/bin/rm -rf /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le ++ dirname /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le + /usr/bin/mkdir -p /builddir/build/BUILDROOT + /usr/bin/mkdir /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le + cd libtracefs-93f4d523856710929c715f8124b219e17da735df + ref=/usr/lib/rpm + mints=0 + case $(uname -m) in ++ uname -m + mints=20130610 + for s in guess sub ++ find -maxdepth 8 -name config.guess + for s in guess sub ++ find -maxdepth 8 -name config.sub + CONFIG_SHELL=/usr/bin/bash + export CONFIG_SHELL + CFLAGS='-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' + export CFLAGS + CXXFLAGS='-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' + export CXXFLAGS + FFLAGS='-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ' + export FFLAGS + FCFLAGS='-O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables ' + export FCFLAGS + LDFLAGS= + export LDFLAGS + rpm --showrc ARCHITECTURE AND OS: build arch : ppc64le compatible build archs: ppc64le noarch fat build os : Linux compatible build os's : Linux install arch : ppc64le install os : Linux compatible archs : ppc64le noarch fat compatible os's : Linux RPMRC VALUES: archcolor : 2 optflags : -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables Features supported by rpmlib: 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 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/suse/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/%{_target}/macros:~/.rpmmacros ======================== -20: P -20: S -13: __7zip /usr/bin/7za -13: ___build_args -e -13: ___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args} -13: ___build_post RPM_EC=$? for pid in $(jobs -p); do kill -9 ${pid} || continue; done exit ${RPM_EC} %{nil} -13: ___build_pre RPM_SOURCE_DIR="%{u2p:%{_sourcedir}}" RPM_BUILD_DIR="%{u2p:%{_builddir}}" RPM_OPT_FLAGS="%{optflags}" RPM_ARCH="%{_arch}" RPM_OS="%{_os}" RPM_BUILD_NCPUS="%{_smp_build_ncpus}" export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_DOC_DIR="%{_docdir}" export RPM_DOC_DIR RPM_PACKAGE_NAME="%{NAME}" RPM_PACKAGE_VERSION="%{VERSION}" RPM_PACKAGE_RELEASE="%{RELEASE}" export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE LANG=C export LANG unset CDPATH DISPLAY ||: %{?buildroot:RPM_BUILD_ROOT="%{u2p:%{buildroot}}" export RPM_BUILD_ROOT} %{?_javaclasspath:CLASSPATH="%{_javaclasspath}" export CLASSPATH} PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig" export PKG_CONFIG_PATH %[%{verbose}?"set -x":""] umask 022 cd "%{u2p:%{_builddir}}" -13: ___build_shell %{?_buildshell:%{_buildshell}}%{!?_buildshell:/bin/sh} -13: ___build_template #!%{___build_shell} %{___build_pre} %{nil} -13: __apply_patch(qp:m:) %{lua: local file = rpm.expand("%{1}") local num = rpm.expand("%{2}") if posix.access(file, "r") then local options = rpm.expand("%{-q} %{-p:-p%{-p*}} %{-m:-m%{-m*}}") local scm_apply = rpm.expand("%__scm_apply_%{__scm}") print(rpm.expand("%{uncompress:"..file.."} | "..scm_apply.." "..options.." "..file.." "..num.."\n")) else print("echo 'Cannot read "..file.."'; exit 1;".."\n") end} -13: __ar ar -13: __arch_install_post %{nil} -13: __as as -13: __awk gawk -13: __brp_compress %{_rpmconfigdir}/brp-compress %{?_prefix} -13: __brp_elfperms %{_rpmconfigdir}/brp-elfperms -13: __brp_remove_la_files %{_rpmconfigdir}/brp-remove-la-files -13: __brp_strip %{_rpmconfigdir}/brp-strip %{__strip} -13: __brp_strip_comment_note %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} -13: __brp_strip_static_archive %{_rpmconfigdir}/brp-strip-static-archive %{__strip} -13: __bzip2 /usr/bin/bzip2 -13: __bzr /usr/bin/bzr -13: __cat /usr/bin/cat -13: __cc gcc -13: __check_files %{_rpmconfigdir}/check-files %{buildroot} -13: __chgrp_Rhf %{__chgrp} -Rhf -13: __chmod /usr/bin/chmod -13: __chown /usr/bin/chown -13: __chown_Rhf %{__chown} -Rhf -13: __cp /usr/bin/cp -13: __cpp gcc -E -13: __cxx g++ -13: __debug_install_post %{__find_debuginfo} \ %{?_smp_build_ncpus:-j%{_smp_build_ncpus}} \ %{?_missing_build_ids_terminate_build:--strict-build-id} \ %{?_no_recompute_build_ids:-n} \ %{?_include_minidebuginfo:-m} \ %{?_include_gdb_index:-i} \ %{?_unique_build_ids:--build-id-seed "%{VERSION}-%{RELEASE}"} \ %{?_unique_debug_names:--unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch}"} \ %{?_unique_debug_srcs:--unique-debug-src-base "%{name}-%{VERSION}-%{RELEASE}.%{_arch}"} \ %{?_find_debuginfo_dwz_opts} \ %{lua:if posix.access(rpm.expand("%_sourcedir/baselibs.conf"), "r") then print("--dwz-single-file-mode") end} \ %{?_find_debuginfo_opts} \ %{?_debugsource_packages:-S debugsourcefiles.list} \ "%{_builddir}/%{?buildsubdir}" %{nil} -13: __debuginfo_path ^/usr/lib/debug/.build-id/[^/]+/[^/]+\.debug$ -13: __debuginfo_provides %{lua: local file = rpm.expand("%1") local b1, b2 = file:match("/([0-9a-f]+)/([0-9a-f]+).debug$") print(string.format("debuginfo(build-id) = %s%s\n", b1, b2)) } -13: __desktop_path ^%{_datadir}/applications/.*\.desktop$ -13: __desktop_provides %{lua: local executable = false local mimetypes = nil for line in io.lines(rpm.expand("%1")) do if line:match("^Type%s*=%s*Application$") or line:match("^Exec%s*=") then executable = true elseif line:match("^MimeType%s*=") then mimetypes = line:match("=%s*(.+)") end end if executable then print("application()\n") print(string.format("application(%s)\n", rpm.expand("%{basename:%1}"))) if mimetypes then for mimetype in mimetypes:gmatch("([^;]+)") do print(string.format("mimehandler(%s)\n", mimetype)) end end end } -13: __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 -13: __elf_exclude_path ^/usr/lib/debug/ -13: __elf_magic ^(setuid,? )?(setgid,? )?(sticky )?ELF (32|64)-bit.*$ -13: __elf_provides %{_rpmconfigdir}/elfdeps --provides -13: __elf_requires %{_rpmconfigdir}/elfdeps --requires -13: __file /usr/bin/file -13: __find_debuginfo /usr/lib/rpm/find-debuginfo -13: __find_provides %{_rpmconfigdir}/find-provides -13: __find_requires %{_rpmconfigdir}/find-requires -13: __find_supplements %{_rpmconfigdir}/find-supplements -13: __firmware_path %{_firmwaredir} -13: __firmware_provides %{_rpmconfigdir}/firmware.prov -13: __font_magic [Ff]ont?( (program|collection))?( (text|data)) -13: __font_provides %{_rpmconfigdir}/fontconfig.prov -13: __font_requires %{nil} -13: __gem /usr/bin/gem -13: __git /usr/bin/git -13: __global_provides_exclude_from %{?_docdir:%{_docdir}} -13: __global_requires_exclude_from %{?_docdir:%{_docdir}} -13: __gpg /usr/bin/gpg2 -13: __gpg_reserved_space 4096 -13: __gpg_sign_cmd %{__gpg} gpg --no-verbose --no-armor %{?_gpg_digest_algo:--digest-algo %{_gpg_digest_algo}} --no-secmem-warning %{?_gpg_sign_cmd_extra_args:%{_gpg_sign_cmd_extra_args}} -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename} -13: __grep /usr/bin/grep -13: __gzip /usr/bin/gzip -13: __hg /usr/bin/hg -13: __id /usr/bin/id -13: __id_u %{__id} -u -13: __install /usr/bin/install -13: __isa %{__isa_name}-%{__isa_bits} -13: __isa_bits 64 -13: __isa_name ppc -13: __kernel_path ^((/usr)?/lib/modules/[^/]*/kernel/(.*.ko(.gz|.xz|.zst)?|vmlinu[xz])|/boot/vmlinu[xz].*)$ -13: __kernel_provides %{_rpmconfigdir}/find-provides.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1} -13: __kmp_path ^(/usr)?/lib/modules/[^/]*/(updates|extra)/.*.ko(.gz|.xz|.zst)? -13: __kmp_provides %{_rpmconfigdir}/find-provides.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1} -13: __kmp_requires %{_rpmconfigdir}/find-requires.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1} -13: __kmp_supplements %{_rpmconfigdir}/find-supplements.ksyms -13: __ld /usr/bin/ld -13: __ln_s ln -s -13: __locale_namespace locale -13: __locale_path /locales?/[^/]*/LC_MESSAGES/.*$ -13: __locale_provides %{_rpmconfigdir}/locale.prov -13: __locale_provides_opts %{name} -13: __lrzip /usr/bin/lrzip -13: __lzip /usr/bin/lzip -13: __make /usr/bin/make -13: __metainfo_path ^%{_datadir}/(appdata|metainfo)/.*\.(appdata|metainfo)\.xml$ -13: __metainfo_provides %{lua: print("metainfo()\n") print(string.format("metainfo(%s)\n", rpm.expand("%{basename:%1}"))) } -13: __mkdir /usr/bin/mkdir -13: __mkdir_p /usr/bin/mkdir -p -13: __modulesload_path ^(/usr)?/lib/modules-load.d/.*.conf$ -13: __modulesload_requires %{_rpmconfigdir}/find-requires.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1} -13: __mv /usr/bin/mv -13: __objdump /usr/bin/objdump -13: __os_install_post /usr/lib/rpm/brp-compress /usr/lib/rpm/brp-suse %{nil} -13: __patch /usr/bin/patch -13: __perl /usr/bin/perl -13: __perl_flags exeonly -13: __perl_magic ^.*[Pp]erl .*$ -13: __perllib_flags magic_and_path -13: __perllib_magic ^Perl[[:digit:]] module source.* -13: __perllib_path \.pm$ -13: __perllib_provides %{_rpmconfigdir}/perl.prov -13: __pkgconfig_path ^((%{_libdir}|%{_datadir})/pkgconfig/.*.pc|%{_bindir}/pkg-config)$ -13: __pkgconfig_provides %{_rpmconfigdir}/pkgconfigdeps.sh --provides -13: __pkgconfig_requires %{_rpmconfigdir}/pkgconfigdeps.sh --requires -13: __plugindir %{_libdir}/rpm-plugins -13: __pypy3 %{_bindir}/%{lua: print((string.gsub("pypy3", "(%a+%d)(%d+)", "%1.%2")))} -13: __python2 %{_bindir}/%{lua: print((string.gsub("python2", "(%a+%d)(%d+)", "%1.%2")))} -13: __python3 %{_bindir}/%{lua: print((string.gsub("python3", "(%a+%d)(%d+)", "%1.%2")))} -13: __python310 %{_bindir}/%{lua: print((string.gsub("python310", "(%a+%d)(%d+)", "%1.%2")))} -13: __python311 %{_bindir}/%{lua: print((string.gsub("python311", "(%a+%d)(%d+)", "%1.%2")))} -13: __python38 %{_bindir}/%{lua: print((string.gsub("python38", "(%a+%d)(%d+)", "%1.%2")))} -13: __python39 %{_bindir}/%{lua: print((string.gsub("python39", "(%a+%d)(%d+)", "%1.%2")))} -13: __python_path ^((%{_prefix}/lib(64)?/python[[:digit:]]+\.[[:digit:]]+/.*\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]+\.[[:digit:]]+))$ -13: __python_provides %{lua: -- Match buildroot/payload paths of the form -- /PATH/OF/BUILDROOT/usr/bin/pythonMAJOR.MINOR -- generating a line of the form -- python(abi) = MAJOR.MINOR -- (Don't match against -config tools e.g. /usr/bin/python2.6-config) local path = rpm.expand('%1') if path:match('/usr/bin/python%d+%.%d+$') then local provides = path:gsub('.*/usr/bin/python(%d+%.%d+)', 'python(abi) = %1') print(provides) end } -13: __python_requires %{lua: -- Match buildroot paths of the form -- /PATH/OF/BUILDROOT/usr/lib/pythonMAJOR.MINOR/ and -- /PATH/OF/BUILDROOT/usr/lib64/pythonMAJOR.MINOR/ -- generating a line of the form: -- python(abi) = MAJOR.MINOR local path = rpm.expand('%1') if path:match('/usr/lib%d*/python%d+%.%d+/.*') then local requires = path:gsub('.*/usr/lib%d*/python(%d+%.%d+)/.*', 'python(abi) = %1') print(requires) end } -13: __pythondist_path /lib(64)?/python[[:digit:]]\.[[:digit:]]+/site-packages/[^/]+\.(dist-info|egg-info|egg-link)$ -13: __pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides --majorver-provides -13: __quilt /usr/bin/quilt -13: __rm /usr/bin/rm -13: __scm patch -13: __scm_apply_bzr(qp:m:) %{__patch} %{-p:-p%{-p*}} %{-q:-s} %{__bzr} commit %{-q} -m %{-m*} -13: __scm_apply_gendiff(qp:m:) %{__patch} %{-p:-p%{-p*}} %{-q:-s} --fuzz=%{_default_patch_fuzz} %{_default_patch_flags} -b --suffix ".%{2}" -13: __scm_apply_git(qp:m:) %{__git} apply --index --reject %{-p:-p%{-p*}} - %{__git} commit %{-q} -m %{-m*} --author "%{__scm_author}" -13: __scm_apply_git_am(qp:m:) %{__git} am --reject %{-q} %{-p:-p%{-p*}} -13: __scm_apply_hg(qp:m:) %{__hg} import - %{-p:-p%{-p*}} %{-q} -m %{-m*} --user "%{__scm_author}" -13: __scm_apply_patch(qp:m:) %{__patch} %{-p:-p%{-p*}} %{-q:-s} --fuzz=%{_default_patch_fuzz} %{_default_patch_flags} -13: __scm_apply_quilt(qp:m:) %{__quilt} import %{-p:-p%{-p*}} %{1} && %{__quilt} push %{-q} -13: __scm_author %{__scm_username} %{__scm_usermail} -13: __scm_setup_bzr(q) %{__bzr} init %{-q} %{__bzr} whoami --branch "%{__scm_author}" %{__bzr} add . %{__bzr} commit %{-q} -m "%{NAME}-%{VERSION} base" -13: __scm_setup_gendiff(q) %{nil} -13: __scm_setup_git(q) %{__git} init %{-q} %{__git} config user.name "%{__scm_username}" %{__git} config user.email "%{__scm_usermail}" %{__git} config gc.auto 0 %{__git} add --force . %{__git} commit %{-q} --allow-empty -a\ --author "%{__scm_author}" -m "%{NAME}-%{VERSION} base" %{__git} branch rpm-build %{__git} checkout rpm-build %{__git} branch --set-upstream-to=master -13: __scm_setup_git_am(q) %{expand:%__scm_setup_git %{-q}} -13: __scm_setup_hg(q) %{__hg} init %{-q} . %{__hg} add %{-q} . %{__hg} commit %{-q} --user "%{__scm_author}" -m "%{NAME}-%{VERSION} base" -13: __scm_setup_patch(q) %{nil} -13: __scm_setup_quilt(q) %{nil} -13: __scm_usermail -13: __scm_username rpm-build -13: __script_flags exeonly -13: __script_magic ^.* script[, ].*$ -13: __script_requires %{_rpmconfigdir}/script.req -13: __sed /usr/bin/sed -13: __spec_build_args %{___build_args} -13: __spec_build_body %{___build_body} -13: __spec_build_cmd %{___build_cmd} -13: __spec_build_post %{___build_post} -13: __spec_build_pre %{___build_pre} %{?buildroot: %__rm -rf "$RPM_BUILD_ROOT" %__mkdir_p `dirname "$RPM_BUILD_ROOT"` %__mkdir "$RPM_BUILD_ROOT" } -13: __spec_build_shell %{___build_shell} -13: __spec_build_template #!%{__spec_build_shell} %{__spec_build_pre} %{nil} -13: __spec_buildrequires_args %{___build_args} -13: __spec_buildrequires_body %{___build_body} -13: __spec_buildrequires_cmd %{___build_cmd} -13: __spec_buildrequires_post %{___build_post} -13: __spec_buildrequires_pre %{___build_pre} -13: __spec_buildrequires_shell %{___build_shell} -13: __spec_buildrequires_template #!%{__spec_buildrequires_shell} %{__spec_buildrequires_pre} %{nil} -13: __spec_check_args %{___build_args} -13: __spec_check_body %{___build_body} -13: __spec_check_cmd %{___build_cmd} -13: __spec_check_post %{___build_post} -13: __spec_check_pre %{___build_pre} -13: __spec_check_shell %{___build_shell} -13: __spec_check_template #!%{__spec_check_shell} %{__spec_check_pre} %{nil} -13: __spec_clean_args %{___build_args} -13: __spec_clean_body %{___build_body} -13: __spec_clean_cmd %{___build_cmd} -13: __spec_clean_post %{___build_post} -13: __spec_clean_pre %{___build_pre} -13: __spec_clean_shell %{___build_shell} -13: __spec_clean_template #!%{__spec_clean_shell} %{__spec_clean_pre} %{nil} -13: __spec_install_args %{___build_args} -13: __spec_install_body %{___build_body} -13: __spec_install_cmd %{___build_cmd} -13: __spec_install_post %{?__debug_package:%{__debug_install_post}} %{__arch_install_post} %{__os_install_post} %{nil} -13: __spec_install_pre %{___build_pre} %{__rm} -rf "%{buildroot}" %{__mkdir_p} "%{dirname:%{buildroot}}" %{__mkdir} "%{buildroot}" %{nil} -13: __spec_install_shell %{___build_shell} -13: __spec_install_template #!%{__spec_install_shell} %{__spec_install_pre} %{nil} -13: __spec_prep_args %{___build_args} -13: __spec_prep_body %{___build_body} -13: __spec_prep_cmd %{___build_cmd} -13: __spec_prep_post %{___build_post} -13: __spec_prep_pre %{___build_pre} -13: __spec_prep_shell %{___build_shell} -13: __spec_prep_template #!%{__spec_prep_shell} %{__spec_prep_pre} %{nil} -13: __spec_rmbuild_args %{___build_args} -13: __spec_rmbuild_body %{___build_body} -13: __spec_rmbuild_cmd %{___build_cmd} -13: __spec_rmbuild_post %{___build_post} -13: __spec_rmbuild_pre %{___build_pre} -13: __spec_rmbuild_shell %{___build_shell} -13: __spec_rmbuild_template #!%{__spec_rmbuild_shell} %{__spec_rmbuild_pre} %{nil} -13: __strip /usr/bin/strip -13: __sysvinit_path ^/etc/init.d/ -13: __sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides -13: __tar /usr/bin/tar -13: __transaction_audit %{__plugindir}/audit.so -13: __transaction_dbus_announce %{__plugindir}/dbus_announce.so -13: __transaction_fapolicyd %{__plugindir}/fapolicyd.so -13: __transaction_fsverity %{__plugindir}/fsverity.so -13: __transaction_ima %{__plugindir}/ima.so -13: __transaction_prioreset %{__plugindir}/prioreset.so -13: __transaction_selinux %{__plugindir}/selinux.so -13: __transaction_syslog %{__plugindir}/syslog.so -13: __transaction_systemd_inhibit %{__plugindir}/systemd_inhibit.so -13: __unzip /usr/bin/unzip -13: __urlhelper_localopts --proto -all,+https,+ftps -13: __urlhelper_proxyopts %{?_httpproxy:--proxy %{_httpproxy}%{?_httpport::%{_httpport}}}%{!?_httpproxy:%{nil}} -13: __urlhelpercmd /usr/bin/curl -13: __urlhelperopts --silent --show-error --fail --globoff --location -o -13: __vsflags 0xf0000 -13: __xz /usr/bin/xz -13: __zstd /usr/bin/zstd -13: _arch ppc64le -13: _binaries_in_noarch_packages_terminate_build 1 -13: _binary_filedigest_algorithm 8 -13: _binary_payload w19T0.zstdio -13: _binarychangelogtrim 0,1546300800,10 -13: _bindir %{_exec_prefix}/bin -13: _binfmtdir /usr/lib/binfmt.d -13: _build %{_host} -13: _build_alias %{_host_alias} -13: _build_arch ppc64le -13: _build_cpu %{_host_cpu} -13: _build_id_links alldebug -13: _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm -13: _build_os %{_host_os} -13: _build_vendor %{_host_vendor} -13: _builddir %{_topdir}/BUILD -13: _buildhost copr-hv-ppc64le-01-prod-02423105-20220928-231445 -13: _buildrootdir %{_topdir}/BUILDROOT -13: _buildshell /usr/bin/bash -13: _changelog_trimage 0 -13: _changelog_trimtime 0 -13: _color_output never -13: _configure ./configure -13: _datadir %{_datarootdir} -13: _datarootdir %{_prefix}/share -13: _db_backend ndb -13: _dbpath %{_usr}/lib/sysimage/rpm -13: _dbpath_rebuild %{_dbpath} -13: _debuginfo_subpackages 1 -13: _debuginfo_template %package debuginfo Summary: Debug information for package %{name} Group: Development/Debug AutoReq: 0 AutoProv: 1 %description debuginfo This package provides debug information for package %{name}. Debug information is useful when developing applications that use this package or when debugging this package. %files debuginfo -f debugfiles.list %{nil} -13: _debugsource_packages 1 -13: _debugsource_template %package debugsource Summary: Debug sources for package %{name} Group: Development/Debug AutoReqProv: 0 %description debugsource This package provides debug sources for package %{name}. Debug sources are useful when developing applications that use this package or when debugging this package. %files debugsource -f debugsourcefiles.list %{nil} -13: _default_patch_flags --no-backup-if-mismatch -f -13: _default_patch_fuzz 0 -13: _defaultdocdir %{_usr}/share/doc/packages -13: _defaultlicensedir %{_datadir}/licenses -13: _disable_source_fetch 1 -13: _distconfdir %{_usr}/etc -13: _docdir_fmt %%{NAME} -13: _duplicate_files_terminate_build 0 -13: _dwz_low_mem_die_limit 10000000 -13: _dwz_max_die_limit 50000000 -13: _empty_manifest_terminate_build 0 -13: _environmentdir /usr/lib/environment.d -13: _exec_prefix %{_prefix} -13: _fail_on_postinstall_errors 0 -13: _fileattrsdir %{_rpmconfigdir}/fileattrs -13: _fillupdir %{_usr}/share/fillup-templates -13: _find_debuginfo_dwz_opts --run-dwz\ --dwz-low-mem-die-limit %{_dwz_low_mem_die_limit}\ --dwz-max-die-limit %{_dwz_max_die_limit} -13: _firmwaredir %{?usrmerged:%{_usr}}/lib/firmware -13: _fixgroup [ `%{__id_u}` = '0' ] && %{__chgrp_Rhf} root -13: _fixowner [ `%{__id_u}` = '0' ] && %{__chown_Rhf} root -13: _fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w -13: _gnu -gnu -13: _hkp_keyserver http://pgp.mit.edu -13: _hkp_keyserver_query %{_hkp_keyserver}:11371/pks/lookup?op=get&search=0x -13: _host powerpc64le-suse-linux-gnu -13: _host_alias powerpc64le-suse-linux-gnu%{nil} -13: _host_cpu powerpc64le -13: _host_os linux -13: _host_vendor suse -13: _includedir %{_prefix}/include -13: _infodir %{_prefix}/share/info -13: _initddir %{_sysconfdir}/init.d -13: _initrddir %{_initddir} -13: _install_langs all -13: _install_script_path /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin -13: _invalid_encoding_terminates_build 1 -13: _isa %{?__isa:(%{__isa})}%{!?__isa:%{nil}} -13: _journalcatalogdir /usr/lib/systemd/catalog -13: _jvmjardir %{_libdir}/jvm-exports -13: _keyring rpmdb -13: _keyringpath %{_dbpath}/pubkeys/ -13: _lib lib64 -13: _libdir %{_prefix}/lib64 -13: _libexecdir %{_exec_prefix}/libexec -13: _localstatedir /var -13: _lto_cflags -flto=auto -13: _make_output_sync %(! %{__make} --version -O >/dev/null 2>&1 || echo -O) -13: _make_verbose V=1 VERBOSE=1 -13: _mandir %{_prefix}/share/man -13: _minimize_writes 1 -13: _missing_doc_files_terminate_build 1 -13: _modprobedir /usr/lib/modprobe.d -13: _modulesloaddir /usr/lib/modules-load.d -13: _ntpunitsdir /usr/lib/systemd/ntp-units.d -13: _oldincludedir /usr/include -13: _os linux -13: _pkgverify_flags 0x0 -13: _pkgverify_level digest -13: _platform_multiplier 1 -13: _prefix /usr -13: _presetdir /usr/lib/systemd/system-preset -13: _pypy3_bin_suffix pp%{pypy3_version} -13: _python_definitions %{lua: -- declare common functions function string.startswith(str, prefix) return str:sub(1, prefix:len()) == prefix end function string.endswith(str, suffix) return str:sub(-suffix:len()) == suffix end function string.basename(str) while true do local idx = str:find("/") if not idx then return str end str = str:sub(idx + 1) end end function lookup_table(tbl) local result = {} for _,v in ipairs(tbl) do result[v] = true end return result end -- macro replacements SHORT_FLAVORS = { -- ?? python = "py", -- ?? python2 = "py2", python3 = "py3", pypy = "pypy", } function replace_macros(str, targetflavor) local LONG_MACROS = { "sitelib", "sitearch", "alternative", "install_alternative", "uninstall_alternative", "reset_alternative", "version", "version_nodots", "bin_suffix", "prefix", "provides"} local SHORT_MACROS = { "ver" } for _, srcflavor in ipairs({flavor, "python"}) do str = str:gsub("%%__" .. srcflavor, "%%__" .. targetflavor) for _, macro in ipairs(LONG_MACROS) do local from = string.format("%s_%s", srcflavor, macro) local to = string.format("%s_%s", targetflavor, macro) str = str:gsub("%%" .. from, "%%" .. to) str = str:gsub("%%{" .. from .. "}", "%%{" .. to .. "}") str = str:gsub("%%{" .. from .. "(%s+.-)}", "%%{" .. to .. "%1}") end for _, macro in ipairs(SHORT_MACROS) do local from = string.format("%s_%s", SHORT_FLAVORS[srcflavor], macro) local to = string.format("%s_%s", SHORT_FLAVORS[targetflavor], macro) str = str:gsub("%%" .. from, "%%" .. to) str = str:gsub("%%{" .. from .. "}", "%%{" .. to .. "}") end end return str end function package_name(flavor, modname, subpkg, append) if flavor == "python2" and old_python2 then flavor = "python" end local name = flavor .. "-" .. modname if subpkg and subpkg ~= "" then name = name .. "-" .. subpkg end if append and append ~= "" then name = name .. " " .. replace_macros(append, flavor) end return name end function pkgname_from_param(param) if param == modname then return "" elseif param:startswith(modname .. "-") then return param:sub(modname:len() + 2) else return "-n " .. param end end -- alternative-related local bindir = rpm.expand("%{_bindir}") local mandir = rpm.expand("%{_mandir}") local ext_man, ext_man_expr ext_man = rpm.expand("%{ext_man}") if ext_man == "" then ext_man_expr = "%.%d$" else -- ASSUMPTION: ext_man:startswith(".") ext_man_expr = "%.%d%" .. ext_man .. "$" end function python_alternative_names(arg, binsuffix, keep_path_unmangled) local link, name, path name = arg:basename() local man_ending = arg:match(ext_man_expr) or arg:match("%.%d$") if arg:startswith("/") then link = arg elseif man_ending then link = mandir .. "/man" .. man_ending:sub(2,2) .. "/" .. arg else link = bindir .. "/" .. arg end if man_ending then path = link:sub(1, -man_ending:len()-1) .. "-" .. binsuffix .. man_ending else path = link .. "-" .. binsuffix end -- now is the time to append ext_man if appropriate -- "link" and "name" get ext_man always if ext_man ~= "" and man_ending and not arg:endswith(ext_man) then link = link .. ext_man name = name .. ext_man if not keep_path_unmangled then path = path .. ext_man end end return link, name, path end function alternative_prio(flavor) local prio = rpm.expand("%" .. flavor .. "_version_nodots") -- increase priority for primary python3 flavor local provides = rpm.expand("%" .. flavor .. "_provides") .. " " if provides:match("python3%s") then prio = prio + 1000 end return prio end function python_install_ualternative(flavor) local prio = alternative_prio(flavor) local binsuffix = rpm.expand("%" .. flavor .. "_bin_suffix") local params = {} for p in string.gmatch(rpm.expand("%*"), "%S+") do table.insert(params, p) end if #params == 0 then print("error") return end local link, name, path = python_alternative_names(params[1], binsuffix) print(string.format("update-alternatives --quiet --install %s %s %s %s", link, name, path, prio)) table.remove(params, 1) for _, v in ipairs(params) do print(string.format(" \\\n --slave %s %s %s", python_alternative_names(v, binsuffix))) end end function python_install_libalternative(flavor, target) local prio = alternative_prio(flavor) local binsuffix = rpm.expand("%" .. flavor .. "_bin_suffix") local ldir = rpm.expand("%{buildroot}%{_datadir}/libalternatives") local link, name, path = python_alternative_names(target, binsuffix) local man_ending = name:match(ext_man_expr) local entry, lname if man_ending then lname=name:sub(1,-ext_man:len()-3) entry="man=" .. path:basename():sub(1,-ext_man:len()-1) else entry="binary=" .. path lname=name end print(string.format("mkdir -p %s/%s\n", ldir, lname)) print(string.format("echo %s >> %s/%s/%s.conf\n", entry, ldir, lname, prio)) end } -13: _python_macro_init %{_python_definitions}%{_python_scan_spec}%{lua: rpm.define("_python_macro_init %{nil}")} -13: _python_scan_spec %{lua: local last_python = rpm.expand("%python_for_executables") local insert_last_python = false pythons = {} -- make sure that last_python is the last item in the list for str in string.gmatch(rpm.expand("%pythons"), "%S+") do if str == last_python then insert_last_python = true else table.insert(pythons, str) end end -- ...but check that it is actually in the buildset if insert_last_python then table.insert(pythons, last_python) end modname = rpm.expand("%name") local spec_name_prefix = "python" -- modname from name local name = modname for _,py in ipairs(pythons) do if name:find(py .. "%-") == 1 then spec_name_prefix = py modname = name:sub(py:len() + 2) break end end -- try to match "python-" if name == modname and name:find("python%-") == 1 then spec_name_prefix = "python" modname = name:sub(8) end -- if not found, modname == %name, spec_name_prefix == "python" system_python = rpm.expand("%system_python") -- is the package built for python2 as "python-foo" ? old_python2 = rpm.expand("%python2_prefix") == "python" is_called_python = spec_name_prefix == "python" -- detect `flavor`, used for evaluating %ifmacros if is_called_python then -- either system_python (if found in %pythons) -- or the last entry of %pythons for _,py in ipairs(pythons) do flavor = py if flavor == system_python then break end end else -- specname is something other than "python-", and it is a valid -- python flavor (otherwise spec_name_prefix defaults to "python" -- so `is_called_python` is true), so we use it literally flavor = spec_name_prefix end -- find the spec file specpath = rpm.expand("%_specfile") } -13: _python_stash_flavor if [ -d build ]; then mv build _build.%1; fi if [ -d _build.tmp ]; then mv _build.tmp build; fi %{nil} -13: _python_sysconfig_path %([ -x %1 ] && %1 -c "import sysconfig as s; print(s.get_paths().get('%2'))" || echo "!!_{%1}_not_installed_!!") -13: _python_sysconfig_var %([ -x %1 ] && %1 -c "import sysconfig as s; print(s.get_config_var('%2'))" || echo "!!_{%1}_not_installed_!!") -13: _python_use_flavor last_flavor=`[ -f _current_flavor ] && cat _current_flavor || true` if [ -z "$last_flavor" ]; then last_flavor="tmp"; fi if [ "$last_flavor" != "%1" ]; then if [ -d build ]; then mv build _build.$last_flavor; fi if [ -d _build.%1 ]; then mv _build.%1 build; fi fi echo %1 > _current_flavor python_flavor=%1 %{nil} -13: _query_all_fmt %%{nvra} -13: _query_selector_match default -13: _rec_macro_helper %{lua: rpm.define("_rec_macro_helper %{nil}") function expand_macro(name, args) local pflavor = rpm.expand("%python_flavor") local args = args and rpm.expand(args) or "" print(rpm.expand("%{" .. pflavor .. "_" .. name .. " " .. args .."}")) end } -13: _restart_on_update if [ -e /etc/sysconfig/services ]; then DISABLE_RESTART_ON_UPDATE= . /etc/sysconfig/services case "$DISABLE_RESTART_ON_UPDATE" in yes|1) ;; *) /usr/bin/systemctl try-restart %{*} || : esac fi %{nil} -13: _restart_on_update_force /usr/bin/systemctl try-restart %{*} || : %{nil} -13: _restart_on_update_never : # Restart of %{*} skipped %{nil} -13: _rpmconfigdir %{getconfdir} -13: _rpmdir %{_topdir}/RPMS -13: _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm -13: _rpmlock_path %{_dbpath}/.rpm.lock -13: _rpmluadir %{_rpmconfigdir}/lua -13: _rpmmacrodir %{_rpmconfigdir}/macros.d -13: _rundir /run -13: _sbindir %{_exec_prefix}/sbin -13: _sharedstatedir /var/lib -13: _smp_build_ncpus %([ -z "$RPM_BUILD_NCPUS" ] \ && RPM_BUILD_NCPUS="%{getncpus}"; \ ncpus_max=%{?_smp_ncpus_max}; \ if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \ echo "$RPM_BUILD_NCPUS";) -13: _smp_build_nthreads %{_smp_build_ncpus} -13: _smp_mflags -j%{_smp_build_ncpus} -13: _source_filedigest_algorithm 8 -13: _sourcedir %{_topdir}/SOURCES -13: _specdir %{_topdir}/SPECS -13: _srcrpmdir %{_topdir}/SRPMS -13: _sysconfdir /etc -13: _sysctldir /usr/lib/sysctl.d -13: _systemd_system_env_generator_dir /usr/lib/systemd/system-environment-generators -13: _systemd_user_env_generator_dir /usr/lib/systemd/user-environment-generators -13: _systemd_util_dir /usr/lib/systemd -13: _systemdgeneratordir /usr/lib/systemd/system-generators -13: _systemdusergeneratordir /usr/lib/systemd/user-generators -13: _sysusersdir /usr/lib/sysusers.d -11: _target ppc64le-linux -13: _target_alias %{_host_alias} -11= _target_cpu ppc64le -11= _target_os linux -13: _target_platform %{_target_cpu}-%{_vendor}-%{_target_os} -13: _target_vendor %{_host_vendor} -13: _tmpfilesdir /usr/lib/tmpfiles.d -13: _tmppath %{_var}/tmp -13: _topdir /builddir/build -13: _transaction_color 0 -13: _udevhwdbdir /usr/lib/udev/hwdb.d -13: _udevrulesdir /usr/lib/udev/rules.d -13: _unique_build_ids 1 -13: _unique_debug_names 1 -13: _unique_debug_srcs 1 -13: _unitdir /usr/lib/systemd/system -13: _unpackaged_files_terminate_build 1 -13: _urlhelper %{__urlhelpercmd} %{?__urlhelper_localopts} %{?__urlhelper_proxyopts} %{__urlhelperopts} -13: _use_internal_dependency_generator 1 -13: _userpresetdir /usr/lib/systemd/user-preset -13: _userunitdir /usr/lib/systemd/user -13: _usr /usr -13: _usrsrc %{_usr}/src -13: _var /var -13: _vendor suse -13: _vpath_builddir %_target_platform -13: _vpath_srcdir . -13: _vsflags_build %{__vsflags} -13: _vsflags_erase %{__vsflags} -13: _vsflags_install %{__vsflags} -13: _vsflags_query %{__vsflags} -13: _vsflags_rebuilddb 0xc0c00 -13: _vsflags_verify %{__vsflags} -13: _without_python2 1 -13: _wrong_version_format_terminate_build 0 -13: _zstd_pool_threads 8 -13: add_python %{expand:%%define pythons %1 %pythons} -13: add_start_if_needed set -- %{?*} while [ ${#*} -gt 0 ] ; do SCRIPTNAME=$1 SV_VALUE=$2 shift 2 test -n "$SCRIPTNAME" -a -n "$SV_VALUE" || { echo "SCRIPTNAME or SV_VALUE unknown"; exit 1;} if test "$FIRST_ARG" = "1" -a "$SV_VALUE" = "no" ; then /sbin/insserv ${YAST_IS_RUNNING:+-f} -r /etc/init.d/$SCRIPTNAME elif test "$FIRST_ARG" = "1" -o "$FORCE_YES" = "1" ; then /sbin/insserv ${YAST_IS_RUNNING:+-f} /etc/init.d/$SCRIPTNAME fi done -13: alpha alpha alphaev56 alphaev6 alphaev67 -13: alternative_for %1 %ghost %{_sysconfdir}/alternatives/%{basename:%1} -13: arm %{arm32} -13: arm32 armv3l armv4b armv4l armv4tl armv5b armv5l armv5teb armv5tel armv5tejl armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl -13: arm64 aarch64 -13: armb armv4b armv5b armv5teb -13: arml armv3l armv4l armv5l armv5tel armv6l armv6hl armv7l armv7hl armv7hnl armv8l armv8hl armv8hnl armv8hcnl -13: autopatch(vp:m:M:) %{lua: if #arg == 0 then local lo = tonumber(rpm.expand("%{-m:%{-m*}}")) local hi = tonumber(rpm.expand("%{-M:%{-M*}}")) for i, n in ipairs(patch_nums) do if ((not lo or n >= lo) and (not hi or n <= hi)) then table.insert(arg, n) end end end local options = rpm.expand("%{!-v:-q} %{-p:-p%{-p*}} ") local bynum = {} for i, p in ipairs(patches) do bynum[patch_nums[i]] = p end for i, a in ipairs(arg) do local p = bynum[tonumber(a)] if p then print(rpm.expand("%__apply_patch -m %{basename:"..p.."} "..options..p.." "..i.."\n")) else macros.error({"no such patch "..a}) end end } -13: autosetup(a:b:cDn:TvNS:p:) %setup %{-a} %{-b} %{-c} %{-D} %{-n} %{-T} %{!-v:-q} %{-S:%global __scm %{-S*}} %{expand:%__scm_setup_%{__scm} %{!-v:-q}} %{!-N:%autopatch %{-v} %{-p:-p%{-p*}}} -20: basename -13: bcond %[ (%2) ? "%{expand:%%{!?_without_%{1}:%%global with_%{1} 1}}" : "%{expand:%%{?_with_%{1}:%%global with_%{1} 1}}" ] -13: bcond_with %bcond %{1} 0 -13: bcond_without %bcond %{1} 1 -13: binfmt_apply [ -x /usr/lib/systemd/systemd-binfmt ] && /usr/lib/systemd/systemd-binfmt %{?*} || : %{nil} -13: build_cflags %{optflags} -13: build_cxxflags %{optflags} -13: build_fflags %{optflags} %{?_fmoddir:-I%{_fmoddir}} -13: buildroot %{_buildrootdir}/%{NAME}-%{VERSION}-%{RELEASE}.%{_arch} -13: buildtag .copr4877608 -13: cflags_profile_feedback -fprofile-use -13: cflags_profile_generate -fprofile-update=atomic -fprofile-generate -13: clamp_mtime_to_source_date_epoch 0 -13: configure %{set_build_flags}; %{_configure} --host=%{_host} --build=%{_build} \ --program-prefix=%{?_program_prefix} \ --disable-dependency-tracking \ --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} \ --includedir=%{_includedir} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} \ --mandir=%{_mandir} \ --infodir=%{_infodir} -13: configure_kernel_source if test -d /usr/src/linux ; then pushd /usr/src/linux test -f .config || cp arch/%_arch/defconfig.default .config yes "" | make oldconfig make dep popd fi %nil -13: copr_projectname tracing-trunk -13: copr_username warthog9 -13: cpython3_soabi %(python3 -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))") -13: debug_package %ifnarch noarch %global __debug_package 1 %_debuginfo_template %{?_debugsource_packages:%_debugsource_template} %endif %{nil} -20: define -13: defined %{expand:%%{?%{1}:1}%%{!?%{1}:0}} -20: dirname -13: dist .suse.tw%(sh -c ". /etc/os-release; echo $VERSION_ID") -20: dnl -13: do_profiling 1 -13: do_real_fillup SYSC_TEMPLATE=%{_fillupdir}/sysconfig.$PNAME # If template not in new %{_fillupdir}, fallback to old TEMPLATE_DIR if [ ! -f $SYSC_TEMPLATE ] ; then TEMPLATE_DIR=/var/adm/fillup-templates SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME fi SD_NAME="" %{sysc_fillup} -20: dump -20: echo -20: error -20: exists -20: expand -20: expr -13: ext_info .gz -13: ext_man .gz -13: fillup_and_insserv(finpsyY) %{-p:echo "-p option for fillup_and_insserv no longer supported (ever only used on SL8.0)"; exit 1;} %{-s:echo "STARTVAR for fillup_and_insserv no longer supported (rc.config is gone since SL8.0)"; exit 1;} test -n "$FIRST_ARG" || FIRST_ARG=$1 %{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} set -- %{?*} %{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} INSSRV_ARRAY="" while [ ${#*} -gt 0 ] ; do SCRIPTNAME=$1 shift SV_B='^### BEGIN INIT INFO' SV_E='^### END INIT INFO' SV_KW=Default-Enabled SV_VALUE=`sed -n -e "/$SV_B/,/$SV_E/{/^# [^[:space:]]*$SV_KW:[[:space:]]*\([^[:space:]]*\).*/s//\1/p;}" < /etc/init.d/$SCRIPTNAME` test "$FORCE_YES" = "1" && SV_VALUE="yes" test -n "$SV_VALUE" || SV_VALUE=%{-y:"yes"}%{!-y:"no"} INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $SV_VALUE" done %{!-f: %{do_real_fillup}} %{!-i: %{add_start_if_needed $INSSRV_ARRAY } } %nil -13: fillup_only(dans) %{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} %{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} SYSC_TEMPLATE=%{_fillupdir}/sysconfig.$PNAME$SUBPNAME # If template not in new %{_fillupdir}, fallback to old TEMPLATE_DIR if [ ! -f $SYSC_TEMPLATE ] ; then TEMPLATE_DIR=/var/adm/fillup-templates SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME fi SD_NAME="" %{-d:%{-s:SD_NAME=%{3}/}%{!-s:SD_NAME=%{2}/}} %{sysc_fillup} %nil -13: fillup_prereq fillup /usr/bin/mkdir /usr/bin/touch -13: find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot} -20: getconfdir -20: getenv -20: getncpus -20: global -13: have_python3 1 -13: if_not_python_kind %if "%{python_flavor}" != "%1" -13: if_python_kind %if "%{python_flavor}" == "%1" -13: ifpycache %if "%{python_flavor}" != "python2" -13: ifpypy3 %if "%{python_flavor}" == "pypy3" -13: ifpython2 %if "%{python_flavor}" == "python2" -13: ifpython3 %if "%{python_flavor}" == "python3" -13: ifpython310 %if "%{python_flavor}" == "python310" -13: ifpython311 %if "%{python_flavor}" == "python311" -13: ifpython38 %if "%{python_flavor}" == "python38" -13: ifpython39 %if "%{python_flavor}" == "python39" -13: insserv_cleanup /sbin/insserv /etc/init.d -13: insserv_force_if_yast /sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*} -13: insserv_prereq insserv sed -13: install_alternative(s:t:p:n:) %define alternative_name %{-n:%{-n*}}%{!-n:%1} %define alternative_source %{-s:%{-s*}}%{!-s:%{_bindir}/%{alternative_name}} %define alternative_target %{-t:%{-t*}}%{!-t:%2} %define alternative_priority %{-p:%{-p*}}%{!-p:%3} update-alternatives --install \ %{alternative_source} \ %{alternative_name} \ %{alternative_target} \ %{alternative_priority} -13: install_info(:-:) : # install_info deprecated in favor of file triggers -13: install_info_delete(:-:) : # install_info_delete deprecated in favor of file triggers -13: install_info_prereq %{nil} -13: is_opensuse 1 -13: is_plus %(if test -f /.buildenv ; then source /.buildenv ; if [[ "$BUILD_BASENAME" == *+kde ]] ; then echo 1 ; else echo 0 ; fi ; else echo 0 ; fi) -13: ix86 i386 i486 i586 i686 pentium3 pentium4 athlon geode -13: journal_catalog_update [ -x /usr/bin/journalctl ] && /usr/bin/journalctl --update-catalog || : %{nil} -13: lang_package(n:r:) %package %{-n:-n %{-n*}-}lang Summary: Translations for package %{name} Group: System/Localization %{-n:Requires: %{-n*} = %{version}} %{!-n:%{!-r:Requires: %{name} = %{version}}} %{-r:Requires: %{-r*}} Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} BuildArch: noarch %description %{-n:-n %{-n*}-}lang Provides translations for the "%{name}" package. -13: ldconfig /sbin/ldconfig -13: ldconfig_post(n:) %{?ldconfig:%post -p %ldconfig %{?*} %{-n:-n %{-n*}} %end} -13: ldconfig_postun(n:) %{?ldconfig:%postun -p %ldconfig %{?*} %{-n:-n %{-n*}} %end} -13: ldconfig_scriptlets(n:) %{?ldconfig: %ldconfig_post %{?*} %{-n:-n %{-n*}} %ldconfig_postun %{?*} %{-n:-n %{-n*}} } -20: load -20: lua -20: macrobody -13: make_build %{__make} %{_make_output_sync} %{?_smp_mflags} %{_make_verbose} -13: make_install make install DESTDIR="%{?buildroot}" -13: makeinstall make DESTDIR="%{?buildroot:%{buildroot}}" install -13: mime_database_post %nil -13: mime_database_postun %nil -13: mips %{mips32} %{mips64} -13: mips32 mips mipsel mipsr6 mipsr6el -13: mips64 mips64 mips64el mips64r6 mips64r6el -13: mipseb mips mipsr6 mips64 mips64r6 -13: mipsel mipsel mipsr6el mips64el mips64r6el -13: nil %{!?nil} -13: no_lang_C --without-C -11: optflags -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -13: patches %{lua: for i, p in ipairs(patches) do print(p.." ") end} -13: pkg_vcmp (%{expand:%%{pkg_version_cmp %1 %3}} %2 0) -13: pkg_version %(LC_ALL=C rpm -q --whatprovides --qf "%%{version}" "%1" | sed -e "s/^no package provides .*/~~~/") -13: pkg_version_cmp %{expand:%{expand:%%%%{rpm_vercmp %%{pkg_version %1} %%2}}} -13: pkgconfig_personalitydir /usr/share/pkgconfig/personality.d -13: power64 ppc64 ppc64p7 ppc64le -13: prepare_alternative(t:) %define alternative_target %{-t:%{-t*}}%{!-t:%{_bindir}/%1} rm -f %{buildroot}%{alternative_target} alternative_target="%{alternative_target}" if [[ "$alternative_target" == %{_mandir}* ]]; then rm -f %{buildroot}${alternative_target%%%%%{ext_man}} rm -f %{buildroot}%{alternative_target}%{ext_man} fi if [ %{with libalternatives} -eq 1 ] ; then mkdir -p %{buildroot}%{_datadir}/libalternatives if [[ "$alternative_target" != %{_mandir}* ]]; then ln -sf %{_bindir}/alts %{buildroot}%{alternative_target} fi else mkdir -p %{buildroot}%{_sysconfdir}/alternatives touch %{buildroot}%{_sysconfdir}/alternatives/%1 ln -sf %{_sysconfdir}/alternatives/%1 %{buildroot}%{alternative_target} fi %{nil} -13: primary_python python310 -13: py2_build %python2_build -13: py2_dist %{python2_dist %{?**}} -13: py2_install %python2_install -13: py2_shbang_opts %py_shbang_opts -13: py2_ver %python2_version -13: py3_build %python3_build -13: py3_compile(O) find %1 -name '*.pyc' -exec rm -f {} ";" python3 -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 %{-O: find %1 -name '*.pyo' -exec rm -f {} ";" python3 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 } -13: py3_dist %{python3_dist %{?**}} -13: py3_install %python3_install -13: py3_shbang_opts %py_shbang_opts -13: py3_soflags %cpython3_soabi -13: py3_ver %python3_version -13: py_dist_name %{python_dist_name %{?**}} -13: py_incdir %{py_prefix}/include/python%{py_ver} -13: py_libdir %{py_prefix}/%{_lib}/python%{py_ver} -13: py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) -13: py_setup setup.py -13: py_shbang_opts -s -13: py_sitedir %{py_libdir}/site-packages -13: py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) -13: pycache_only %ifpycache %** %endif -13: pyproject_install(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) %{lua: local args = rpm.expand("%**"); local broot = rpm.expand("--root %buildroot"); local pyexpandstart = "%{python_expand # \n"; local findwheel = "wheelinargs=0 \n"; if args ~= "" then findwheel = findwheel .. "for a in " .. args .. "; do if [ -f $a -a ${a: -3} = 'whl' ]; then wheelinargs=1; break; fi; done \n"; end findwheel = findwheel .. "if [ $wheelinargs -eq 0 ]; then if [ -f build/*.whl ]; then wheelname=build/*.whl; else wheelname=*.whl; fi; fi \n"; local installwheel = "$python -mpip install " .. broot .. " --disable-pip-version-check --no-compile --no-deps --progress-bar off " .. args .. " $wheelname"; local pyexpandend = "}"; print(rpm.expand(pyexpandstart .. findwheel .. installwheel .. pyexpandend)) print(rpm.expand("%python_compileall")) } -13: pyproject_wheel(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) %{lua: local args = rpm.expand("%**"); local pyexpandstart = "%{python_expand # \n"; local buildwheel = "$python -mpip wheel --no-deps %{?py_setup_args:--build-option %{py_setup_args}}"; buildwheel = buildwheel .. " --disable-pip-version-check --use-pep517 --no-build-isolation --progress-bar off --verbose . -w build/ "; -- remove abi and platform tags from filename in case the package does define them incorrectly (see PEP427 for valid filenames) -- single percent for shell out of four percent by rpm.expand local renamewheel = "fn=(build/*.whl); fn2=${fn%%%%-*-*.whl}-none-any.whl; if [ ! $fn -ef $fn2 ]; then mv $fn $fn2; fi"; local pyexpandend = "}"; print(rpm.expand(pyexpandstart .. buildwheel .. args .. "\n " .. renamewheel .. pyexpandend)) } -13: pypy3_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%pypy3_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("pypy3") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: pypy3_bin_suffix %{?!_pypy3_bin_suffix:%pypy3_version}%{?_pypy3_bin_suffix} -13: pypy3_build %{_python_use_flavor pypy3} %__pypy3 %{py_setup} %{?py_setup_args} build \ --executable="%__pypy3 %pypy3_shbang_opts" -13: pypy3_install %{_python_use_flavor pypy3} %__pypy3 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: pypy3_install_alternative # pypy3_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("pypy3")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: pypy3_only %if "%{python_flavor}" == "pypy3" %** %endif -13: pypy3_prefix pypy3 -13: pypy3_provides %(provides=""; for flavorbin in %{_bindir}/python?; do if [ $flavorbin != %__pypy3 -a $(realpath $flavorbin) = %__pypy3 ]; then provides="$provides $(basename $flavorbin)"; fi; done; echo ${provides# }; ) -13: pypy3_reset_alternative # pypy3_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%pypy3_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: pypy3_shbang_opts %py_shbang_opts -13: pypy3_sitearch %{_python_sysconfig_path %__pypy3 platlib} -13: pypy3_sitelib %{_python_sysconfig_path %__pypy3 purelib} -13: pypy3_sysconfig_path %{_python_sysconfig_path %__pypy3 %1} -13: pypy3_sysconfig_var %{_python_sysconfig_var %__pypy3 %1} -13: pypy3_uninstall_alternative # pypy3_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%pypy3_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: pypy3_version %{_python_sysconfig_var %__pypy3 py_version_short} -13: pypy3_version_nodots %{_python_sysconfig_var %__pypy3 py_version_nodot} -13: pytest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) %python_flavored_alternatives %{lua: local args = rpm.expand("%**"); local broot = rpm.expand("%buildroot"); local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 "; local ignore_build = "--ignore=_build." .. rpm.expand("%pythons"):gsub("%s+", " --ignore=_build."); intro = intro .. "pytest-%{$python_bin_suffix} " .. ignore_build .. " -v "; print(rpm.expand(intro .. args .. "}")) } -13: pytest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) %python_flavored_alternatives %{lua: local args = rpm.expand("%**"); local broot = rpm.expand("%buildroot"); local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1 "; local ignore_build = "--ignore=_build." .. rpm.expand("%pythons"):gsub("%s+", " --ignore=_build."); intro = intro .. "pytest-%{$python_bin_suffix} " .. ignore_build .. " -v "; print(rpm.expand(intro .. args .. "}")) } -13: python2_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%python2_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("python2") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: python2_bin_suffix %{?!_python2_bin_suffix:%python2_version}%{?_python2_bin_suffix} -13: python2_build %{_python_use_flavor python2} %__python2 %{py_setup} %{?py_setup_args} build \ --executable="%__python2 %python2_shbang_opts" -13: python2_dist %{lua: args = {} arg = 1 while (true) do name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}"); if (name == nil or name == '') then break end args[arg] = name arg = arg + 1 end for arg, name in ipairs(args) do canonical = rpm.expand("%python_dist_name " .. name); print("python" .. rpm.expand("%python2_version") .. "dist(" .. canonical .. ") "); end } -13: python2_install %{_python_use_flavor python2} %__python2 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: python2_install_alternative # python2_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("python2")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: python2_only %if "%{python_flavor}" == "python2" %** %endif -13: python2_prefix %{?python2_package_prefix}%{?!python2_package_prefix:python} -13: python2_provides python -13: python2_reset_alternative # python2_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%python2_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: python2_shbang_opts %py2_shbang_opts -13: python2_sitearch %{_python_sysconfig_path %__python2 platlib} -13: python2_sitelib %{_python_sysconfig_path %__python2 purelib} -13: python2_sysconfig_path %{_python_sysconfig_path %__python2 %1} -13: python2_sysconfig_var %{_python_sysconfig_var %__python2 %1} -13: python2_uninstall_alternative # python2_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%python2_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: python2_version %{_python_sysconfig_var %__python2 py_version_short} -13: python2_version_nodots %{_python_sysconfig_var %__python2 py_version_nodot} -13: python310_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%python310_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("python310") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: python310_bin_suffix %{?!_python310_bin_suffix:%python310_version}%{?_python310_bin_suffix} -13: python310_build %{_python_use_flavor python310} %__python310 %{py_setup} %{?py_setup_args} build \ --executable="%__python310 %python310_shbang_opts" -13: python310_install %{_python_use_flavor python310} %__python310 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: python310_install_alternative # python310_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("python310")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: python310_only %if "%{python_flavor}" == "python310" %** %endif -13: python310_prefix python310 -13: python310_provides %(provides=""; for flavorbin in %{_bindir}/python?; do if [ $flavorbin != %__python310 -a $(realpath $flavorbin) = %__python310 ]; then provides="$provides $(basename $flavorbin)"; fi; done; echo ${provides# }; ) -13: python310_reset_alternative # python310_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%python310_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: python310_shbang_opts %py_shbang_opts -13: python310_sitearch %{_python_sysconfig_path %__python310 platlib} -13: python310_sitelib %{_python_sysconfig_path %__python310 purelib} -13: python310_sysconfig_path %{_python_sysconfig_path %__python310 %1} -13: python310_sysconfig_var %{_python_sysconfig_var %__python310 %1} -13: python310_uninstall_alternative # python310_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%python310_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: python310_version %{_python_sysconfig_var %__python310 py_version_short} -13: python310_version_nodots %{_python_sysconfig_var %__python310 py_version_nodot} -13: python311_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%python311_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("python311") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: python311_bin_suffix %{?!_python311_bin_suffix:%python311_version}%{?_python311_bin_suffix} -13: python311_build %{_python_use_flavor python311} %__python311 %{py_setup} %{?py_setup_args} build \ --executable="%__python311 %python311_shbang_opts" -13: python311_install %{_python_use_flavor python311} %__python311 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: python311_install_alternative # python311_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("python311")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: python311_only %if "%{python_flavor}" == "python311" %** %endif -13: python311_prefix python311 -13: python311_provides %(provides=""; for flavorbin in %{_bindir}/python?; do if [ $flavorbin != %__python311 -a $(realpath $flavorbin) = %__python311 ]; then provides="$provides $(basename $flavorbin)"; fi; done; echo ${provides# }; ) -13: python311_reset_alternative # python311_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%python311_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: python311_shbang_opts %py_shbang_opts -13: python311_sitearch %{_python_sysconfig_path %__python311 platlib} -13: python311_sitelib %{_python_sysconfig_path %__python311 purelib} -13: python311_sysconfig_path %{_python_sysconfig_path %__python311 %1} -13: python311_sysconfig_var %{_python_sysconfig_var %__python311 %1} -13: python311_uninstall_alternative # python311_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%python311_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: python311_version %{_python_sysconfig_var %__python311 py_version_short} -13: python311_version_nodots %{_python_sysconfig_var %__python311 py_version_nodot} -13: python38_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%python38_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("python38") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: python38_bin_suffix %{?!_python38_bin_suffix:%python38_version}%{?_python38_bin_suffix} -13: python38_build %{_python_use_flavor python38} %__python38 %{py_setup} %{?py_setup_args} build \ --executable="%__python38 %python38_shbang_opts" -13: python38_install %{_python_use_flavor python38} %__python38 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: python38_install_alternative # python38_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("python38")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: python38_only %if "%{python_flavor}" == "python38" %** %endif -13: python38_prefix python38 -13: python38_provides %(provides=""; for flavorbin in %{_bindir}/python?; do if [ $flavorbin != %__python38 -a $(realpath $flavorbin) = %__python38 ]; then provides="$provides $(basename $flavorbin)"; fi; done; echo ${provides# }; ) -13: python38_reset_alternative # python38_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%python38_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: python38_shbang_opts %py_shbang_opts -13: python38_sitearch %{_python_sysconfig_path %__python38 platlib} -13: python38_sitelib %{_python_sysconfig_path %__python38 purelib} -13: python38_sysconfig_path %{_python_sysconfig_path %__python38 %1} -13: python38_sysconfig_var %{_python_sysconfig_var %__python38 %1} -13: python38_uninstall_alternative # python38_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%python38_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: python38_version %{_python_sysconfig_var %__python38 py_version_short} -13: python38_version_nodots %{_python_sysconfig_var %__python38 py_version_nodot} -13: python39_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%python39_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("python39") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: python39_bin_suffix %{?!_python39_bin_suffix:%python39_version}%{?_python39_bin_suffix} -13: python39_build %{_python_use_flavor python39} %__python39 %{py_setup} %{?py_setup_args} build \ --executable="%__python39 %python39_shbang_opts" -13: python39_install %{_python_use_flavor python39} %__python39 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: python39_install_alternative # python39_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("python39")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: python39_only %if "%{python_flavor}" == "python39" %** %endif -13: python39_prefix python39 -13: python39_provides %(provides=""; for flavorbin in %{_bindir}/python?; do if [ $flavorbin != %__python39 -a $(realpath $flavorbin) = %__python39 ]; then provides="$provides $(basename $flavorbin)"; fi; done; echo ${provides# }; ) -13: python39_reset_alternative # python39_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%python39_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: python39_shbang_opts %py_shbang_opts -13: python39_sitearch %{_python_sysconfig_path %__python39 platlib} -13: python39_sitelib %{_python_sysconfig_path %__python39 purelib} -13: python39_sysconfig_path %{_python_sysconfig_path %__python39 %1} -13: python39_sysconfig_var %{_python_sysconfig_var %__python39 %1} -13: python39_uninstall_alternative # python39_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%python39_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: python39_version %{_python_sysconfig_var %__python39 py_version_short} -13: python39_version_nodots %{_python_sysconfig_var %__python39 py_version_nodot} -13: python3_alternative %{_python_macro_init} %{lua:local link, name, path = python_alternative_names(rpm.expand("%1"), rpm.expand("%python3_bin_suffix")) local libalternatives = rpm.expand("%{with libalternatives}") if libalternatives == "1" then if not link:startswith(rpm.expand("%{_mandir}")) then local prio = alternative_prio("python3") print(rpm.expand("%dir %{_datadir}/libalternatives/" .. name .. "\n")) print(rpm.expand("%{_datadir}/libalternatives/" .. name .. "/" .. prio .. ".conf\n")) print(link .. "\n") end print(path .. "\n") else print(rpm.expand("%ghost %{_sysconfdir}/alternatives/" .. name .. "\n")) print(link .. "\n") print(path .. "\n") end } -13: python3_bin_suffix %{?!_python3_bin_suffix:%python3_version}%{?_python3_bin_suffix} -13: python3_build %{_python_use_flavor python3} %__python3 %{py_setup} %{?py_setup_args} build \ --executable="%__python3 %python3_shbang_opts" -13: python3_dist %{lua: args = {} arg = 1 while (true) do name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}"); if (name == nil or name == '') then break end args[arg] = name arg = arg + 1 end for arg, name in ipairs(args) do canonical = rpm.expand("%python_dist_name " .. name); print("python" .. rpm.expand("%python3_version") .. "dist(" .. canonical .. ") "); end } -13: python3_install %{_python_use_flavor python3} %__python3 %{py_setup} %{?py_setup_args} install \ -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix} -13: python3_install_alternative # python3_install_alternative: %if ! %{with libalternatives} %{_python_macro_init} %{lua:python_install_ualternative("python3")} \ %else : # no install scriptlet action for libalternatives %endif %{nil} -13: python3_only %if "%{python_flavor}" == "python3" %** %endif -13: python3_prefix python3 -13: python3_provides %(provides=""; for flavorbin in %{_bindir}/python?; do if [ $flavorbin != %__python3 -a $(realpath $flavorbin) = %__python3 ]; then provides="$provides $(basename $flavorbin)"; fi; done; echo ${provides# }; ) -13: python3_reset_alternative # python3_reset_alternative: %if %{with libalternatives} %{reset_alternative -n %1 -t %{_bindir}/%1-%python3_bin_suffix} %else : # reset action only for libalternatives %endif %{nil} -13: python3_shbang_opts %py3_shbang_opts -13: python3_sitearch %{_python_sysconfig_path %__python3 platlib} -13: python3_sitelib %{_python_sysconfig_path %__python3 purelib} -13: python3_sysconfig_path %{_python_sysconfig_path %__python3 %1} -13: python3_sysconfig_var %{_python_sysconfig_var %__python3 %1} -13: python3_uninstall_alternative # python3_uninstall_alternative: %if ! %{with libalternatives} %{uninstall_alternative -n %1 -t %{_bindir}/%1-%python3_bin_suffix} %else : # no uninstall scriptlet action for libalternatives %endif %{nil} -13: python3_version %{_python_sysconfig_var %__python3 py_version_short} -13: python3_version_nodots %{_python_sysconfig_var %__python3 py_version_nodot} -13: python_alternative %{_rec_macro_helper}%{lua:expand_macro("alternative", "%**")} -13: python_bin_suffix %{_rec_macro_helper}%{lua:expand_macro("bin_suffix")} -13: python_build(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=) %{lua: rpm.expand("%_python_macro_init") for _, python in ipairs(pythons) do print(rpm.expand("%" .. python .. "_build %**")) end } -13: python_clone(a) %{lua: rpm.expand("%_python_macro_init") local param = rpm.expand("%1") local link, name, path for _, python in ipairs(pythons) do local binsuffix = rpm.expand("%" .. python .. "_bin_suffix") link,name,path = python_alternative_names(param, binsuffix, true) print(rpm.expand(string.format("cp %s %s\n", param, path))) print(rpm.expand(string.format("sed -ri '1s@#!.*python.*@#!%s@' %s\n", "%__" .. python, path))) end -- %python_clone -a if rpm.expand("%{?-a}") == "-a" then local buildroot = rpm.expand("%{buildroot}") if link:startswith(buildroot) then link = link:sub(buildroot:len() + 1) end print(rpm.expand(string.format("%%{prepare_alternative -t %s %s}\n", link, name))) if rpm.expand("%{with libalternatives}") == "1" then for _, python in ipairs(pythons) do python_install_libalternative(python, link) end end end } -13: python_compileall %{python_expand for d in %{buildroot}%{$python_sitelib} %{buildroot}%{$python_sitearch}; do if [ -d $d ]; then find $d -name '*.pyc' -delete; $python -m compileall $d; $python -O -m compileall $d; fi; done } %{nil} -13: python_dist_name %{lua: name = rpm.expand("%{?1:%{1}}"); canonical = string.gsub(string.lower(name), "[^%w%.]+", "-"); print(canonical); } -13: python_enable_dependency_generator %global __pythondist_requires %{_rpmconfigdir}/pythondistdeps.py --requires %{nil} -13: python_exec(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=) %{lua: local args = rpm.expand("%**") print(rpm.expand("%{python_expand $python " .. args .. "}")) } -13: python_expand(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=) %{lua: -- force spec scan rpm.expand("%_python_macro_init") local args = rpm.expand("%**") for _, python in ipairs(pythons) do print(rpm.expand("%{_python_use_flavor " .. python .. "}\n")) local cmd = replace_macros(args, python) -- when used as call of the executable, basename only cmd = cmd:gsub("$python%f[%s\"\'\\%)&|;<>]", string.basename(rpm.expand("%__" .. python))) -- when used as flavor expansion for a custom macro cmd = cmd:gsub("$python", python) print(rpm.expand(cmd .. "\n")) end } -13: python_files %{lua: rpm.expand("%_python_macro_init") local nparams = rpm.expand("%#") local param = "" if tonumber(nparams) > 0 then param = rpm.expand("%1") end if subpackage_only then modname = param param = "" end print("-n " .. package_name(flavor, modname, param)) if not _python_subpackages_emitted then print("\n/%python_subpackages_macro_not_present\n") io.stderr:write("%python_subpackages macro not present\n" .. "(To get rid of this error, either add a %python_subpackages macro to preamble " .. "or remove %python_files.\n") error("%python_subpackages macro not present\n") end } -13: python_find_lang %find_lang %{**} langfile=%{?2}%{!?2:%1.lang} %{python_expand # grep -v 'python.*site-packages' ${langfile} > %{$python_prefix}-${langfile} grep -F %{$python_sitelib} ${langfile} >> %{$python_prefix}-${langfile} } %{nil} -13: python_flavor %{_python_macro_init}%{lua: print(flavor)} -13: python_flavored_alternatives(v:) %{!-v:set +x} %{python_expand # provide libalternatives and update-alternatives in the current flavor version when shuffling the build dir mkdir -p build/xdgflavorconfig export XDG_CONFIG_HOME=$PWD/build/xdgflavorconfig if [ -d /usr/share/libalternatives/ ]; then for b in /usr/share/libalternatives/*; do if [ -e "${b}/%{$python_version_nodots}.conf" ]; then baseb=$(basename ${b}) alts -n ${baseb} -p %{$python_version_nodots} echo "Using libalternatives variant %{$python_version_nodots} for ${baseb} in XDG_CONFIG_HOME during Python %{$python_version} expansions." fi done fi mkdir -p build/flavorbin for bin in %{_bindir}/*-%{$python_bin_suffix} %{buildroot}%{_bindir}/*-%{$python_bin_suffix}; do if [ -x "${bin}" ]; then # four percent into 1 by rpm/python expansions mainbin="${bin%%%%-%{$python_bin_suffix}}" basemain="$(basename ${mainbin})" if [ "$(readlink ${mainbin})" = "/etc/alternatives/${basemain}" ]; then ln -sf "${bin}" "build/flavorbin/${basemain}" echo "Using alternative $(basename ${bin}) for ${basemain} in ./build/flavorbin during Python %{$python_version} expansions." fi fi done } %{!-v:set -x} export PATH=$PWD/build/flavorbin:$PATH %{nil} -13: python_for_executables python3 -13: python_group_libalternatives if [ %{with libalternatives} -eq 1 ] ; then group="%{**}" for f in %{buildroot}%{_datadir}/libalternatives/%1/*.conf; do for name in %{**}; do sed -n -i -e '/^group=/!p' -e '$'"a group=${group// /, }" ${f/\/%{1}\//\/$name\/} done done fi %{nil} -13: python_install(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-=) %{lua: rpm.expand("%_python_macro_init") for _, python in ipairs(pythons) do print(rpm.expand("%" .. python .. "_install %**")) end } -13: python_install_alternative %{_rec_macro_helper}%{lua:expand_macro("install_alternative", "%**")} -13: python_libalternatives_reset_alternative %{_rec_macro_helper}%{lua:expand_macro("reset_alternative", "%**")} -13: python_module %{?!python_module_lua:%{expand:%%define args %{**}} %{expand:%%{python_module_iter -a %{pythons} STOP}}}%{?python_module_lua:%python_module_lua %{**}} -13: python_module_iter(a:) %{expand:%%define python %{-a*}} ( %python-%args ) %{expand:%%{?!python_module_iter_%1:%%{python_module_iter -a%*}}%%{?python_module_iter_%1}} -13: python_module_iter_STOP %global python %%%%python -13: python_module_lua %{lua: rpm.expand("%_python_macro_init") local params = rpm.expand("%**") -- The Provides: tag does not support boolean dependencies, so only add parens if needed local lpar = "" local rpar = "" local OPERATORS = lookup_table { 'and', 'or', 'if', 'with', 'without', 'unless'} for p in string.gmatch(params, "%S+") do if OPERATORS[p] then lpar = "(" rpar = ")" break end end for _, python in ipairs(pythons) do local python_prefix = rpm.expand("%" .. python .. "_prefix") print(lpar .. python_prefix .. "-" .. string.gsub(params, "%%python", python_prefix) .. rpar .. " ") end } -13: python_prefix %{_rec_macro_helper}%{lua:expand_macro("prefix")} -13: python_provides %{_rec_macro_helper}%{lua:expand_macro("provides")} -13: python_sitearch %{_python_sysconfig_path %{expand:%__%{python_flavor}} platlib} -13: python_sitelib %{_python_sysconfig_path %{expand:%__%{python_flavor}} purelib} -13: python_subpackages %{lua: rpm.expand("%_python_macro_init") _python_subpackages_emitted = true local current_flavor = flavor local original_flavor = rpm.expand("%python_flavor") subpackage_only = rpm.expand("%{python_subpackage_only}") == "1" if subpackage_only then is_called_python = false modname = "" end -- line processing functions local function print_altered(line) -- set %name macro to proper flavor-name if not subpackage_only then line = line:gsub("%%{?name}?", current_flavor .. "-" .. modname) end -- print expanded print(rpm.expand(replace_macros(line, current_flavor)) .. "\n") end local function ignore_line(line) end local function files_line(line) -- unexpand %license at start of line if line:startswith("%license") then line = "%" .. line end return print_altered(line) end local PROPERTY_COPY_UNMODIFIED = lookup_table { "Summary:", "Version:", "BuildArch:" } local PROPERTY_COPY_MODIFIED = lookup_table { "Requires:", "Provides:", "Recommends:", "Suggests:", "Conflicts:", "Obsoletes:", "Supplements:", "Enhances:", "%requires_eq", "%requires_ge", "Requires(pre):", "Requires(preun):", "Requires(post):", "Requires(postun):", "Requires(pretrans):", "Requires(posttrans):", } local PROPERTY_COPY_DEFAULT_PROVIDER = lookup_table { "Conflicts:", "Obsoletes:", "Provides:", "Supplements:", "Enhances:", } local function process_package_line(line) -- This function processes package tags like requirements and capabilities. -- It supports the python- prefix for plain packages, packageand(python-a:python-b:...), and boolean dependencies. -- "Requires: python-foo" -> "Requires: python3-foo" -- "Requires: %{name} = %{version}" -> "Requires: python3-modname = %{version}" -- first split Property: value local property, value = line:match("^([A-Z%%]%S+)%s*(.*)$") -- split and rewrite every package value either plain or inside boolean dependencies and packageand() -- recursive local function replace_prefix(value, flavor) local function replace_prefix_r(ivalue) return replace_prefix(ivalue, flavor) end local function rename_package(package) if package == "python" or package == flavor then -- specialcase plain "python" package = current_flavor else package = package:gsub("^" .. flavor .. "(%W)", current_flavor .. "%1") package = package:gsub("^python(%W)", current_flavor .. "%1") end return package end local before, inner, space, remainder inner, space, remainder = value:match("^packageand(%b())(%s*)(.*)$") if inner then return "packageand(" .. inner:sub(2,-2):gsub("[^:]+", rename_package) .. ")" .. space .. replace_prefix_r(tostring(remainder)) end before, inner, space, remainder = value:match("^([^()]*)(%b())(%s*)(.*)$") if inner then return replace_prefix_r(tostring(before)) .. "(".. replace_prefix_r(inner:sub(2, -2)) .. ")" .. space .. replace_prefix_r(tostring(remainder)) end return value:gsub("%S+", rename_package) end if PROPERTY_COPY_UNMODIFIED[property] then print_altered(line) elseif PROPERTY_COPY_MODIFIED[property] then -- specifically handle %name macro before expansion if not subpackage_only then line = line:gsub("%%{?name}?", current_flavor .. "-" .. modname) end local function print_property_copy_modified(value) value = replace_prefix(value, flavor) -- rely on print_altered to perform expansion on the result print_altered(string.format("%s %s", property, value)) end if PROPERTY_COPY_DEFAULT_PROVIDER[property] then -- print renamed lines for all flavors which the current_flavor provides. for iflavor in string.gmatch(rpm.expand("%{?" .. current_flavor .. "_provides}") .. " " .. current_flavor, "%S+" ) do current_flavor = iflavor -- make sure to process the main current_flavor last for final reset. print_property_copy_modified(value) end else print_property_copy_modified(value) end end end local auto_posttrans = {} local auto_posttrans_current = {} local auto_posttrans_backslash = false local function expect_alternatives(line) if auto_posttrans_backslash then local apc = auto_posttrans_current apc[#apc] = apc[#apc] .. "\n" .. line auto_posttrans_backslash = line:endswith("\\") elseif line:startswith("%python_install_alternative") or line:startswith("%{python_install_alternative") -- "}" or line:startswith("%" .. flavor .. "_install_alternative") or line:startswith("%{" .. flavor .. "_install_alternative") -- "}" then table.insert(auto_posttrans_current, line) auto_posttrans_backslash = line:endswith("\\") else auto_posttrans_backslash = false end return print_altered(line) end -- end line processing functions local function print_provided_flavor(modname) for provided_flavor in string.gmatch(rpm.expand("%{?" .. current_flavor .. "_provides}"), "%S+" ) do local pkg = provided_flavor .. "-" .. modname print(rpm.expand("Obsoletes: " .. pkg .. " < %{?epoch:%{epoch}:}%{version}-%{release}\n")) print(rpm.expand("Provides: " .. pkg .. " = %{?epoch:%{epoch}:}%{version}-%{release}\n")) end end local function files_headline(flavor, param) if not param then param = "" end local append = param:match("(%-f%s+%S+)") local nof = param:gsub("%-f%s+%S+%s*", "") local python_files = param:match("%%{?python_files}?") local subpkg = param:match("%%{python_files%s*(.-)}") if subpkg then python_files = true end if is_called_python and not python_files then -- kingly hack. but RPM's native %error does not work. local errmsg = 'error: Package with "python-" prefix must not contain unmarked "%files" sections.\n' .. 'error: Use "%files %python_files" or "%files %{python_files foo} instead.\n' io.stderr:write(errmsg) print(errmsg) error('Invalid spec file') end local mymodname = nof if python_files then mymodname = subpkg end return "%files -n " .. package_name(flavor, modname, mymodname, append) .. "\n" end local function section_headline(section, flavor, param) if section == "files" then return files_headline(flavor, param) else return "%" .. section .. " -n " .. package_name(flavor, modname, param) .. "\n" end end local python2_binsuffix = rpm.expand("%python2_bin_suffix") local function dump_alternatives_posttrans() if not old_python2 and current_flavor == "python2" then for label, value in pairs(auto_posttrans) do if value ~= false then print(section_headline("posttrans", current_flavor, label)) for _,line in ipairs(value) do -- RPM needs {} characters in Lua macros to match, so -- this is an opening "{" for this one: ----------v firstarg = line:match("install_alternative%s+([^%s}]+)") if firstarg then local _,_,path = python_alternative_names(firstarg, python2_binsuffix) print(string.format('if [ -e "%s" ]; then\n', path)) print_altered(line) print("fi\n") end end end end end auto_posttrans = {} end local function should_expect_alternatives(section, param) if old_python2 or current_flavor ~= "python2" then return false end if param == nil then param = "" end if section == "posttrans" then auto_posttrans[param] = false return false end if section == "post" and auto_posttrans[param] ~= false then auto_posttrans_current = {} auto_posttrans[param] = auto_posttrans_current return true end return false end local function match_braces(line) local count = 0 for c in line:gmatch(".") do if c == "{" then count = count + 1 elseif c == "}" and count > 0 then count = count - 1 end end return count == 0 end local KNOWN_SECTIONS = lookup_table {"package", "description", "files", "prep", "build", "install", "check", "clean", "pre", "post", "preun", "postun", "pretrans", "posttrans", "changelog"} local COPIED_SECTIONS = lookup_table {"description", "files", "pre", "post", "preun", "postun", "pretrans", "posttrans"} -- before we start, print Provides: python2-modname if is_called_python and old_python2 and not subpackage_only then print(rpm.expand("Provides: python2-" .. modname .. " = %{?epoch:%{epoch}:}%{version}-%{release}\n")) end for _,python in ipairs(pythons) do local is_current_flavor = python == flavor -- "python-foo" case: if is_called_python then if old_python2 then -- if we're in old-style package, "python" == "python2" is_current_flavor = python == "python2" else -- else nothing is current flavor, always generate is_current_flavor = false end end current_flavor = python -- rescan spec for each flavor if not is_current_flavor or subpackage_only then local spec, err = io.open(specpath, "r") if err then print ("could not find spec file at path: " .. specpath) return end rpm.define("python_flavor " .. python) local section_function if subpackage_only then section_function = ignore_line else section_function = process_package_line print(section_headline("package", current_flavor, nil)) print_provided_flavor(modname) end while true do -- collect lines until braces match. it's what rpm does, kind of. local eof = false local line = spec:read() if line == nil then break end while not match_braces(line) do local nl = spec:read() if nl == nil then eof = true break end line = line .. "\n" .. nl end if eof then break end --io.stderr:write(current_flavor .. " >".. tostring(line) .."<\n") -- match section delimiter local section_noparam = line:match("^%%(%S+)(%s*)$") local section_withparam, param = line:match("^%%(%S+)%s+(.+)$") local newsection = section_noparam or section_withparam if KNOWN_SECTIONS[newsection] then -- enter new section local ignore_section = false if subpackage_only then ignore_section = true if param then local subparam if newsection == "files" then subparam = param:match("%%{python_files%s+(.*)}") else subparam = param:match("^%-n%s+python%-(.*)$") end if subparam then local submodname, subsubparam = rpm.expand(subparam):match("^(%S+)%s*(.*)$") modname = submodname param = subsubparam ignore_section = false end end elseif (param and param:startswith("-n")) then ignore_section = true end if ignore_section then section_function = ignore_line elseif newsection == "package" then print(section_headline("package", current_flavor, param)) if subpackage_only then print_provided_flavor(modname) else -- only valid param is a regular subpackage name print_provided_flavor(modname .. "-" .. param) end section_function = process_package_line elseif newsection == "files" and current_flavor == flavor then section_function = ignore_line elseif COPIED_SECTIONS[newsection] then print(section_headline(newsection, current_flavor, param)) if should_expect_alternatives(newsection, param) then section_function = expect_alternatives elseif newsection == "files" then section_function = files_line else section_function = print_altered end else section_function = ignore_line end elseif line:startswith("%python_subpackages") then -- ignore elseif line:startswith("%if") then -- RPM handles %if on top level, whole sections can be conditional. -- We must copy the %if declarations always, even if they are part -- of non-copied sections. Otherwise we miss this: -- %files A -- /bin/something -- %if %condition -- %files B -- /bin/otherthing -- %endif print_altered(line) -- We are, however, copying expanded versions. This way, specifically, -- macros like %ifpython3 are evaluated differently in the top-level spec -- itself and in the copied sections. --io.stderr:write(rpm.expand(line) .. "\n") elseif line:startswith("%else") or line:startswith("%endif") then print(line .. "\n") --io.stderr:write(line .. "\n") else section_function(line) end end dump_alternatives_posttrans() spec:close() end end -- restore %python_flavor for further processing rpm.define("python_flavor " .. original_flavor) } -13: python_sysconfig_path %{_python_sysconfig_path %{expand:%__%{python_flavor}} %1} -13: python_sysconfig_var %{_python_sysconfig_var %{expand:%__%{python_flavor}} %1} -13: python_uninstall_alternative %{_rec_macro_helper}%{lua:expand_macro("uninstall_alternative", "%**")} -13: python_version %{_python_sysconfig_var %{expand:%__%{python_flavor}} py_version_short} -13: python_version_nodots %{_python_sysconfig_var %{expand:%__%{python_flavor}} py_version_nodot} -13: pythons %{?!skip_python3:%{?!skip_python38:python38} %{?!skip_python39:python39} %{?!skip_python310:python310}} -13: pyunittest(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) %python_flavored_alternatives %{lua: local args = rpm.expand("%**"); local broot = rpm.expand("%buildroot"); local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitelib} PYTHONDONTWRITEBYTECODE=1 $python -m unittest "; print(rpm.expand(intro .. args .. "}")) } -13: pyunittest_arch(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=) %python_flavored_alternatives %{lua: local args = rpm.expand("%**"); local broot = rpm.expand("%buildroot"); local intro = "%{python_expand PYTHONPATH=${PYTHONPATH:+$PYTHONPATH:}" .. broot .. "%{$python_sitearch} PYTHONDONTWRITEBYTECODE=1 $python -m unittest "; print(rpm.expand(intro .. args .. "}")) } -20: quote -13: regenerate_initrd_post mkdir -p /run/regenerate-initrd/ touch /run/regenerate-initrd/all %nil -13: regenerate_initrd_posttrans if test -x /usr/lib/module-init-tools/regenerate-initrd-posttrans; then /bin/bash -c 'set +e; /usr/lib/module-init-tools/regenerate-initrd-posttrans' fi %nil -13: remove_and_set(n:y) %{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} DEF_VAL=%{-y:"yes"}%{!-y:"no"} DEL_TEMPL=%{_fillupdir}/$PNAME.del rm -f $DEL_TEMPL for var in %{?*} ; do printf "#\n%s=%s\n" "$var" "$DEF_VAL" >> $DEL_TEMPL done if [ -f /etc/sysconfig/$PNAME ] ; then /bin/fillup -q -t -r -i -d "=" /etc/sysconfig/$PNAME $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ test -f /etc/sysconfig/$PNAME.new && mv /etc/sysconfig/$PNAME.new /etc/sysconfig/$PNAME fi for i in $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ ; do if [ -f $i ] ; then . $i rm -f $i fi done -13: rename_sysconfig_variable(f:) %{!-f:echo "missing argument for rename_sysconfig_variable"; exit 1; }%{-f:FILE=%{-f*}} if [ -f $FILE ] ; then sed -i -e "s/^%{1}=/%{2}=/" $FILE fi -13: requires_eq %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") -13: requires_ge %(echo '%*' | LC_ALL=C xargs -r rpm -q --qf 'Requires: %%{name} >= %%{epoch}:%%{version}\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not") -13: reset_alternative(n:t:) %define alternative_name %{-n:%{-n*}}%{!-n:%1} %define alternative_target %{-t:%{-t*}}%{!-t:%2} if [ "$1" -gt 0 ] && [ -f %{_sbindir}/update-alternatives ]; then update-alternatives --quiet --remove "%{alternative_name}" "%{alternative_target}" fi %{nil} -13: restart_on_update %{expand::%%service_del_postun %{?**}} -13: riscv %{riscv32} %{riscv64} %{riscv128} -13: riscv128 riscv128 -13: riscv32 riscv32 -13: riscv64 riscv64 -13: rpm_vercmp %{lua:print(rpm.expand('%1') == '~~~' and '~~~' or rpm.vercmp(rpm.expand('%1'), rpm.expand('%2')))} -13: run_ldconfig /sbin/ldconfig -13: sbat_distro opensuse -13: sbat_distro_summary The openSUSE Project -13: sbat_distro_url mailto:security@suse.de -13: service_add_post if [ -x /usr/bin/systemctl ]; then for service in %{?*} ; do if [ -e "/run/systemd/rpm/needs-preset/$service" ]; then /usr/bin/systemctl preset "$service" || : rm "/run/systemd/rpm/needs-preset/$service" || : fi done fi %{nil} -13: service_add_pre if [ -x /usr/bin/systemctl ]; then for service in %{?*} ; do if [ ! -e "/usr/lib/systemd/system/$service" ]; then mkdir -p /run/systemd/rpm/needs-preset touch "/run/systemd/rpm/needs-preset/$service" fi done fi %{nil} -13: service_del_postun(fn) if [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload || : if [ $1 -ge 1 ]; then # Package upgrade, not uninstall %{expand:%%_restart_on_update%{-f:_force}%{!-f:%{-n:_never}} %{?*}} fi fi %{nil} -13: service_del_postun_with_restart if [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload || : if [ $1 -ge 1 ]; then # Package upgrade, not uninstall /usr/bin/systemctl try-restart %{?*} || : fi fi %{nil} -13: service_del_postun_without_restart if [ -x /usr/bin/systemctl ]; then /usr/bin/systemctl daemon-reload || : fi %{nil} -13: service_del_preun if [ $1 -eq 0 -a -x /usr/bin/systemctl ]; then # Package removal, not upgrade /usr/bin/systemctl --no-reload disable --now %{?*} || : fi %{nil} -13: set_build_flags CONFIG_SHELL="${CONFIG_SHELL:-/usr/bin/bash}" ; export CONFIG_SHELL ; CFLAGS="${CFLAGS:-%{?build_cflags}}" ; export CFLAGS ; CXXFLAGS="${CXXFLAGS:-%{?build_cxxflags}}" ; export CXXFLAGS ; FFLAGS="${FFLAGS:-%{?build_fflags}}" ; export FFLAGS ; FCFLAGS="${FCFLAGS:-%{?build_fflags}}" ; export FCFLAGS ; LDFLAGS="${LDFLAGS:-%{?build_ldflags}}" ; export LDFLAGS -13: set_permissions(f:) if [ -x /usr/bin/chkstat ]; then /usr/bin/chkstat -n --set --system %{**} fi %nil -20: shrink -13: sles_version 0 -13: source_date_epoch_from_changelog 0 -13: sources %{lua: for i, s in ipairs(sources) do print(s.." ") end} -13: sparc sparc sparcv8 sparcv9 sparcv9v sparc64 sparc64v -13: stop_on_removal %{expand:%%service_del_preun %{?**}} -20: suffix -13: supplements_kernel_module %{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)} -13: suse_check %{nil} -13: suse_install_update_message install -D -m 644 %1 %buildroot/var/adm/update-messages/%{name}-%{version}-%{release}-%(basename %1).txt %nil -13: suse_install_update_script install -D -m 755 %1 %buildroot/var/adm/update-scripts/%{name}-%{version}-%{release}-%(basename %1).txt %nil -13: suse_update_libdir if [ %_lib != lib ]; then for file in %{?*} ; do [ ! -e $file ] && echo "Error: $file does not exist!" && exit -1 [ -e $file.nolib64 ] && echo "Error: $file.nolib64 already exists!" && exit -1 cp $file $file.nolib64 echo "patching $file" sed -e "s,/lib\>,/%_lib,g" $file.nolib64 | sed -e "s,/%_lib/cpp,/lib/cpp,; s,/usr/%_lib/perl,/usr/lib/perl, ; s,/%_lib\([$-]\),/lib\1,g" > $file diff -u $file.nolib64 $file rm -f $file.nolib64 done; fi ; -13: suse_version 1599 -13: sysc_fillup if [ -x /bin/fillup ] ; then if [ -f $SYSC_TEMPLATE ] ; then echo "Updating /etc/sysconfig/$SD_NAME$PNAME ..." mkdir -p /etc/sysconfig/$SD_NAME touch /etc/sysconfig/$SD_NAME$PNAME /bin/fillup -q /etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE fi else echo "ERROR: fillup not found. This should not happen. Please compare" echo "/etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" echo "update by hand." fi -13: sysctl_apply [ -x /usr/lib/systemd/systemd-sysctl ] && /usr/lib/systemd/systemd-sysctl %{?*} || : %{nil} -13: system_python python3 -13: systemd_ordering OrderWithRequires(pre): systemd OrderWithRequires(post): systemd OrderWithRequires(preun): systemd OrderWithRequires(postun): systemd Suggests: systemd %{nil} -13: systemd_post %{expand::%%service_add_post %{?**}} -13: systemd_postun %{expand::%%service_del_postun_without_restart %{?**}} -13: systemd_postun_with_restart %{expand::%%service_del_postun %{?**}} -13: systemd_pre %{expand::%%service_add_pre %{?**}} -13: systemd_preun %{expand::%%service_del_preun %{?**}} -13: systemd_requires Requires(pre): systemd Requires(post): systemd Requires(preun): systemd Requires(postun): systemd %{nil} -13: systemd_user_post if [ -x /usr/bin/systemctl ]; then for service in %{?*} ; do if [ -e "/run/systemd/rpm/needs-user-preset/$service" ]; then /usr/bin/systemctl --global preset "$service" || : rm "/run/systemd/rpm/needs-user-preset/$service" || : fi done fi %{nil} -13: systemd_user_postun %{nil} -13: systemd_user_postun_with_restart %{nil} -13: systemd_user_pre if [ -x /usr/bin/systemctl ]; then for service in %{?*} ; do if [ ! -e "/usr/lib/systemd/user/$service" ]; then mkdir -p /run/systemd/rpm/needs-user-preset touch "/run/systemd/rpm/needs-user-preset/$service" fi done fi %{nil} -13: systemd_user_preun if [ $1 -eq 0 -a -x /usr/bin/systemctl ]; then # Package removal, not upgrade /usr/bin/systemctl --global disable %{?*} || : fi %{nil} -13: sysusers_create [ -x /usr/bin/systemd-sysusers ] && /usr/bin/systemd-sysusers %{?*} || : %{nil} -13: sysusers_create_inline [ -x /usr/bin/systemd-sysusers ] && /usr/bin/systemd-sysusers - < -20: u2p -13: udev_hwdb_update [ -x /usr/bin/udevadm ] && /usr/bin/udevadm hwdb --update || : %{nil} -13: udev_rules_update [ -x /usr/bin/udevadm ] && /usr/bin/udevadm control --reload || : %{nil} -13: ul_version 0 -20: uncompress -20: undefine -13: undefined %{expand:%%{?%{1}:0}%%{!?%{1}:1}} -13: uninstall_alternative(n:t:) %define alternative_name %{-n:%{-n*}}%{!-n:%1} %define alternative_target %{-t:%{-t*}}%{!-t:%2} if [ ! -e "%{alternative_target}" ]; then update-alternatives --quiet --remove "%{alternative_name}" "%{alternative_target}" fi %{nil} -20: url2path -13: use_source_date_epoch_as_buildtime 0 -13: user_group_add getent group %{1} >/dev/null || /usr/sbin/groupadd -r %{1} getent passwd %{1} >/dev/null || /usr/sbin/useradd -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} %{nil} -13: usrmerged 1 -13: vendor Fedora Copr - user warthog9 -20: verbose -13: verify_permissions(e:f:) /usr/bin/chkstat -n --warn --system %{**} 1>&2 %nil -20: warn -13: with %{expand:%%{?with_%{1}:1}%%{!?with_%{1}:0}} -13: without %{expand:%%{?with_%{1}:0}%%{!?with_%{1}:1}} ======================== active 740 empty 0 ccbase: %{__cc} CC: gcc CC2: + echo 'ccbase: ' '%{__cc}' + echo 'CC: ' gcc + echo 'CC2: ' ++ basename '' + ccbase= + [[ '' == \c\l\a\n\g ]] + /usr/bin/make -O V=1 VERBOSE=1 prefix=/usr libdir=/usr/lib64 all ( mkdir -p /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src; /usr/bin/make --no-print-directory bdir=/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src -C /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src libtracefs.so) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-utils.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-utils.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-utils.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-utils.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-instance.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-instance.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-instance.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-instance.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-events.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-events.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-events.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-events.o) tracefs-events.c: In function 'tracefs_system_events': tracefs-events.c:586:9: warning: ignoring return value of 'asprintf' declared with attribute 'warn_unused_result' [-Wunused-result] 586 | asprintf(&system_dir, "%s/events/%s", tracing_dir, system); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-tools.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-tools.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-tools.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-tools.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-marker.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-marker.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-marker.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-marker.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-kprobes.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-kprobes.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-kprobes.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-kprobes.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-hist.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-hist.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-hist.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-hist.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-filter.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-filter.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-filter.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-filter.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-dynevents.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-dynevents.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-dynevents.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-dynevents.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-eprobes.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-eprobes.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-eprobes.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-eprobes.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-uprobes.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-uprobes.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-uprobes.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-uprobes.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.sqlhist-lex.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist-lex.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC sqlhist-lex.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist-lex.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.sqlhist.tab.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist.tab.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC sqlhist.tab.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist.tab.o) ( cc -Wp,-MMD,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/.tracefs-sqlhist.o.d,-MT,/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-sqlhist.o -MP -c -O2 -g -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -D_GNU_SOURCE -I/usr/include/traceevent -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include -I/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs -std=gnu99 -fPIC tracefs-sqlhist.c -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-sqlhist.o) ( cc --shared /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-utils.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-instance.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-events.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-tools.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-marker.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-kprobes.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-hist.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-filter.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-dynevents.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-eprobes.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-uprobes.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist-lex.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist.tab.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-sqlhist.o '-Wl,-soname,libtracefs.so.1,-rpath=$ORIGIN' -o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.so.1.5.0 -ltraceevent -lpthread) ( mkdir -p /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src; /usr/bin/make --no-print-directory bdir=/builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src -C /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.a) ( if [ -f /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.a ]; then mv /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.a /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.a.rm; rm -f /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.a.rm; fi; ar rcs /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.a /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-utils.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-instance.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-events.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-tools.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-marker.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-kprobes.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-hist.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-filter.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-dynevents.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-eprobes.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-uprobes.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist-lex.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/sqlhist.tab.o /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/src/tracefs-sqlhist.o) (echo /usr > /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix.tmp; if [ -r /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix ] && cmp -s /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix.tmp; then rm -f /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix.tmp; else mv -f /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix.tmp /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/build_prefix; fi); ( (echo '/* This file is automatically generated. Do not modify. */'; echo \#define VERSION_CODE 261; echo '#define EXTRAVERSION ' 0; echo '#define VERSION_STRING "'1.5.0'"'; ) > tfs_version.h.tmp; if [ -r tfs_version.h ] && cmp -s tfs_version.h tfs_version.h.tmp; then rm -f tfs_version.h.tmp; else echo ' UPDATE tfs_version.h'; mv -f tfs_version.h.tmp tfs_version.h; fi); UPDATE tfs_version.h cp -f libtracefs.pc.template /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc; sed -i "s|INSTALL_PREFIX|/usr|g" /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc; sed -i "s|LIB_VERSION|1.5.0|g" /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc; sed -i "s|LIB_DIR|lib64|g" /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc; sed -i "s|HEADER_DIR|include/tracefs|g" /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc; sed -i "s|LIBTRACEEVENT_MIN|1.3|g" /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc; + RPM_EC=0 ++ jobs -p + exit 0 Executing(%install): /usr/bin/bash -e /var/tmp/rpm-tmp.EZLs1B + umask 022 + cd /builddir/build/BUILD + /usr/bin/rm -rf /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le + /usr/bin/mkdir -p /builddir/build/BUILDROOT + /usr/bin/mkdir /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le + cd libtracefs-93f4d523856710929c715f8124b219e17da735df + make install DESTDIR=/builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le prefix=/usr libdir=/usr/lib64 DESCEND src libtracefs.a BUILD STATIC LIB libtracefs.a DESCEND src libtracefs.so INSTALL /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/libtracefs.pc to /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/lib64/pkgconfig INSTALL /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/lib/libtracefs.so.1.5.0 to /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/lib64 INSTALL /builddir/build/BUILD/libtracefs-93f4d523856710929c715f8124b219e17da735df/include/tracefs.h to /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/include/tracefs + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-suse Processing files: libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le Executing(%license): /usr/bin/bash -e /var/tmp/rpm-tmp.U8MIL5 + umask 022 + cd /builddir/build/BUILD + cd libtracefs-93f4d523856710929c715f8124b219e17da735df + LICENSEDIR=/builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/share/licenses/libtracefs + export LC_ALL=C + LC_ALL=C + export LICENSEDIR + /usr/bin/mkdir -p /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/share/licenses/libtracefs + cp -pr LICENSES/LGPL-2.1 /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/share/licenses/libtracefs + cp -pr LICENSES/GPL-2.0 /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le/usr/share/licenses/libtracefs + RPM_EC=0 ++ jobs -p + exit 0 Provides: libtracefs = 20220922.152943.93f4d52-202209281715.suse.tw libtracefs(ppc-64) = 20220922.152943.93f4d52-202209281715.suse.tw libtracefs.so.1()(64bit) Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: libc.so.6()(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.32)(64bit) libc.so.6(GLIBC_2.33)(64bit) libtraceevent.so.1()(64bit) Conflicts: trace-cmd < 2.9.1-6 Processing files: libtracefs-devel-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le Provides: libtracefs-devel = 20220922.152943.93f4d52-202209281715.suse.tw libtracefs-devel(ppc-64) = 20220922.152943.93f4d52-202209281715.suse.tw pkgconfig(libtracefs) = 1.5.0 Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires: /usr/bin/pkg-config pkgconfig(libtraceevent) > 1.3 Processing files: libtracefs-static-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le Provides: libtracefs-static = 20220922.152943.93f4d52-202209281715.suse.tw libtracefs-static(ppc-64) = 20220922.152943.93f4d52-202209281715.suse.tw Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le Wrote: /builddir/build/RPMS/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le.rpm Wrote: /builddir/build/RPMS/libtracefs-devel-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le.rpm Wrote: /builddir/build/RPMS/libtracefs-static-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le.rpm Executing(%clean): /usr/bin/bash -e /var/tmp/rpm-tmp.0q0bRP + umask 022 + cd /builddir/build/BUILD + cd libtracefs-93f4d523856710929c715f8124b219e17da735df + /usr/bin/rm -rf /builddir/build/BUILDROOT/libtracefs-20220922.152943.93f4d52-202209281715.suse.tw.ppc64le + RPM_EC=0 ++ jobs -p + exit 0 Child return code was: 0