From 59caa90b5f336468dd33b621a742934bf02f1131 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Tue, 8 Nov 2022 14:51:03 -0600 Subject: [PATCH] Stop overriding macros that are now in RHEL 8.7 Relates: https://git.centos.org/rpms/python-rpm-macros/c/d6955c24a4b310b5dfeb6183540d817d21e4e14b?branch=c8 --- epel-rpm-macros.spec | 5 ++++- macros.epel-rpm-macros | 23 ----------------------- macros.zzz-epel-override | 32 -------------------------------- 3 files changed, 4 insertions(+), 56 deletions(-) diff --git a/epel-rpm-macros.spec b/epel-rpm-macros.spec index b576485..80273c9 100644 --- a/epel-rpm-macros.spec +++ b/epel-rpm-macros.spec @@ -1,6 +1,6 @@ Name: epel-rpm-macros Version: 8 -Release: 36 +Release: 37 Summary: Extra Packages for Enterprise Linux RPM macros License: GPLv2 @@ -119,6 +119,9 @@ install -Dpm 644 %{SOURCE151} \ %changelog +* Wed Feb 08 2023 Maxwell G - 8-37 +- Stop overriding macros that are now in RHEL 8.7 + * Mon Jan 23 2023 Jitka Plesnikova - 8-36 - Add perl-generators-epel to the buildroot diff --git a/macros.epel-rpm-macros b/macros.epel-rpm-macros index 49b41f4..9f5333b 100644 --- a/macros.epel-rpm-macros +++ b/macros.epel-rpm-macros @@ -16,29 +16,6 @@ # Use the non-underscored Python macros to refer to Python in spec, etc. %python2 %__python2 -# This macro is copied here from https://git.centos.org/rpms/python-rpm-macros/pull-request/1 -# and is needed for the overrides in macros.zzz-epel-override. -# It will be removed once it lands in RHEL. -# https://bugzilla.redhat.com/show_bug.cgi?id=2090007 -# -# RHEL 9+ and Fedora compatibility macro -# Only use in macro backports, not intended to be used in spec files! -# In the future, the %%python3_pkgversion macro has a dot, e.g. 3.9 or 3.11 -# However, in RHEL 8 at least, it does not, e.g. 38, 39 -# This is a helpful macro that determines the proper "Python version" string with dot -# from %%python3_pkgversion without actually having Python installed. -# For values other than 3X, it should expand to %%python3_pkgversion unchanged. -# Examples of %%python3_pkgversion -> %%_python3_pkgversion_with_dot: -# 3 -> 3 -# 38 -> 3.8 -# 39 -> 3.9 -# 310 -> 3.10 -# 3.12 -> 3.12 -# 4 -> 4 -# 412 -> 412 -%_python3_pkgversion_with_dot %{lua:print((rpm.expand("%python3_pkgversion"):gsub('^3(%d)', '3.%1')))} - - # Users can use %%python only if they redefined %%__python (e.g. to %%__python3) %python() %{lua:\ __python = rpm.expand("%__python")\ diff --git a/macros.zzz-epel-override b/macros.zzz-epel-override index bf79bff..b8c5d96 100644 --- a/macros.zzz-epel-override +++ b/macros.zzz-epel-override @@ -25,35 +25,3 @@ else end print(bin) } - - -# RHEL 8's %%pytest does not work properly on non-default Python versions. -# Backported from https://src.fedoraproject.org/rpms/python-rpm-macros/c/02536540768555dde6d675935db45df81bcab7bf?branch=rawhide -# https://bugzilla.redhat.com/show_bug.cgi?id=2091462 -%__pytest /usr/bin/pytest%(test %{python3_pkgversion} == 3 && echo -3 || echo -%{python3_version}) - -# RHEL 8's %%py3_dist does not work properly on non-default Python versions. -# This is copied here from https://git.centos.org/rpms/python-rpm-macros/pull-request/1 -# until that lands in RHEL. -# https://bugzilla.redhat.com/show_bug.cgi?id=2090007 - -# Creates Python 3 dist tag(s) after converting names to canonical format -# Needs to first put all arguments into a list, because invoking a different -# macro (%py_dist_name) overwrites them -%py3_dist() %{lua:\ - python3_pkgversion_with_dot = rpm.expand("%_python3_pkgversion_with_dot")\ - 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("%py_dist_name " .. name);\ - print("python" .. python3_pkgversion_with_dot .. "dist(" .. canonical .. ") ");\ - end\ -}