diff --git a/.gitignore b/.gitignore index 95783a2..9ee1f46 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,10 @@ argus-2.0.6.fixes.1.tar.gz argus-clients-2.0.6.fixes.1.tar.gz +/argus-3.0.4.tar.gz +/argus-clients-3.0.4.1.tar.gz +/argus-3.0.6.1.tar.gz +/argus-clients-3.0.6.2.tar.gz +/argus-3.0.8.tar.gz +/argus-clients-3.0.8.tar.gz +/argus-3.0.8.2.tar.gz +/argus-clients-3.0.8.2.tar.gz diff --git a/argus-configure-c99.patch b/argus-configure-c99.patch new file mode 100644 index 0000000..cfa740c --- /dev/null +++ b/argus-configure-c99.patch @@ -0,0 +1,38 @@ +Include relevant headers to avoid implicit function declarations. +Declare the return type of main to avoid an implicit int. + +Submitted upstream: + + + + +diff -ur argus-3.0.8.2.orig/acsite.m4 argus-3.0.8.2/acsite.m4 +--- argus-3.0.8.2.orig/acsite.m4 2015-04-14 16:32:33.000000000 +0200 ++++ argus-3.0.8.2/acsite.m4 2022-11-25 18:44:48.934763450 +0100 +@@ -298,8 +298,10 @@ + # include + # include + # include ++# include ++# include + unsigned char a[[5]] = { 1, 2, 3, 4, 5 }; +- main() { ++ int main() { + unsigned int i; + pid_t pid; + int status; +diff -ur argus-3.0.8.2.orig/configure argus-3.0.8.2/configure +--- argus-3.0.8.2.orig/configure 2016-06-01 20:29:33.000000000 +0200 ++++ argus-3.0.8.2/configure 2022-11-25 18:44:56.248688727 +0100 +@@ -5789,8 +5789,10 @@ + # include + # include + # include ++# include ++# include + unsigned char a[5] = { 1, 2, 3, 4, 5 }; +- main() { ++ int main() { + unsigned int i; + pid_t pid; + int status; diff --git a/argus-tirpc.patch b/argus-tirpc.patch new file mode 100644 index 0000000..2eec2fb --- /dev/null +++ b/argus-tirpc.patch @@ -0,0 +1,11 @@ +--- common/Makefile.in~ 2015-04-14 09:32:33.000000000 -0500 ++++ common/Makefile.in 2018-03-16 11:32:06.395595496 -0500 +@@ -35,7 +35,7 @@ + + CC = @CC@ + CCOPT = @V_CCOPT@ +-INCLS = -I$(srcdir) @V_INCLS@ -I$(srcdir)/../include -I$(srcdir)/../argus ++INCLS = -I$(srcdir) @V_INCLS@ -I$(srcdir)/../include -I$(srcdir)/../argus -I/usr/include/tirpc + DEFS = @DEFS@ + + # Standard CFLAGS diff --git a/argus.cron b/argus.cron new file mode 100644 index 0000000..f79a706 --- /dev/null +++ b/argus.cron @@ -0,0 +1,8 @@ +#!/bin/sh +ARGUSPATH=/var/lib/argus + +# rotate and keep a copy of the argus log +cd $ARGUSPATH +mv argus.out archive/argus.out.`date +%Y-%m-%d` +gzip archive/argus.out.`date +%Y-%m-%d` +/sbin/tmpwatch -m 366d $ARGUSPATH/archive diff --git a/argus.logrotate b/argus.logrotate new file mode 100644 index 0000000..e42b898 --- /dev/null +++ b/argus.logrotate @@ -0,0 +1,8 @@ +# logrotate configuration file for package argus +/var/lib/argus/argus.out { + daily + rotate 366 + missingok + olddir /var/lib/argus/archive + compress +} diff --git a/argus.service b/argus.service new file mode 100644 index 0000000..c097432 --- /dev/null +++ b/argus.service @@ -0,0 +1,11 @@ +[Unit] +Description=Argus generates network transaction audit records +After=syslog.target network.target + +[Service] +PIDFile=/var/run/argus.pid +ExecStart=/usr/sbin/argus -d + +[Install] +WantedBy=multi-user.target + diff --git a/argus.spec b/argus.spec index e2bbd07..3b01955 100644 --- a/argus.spec +++ b/argus.spec @@ -1,31 +1,31 @@ +%define _hardened_build 1 +%global clientversion 3.0.8.2 Name: argus -Version: 2.0.6.fixes.1 -Release: 19%{?dist} +Version: 3.0.8.2 +Release: 29%{?dist} Summary: Network transaction audit tool -License: GPLv2+ -Group: Applications/Internet +License: GPL-2.0-or-later Url: http://qosient.com/argus -Source0: ftp://ftp.qosient.com/dev/argus-2.0/%{name}-%{version}.tar.gz -Source1: ftp://ftp.qosient.com/dev/argus-2.0/%{name}-clients-%{version}.tar.gz -Source2: argus.init +Source0: http://qosient.com/argus/src/%{name}-%{version}.tar.gz +Source1: http://qosient.com/argus/src/%{name}-clients-%{clientversion}.tar.gz +Source2: argus.service Source3: README.fedora -Patch0: argus-2.0.6.fixes.1-makefile.patch -Patch1: argus-2.0.6.fixes.1-build.patch -# bpf_dump conflicts with a function with slightly different prototype (added -# const) in libpcap 1.0 -Patch2: argus-2.0.6.fixes.1-libpcap10.patch -Patch3: argus-clients-2.0.6.fixes.1-makefile.patch -Patch4: argus-clients-2.0.6.fixes.1-build.patch -Patch5: argus-clients-2.0.6.fixes.1-print.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig -BuildRequires: cyrus-sasl-devel tcp_wrappers flex bison ncurses-devel -BuildRequires: libpcap-devel +Source4: argus.logrotate +Patch0: argus-tirpc.patch +Patch1: common.patch +Patch2: argus-configure-c99.patch +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +Requires: logrotate +BuildRequires: gcc autoconf automake +BuildRequires: cyrus-sasl-devel perl-generators flex bison ncurses-devel +BuildRequires: libpcap-devel zlib-devel libtirpc-devel readline-devel +BuildRequires: systemd-units +BuildRequires: make %package clients Summary: Client tools for argus network audit -Group: Applications/Internet %description Argus (Audit Record Generation and Utilization System) is an IP network @@ -36,40 +36,46 @@ management. %description clients Clients to the argus probe which process and display information. +%package devel +Summary: Header files for argus network audit + +%description devel +Header files for argus. + + %prep -%setup -a0 -%setup -a1 -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -pushd %{name}-clients-%{version} -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +%setup -a0 -q +%setup -a1 -q +%patch -P0 -p0 +%patch -P1 -p0 +%patch -P2 -p1 +pushd %{name}-clients-%{clientversion} +%patch -P2 -p1 popd %{__install} -p -m 0644 %{SOURCE3} . %build -%configure --with-sasl=yes -%{__make} %{?_smp_mflags} -pushd %{name}-clients-%{version} -%configure --with-sasl=yes +autoreconf -if +export CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc -fcommon" +export CXXFLAGS="$CXXFLAGS -fcommon" +%configure --with-sasl=yes --prefix=%{_prefix} +find . -type f -name 'Makefile' | xargs sed -i s/fcf-protection/fcf-protection\ -fcommon/g +pushd %{name}-clients-%{clientversion} +%configure --with-sasl=yes --prefix=%{_prefix} %{__make} %{?_smp_mflags} popd %install -%{__rm} -rf %{buildroot} %{__make} DESTDIR=%{buildroot} install -pushd %{name}-clients-%{version} +pushd %{name}-clients-%{clientversion} %{__make} DESTDIR=%{buildroot} install # avoid unwanted dependencies when using these as docs (clients package): -find doc contrib support ragraph -type f -exec chmod a-x '{}' \; +find support -type f -exec chmod a-x '{}' \; popd %{__rm} -rf %{buildroot}/%{_libdir} -%{__rm} -rf %{buildroot}/%{_bindir}/ragraph %{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/lib/argus/archive %{__install} -D -m 0644 support/Config/argus.conf %{buildroot}/%{_sysconfdir}/argus.conf -%{__install} -D -m 0755 %{SOURCE2} %{buildroot}/%{_initrddir}/argus +%{__install} -D -m 0644 %{SOURCE2} %{buildroot}/%{_unitdir}/argus.service # fix up argus.conf to a good default %{__sed} -i 's|var/log/argus|var/lib/argus|' %{buildroot}/%{_sysconfdir}/argus.conf %{__sed} -i 's|#ARGUS_BIND_IP|ARGUS_BIND_IP|' %{buildroot}/%{_sysconfdir}/argus.conf @@ -77,56 +83,201 @@ popd # avoid unwanted dependencies when using these as docs (main package): find support -type f -exec chmod a-x '{}' \; -%clean -%{__rm} -rf %{buildroot} +rm -rf %{buildroot}/usr/share/doc/argus-clients-3.0/ +mv %{buildroot}/usr/argus %{buildroot}%{_datadir}/argus + +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d +%{__install} -p -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/argus %post -# only post-install -if [ $1 -le 1 ]; then - /sbin/chkconfig --add argus -fi +%systemd_post argus.service %preun -# only pre-erase -if [ $1 -eq 0 ]; then - /sbin/service argus stop >/dev/null 2>&1 - /sbin/chkconfig --del argus -fi +%systemd_preun argus.service %postun -# only postun-upgrade -if [ $1 -ge 1 ]; then - /sbin/service argus condrestart >/dev/null 2>&1 -fi +%systemd_postun_with_restart argus.service %files -%defattr(-,root,root) -%doc support doc/CHANGES doc/FAQ doc/HOW-TO doc/html bin/argusbug -%doc COPYING CREDITS INSTALL README VERSION +%doc support bin/argusbug +%doc CREDITS INSTALL README VERSION +%license COPYING %config(noreplace) %{_sysconfdir}/argus.conf -%{_initrddir}/argus -%{_sbindir}/argus* +%config(noreplace) %{_sysconfdir}/logrotate.d/argus +%{_unitdir}/argus.service +%{_bindir}/argus* +%{_sbindir}/argus %{_mandir}/man5/argus* %{_mandir}/man8/argus* %dir %{_localstatedir}/lib/argus %dir %{_localstatedir}/lib/argus/archive %files clients -%doc %{name}-clients-%{version}/ChangeLog %{name}-clients-%{version}/COPYING -%doc %{name}-clients-%{version}/CREDITS %{name}-clients-%{version}/INSTALL -%doc %{name}-clients-%{version}/README %{name}-clients-%{version}/VERSION -%doc %{name}-clients-%{version}/doc/CHANGES %{name}-clients-%{version}/doc/FAQ -%doc %{name}-clients-%{version}/doc/HOW-TO %{name}-clients-%{version}/doc/html -%doc %{name}-clients-%{version}/support -%doc %{name}-clients-%{version}/ragraph/ragraph.pl -# .pm checked for dependencies regardless of permissions -#%doc %{name}-clients-%{version}/contrib +%doc %{name}-clients-%{clientversion}/ChangeLog %{name}-clients-%{clientversion}/COPYING +%doc %{name}-clients-%{clientversion}/CREDITS %{name}-clients-%{clientversion}/INSTALL +%doc %{name}-clients-%{clientversion}/README %{name}-clients-%{clientversion}/VERSION +%doc %{name}-clients-%{clientversion}/support %doc README.fedora %{_bindir}/ra* +%{_sbindir}/ra* %{_mandir}/man1/ra* %{_mandir}/man5/ra* +%{_mandir}/man8/ra* +%{_datadir}/argus/ + +%files devel +%{_includedir}/argus/ %changelog +* Fri Jan 16 2026 Fedora Release Engineering - 3.0.8.2-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Wed Jul 23 2025 Fedora Release Engineering - 3.0.8.2-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Thu Jan 16 2025 Fedora Release Engineering - 3.0.8.2-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Jul 17 2024 Fedora Release Engineering - 3.0.8.2-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 3.0.8.2-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 3.0.8.2-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jul 19 2023 Fedora Release Engineering - 3.0.8.2-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Mar 07 2023 Gwyn Ciesla - 3.0.8.2-22 +- migrated to SPDX license + +* Wed Jan 18 2023 Fedora Release Engineering - 3.0.8.2-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Nov 25 2022 Florian Weimer - 3.0.8.2-20 +- Port configure scripts to C99 + +* Wed Jul 20 2022 Fedora Release Engineering - 3.0.8.2-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 3.0.8.2-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 3.0.8.2-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 3.0.8.2-16 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + +* Tue Jan 26 2021 Fedora Release Engineering - 3.0.8.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 3.0.8.2-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jan 31 2020 Gwyn Ciesla - 3.0.8.2-13 +- Fix FTBFS + +* Tue Jan 28 2020 Fedora Release Engineering - 3.0.8.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jul 24 2019 Fedora Release Engineering - 3.0.8.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 17 2019 Igor Gnatenko - 3.0.8.2-10 +- Rebuild for readline 8.0 + +* Thu Jan 31 2019 Fedora Release Engineering - 3.0.8.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 3.0.8.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Mar 16 2018 Gwyn Ciesla - 3.0.8.2-7 +- Migrate to libtirpc. + +* Fri Feb 09 2018 Igor Gnatenko - 3.0.8.2-6 +- Escape macros in %%changelog + +* Wed Feb 07 2018 Fedora Release Engineering - 3.0.8.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 3.0.8.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 3.0.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 3.0.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jun 07 2016 Jon Ciesla - 3.0.8.2-1 +- 3.0.8.2, BZ 1341870. + +* Mon May 02 2016 Jon Ciesla - 3.0.8-6 +- Only have logrotate compress argus logs, not all logs. BZ 1332098. + +* Wed Feb 03 2016 Fedora Release Engineering - 3.0.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 04 2016 Jon Ciesla - 3.0.8-4 +- Switch from cron to logrotate, BZ 1266304. +- Removed systemd migration cruft. + +* Tue Sep 15 2015 Jon Ciesla - 3.0.8-3 +- Introduce new systemd-rpm macros in argus spec file, BZ 850029 +- Missing argus client: ragraph, BZ 1152650 +- Add cron.daily rotation of argus data file, BZ 1219565 +- remove executable permission bits from argus.service, BZ 1252117 + +* Wed Jun 17 2015 Fedora Release Engineering - 3.0.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Sep 04 2014 Jon Ciesla - 3.0.8-1 +- Latest upstream, BZ 1138240. + +* Fri Aug 15 2014 Fedora Release Engineering - 3.0.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 3.0.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 3.0.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 17 2013 Petr Pisar - 3.0.6.1-2 +- Perl 5.18 rebuild + +* Wed Feb 27 2013 Jon Ciesla - 3.0.6.1-1 +- Latest upstream, BZ 915190. + +* Wed Feb 13 2013 Fedora Release Engineering - 3.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 3.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Apr 12 2012 Jon Ciesla - 3.0.4-2 +- Add hardened build. + +* Mon Mar 19 2012 Jon Ciesla - 3.0.4-1 +- Latest upstream, BZ 575984. + +* Thu Jan 12 2012 Fedora Release Engineering - 2.0.6.fixes.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Sep 9 2011 Tom Callaway - 2.0.6.fixes.1-22 +- add missing systemd scriptlets + +* Thu Sep 8 2011 Tom Callaway - 2.0.6.fixes.1-21 +- convert to systemd + +* Mon Feb 07 2011 Fedora Release Engineering - 2.0.6.fixes.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Oct 04 2009 Kevin Kofler - 2.0.6.fixes.1-19 - Fix build with libpcap 1.0 (rename conflicting bpf_dump symbol, remove conflicting redeclaration of bpf_image) @@ -183,7 +334,7 @@ fi - backed out of __perl_requires redefine for .pm files - trouble w. rpmbuild * Fri Feb 24 2006 Gabriel Somlo 2.0.6.fixes.1-2 -- empty perl_req/prov avoids .pm's in %doc from being dep-checked at all +- empty perl_req/prov avoids .pm's in %%doc from being dep-checked at all - misc spec file fixes * Fri Feb 24 2006 Gabriel Somlo 2.0.6.fixes.1-1 diff --git a/common.patch b/common.patch new file mode 100644 index 0000000..37ec3b9 --- /dev/null +++ b/common.patch @@ -0,0 +1,11 @@ +--- argus/ArgusUdt.c~ 2015-06-29 15:17:25.000000000 -0500 ++++ argus/ArgusUdt.c 2020-02-19 10:45:00.768211138 -0600 +@@ -41,7 +41,7 @@ + #include + + #include +-struct bootp *bp; ++extern struct bootp *bp; + + struct ArgusSystemFlow * + ArgusCreateUDTFlow (struct ArgusModelerStruct *model, struct udt_header *udt) diff --git a/sources b/sources index 8e0d5eb..2980a7a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -b90b8ea951fd0e2193b9a6bab565a139 argus-2.0.6.fixes.1.tar.gz -59f65159070f849211685513384fa90f argus-clients-2.0.6.fixes.1.tar.gz +eaf5f5ec66569e556392802a70ef9ca5 argus-3.0.8.2.tar.gz +09f453e3e581587cd69bc2c2b52d5c0a argus-clients-3.0.8.2.tar.gz