Communicate loudly that this does not work with old RPM

I have seen several folks building this package in a RHEL 8 environment.
This won't prevent them doing so, but at least they will be forced to make changes,
acknowledging the fact that what they are doing has consequences.
This commit is contained in:
Miro Hrončok 2023-09-05 16:10:50 +02:00 committed by churchyard
parent 97a7574518
commit 15acb6ee5b

View File

@ -77,6 +77,12 @@ Requires: (pyproject-srpm-macros = %{?epoch:%{epoch}:}%{version}-%{release
Requires: /usr/bin/find Requires: /usr/bin/find
Requires: /usr/bin/sed Requires: /usr/bin/sed
# This package requires the %%generate_buildrequires functionality.
# It has been introduced in RPM 4.15 (4.14.90 is the alpha of 4.15).
# What we need is rpmlib(DynamicBuildRequires), but that is impossible to (Build)Require.
Requires: (rpm-build >= 4.14.90 if rpm-build)
BuildRequires: rpm-build >= 4.14.90
%description %description
These macros allow projects that follow the Python packaging specifications These macros allow projects that follow the Python packaging specifications
to be packaged as RPMs. to be packaged as RPMs.
@ -95,6 +101,7 @@ which only work with setup.py.
%package -n pyproject-srpm-macros %package -n pyproject-srpm-macros
Summary: Minimal implementation of %%pyproject_buildrequires Summary: Minimal implementation of %%pyproject_buildrequires
Requires: (pyproject-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-rpm-macros) Requires: (pyproject-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-rpm-macros)
Requires: (rpm-build >= 4.14.90 if rpm-build)
%description -n pyproject-srpm-macros %description -n pyproject-srpm-macros
This package contains a minimal implementation of %%pyproject_buildrequires. This package contains a minimal implementation of %%pyproject_buildrequires.
@ -109,6 +116,9 @@ takes precedence.
%setup -c -T %setup -c -T
cp -p %{sources} . cp -p %{sources} .
%generate_buildrequires
# nothing to do, this is here just to assert we have that functionality
%build %build
# nothing to do, sources are not buildable # nothing to do, sources are not buildable