diff options
author | Paweł Gołaszewski | 2005-09-05 12:58:31 (GMT) |
---|---|---|
committer | cvs2git | 2012-06-24 12:13:13 (GMT) |
commit | abc7208742f35a424fb2eab91f409ba3ba3ff7c3 (patch) | |
tree | 56a381d984ed9780b37d16d8c532c57b71c83cb1 | |
parent | ca9d42a7628993cc39721cb099d0c2e1311284bb (diff) | |
download | postgrey-abc7208742f35a424fb2eab91f409ba3ba3ff7c3.zip postgrey-abc7208742f35a424fb2eab91f409ba3ba3ff7c3.tar.gz |
- more humanization...
Changed files:
postgrey.spec -> 1.2
-rw-r--r-- | postgrey.spec | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/postgrey.spec b/postgrey.spec index f62a4d5..8543a2b 100644 --- a/postgrey.spec +++ b/postgrey.spec @@ -1,22 +1,21 @@ Summary: Postfix Greylisting Policy Server Name: postgrey Version: 1.21 -Release: 0.1 +Release: 0.2 License: GPL Group: Daemons -Source: http://isg.ee.ethz.ch/tools/postgrey/pub/%{name}-%{version}.tar.gz -Source1: %{name}.sysv -Patch: postgrey-group.patch +Source0: http://isg.ee.ethz.ch/tools/postgrey/pub/%{name}-%{version}.tar.gz +# Source0-md5: 1274e073be5178445e0892a9dcc6fe98 +Source1: %{name}.init +Patch: %{name}-group.patch URL: http://isg.ee.ethz.ch/tools/postgrey/ Buildarch: noarch Prereq: perl, perl-IO-Multiplex, perl-Net-Server, perl-BerkeleyDB +Requires: postfix BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define confdir /etc/postfix -%define uid 95 -%define gid 95 - %description Postgrey is a Postfix policy server implementing greylisting. @@ -61,34 +60,34 @@ install contrib/postgreyreport $RPM_BUILD_ROOT%{_sbindir} rm -rf $RPM_BUILD_ROOT %pre -if [ $1 -eq 1 ]; then - %{_sbindir}/groupadd -g %{gid} -r %{name} &>/dev/null || : - %{_sbindir}/useradd -d %{_var}/spool/postfix/%{name} -s /sbin/nologin -u %{uid} -g %{gid} -M -r %{name} 2>/dev/null || : -fi +%groupadd -g 155 postgrey +%useradd -u 155 -d %{_var}/spool/postfix/%{name} -s /sbin/false -c "Postfix Greylisting Policy" -g postgrey postgrey %post /sbin/chkconfig --add %{name} %preun if [ $1 -eq 0 ]; then - /sbin/service %{name} stop &>/dev/null || : + if [ -f /var/lock/subsys/%{name} ]; then + /etc/rc.d/init.d/%{name} stop >&2 + fi /sbin/chkconfig --del %{name} fi %postun if [ $1 -eq 0 ]; then - %{_sbindir}/userdel %{name} 2>/dev/null || : - %{_sbindir}/groupdel %{name} 2>/dev/null || : - %{__rm} -rf %{_var}/spool/postfix/%{name} + %userremove postgrey + %groupremove postgrey + # should be done?: + rm -rf %{_var}/spool/postfix/%{name} fi - %files -%defattr(-,root,root) +%defattr(644,root,root,755) %doc README Changes COPYING -%{_initrddir}/%{name} -%config(noreplace) %{confdir}/postgrey_whitelist_clients -%config(noreplace) %{confdir}/postgrey_whitelist_recipients -%config(noreplace) %{confdir}/postgrey_whitelist_clients.local -%{_sbindir}/postgrey* +%config(noreplace) %verify(not md5 mtime size) %{confdir}/postgrey_whitelist_clients +%config(noreplace) %verify(not md5 mtime size) %{confdir}/postgrey_whitelist_recipients +%config(noreplace) %verify(not md5 mtime size) %{confdir}/postgrey_whitelist_clients.local +%attr(754,root,root) /etc/rc.d/init.d/%{name} +%attr(755,root,root) %{_sbindir}/postgrey* %dir %attr(0711, postgrey, postgrey) %{_var}/spool/postfix/%{name} |