Blob Blame History Raw
Name: argus
Version: 3.0.4
Release: 1%{?dist}
Summary: Network transaction audit tool
License: GPLv2+
Group: Applications/Internet
Url: http://qosient.com/argus
Source0: http://qosient.com/argus/src/%{name}-%{version}.tar.gz
Source1: http://qosient.com/argus/src/%{name}-clients-%{version}.1.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
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
BuildRequires: cyrus-sasl-devel tcp_wrappers flex bison ncurses-devel
BuildRequires: libpcap-devel zlib-devel
BuildRequires: systemd-units

%package clients
Summary: Client tools for argus network audit
Group: Applications/Internet

%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
Group: Applications/Internet

%description devel
Header files for argus.


%prep
%setup -a0 -q
%setup -a1 -q
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#pushd %{name}-clients-%{version}.1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
#popd
%{__install} -p -m 0644 %{SOURCE3} .

%build
%configure --with-sasl=yes --prefix=%{_prefix}
%{__make} %{?_smp_mflags}
pushd %{name}-clients-%{version}.1
%configure --with-sasl=yes --prefix=%{_prefix}
%{__make} %{?_smp_mflags}
popd

%install
%{__make} DESTDIR=%{buildroot} install
pushd %{name}-clients-%{version}.1
%{__make} DESTDIR=%{buildroot} install
# avoid unwanted dependencies when using these as docs (clients package):
find doc support ragraph -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}/%{_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
%{__sed} -i 's|#ARGUS_ACCESS_PORT|ARGUS_ACCESS_PORT|' %{buildroot}/%{_sysconfdir}/argus.conf
# avoid unwanted dependencies when using these as docs (main package):
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

%post
if [ $1 -eq 1 ] ; then 
    # Initial installation 
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi

%preun
if [ $1 -eq 0 ] ; then
    # Package removal, not upgrade
    /bin/systemctl --no-reload disable argus.service > /dev/null 2>&1 || :
    /bin/systemctl stop argus.service > /dev/null 2>&1 || :
fi

%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
    /bin/systemctl try-restart argus.service >/dev/null 2>&1 || :
fi

%triggerun -- argus < 2.0.6.fixes.1-21
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply argus
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save argus >/dev/null 2>&1 ||:

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del argus >/dev/null 2>&1 || :
/bin/systemctl try-restart argus.service >/dev/null 2>&1 || :

%files
%doc support bin/argusbug
%doc COPYING CREDITS INSTALL README VERSION
%config(noreplace) %{_sysconfdir}/argus.conf
%{_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}.1/ChangeLog %{name}-clients-%{version}.1/COPYING
%doc %{name}-clients-%{version}.1/CREDITS %{name}-clients-%{version}.1/INSTALL
%doc %{name}-clients-%{version}.1/README %{name}-clients-%{version}.1/VERSION
%doc %{name}-clients-%{version}.1/doc/CHANGES %{name}-clients-%{version}.1/doc/FAQ
%doc %{name}-clients-%{version}.1/doc/HOW-TO %{name}-clients-%{version}.1/doc/pdf
%doc %{name}-clients-%{version}.1/doc/README
%doc %{name}-clients-%{version}.1/support
%doc %{name}-clients-%{version}.1/ragraph/ragraph.pl
# .pm checked for dependencies regardless of permissions
#%doc %{name}-clients-%{version}/contrib
%doc README.fedora
%{_bindir}/ra*
%{_sbindir}/ra*
%{_mandir}/man1/ra*
%{_mandir}/man5/ra*
%{_mandir}/man8/ra*
%{_datadir}/argus/

%files devel
%{_includedir}/argus/

%changelog
* Mon Mar 19 2012 Jon Ciesla <limburgher@gmail.com> - 3.0.4-1
- Latest upstream, BZ 575984.

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6.fixes.1-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Sep  9 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.6.fixes.1-22
- add missing systemd scriptlets

* Thu Sep  8 2011 Tom Callaway <spot@fedoraproject.org> - 2.0.6.fixes.1-21
- convert to systemd

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6.fixes.1-20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Sun Oct 04 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.6.fixes.1-19
- Fix build with libpcap 1.0 (rename conflicting bpf_dump symbol, remove
  conflicting redeclaration of bpf_image)

* Wed Sep 30 2009 Gabriel Somlo <somlo at cmu.edu> - 2.0.6.fixes.1-18
- Rebuilt for libpcap.1.0

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6.fixes.1-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.6.fixes.1-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.6.fixes.1-15
- Autorebuild for GCC 4.3

* Thu Aug 16 2007 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-14
- fixed license

* Wed Nov 29 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-13
- rebuilt against libpcap 0.9.5

* Fri Sep 08 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-12
- rebuilt for FC6MassRebuild

* Thu Jun 29 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-11
- buildreq. libpcap up to fc5, libpcap-devel in fc6 and later

* Fri Apr 21 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-10
- bumped release to workaround botched CVS tag attempt

* Fri Apr 21 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-9
- daemon patches now eliminate unused common files: argus_parse.c, argus_util.c, and argus_auth.c

* Mon Mar 20 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-8
- added ncurses-devel build requirement

* Wed Mar 15 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-7
- fixed argus makefile patch

* Fri Mar 10 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-6
- argus.conf now enables listening for connections on localhost
- added README.fedora to clients subpackage explaining contrib situation and ra printing patch

* Wed Mar 08 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-5
- added patch from Peter Van Epp <vanepp@sfu.ca> to fix ra printing bugs

* Mon Mar 06 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-4
- removing execute flag from all documentation
- capture file location changed /var/argus -> /var/lib/argus
- init script set to default-disabled

* Sun Mar 05 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-3
- backed out of __perl_requires redefine for .pm files - trouble w. rpmbuild

* Fri Feb 24 2006 Gabriel Somlo <somlo at cmu.edu> 2.0.6.fixes.1-2
- 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 <somlo at cmu.edu> 2.0.6.fixes.1-1
- initial build for fedora extras