Skip to content

Commit 403debb

Browse files
committed
RPM spec: add conditional Python and EPEL dependencies based on RHEL version
- Added Requires for python39 and related packages on RHEL 8 - Added Requires for python3 and related packages on RHEL 9 - Added a note in %prep explaining how to manually install EPEL on RHEL 8 in case python39-jsonschema cannot be found
1 parent 6b053db commit 403debb

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

pkg/rpm/ipfixprobe-msec.spec.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,19 @@ Requires: libatomic
3939
Requires: fuse3
4040
Requires: lz4
4141
Requires: openssl
42+
43+
%if 0%{?rhel} == 8
44+
Requires: epel-release
45+
Requires: python39
46+
Requires: python39-pyyaml
47+
Requires: python39-jsonschema
48+
%endif
49+
50+
%if 0%{?rhel} == 9
4251
Requires: python3
4352
Requires: python3-pyyaml
4453
Requires: python3-jsonschema
54+
%endif
4555

4656
%description
4757
ipfixprobe is a network traffic analysis tool that exports IPFIX flows with extended elements via plugins.
@@ -51,6 +61,9 @@ Export timestamp in milliseconds.
5161
%undefine __cmake_in_source_build
5262

5363
%prep
64+
# If the package python39-jsonschema cannot be found, you may need to enable EPEL manually (for epel8):
65+
# sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
66+
5467
%autosetup
5568

5669
%build

pkg/rpm/ipfixprobe-nemea.spec.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,19 @@ Requires: libatomic
4444
Requires: fuse3
4545
Requires: lz4
4646
Requires: openssl
47+
48+
%if 0%{?rhel} == 8
49+
Requires: epel-release
50+
Requires: python39
51+
Requires: python39-pyyaml
52+
Requires: python39-jsonschema
53+
%endif
54+
55+
%if 0%{?rhel} == 9
4756
Requires: python3
4857
Requires: python3-pyyaml
4958
Requires: python3-jsonschema
59+
%endif
5060

5161
%description
5262
ipfixprobe is a network traffic analysis tool that exports IPFIX flows with extended elements via plugins.
@@ -75,6 +85,9 @@ Experimental process plugins.
7585
%undefine __cmake_in_source_build
7686

7787
%prep
88+
# If the package python39-jsonschema cannot be found, you may need to enable EPEL manually (for epel8):
89+
# sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
90+
7891
%autosetup
7992

8093
%build

pkg/rpm/ipfixprobe.spec.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,19 @@ Requires: libatomic
4545
Requires: fuse3
4646
Requires: lz4
4747
Requires: openssl
48+
49+
%if 0%{?rhel} == 8
50+
Requires: epel-release
51+
Requires: python39
52+
Requires: python39-pyyaml
53+
Requires: python39-jsonschema
54+
%endif
55+
56+
%if 0%{?rhel} == 9
4857
Requires: python3
4958
Requires: python3-pyyaml
5059
Requires: python3-jsonschema
60+
%endif
5161

5262
%description
5363
ipfixprobe is a network traffic analysis tool that exports IPFIX flows with extended elements via plugins.
@@ -96,6 +106,9 @@ Experimental process plugins.
96106
%undefine __cmake_in_source_build
97107

98108
%prep
109+
# If the package python39-jsonschema cannot be found, you may need to enable EPEL manually (for epel8):
110+
# sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
111+
99112
%autosetup
100113

101114
%build

0 commit comments

Comments
 (0)