diff --git a/argus-3.0.8.2.tar.gz b/argus-3.0.8.2.tar.gz new file mode 100644 index 0000000..14cb58d Binary files /dev/null and b/argus-3.0.8.2.tar.gz differ diff --git a/argus-clients-3.0.8.2.tar.gz b/argus-clients-3.0.8.2.tar.gz new file mode 100644 index 0000000..19ddda7 Binary files /dev/null and b/argus-clients-3.0.8.2.tar.gz differ 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.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 new file mode 100644 index 0000000..19b172c --- /dev/null +++ b/argus.spec @@ -0,0 +1,113 @@ +%define _hardened_build 1 +%global clientversion 3.0.8.2 +Name: argus +Version: 3.0.8.2 +Release: 1 +Summary: Network transaction audit tool +License: GPLv2+ +Url: http://qosient.com/argus +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: argus.logrotate +Patch0: argus-tirpc.patch +Patch1: common.patch +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +Requires: logrotate +BuildRequires: gcc autoconf automake cyrus-sasl-devel perl-generators flex bison ncurses-devel +BuildRequires: libpcap-devel zlib-devel libtirpc-devel readline-devel systemd-units make + +%package clients +Summary: Client tools for argus network audit +%description +Argus (Audit Record Generation and Utilization System) is an IP network +transaction audit tool. The data generated by argus can be used for a +wide range of tasks such as network operations, security and performance +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 -q +%setup -a1 -q +%patch0 -p0 +%patch1 -p0 + +%build +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 +%{__make} DESTDIR=%{buildroot} install +pushd %{name}-clients-%{clientversion} +%{__make} DESTDIR=%{buildroot} install +find support -type f -exec chmod a-x '{}' \; +popd +%{__rm} -rf %{buildroot}/%{_libdir} +%{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/lib/argus/archive +%{__install} -D -m 0644 support/Config/argus.conf %{buildroot}/%{_sysconfdir}/argus.conf +%{__install} -D -m 0644 %{SOURCE2} %{buildroot}/%{_unitdir}/argus.service +%{__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 +%{__sed} -i 's|#ARGUS_ACCESS_PORT|ARGUS_ACCESS_PORT|' %{buildroot}/%{_sysconfdir}/argus.conf +find support -type f -exec chmod a-x '{}' \; +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 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/argus + +%post +%systemd_post argus.service + +%preun +%systemd_preun argus.service + +%postun +%systemd_postun_with_restart argus.service + +%files +%doc support bin/argusbug +%doc CREDITS INSTALL README VERSION +%license COPYING +%config(noreplace) %{_sysconfdir}/argus.conf +%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-%{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 +%{_bindir}/ra* +%{_sbindir}/ra* +%{_mandir}/man1/ra* +%{_mandir}/man5/ra* +%{_mandir}/man8/ra* +%{_datadir}/argus/ + +%files devel +%{_includedir}/argus/ + +%changelog +* Mon Sep 6 2021 wulei - 3.0.8.2-1 +- package init 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)