rpms/sagator/devel sagator.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Ján ONDREJ (ondrejj) fedora-extras-commits at redhat.com
Fri Jan 25 19:30:16 UTC 2008


Author: ondrejj

Update of /cvs/pkgs/rpms/sagator/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15563/devel

Modified Files:
	.cvsignore sources 
Added Files:
	sagator.spec 
Log Message:
First release


--- NEW FILE sagator.spec ---
%define CHROOTDIR %{_var}/spool/vscan
%define BASE_LIBS glibc,libgcc,expat,libstdc++,zlib,bzip2-libs,cracklib,cracklib-dicts
%define ARCHIVERS tar,arc,unace,unrar,rar,zoo,unarj,arj,unzip,zip,gzip,bzip2
%define ANTIVIRS clamav,clamav-libs,avglinux,nod32ls,nod32lfs,kav4mailservers-linux
%define ANTISPAMS bogofilter,qsf

Summary:   SAGATOR - antivir/antispam gateway for smtp server
Name:      sagator
Version:   1.0.0
Release:   1%{?dist}
Source:    http://www.salstar.sk/pub/antivir/snapshots/sagator-%{version}.tar.bz2
URL:       http://www.salstar.sk/sagator/
License:   GPLv2+
Group:     System Environment/Daemons
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel >= 2.2.2, ed, gettext
Requires:  python >= 2.2.2, sed
%if %_vendor == "suse"
Requires:  aaa_base, smtp_daemon
BuildRequires: aaa_base, python-xml
%else
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires:  initscripts, smtpdaemon, shadow-utils
BuildRequires: initscripts, logwatch

# SElinux policy for Fedoras and RHEL>=5
%if 0%{?fedora} || 0%{?rhel} >= 5
BuildRequires: selinux-policy-devel
# SElinux directory and policy package
%define sedir %{_datadir}/%{name}/selinux
%define sepolicy %{sedir}/%{name}.pp
%endif

%endif

%description
This program is an email antivirus/antispam gateway. It is an interface to
the postfix, sendmail, or any other smtpd, which runs antivirus and/or
spamchecker. Its modular architecture can use any combination of
antivirus/spamchecker according to configuration.

It has some internal checkers (string_scanner and regexp_scanner). Sagator
can parse MIME mails and decompress archives, if it is configured so.

Features:
    * modular antivirus/spamchecker support
    * you don't need any perl modules or any other modules, only python
    * you can return any quarantined mail to mailq/user mailbox
    * mailbox/maildir scanning and cleaning
    * smtp policy service (greylist)
    * nice statistics via RRDTOOL or MRTG
    * web-quarantine access for users
    * daily reports for users
    * SQL database logging and configuration
    * simple chroot support

%package webq
Summary:        SAGATOR's web quarantine access
Group:          System Environment/Daemons
Requires:       sagator = %{version}-%{release}, python-kid >= 0.9.5
BuildRequires:  python-kid

%description webq
SAGATOR's web quarantine access can be used to allow users (or admin)
to access their emails in sagator's quarantine.

%prep
%setup -q

%build
sh configure --prefix=%{_prefix} --filelist
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} PREFIX=%{_prefix} install
rm -f %{buildroot}%{_datadir}/sagator/etc/sgconf.py* \
  scripts/mkchroot.sh scripts/graphs/*.in
touch %{buildroot}%{_datadir}/%{name}/etc/sgconf.py_
ln -s ../../../..%{_sysconfdir}/sagator.conf \
  %{buildroot}%{_datadir}/%{name}/etc/sgconf.py
mkdir -p %{buildroot}%{CHROOTDIR}/tmp/quarantine
# add SElinux policy
if [ -e %{buildroot}%{sepolicy} ]; then
  echo "%dir %{sedir}" >> filelist
  echo "%{sepolicy}" >> filelist
fi
%find_lang %{name}

%pre
getent group vscan >/dev/null || groupadd -r vscan
getent passwd vscan >/dev/null || \
useradd -r -g vscan -d %{CHROOTDIR} -s /sbin/nologin -c "SAGATOR" vscan
exit 0

%post
touch %{_var}/lib/sagator-mkchroot
if [ $1 = 2 ]; then # upgrade
  [ -f %{_sysconfdir}/sysconfig/sagator ] && . %{_sysconfdir}/sysconfig/sagator || true
  # update configuration
  %{_datadir}/sagator/updatecfg.py || true
  if [ "$RESTART" = "auto" ]; then
    # restart sagator
    %{_initrddir}/sagator try-restart >/dev/null 2>&1 || true
  fi
else # install
  if [ -x /sbin/chkconfig ]; then
    chkconfig --add sagator
  elif [ -x /sbin/insserv ]; then
    insserv sagator
  fi
  # selinux
  [ ! -x %{_sbindir}/semodule ] || [ ! -x %{_sbindir}/sestatus ] || 
    [ ! -x %{_sbindir}/selinuxenabled ] || ! %{_sbindir}/selinuxenabled || \
      [ ! -e %{sepolicy} ] || \
        %{_sbindir}/semodule -i %{sepolicy} \
          >/dev/null 2>/dev/null
fi

%preun
if [ $1 = 0 ]; then # uninstall
  # stop service
  %{_initrddir}/sagator stop >/dev/null 2>&1
  # remove init script symlinks
  if [ -x /sbin/chkconfig ]; then
    chkconfig --del sagator
  elif [ -x /sbin/insserv ]; then
    insserv -r sagator
  fi
fi

%triggerin -- sagator-webq,%{BASE_LIBS},%{ARCHIVERS},%{ANTIVIRS},%{ANTISPAMS}
touch %{_var}/lib/sagator-mkchroot

%triggerpostun -- sagator-webq,%{BASE_LIBS},%{ARCHIVERS},%{ANTIVIRS},%{ANTISPAMS}
touch %{_var}/lib/sagator-mkchroot

%clean
rm -rf %{buildroot}

%files -f filelist
%defattr(-,root,root)
%config(noreplace) %verify(not md5 size mtime) %attr(640,root,vscan) %{_sysconfdir}/%{name}.conf
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/*/conf.d/%{name}.conf
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mrtg/%{name}.cfg
%{_initrddir}/%{name}
%config(noreplace) %verify(not md5 size mtime) %attr(644,root,root) %{_sysconfdir}/cron.d/%{name}
%doc doc/README doc/FAQ doc/*.txt doc/*.html TODO COPYING ChangeLog test
%doc scripts/db scripts/graphs scripts/*.sh
%{_bindir}/*
%{_sbindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*.py*
%dir %attr(750,root,vscan) %{_datadir}/%{name}/etc
%{_datadir}/%{name}/etc/*.py*
%exclude %{_datadir}/%{name}/etc/sgconf.py?
%dir %{_datadir}/%{name}/av
%{_datadir}/%{name}/av/*.py*
%dir %{_datadir}/%{name}/as
%{_datadir}/%{name}/as/*.py*
%dir %{_datadir}/%{name}/interscan
%{_datadir}/%{name}/interscan/*.py*
%dir %{_datadir}/%{name}/srv
%{_datadir}/%{name}/srv/*.py*
%{_mandir}/man*/*
%dir %{CHROOTDIR}
%attr(1777,vscan,vscan) %dir %{CHROOTDIR}/tmp
%attr(0770,vscan,vscan) %dir %{CHROOTDIR}/tmp/quarantine

%files webq -f sagator.lang
%dir %{_datadir}/%{name}/srv/web
%{_datadir}/%{name}/srv/web/*.py*
%{_datadir}/%{name}/srv/web/*.kid

%changelog
* Fri Jan 3 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.0.0-1
- /var/spool/vscan replaced by CHROOTDIR macro
- posttrans section moved to init script (start section)
- more macros used

* Thu Jan 3 2008 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.0.0-0beta32
- clean buildroot before install
- sagator.conf symlink is now relative

* Fri Sep 7 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> - 1.0.0-0beta31
- sagator moved from /usr/lib to /usr/share

* Fri Apr 13 2007 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- added sagator.pp selinux policy file and post-install script

* Wed Dec 27 2006 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- added GPG public key

* Tue Sep 05 2006 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- added gcc build-require for suse package
- better build for unstable releases
- postfix autoconfigure messages
- crontab modification moved to /etc/cron.d/ directory
- mrtg triggers removed
- removed clamav a dspam stuff
- fixed permissions for sagator.conf
- postfix autoconfiguration moved into documentation

* Sun Nov 20 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- suse support
- proper pathes for logwatch 0.7 scripts

* Sun Aug 28 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- configuration moved into config directory

* Fri Aug 05 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- script documentation added

* Mon Jul 18 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- new description
- changed dependecy from postfix to smtpdaemon

* Sun Jun 26 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- changes recommended by Fedora Extras Packaging Guidelines

* Mon May 30 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- web directory added

* Mon Apr 11 2005 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- postinstall script fix to update master.cf properly

* Mon Dec 20 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- Documentation moved into doc directory.
- man pages added
- dspam module

* Sun Nov  7 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- chkconfig is started only on install (not upgrade)
- sagator is restarted only when RESTART=auto is configured in sysconfig
- You will be able ... message will show only on install
- Fedora Core 3 yum.repos.d autodetect

* Thu Aug 26 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- logrotate script added

* Thu Aug  6 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- srv/* added
- updatecfg.py in postinstall script

* Tue Jul  6 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- mrtg script added

* Mon May 31 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- cron script is now as configuration script (not replaced)

* Thu Apr 29 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- added triggers

* Tue Apr 13 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- /var/spool/vscam/tmp permission fix

* Wed Feb  4 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- postfix requirement added
- fixed scriptlet fail when postfix is not started
- testing programs added to documentation

* Wed Jan 28 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- configs are not replaced

* Mon Jan 19 2004 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- added sysconfig file
- added logrotate files
- config moved into /etc and symlink into /usr/lib/sagator

* Fri Oct 31 2003 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- added mrtg.cfg and index.html
- making of chroot removed on upgrading

* Thu Sep 18 2003 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- postfix is not reloaded, when sagator is upgrading

* Tue Jun 10 2003 Jan ONDREJ (SAL) <ondrejj(at)salstar.sk>
- first release


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/sagator/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	24 Jan 2008 22:26:32 -0000	1.1
+++ .cvsignore	25 Jan 2008 19:29:39 -0000	1.2
@@ -0,0 +1 @@
+sagator-1.0.0.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/sagator/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	24 Jan 2008 22:26:32 -0000	1.1
+++ sources	25 Jan 2008 19:29:39 -0000	1.2
@@ -0,0 +1 @@
+bf14d88d95645c41c489350bad74e1de  sagator-1.0.0.tar.bz2




More information about the fedora-extras-commits mailing list