Skip to content

Commit 1d31be9

Browse files
authored
Merge pull request #262 from CESNET/rpm-spec-files
Update RPM spec files
2 parents f993721 + fad8953 commit 1d31be9

File tree

3 files changed

+89
-57
lines changed

3 files changed

+89
-57
lines changed

pkg/rpm/ipfixprobe-msec.spec.in

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,51 @@ Group: Liberouter
99
License: BSD
1010
Vendor: CESNET, z.s.p.o.
1111
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
12-
Provides: ipfixprobe-msec
12+
Provides: ipfixprobe
1313
Obsoletes: ipfixprobe-ndp < 5.0.0
1414
Obsoletes: ipfixprobe-dpdk < 5.0.0
1515
Conflicts: ipfixprobe-nemea, ipfixprobe
1616
Source0: %{name}-%{version}.tar.gz
1717

1818
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
19-
BuildRequires: (gcc >= 10 or gcc-toolset-13-gcc)
20-
BuildRequires: (gcc-c++ >= 10 or gcc-toolset-13-gcc-c++)
19+
%if 0%{?rhel} == 8
20+
BuildRequires: gcc-toolset-14
21+
BuildRequires: gcc-toolset-14-gcc
22+
BuildRequires: gcc-toolset-14-gcc-c++
23+
%endif
24+
25+
%if 0%{?rhel} == 9
26+
BuildRequires: gcc >= 10
27+
BuildRequires: gcc-c++ >= 10
28+
%endif
2129
BuildRequires: make
2230
BuildRequires: cmake >= 3.12
2331
BuildRequires: libunwind-devel
2432
BuildRequires: gcc-toolset-14-libatomic-devel
2533
BuildRequires: pkgconfig
2634
BuildRequires: lz4-devel
2735
BuildRequires: openssl-devel
36+
BuildRequires: git
2837

2938
Requires: libatomic
3039
Requires: fuse3
31-
Requires: telemetry
3240
Requires: lz4
3341
Requires: openssl
3442

43+
%description
44+
ipfixprobe is a network traffic analysis tool that exports IPFIX flows with extended elements via plugins.
45+
Export timestamp in milliseconds.
46+
3547
# Make sure that build is always performed out-of-source
3648
%undefine __cmake_in_source_build
3749

38-
%description
39-
The package contains tools, configuration files and traffic samples
40-
that make up the main components of the test environment.
41-
4250
%prep
4351
%autosetup
4452

4553
%build
54+
%if 0%{?rhel} == 8
55+
source /opt/rh/gcc-toolset-14/enable
56+
%endif
4657
%cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_MILISECONDS_TIMESTAMP=ON
4758
%cmake_build
4859

pkg/rpm/ipfixprobe-nemea.spec.in

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,24 @@ Group: Liberouter
1111
License: BSD
1212
Vendor: CESNET, z.s.p.o.
1313
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
14-
Provides: ipfixprobe-nemea
14+
Provides: ipfixprobe
1515
Obsoletes: ipfixprobe-ndp < 5.0.0
1616
Obsoletes: ipfixprobe-dpdk < 5.0.0
1717
Conflicts: ipfixprobe, ipfixprobe-msec, ipfixprobe-process-experimental
1818
Source0: %{name}-%{version}.tar.gz
1919

20-
%if %{with output_unirec}
21-
%package output-unirec
22-
Summary: Output plugin to export records in unirec format.
23-
24-
%description output-unirec
25-
Output plugin for unirec.
20+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
21+
%if 0%{?rhel} == 8
22+
BuildRequires: gcc-toolset-14
23+
BuildRequires: gcc-toolset-14-gcc
24+
BuildRequires: gcc-toolset-14-gcc-c++
25+
%endif
2626

27-
BuildRequires: unirec
28-
Requires: unirec
29-
Requires: ipfixprobe-nemea
27+
%if 0%{?rhel} == 9
28+
BuildRequires: gcc >= 10
29+
BuildRequires: gcc-c++ >= 10
3030
%endif
3131

32-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
33-
BuildRequires: (gcc >= 10 or gcc-toolset-13-gcc)
34-
BuildRequires: (gcc-c++ >= 10 or gcc-toolset-13-gcc-c++)
3532
BuildRequires: make
3633
BuildRequires: cmake >= 3.12
3734
BuildRequires: libunwind-devel
@@ -40,24 +37,39 @@ BuildRequires: pkgconfig
4037
BuildRequires: lz4-devel
4138
BuildRequires: openssl-devel
4239
BuildRequires: nemea-framework-devel
40+
BuildRequires: git
4341

4442
Requires: libatomic
4543
Requires: fuse3
46-
Requires: telemetry
4744
Requires: lz4
4845
Requires: openssl
4946

47+
%description
48+
ipfixprobe is a network traffic analysis tool that exports IPFIX flows with extended elements via plugins.
49+
Builded with NEMEA support.
50+
51+
%if %{with output_unirec}
52+
%package output-unirec
53+
Summary: Output plugin to export records in unirec format.
54+
BuildRequires: unirec
55+
Requires: unirec
56+
Requires: ipfixprobe-nemea
57+
58+
%description output-unirec
59+
Output plugin for unirec.
60+
%endif
61+
62+
5063
# Make sure that build is always performed out-of-source
5164
%undefine __cmake_in_source_build
5265

53-
%description
54-
The package contains tools, configuration files and traffic samples
55-
that make up the main components of the test environment.
56-
5766
%prep
5867
%autosetup
5968

6069
%build
70+
%if 0%{?rhel} == 8
71+
source /opt/rh/gcc-toolset-14/enable
72+
%endif
6173
%cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_NEMEA=ON %{?with_output_unirec: -DENABLE_OUTPUT_UNIREC=ON}
6274
%cmake_build
6375

pkg/rpm/ipfixprobe.spec.in

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,65 @@ Obsoletes: ipfixprobe-dpdk < 5.0.0
2020
Conflicts: ipfixprobe-nemea, ipfixprobe-msec
2121
Source0: %{name}-%{version}.tar.gz
2222

23+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
24+
%if 0%{?rhel} == 8
25+
BuildRequires: gcc-toolset-14
26+
BuildRequires: gcc-toolset-14-gcc
27+
BuildRequires: gcc-toolset-14-gcc-c++
28+
%endif
29+
30+
%if 0%{?rhel} == 9
31+
BuildRequires: gcc >= 10
32+
BuildRequires: gcc-c++ >= 10
33+
%endif
34+
35+
BuildRequires: make
36+
BuildRequires: cmake >= 3.12
37+
BuildRequires: libunwind-devel
38+
BuildRequires: gcc-toolset-14-libatomic-devel
39+
BuildRequires: pkgconfig
40+
BuildRequires: lz4-devel
41+
BuildRequires: openssl-devel
42+
BuildRequires: git
43+
44+
Requires: libatomic
45+
Requires: fuse3
46+
Requires: lz4
47+
Requires: openssl
48+
49+
%description
50+
ipfixprobe is a network traffic analysis tool that exports IPFIX flows with extended elements via plugins.
51+
2352
%if %{with input_pcap}
2453
%package input-pcap
2554
Summary: Input plugin to read packets from files and interfaces using libpcap.
55+
Requires: libpcap
56+
BuildRequires: libpcap-devel
2657

2758
%description input-pcap
2859
Input plugin for libpcap.
29-
30-
BuildRequires: libpcap-devel
31-
Requires: libpcap
3260
%endif
3361

3462
%if %{with input_dpdk}
3563
%package input-dpdk
3664
Summary: Input plugin to read packets from interfaces using dpdk.
65+
BuildRequires: dpdk-devel
66+
Requires: dpdk
3767

3868
%description input-dpdk
3969
Input plugin for dpdk.
40-
41-
BuildRequires: dpdk-devel
42-
Requires: dpdk
4370
%endif
4471

4572
%if %{with input_nfb}
4673
%package input-nfb
4774
Summary: Input plugin to read packets from nfb cards.
75+
BuildRequires: nfb-framework
76+
BuildRequires: numactl-devel
77+
Requires: nfb-framework
78+
Requires: numactl
4879

4980
%description input-nfb
5081
Input plugin for nfb cards.
51-
52-
BuildRequires: nfb-framework
53-
Requires: nfb-framework
5482
%endif
5583

5684
%if %{with process_experimental}
@@ -59,37 +87,18 @@ Summary: Experimental process plugins.
5987

6088
%description process-experimental
6189
Experimental process plugins.
62-
6390
%endif
6491

65-
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
66-
BuildRequires: (gcc >= 10 or gcc-toolset-13-gcc)
67-
BuildRequires: (gcc-c++ >= 10 or gcc-toolset-13-gcc-c++)
68-
BuildRequires: make
69-
BuildRequires: cmake >= 3.12
70-
BuildRequires: libunwind-devel
71-
BuildRequires: gcc-toolset-14-libatomic-devel
72-
BuildRequires: pkgconfig
73-
BuildRequires: lz4-devel
74-
BuildRequires: openssl-devel
75-
76-
Requires: libatomic
77-
Requires: fuse3
78-
Requires: telemetry
79-
Requires: lz4
80-
Requires: openssl
81-
8292
# Make sure that build is always performed out-of-source
8393
%undefine __cmake_in_source_build
8494

85-
%description
86-
The package contains tools, configuration files and traffic samples
87-
that make up the main components of the test environment.
88-
8995
%prep
9096
%autosetup
9197

9298
%build
99+
%if 0%{?rhel} == 8
100+
source /opt/rh/gcc-toolset-14/enable
101+
%endif
93102
%cmake -DCMAKE_BUILD_TYPE=Release %{?with_input_pcap:-DENABLE_INPUT_PCAP=ON} %{?with_input_dpdk:-DENABLE_INPUT_DPDK=ON} %{?with_input_nfb:-DENABLE_INPUT_NFB=ON} %{?with_process_experimental: -DENABLE_PROCESS_EXPERIMENTAL=ON}
94103
%cmake_build
95104

0 commit comments

Comments
 (0)