File tree Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Expand file tree Collapse file tree 3 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,7 @@ get_os_name () {
8686 sed ' s/.*(\(.*\)).*/\1/' | head -1 | \
8787 tr ' [:upper:]' ' [:lower:]' `
8888 # For CentOS grab release
89- release=` cat /etc/* -release | grep -i ' almalinux\|rocky\|centos.*[0-9]' | \
90- sed ' s/^[^0-9]*\([0-9][0-9]*\).*$/\1/' | head -1`
89+ release=` cat /etc/* -release | grep -i ' ^version_id=' | cut -d ' "' -f 2 | cut -c 1`
9190 ;;
9291 rhel|ol)
9392 codename=` cat /etc/* -release | grep -i ' red hat.*(' | \
@@ -522,7 +521,7 @@ case "$os" in
522521 incr_step
523522
524523 case " $os$release " in
525- rhel8|centos8|amzn2)
524+ rhel8|rhel9| centos8|centos9 |amzn2)
526525 check_python 3
527526 python_supported=3
528527 ;;
Original file line number Diff line number Diff line change 1+ gevent==21.8.0
2+ greenlet==1.1.3
3+ netaddr==0.8.0
4+ flup==1.0.3
5+ crossplane==0.5.7
6+ rstr==3.0.0
7+ python-daemon==2.2.4
8+ ujson==5.4.0
9+ PyMySQL==1.0.2
Original file line number Diff line number Diff line change @@ -23,13 +23,22 @@ BuildRequires: python3-pip
2323%if 0%{?amzn } >= 2
2424Requires: python3 >= 3.7
2525Requires: python3-requests
26- %else
26+ %endif
27+
28+ %if 0%{?rhel } == 8
2729Requires: python3 >= 3.6
2830Requires: python3-gevent
2931Requires: python3-requests
3032Requires: python3-netifaces
3133%endif
3234
35+ %if 0%{?rhel } == 9
36+ Requires: python3 >= 3.9
37+ Requires: python3-requests
38+ Requires: python3-netifaces
39+ Requires: python3-psutil
40+ %endif
41+
3342Requires: initscripts >= 8.36
3443Requires(post): chkconfig
3544
@@ -50,12 +59,17 @@ See http://nginx.com/amplify for more information
5059
5160%prep
5261%setup -q -n nginx-amplify-agent-%{version }
53- cp -p %{SOURCE0 } .
62+ %{__cp} -p %{SOURCE0 } .
5463
5564
5665%build
5766%{__python3} -m pip install --upgrade --target=amplify --no-compile -r %%REQUIREMENTS %%
58- %{__python3} -c ' import setuptools; exec(open("setup.py").read())' build
67+ %if 0%{?rhel } == 9
68+ # https://github.com/pypa/pip/issues/10629
69+ %{__python3} -m pip install --upgrade --target=amplify_ --no-compile zope.event
70+ %{__cp} -Pr amplify_/zope* amplify/
71+ %endif
72+ %{__python3} setup.py build
5973
6074
6175%pre
You can’t perform that action at this time.
0 commit comments