Compare commits
36 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96e2834a8c | ||
|
|
23a5f53cc0 | ||
|
|
0fae65d297 | ||
|
|
95595bde31 | ||
|
|
311a467f28 | ||
|
|
74593b54b0 | ||
|
|
23eb92d01e | ||
|
|
d0d654f9a8 | ||
|
|
af92d97bc9 | ||
|
|
6397f12daa | ||
|
|
5590477b99 | ||
|
|
95147493b1 | ||
|
|
0fe819d45b | ||
|
|
da0a030130 | ||
|
|
c8580fa589 | ||
|
|
7798d3e600 | ||
|
|
00be7efaf9 | ||
|
|
669cd5f72c | ||
|
|
57db730e31 | ||
|
|
61ed33ab67 | ||
|
|
77d5e39f67 | ||
|
|
0daff6da10 | ||
|
|
3fecae4273 | ||
|
|
bebfdde140 | ||
|
|
5d7f517026 | ||
|
|
a3208c417d | ||
|
|
e44827f667 | ||
|
|
7668b0b454 | ||
|
|
adbd813161 |
||
|
|
7c6159adce | ||
|
|
48a6ab318e |
||
|
|
71aaec0895 | ||
|
|
afe0c46057 | ||
|
|
fd70904b99 | ||
|
|
ddfcb46e34 | ||
|
|
43dd03a8c7 |
3 changed files with 223 additions and 37 deletions
59
flow-tools-c99.patch
Normal file
59
flow-tools-c99.patch
Normal 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
12
flow-tools-extern.patch
Normal 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);
|
||||
189
flow-tools.spec
189
flow-tools.spec
|
|
@ -1,4 +1,9 @@
|
|||
%bcond_without fedora
|
||||
# Does not support openssl 1.1
|
||||
%if 0%{?fedora}
|
||||
%bcond_with openssl
|
||||
%else
|
||||
%bcond_without openssl
|
||||
%endif
|
||||
|
||||
%global username flow-tools
|
||||
%global homedir %{_localstatedir}/%{name}
|
||||
|
|
@ -7,25 +12,33 @@
|
|||
Version: 0.68.5.1
|
||||
Name: flow-tools
|
||||
Summary: Tool set for working with NetFlow data
|
||||
Release: 17%{?dist}
|
||||
Group: Applications/System
|
||||
License: BSD
|
||||
Release: 45%{?dist}
|
||||
# Automatically converted from old format: BSD - review is highly recommended.
|
||||
License: LicenseRef-Callaway-BSD
|
||||
URL: http://code.google.com/p/%{name}/
|
||||
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tar.bz2
|
||||
Source1: flow-capture.service
|
||||
Source2: flow-capture.sysconfig
|
||||
Patch0: flow-werror-fix.patch
|
||||
BuildRequires: openssl-devel mysql-devel postgresql-devel zlib-devel
|
||||
BuildRequires: bison flex tcp_wrappers-devel
|
||||
# Fix extern usage
|
||||
Patch1: flow-tools-extern.patch
|
||||
Patch2: flow-tools-c99.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
%if 0%{with openssl}
|
||||
BuildRequires: openssl-devel
|
||||
%endif
|
||||
BuildRequires: mariadb-connector-c-devel
|
||||
BuildRequires: libpq-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: flex
|
||||
BuildRequires: doxygen
|
||||
Requires(pre): shadow-utils
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
BuildRequires: systemd
|
||||
Provides: group(%username)
|
||||
Provides: user(%username)
|
||||
%if 0%{?fedora} >= 31
|
||||
BuildRequires: python3.12
|
||||
%endif
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: make
|
||||
|
||||
|
||||
%description
|
||||
|
|
@ -39,8 +52,8 @@ contributed and are included in the distribution.
|
|||
|
||||
%package devel
|
||||
Summary: Development files for flow-tools
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}-%{release} zlib-devel
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: zlib-devel
|
||||
|
||||
%description devel
|
||||
Flow-tools is library and a collection of programs used to collect,
|
||||
|
|
@ -56,8 +69,12 @@ libft.
|
|||
|
||||
%package rrdtool
|
||||
Summary: Scripts for flow-tools to build rrd graphs
|
||||
Group: Applications/System
|
||||
Requires: %{name} = %{version}-%{release} rrdtool-python
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%if 0%{?fedora} >= 31
|
||||
Requires: python3-rrdtool
|
||||
%else
|
||||
Requires: python2-rrdtool
|
||||
%endif
|
||||
|
||||
%description rrdtool
|
||||
Flow-tools is library and a collection of programs used to collect,
|
||||
|
|
@ -73,7 +90,6 @@ from flow data.
|
|||
|
||||
%package docs
|
||||
Summary: HTML and other redundant docs for flow-tools
|
||||
Group: Applications/System
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description docs
|
||||
|
|
@ -88,27 +104,42 @@ contributed and are included in the distribution.
|
|||
This package contains additional documentation, such as man pages in html format.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%autosetup -p1
|
||||
# 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*
|
||||
%endif
|
||||
sed -i '1s|^#!.*perl|#!/usr/bin/perl|' utils/*
|
||||
# Fix mariadb-connector-c detection
|
||||
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
|
||||
export CFLAGS="$CFLAGS -std=gnu17"
|
||||
%configure \
|
||||
LDFLAGS=-L%{_libdir}/mysql \
|
||||
--localstatedir=%{_localstatedir}/%{name} \
|
||||
--sysconfdir=%{_sysconfdir}/%{name} \
|
||||
--enable-static=no \
|
||||
--with-mysql \
|
||||
--with-postgresql \
|
||||
%if 0%{with openssl}
|
||||
--with-openssl
|
||||
%endif
|
||||
|
||||
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
||||
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
||||
|
||||
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
|
||||
%make_build RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%make_install
|
||||
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
|
||||
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/%{name}
|
||||
install -d $RPM_BUILD_ROOT%{_unitdir}
|
||||
|
|
@ -116,15 +147,8 @@ install -m 0644 %SOURCE1 $RPM_BUILD_ROOT%{_unitdir}/flow-capture.service
|
|||
install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/flow-capture
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
install -m0644 -D flow-tools.sysusers.conf %{buildroot}%{_sysusersdir}/flow-tools.conf
|
||||
|
||||
%pre
|
||||
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
|
||||
|
|
@ -135,7 +159,7 @@ exit 0
|
|||
%systemd_preun flow-capture.service
|
||||
|
||||
%postun
|
||||
%systemd_postun
|
||||
%systemd_postun flow-capture.service
|
||||
|
||||
%files
|
||||
%doc README README.fork COPYING ChangeLog
|
||||
|
|
@ -196,6 +220,7 @@ exit 0
|
|||
%attr(-,flow-tools,flow-tools) %{_localstatedir}/%{name}/
|
||||
%dir %{_datadir}/%{name}/
|
||||
%{_datadir}/%{name}/*
|
||||
%{_sysusersdir}/flow-tools.conf
|
||||
|
||||
%files devel
|
||||
%{_libdir}/*.so
|
||||
|
|
@ -211,6 +236,96 @@ exit 0
|
|||
%doc docs/*.html ChangeLog.old TODO INSTALL SECURITY
|
||||
|
||||
%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
|
||||
- Remove /bin/env deps (bug #1512889)
|
||||
- Drop tcp_wrappers support (bug #1518764)
|
||||
- Use mariadb-connector-c-devel (bug #1494095)
|
||||
- Add BR gcc
|
||||
|
||||
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.68.5.1-22
|
||||
- Escape macros in %%changelog
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-21
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-20
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-19
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Orion Poplawski <orion@cora.nwra.com> - 0.68.5.1-19
|
||||
- Build with openssl support - does not work with openssl 1.1
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-18
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.68.5.1-17
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
|
|
@ -366,7 +481,7 @@ exit 0
|
|||
- simplify %%files
|
||||
- use more macros
|
||||
- change Group to Application/System
|
||||
- own/create %{_localstatedir}/ft/
|
||||
- own/create %%{_localstatedir}/ft/
|
||||
- add BR: autoconf
|
||||
- don't need generic INSTALL
|
||||
- mark config files as such
|
||||
|
|
@ -380,10 +495,10 @@ exit 0
|
|||
- Make libft shared library
|
||||
- Split to plain/devel
|
||||
|
||||
* Fri Jan 7 2004 William Emmanuel S. Yu <wyu@ateneo.edu>
|
||||
* Fri Jan 9 2004 William Emmanuel S. Yu <wyu@ateneo.edu>
|
||||
- updated RPM file for version 0.67
|
||||
|
||||
* Tue Aug 8 2003 William Emmanuel S. Yu <wyu@ateneo.edu>
|
||||
* Tue Aug 5 2003 William Emmanuel S. Yu <wyu@ateneo.edu>
|
||||
- fixed SQL bug
|
||||
- update flow-export documentation
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue