Compare commits

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

2 commits

Author SHA1 Message Date
Tom "spot" Callaway
ac778d9b7f add missing scriptlets 2011-09-09 12:24:51 -04:00
Tom "spot" Callaway
ec6b075c55 convert to systemd 2011-09-08 15:53:34 -04:00
2 changed files with 48 additions and 22 deletions

12
argus.service Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=Argus generates network transaction audit records
After=syslog.target network.target
[Service]
Type=forking
PIDFile=/var/run/argus.pid
ExecStart=/usr/sbin/argus -d
[Install]
WantedBy=multi-user.target

View file

@ -1,13 +1,13 @@
Name: argus
Version: 2.0.6.fixes.1
Release: 20%{?dist}
Release: 22%{?dist}
Summary: Network transaction audit tool
License: GPLv2+
Group: Applications/Internet
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
Source2: argus.service
Source3: README.fedora
Patch0: argus-2.0.6.fixes.1-makefile.patch
Patch1: argus-2.0.6.fixes.1-build.patch
@ -17,11 +17,13 @@ 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
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
BuildRequires: systemd-units
%package clients
Summary: Client tools for argus network audit
@ -58,7 +60,6 @@ pushd %{name}-clients-%{version}
popd
%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install
pushd %{name}-clients-%{version}
%{__make} DESTDIR=%{buildroot} install
@ -69,7 +70,7 @@ popd
%{__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 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
@ -77,34 +78,41 @@ popd
# avoid unwanted dependencies when using these as docs (main package):
find support -type f -exec chmod a-x '{}' \;
%clean
%{__rm} -rf %{buildroot}
%post
# only post-install
if [ $1 -le 1 ]; then
/sbin/chkconfig --add argus
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun
# only pre-erase
if [ $1 -eq 0 ]; then
/sbin/service argus stop >/dev/null 2>&1
/sbin/chkconfig --del argus
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
# only postun-upgrade
if [ $1 -ge 1 ]; then
/sbin/service argus condrestart >/dev/null 2>&1
/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
%defattr(-,root,root)
%doc support doc/CHANGES doc/FAQ doc/HOW-TO doc/html bin/argusbug
%doc COPYING CREDITS INSTALL README VERSION
%config(noreplace) %{_sysconfdir}/argus.conf
%{_initrddir}/argus
%{_unitdir}/argus.service
%{_sbindir}/argus*
%{_mandir}/man5/argus*
%{_mandir}/man8/argus*
@ -127,6 +135,12 @@ fi
%{_mandir}/man5/ra*
%changelog
* 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