]> git.pld-linux.org Git - packages/exim.git/blobdiff - exim.spec
- massive attack: source-md5
[packages/exim.git] / exim.spec
index 5fd243f24ce3d65a16a6a81653ed3d0d741da18b..9eb73bb638a4ab1d12f68e424f4877d8d632960e 100644 (file)
--- a/exim.spec
+++ b/exim.spec
@@ -12,27 +12,35 @@ Summary(pt_BR):     Servidor de correio eletr
 Name:          exim
 Version:       4.20
 Release:       1
-Epoch:         1
+Epoch:         2
 License:       GPL
 Group:         Networking/Daemons
 Source0:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-%{version}.tar.bz2
+# Source0-md5: 90f9e876b60d00c0a5dd53ece7c85338
 Source1:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-%{version}.tar.bz2
+# Source1-md5: debc6d3fdd88fd6d9c646ca0495fa92d
 Source2:       %{name}.init
 Source3:       %{name}.cron.db
 Source4:       %{name}4.conf
 Source5:       analyse-log-errors
 Source6:       %{name}on.desktop
 Source7:       http://duncanthrax.net/exiscan/exiscan-%{exiscan_version}.tar.gz
+# Source7-md5: a18eb772895af7b190d17c5b151d4dd9
 # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/
 Source8:       %{name}4-man-021016.tar.bz2
+# Source8-md5: b552704ebf853a401946038a2b7e8e98
 Source9:       %{name}.aliases
 Source10:      newaliases
 Source11:      %{name}.logrotate
+# Source11-md5:        c58826def40346daeee6709d88f48309
 Source12:      %{name}.sysconfig
+# Source12-md5:        caafa78d68a914657798633a592999bd
 # 20020326: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2
 Source13:      %{name}4-FAQ.txt.bz2
+# Source13-md5:        6ae34c36679bd423b32643464a06c4fd
 # 20020326: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2
 Source14:      %{name}4-config.samples.tar.bz2
+# Source14-md5: 918b390124cfc7515ba262e49bee750f
 Patch0:                %{name}4-EDITME.patch
 Patch1:                %{name}4-monitor-EDITME.patch
 Patch2:                %{name}4-texinfo.patch
@@ -52,7 +60,12 @@ BuildRequires:       pcre-devel
 BuildRequires: perl-devel >= 5.6.0
 BuildRequires: texinfo
 PreReq:                rc-scripts
-Requires(pre): user-exim
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
 Provides:      smtpdaemon
@@ -187,6 +200,25 @@ touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+if [ -n "`/usr/bin/getgid exim`" ]; then
+       if [ "`getgid exim`" != "79" ]; then
+               echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/groupadd -g 79 -r -f exim
+fi
+
+if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then
+       if [ "`id -u exim`" != "79" ]; then
+               echo "Warning: user exim doesn't have uid=79. Correct this before installing Exim" 1>&2
+               exit 1
+       fi
+else
+       /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2
+fi
+
 %post
 umask 022
 /sbin/chkconfig --add %{name}
@@ -213,6 +245,10 @@ fi
 
 %postun
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+if [ "$1" = "0" ]; then
+       /usr/sbin/userdel exim
+       /usr/sbin/groupdel exim
+fi
 
 %triggerpostun -- exim  < 3.90
 if [ -f /etc/mail/exim.conf ]; then
This page took 0.033842 seconds and 4 git commands to generate.