#28 python-rpm-macros: make compatible with rhel7.7
Closed 2 years ago by kevin. Opened 2 years ago by kevin.
Unknown source rhel7.7-compat  into  epel7

file modified
+13 -3
@@ -1,6 +1,8 @@

+ %global rpmmacrodir %{_sysconfdir}/rpm

+ 

  Name:           python-rpm-macros

  Version:        3

- Release:        25%{?dist}

+ Release:        31%{?dist}

  Summary:        The unversioned Python RPM macros

  

  License:        MIT
@@ -11,6 +13,8 @@

  Source5:        macros.pybytecompile

  

  BuildArch:      noarch

+ # The macro file has been moved from the python-devel package

+ Conflicts:      python-devel < 2.7.5-78

centos (epel mock) gives me python-devel-2.7.5-80.el7_6

  # For %%python3_pkgversion used in %%python_provide

  Requires:       python-srpm-macros

  
@@ -29,6 +33,8 @@

  

  %package -n python2-rpm-macros

  Summary:        RPM macros for building Python 2 packages

+ # The macro file has been moved from the python-devel package

+ Conflicts:      python-devel < 2.7.5-78

  

  %description -n python2-rpm-macros

  RPM macros for building Python 2 packages.
@@ -46,9 +52,9 @@

  

  %install

  mkdir -p %{buildroot}/%{rpmmacrodir}

- install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE5} \

-   %{buildroot}/%{rpmmacrodir}/

  

+ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \

BUILDSTDERR: install: cannot stat '%{SOURCE4}': No such file or directory

+   %{buildroot}/%{_sysconfdir}/rpm/

is this change necessary with the rpmmacrodir redefinition?

  

  %files

  %{rpmmacrodir}/macros.python
@@ -65,6 +71,10 @@

  

  

  %changelog

+ * Tue Aug 13 2019 Kevin Fenzi <kevin@scrye.com> - 3-31

+ - Update to 3-31 to allow rhel7.7 python2 to install in epel7 buildroot

+ - Move macros to the same location the rhel7.7 version of this has.

+ 

  * Tue Apr 30 2019 Miro Hrončok <mhroncok@redhat.com> - 3-25

  - Split python3-other-rpm-macros from python-rpm-macros to python-epel-rpm-macros

  

centos (epel mock) gives me python-devel-2.7.5-80.el7_6

is this change necessary with the rpmmacrodir redefinition?

BUILDSTDERR: install: cannot stat '%{SOURCE4}': No such file or directory

the conflicts will make it impossible to install both centos 7.6 python-devel and epel python{2,0}-rpm-macros, hence making local mockbuilds impossible. it will however allow Koji builds (broken now).

a solution that might works for both is to keep the macros location as it was before this PR but simply bump the version.

So, thinking about it, lets just bump the version, and add a override for it, then never push it as an update?

Then, centos folks won't get it.
RHEL folks will get the RHEL one if they build locally.
koji will get the epel one for building things.

As long as the macros are the same in the epel and rhel versions, doing that should work for everyone?

let me see... they are almost the same, except implementation detail of py_byte_compile and except python3_(other_)version - but we override that in epel macros anyway. so that should work, yes.

yeah, I just pushed the simple change... hopefully it works.

Pull-Request has been closed by kevin

2 years ago