diff --git a/agent/Makefile b/agent/Makefile index 98ab4689ba..804901688c 100644 --- a/agent/Makefile +++ b/agent/Makefile @@ -244,7 +244,7 @@ install-lib: # For some reason, this only seems to be a problem on RHEL platforms prior to 9. pver = $(shell /usr/bin/python3 -c 'import sys; print(f"python{sys.version_info.major}.{sys.version_info.minor}")') install-python3-setup: install-util-scripts install-lib - ${COPY} requirements.txt ${DESTDIR} + ${COPY} requirements.txt constraints.txt ${DESTDIR} mkdir -p ${DESTDIR}/python3 cd .. && PYTHONPATH=${DESTDIR}/python3/lib/${pver}/site-packages \ /usr/bin/python3 -m pip install --prefix=${DESTDIR}/python3 -e . diff --git a/agent/constraints.txt b/agent/constraints.txt new file mode 100644 index 0000000000..c98d310664 --- /dev/null +++ b/agent/constraints.txt @@ -0,0 +1 @@ +python-daemon<3.0.0 diff --git a/agent/rpm/pbench-agent.spec.j2 b/agent/rpm/pbench-agent.spec.j2 index 40dae87f48..91b7b3f800 100644 --- a/agent/rpm/pbench-agent.spec.j2 +++ b/agent/rpm/pbench-agent.spec.j2 @@ -115,7 +115,7 @@ if pip3 show configtools > /dev/null 2>&1 ;then pip3 uninstall -y configtools ;f %post # Install python dependencies -%{__python3} -m pip --no-cache-dir install --prefix=/%{installdir} -r /%{installdir}/requirements.txt > /%{installdir}/pip3-install.log 2>&1 +%{__python3} -m pip --no-cache-dir install --prefix=/%{installdir} -c /%{installdir}/constraints.txt -r /%{installdir}/requirements.txt > /%{installdir}/pip3-install.log 2>&1 # link the pbench profile, so it'll automatically be sourced on login ln -sf /%{installdir}/profile /etc/profile.d/pbench-agent.sh @@ -151,6 +151,7 @@ fi /%{installdir}/SHA1 /%{installdir}/profile /%{installdir}/requirements.txt +/%{installdir}/constraints.txt %config(noreplace) %attr(0664,root,root) /%{installdir}/config/pbench-agent.cfg