Compare commits

...
Sign in to create a new pull request.

27 commits

Author SHA1 Message Date
Fedora Release Engineering
96e2834a8c Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 20:37:52 +00:00
Zbigniew Jędrzejewski-Szmek
23a5f53cc0 Fix FTBFS
... (rhbz#2244833, rhbz#2340163)

With apologies to python-sig members ;(
2025-03-14 16:10:49 +01:00
Zbigniew Jędrzejewski-Szmek
0fae65d297 Drop Provides for user/group with uid/gid
This duplicates the autogenerated Provides.
2025-03-14 15:59:43 +01:00
Zbigniew Jędrzejewski-Szmek
95595bde31 Add sysusers.d config file to allow rpm to create users/groups automatically
See https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers.
2025-02-11 15:35:16 +01:00
Fedora Release Engineering
311a467f28 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 18:29:50 +00:00
Miroslav Suchý
74593b54b0 convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-08-28 09:40:10 +02:00
Fedora Release Engineering
23eb92d01e Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 23:20:33 +00:00
Fedora Release Engineering
d0d654f9a8 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 11:46:20 +00:00
Fedora Release Engineering
af92d97bc9 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 19:31:02 +00:00
Fedora Release Engineering
6397f12daa Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 19:55:48 +00:00
Florian Weimer
5590477b99 C99 compatibility fixes (#2162330)
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-01-19 12:16:55 +01:00
Fedora Release Engineering
95147493b1 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 03:37:52 +00:00
Fedora Release Engineering
0fe819d45b Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 03:21:33 +00:00
Fedora Release Engineering
da0a030130 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 03:10:54 +00:00
Fedora Release Engineering
c8580fa589 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 23:08:07 +00:00
Pavel Raiskup
7798d3e600 rebuild for libpq ABI fix
Related: rhbz#1908268
2021-02-08 09:25:11 +01:00
Fedora Release Engineering
00be7efaf9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 05:42:32 +00:00
Tom Stellard
669cd5f72c Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-05 00:41:18 +00:00
Fedora Release Engineering
57db730e31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 17:37:06 +00:00
Orion Poplawski
61ed33ab67 Add patch to fix extern usage for gcc 10 2020-01-27 20:48:44 -07:00
Orion Poplawski
77d5e39f67 Use python 3 for Fedora 31+ (bugz#1737952) 2019-08-21 20:42:33 -06:00
Orion Poplawski
0daff6da10 Fix systemd macro usage 2019-07-30 21:01:32 -06:00
Fedora Release Engineering
3fecae4273 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 00:45:41 +00:00
Fedora Release Engineering
bebfdde140 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 19:52:57 +00:00
Igor Gnatenko
5d7f517026 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:02 +01:00
Pavel Raiskup
a3208c417d BuildRequires: s/postgresql-devel/libpq-devel/
That's because we moved libpq.so.5 into libpq package.

Related: rhbz#1618698, rhbz#1623764
2018-09-05 15:15:44 +02:00
Fedora Release Engineering
e44827f667 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 00:40:33 +00:00
3 changed files with 172 additions and 25 deletions

59
flow-tools-c99.patch Normal file
View file

@ -0,0 +1,59 @@
Add a new header file that provides function prototypes for flex/bison
integration. This avoids implicit function declarations and build
failures with future compilers.
diff --git a/src/acllex.l b/src/acllex.l
index 74dd8882f2fed262..3ab5e3c0cd897f70 100644
--- a/src/acllex.l
+++ b/src/acllex.l
@@ -11,6 +11,7 @@
#include "acl2.h"
#include "aclyacc.h"
+#include "aclparse.h"
%}
byte ([0-9]+)
diff --git a/src/aclparse.h b/src/aclparse.h
new file mode 100644
index 0000000000000000..f113fc26d7513042
--- /dev/null
+++ b/src/aclparse.h
@@ -0,0 +1,3 @@
+int yylex (void);
+void yyerror(const char *msg);
+int yyparse (void);
diff --git a/src/aclyacc.y b/src/aclyacc.y
index 60001b6e4c820271..711b7eb169b59aba 100644
--- a/src/aclyacc.y
+++ b/src/aclyacc.y
@@ -2,6 +2,7 @@
#include <ftlib.h>
#include "acl2.h"
#include <stdio.h> /* XXX REMOVE */
+#include "aclparse.h"
/* XXX remove */
unsigned char fmt_buf[32];
diff --git a/src/flow-filter.c b/src/flow-filter.c
index 3c1bfea989b2a129..305e2ed4399ca33d 100644
--- a/src/flow-filter.c
+++ b/src/flow-filter.c
@@ -47,6 +47,7 @@
#endif
#include "acl2.h"
+#include "aclparse.h"
/*
* TODO
@@ -58,9 +59,7 @@ int ip_net_only;
extern struct acl_list acl_list;
-int yyparse (void);
void usage(void);
-void yyerror(const char *msg);
extern FILE *yyin;
extern char *yytext;

12
flow-tools-extern.patch Normal file
View file

@ -0,0 +1,12 @@
diff -up flow-tools-0.68.5.1/src/flow-filter.c.extern flow-tools-0.68.5.1/src/flow-filter.c
--- flow-tools-0.68.5.1/src/flow-filter.c.extern 2008-01-27 13:48:55.000000000 -0700
+++ flow-tools-0.68.5.1/src/flow-filter.c 2020-01-27 20:44:13.176636051 -0700
@@ -56,7 +56,7 @@
int debug;
int ip_net_only;
-struct acl_list acl_list;
+extern struct acl_list acl_list;
int yyparse (void);
void usage(void);

View file

@ -1,5 +1,5 @@
# Does not support openssl 1.1 # Does not support openssl 1.1
%if 0%{?fedora} >= 26 %if 0%{?fedora}
%bcond_with openssl %bcond_with openssl
%else %else
%bcond_without openssl %bcond_without openssl
@ -12,31 +12,33 @@
Version: 0.68.5.1 Version: 0.68.5.1
Name: flow-tools Name: flow-tools
Summary: Tool set for working with NetFlow data Summary: Tool set for working with NetFlow data
Release: 23%{?dist} Release: 45%{?dist}
Group: Applications/System # Automatically converted from old format: BSD - review is highly recommended.
License: BSD License: LicenseRef-Callaway-BSD
URL: http://code.google.com/p/%{name}/ URL: http://code.google.com/p/%{name}/
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2 Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2
Source1: flow-capture.service Source1: flow-capture.service
Source2: flow-capture.sysconfig Source2: flow-capture.sysconfig
Patch0: flow-werror-fix.patch Patch0: flow-werror-fix.patch
# Fix extern usage
Patch1: flow-tools-extern.patch
Patch2: flow-tools-c99.patch
BuildRequires: gcc BuildRequires: gcc
%if 0%{with openssl} %if 0%{with openssl}
BuildRequires: openssl-devel BuildRequires: openssl-devel
%endif %endif
BuildRequires: mariadb-connector-c-devel BuildRequires: mariadb-connector-c-devel
BuildRequires: postgresql-devel BuildRequires: libpq-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: bison BuildRequires: bison
BuildRequires: flex BuildRequires: flex
BuildRequires: doxygen BuildRequires: doxygen
Requires(pre): shadow-utils %if 0%{?fedora} >= 31
Requires(post): systemd BuildRequires: python3.12
Requires(preun): systemd %endif
Requires(postun): systemd BuildRequires: systemd-rpm-macros
BuildRequires: systemd BuildRequires: make
Provides: group(%username)
Provides: user(%username)
%description %description
@ -50,7 +52,6 @@ contributed and are included in the distribution.
%package devel %package devel
Summary: Development files for flow-tools Summary: Development files for flow-tools
Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: zlib-devel Requires: zlib-devel
@ -68,9 +69,12 @@ libft.
%package rrdtool %package rrdtool
Summary: Scripts for flow-tools to build rrd graphs Summary: Scripts for flow-tools to build rrd graphs
Group: Applications/System
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%if 0%{?fedora} >= 31
Requires: python3-rrdtool
%else
Requires: python2-rrdtool Requires: python2-rrdtool
%endif
%description rrdtool %description rrdtool
Flow-tools is library and a collection of programs used to collect, Flow-tools is library and a collection of programs used to collect,
@ -81,12 +85,11 @@ of custom applications for NetFlow export versions 1,5,6 and the 14 currently
defined version 8 subversions. A Perl and Python interface have been defined version 8 subversions. A Perl and Python interface have been
contributed and are included in the distribution. contributed and are included in the distribution.
This package contains scripts that use python2-rrdtool to create rrds and graphs This package contains scripts that use python-rrdtool to create rrds and graphs
from flow data. from flow data.
%package docs %package docs
Summary: HTML and other redundant docs for flow-tools Summary: HTML and other redundant docs for flow-tools
Group: Applications/System
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description docs %description docs
@ -101,15 +104,25 @@ contributed and are included in the distribution.
This package contains additional documentation, such as man pages in html format. This package contains additional documentation, such as man pages in html format.
%prep %prep
%setup -q %autosetup -p1
%patch0 -p1
# Remove /bin/env deps # Remove /bin/env deps
%if 0%{?fedora} >= 31
sed -i '1s|^#!.*python|#!/usr/bin/python3|' bin/flow*
python3.12 -m lib2to3 --write --nobackups bin/flow*
%else
sed -i '1s|^#!.*python|#!/usr/bin/python2|' bin/flow* sed -i '1s|^#!.*python|#!/usr/bin/python2|' bin/flow*
%endif
sed -i '1s|^#!.*perl|#!/usr/bin/perl|' utils/* sed -i '1s|^#!.*perl|#!/usr/bin/perl|' utils/*
# Fix mariadb-connector-c detection # Fix mariadb-connector-c detection
sed -i s/my_init/mysql_init/g configure sed -i s/my_init/mysql_init/g configure
# Create a sysusers.d config file
cat >flow-tools.sysusers.conf <<EOF
u flow-tools - '%{gecos}' %{homedir} -
EOF
%build %build
export CFLAGS="$CFLAGS -std=gnu17"
%configure \ %configure \
--localstatedir=%{_localstatedir}/%{name} \ --localstatedir=%{_localstatedir}/%{name} \
--sysconfdir=%{_sysconfdir}/%{name} \ --sysconfdir=%{_sysconfdir}/%{name} \
@ -134,12 +147,8 @@ install -m 0644 %SOURCE1 $RPM_BUILD_ROOT%{_unitdir}/flow-capture.service
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/flow-capture install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/flow-capture
%pre install -m0644 -D flow-tools.sysusers.conf %{buildroot}%{_sysusersdir}/flow-tools.conf
getent group %{username} >/dev/null || groupadd -r %{username}
getent passwd %{username} >/dev/null || \
useradd -r -g %{username} -d %{homedir} -s /sbin/nologin \
-c '%{gecos}' %{username}
exit 0
%post %post
@ -150,7 +159,7 @@ exit 0
%systemd_preun flow-capture.service %systemd_preun flow-capture.service
%postun %postun
%systemd_postun %systemd_postun flow-capture.service
%files %files
%doc README README.fork COPYING ChangeLog %doc README README.fork COPYING ChangeLog
@ -211,6 +220,7 @@ exit 0
%attr(-,flow-tools,flow-tools) %{_localstatedir}/%{name}/ %attr(-,flow-tools,flow-tools) %{_localstatedir}/%{name}/
%dir %{_datadir}/%{name}/ %dir %{_datadir}/%{name}/
%{_datadir}/%{name}/* %{_datadir}/%{name}/*
%{_sysusersdir}/flow-tools.conf
%files devel %files devel
%{_libdir}/*.so %{_libdir}/*.so
@ -226,6 +236,72 @@ exit 0
%doc docs/*.html ChangeLog.old TODO INSTALL SECURITY %doc docs/*.html ChangeLog.old TODO INSTALL SECURITY
%changelog %changelog
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.68.5.1-44
- Add sysusers.d config file to allow rpm to create users/groups automatically
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-43
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Aug 28 2024 Miroslav Suchý <msuchy@redhat.com> - 0.68.5.1-42
- convert license to SPDX
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Florian Weimer <fweimer@redhat.com> - 0.68.5.1-37
- C99 compatibility fixes (#2162330)
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-35
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-33
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 0.68.5.1-32
- rebuild for libpq ABI fix rhbz#1908268
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Orion Poplawski <orion@nwra.com> - 0.68.5.1-29
- Add patch to fix extern usage for gcc 10
* Wed Aug 21 2019 Orion Poplawski <orio@nwra.com> - 0.68.5.1-28
- Use python 3 for Fedora 31+ (bugz#1737952)
* Tue Jul 30 2019 Orion Poplawski <orio@nwra.com> - 0.68.5.1-27
- Fix systemd macro usage
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Feb 27 2018 Orion Poplawski <orio@nwra.com> - 0.68.5.1-23 * Tue Feb 27 2018 Orion Poplawski <orio@nwra.com> - 0.68.5.1-23
- Remove /bin/env deps (bug #1512889) - Remove /bin/env deps (bug #1512889)
- Drop tcp_wrappers support (bug #1518764) - Drop tcp_wrappers support (bug #1518764)