packages: add RHEL 9 support
parent
8d32f72df2
commit
dc7a43984c
|
@ -86,8 +86,7 @@ get_os_name () {
|
|||
sed 's/.*(\(.*\)).*/\1/' | head -1 | \
|
||||
tr '[:upper:]' '[:lower:]'`
|
||||
# For CentOS grab release
|
||||
release=`cat /etc/*-release | grep -i 'almalinux\|rocky\|centos.*[0-9]' | \
|
||||
sed 's/^[^0-9]*\([0-9][0-9]*\).*$/\1/' | head -1`
|
||||
release=`cat /etc/*-release | grep -i '^version_id=' | cut -d '"' -f 2 | cut -c 1`
|
||||
;;
|
||||
rhel|ol)
|
||||
codename=`cat /etc/*-release | grep -i 'red hat.*(' | \
|
||||
|
@ -522,7 +521,7 @@ case "$os" in
|
|||
incr_step
|
||||
|
||||
case "$os$release" in
|
||||
rhel8|centos8|amzn2)
|
||||
rhel8|rhel9|centos8|centos9|amzn2)
|
||||
check_python 3
|
||||
python_supported=3
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
gevent==21.8.0
|
||||
greenlet==1.1.3
|
||||
netaddr==0.8.0
|
||||
flup==1.0.3
|
||||
crossplane==0.5.7
|
||||
rstr==3.0.0
|
||||
python-daemon==2.2.4
|
||||
ujson==5.4.0
|
||||
PyMySQL==1.0.2
|
|
@ -23,13 +23,22 @@ BuildRequires: python3-pip
|
|||
%if 0%{?amzn} >= 2
|
||||
Requires: python3 >= 3.7
|
||||
Requires: python3-requests
|
||||
%else
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 8
|
||||
Requires: python3 >= 3.6
|
||||
Requires: python3-gevent
|
||||
Requires: python3-requests
|
||||
Requires: python3-netifaces
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} == 9
|
||||
Requires: python3 >= 3.9
|
||||
Requires: python3-requests
|
||||
Requires: python3-netifaces
|
||||
Requires: python3-psutil
|
||||
%endif
|
||||
|
||||
Requires: initscripts >= 8.36
|
||||
Requires(post): chkconfig
|
||||
|
||||
|
@ -50,12 +59,17 @@ See http://nginx.com/amplify for more information
|
|||
|
||||
%prep
|
||||
%setup -q -n nginx-amplify-agent-%{version}
|
||||
cp -p %{SOURCE0} .
|
||||
%{__cp} -p %{SOURCE0} .
|
||||
|
||||
|
||||
%build
|
||||
%{__python3} -m pip install --upgrade --target=amplify --no-compile -r %%REQUIREMENTS%%
|
||||
%{__python3} -c 'import setuptools; exec(open("setup.py").read())' build
|
||||
%if 0%{?rhel} == 9
|
||||
# https://github.com/pypa/pip/issues/10629
|
||||
%{__python3} -m pip install --upgrade --target=amplify_ --no-compile zope.event
|
||||
%{__cp} -Pr amplify_/zope* amplify/
|
||||
%endif
|
||||
%{__python3} setup.py build
|
||||
|
||||
|
||||
%pre
|
||||
|
|
Loading…
Reference in New Issue