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 () {
86
86
sed ' s/.*(\(.*\)).*/\1/' | head -1 | \
87
87
tr ' [:upper:]' ' [:lower:]' `
88
88
# 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`
91
90
;;
92
91
rhel|ol)
93
92
codename=` cat /etc/* -release | grep -i ' red hat.*(' | \
@@ -522,7 +521,7 @@ case "$os" in
522
521
incr_step
523
522
524
523
case " $os$release " in
525
- rhel8|centos8|amzn2)
524
+ rhel8|rhel9| centos8|centos9 |amzn2)
526
525
check_python 3
527
526
python_supported=3
528
527
;;
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
23
23
%if 0%{?amzn } >= 2
24
24
Requires: python3 >= 3.7
25
25
Requires: python3-requests
26
- %else
26
+ %endif
27
+
28
+ %if 0%{?rhel } == 8
27
29
Requires: python3 >= 3.6
28
30
Requires: python3-gevent
29
31
Requires: python3-requests
30
32
Requires: python3-netifaces
31
33
%endif
32
34
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
+
33
42
Requires: initscripts >= 8.36
34
43
Requires(post): chkconfig
35
44
@@ -50,12 +59,17 @@ See http://nginx.com/amplify for more information
50
59
51
60
%prep
52
61
%setup -q -n nginx-amplify-agent-%{version }
53
- cp -p %{SOURCE0 } .
62
+ %{__cp} -p %{SOURCE0 } .
54
63
55
64
56
65
%build
57
66
%{__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
59
73
60
74
61
75
%pre
You can’t perform that action at this time.
0 commit comments