SPECS: dovecot.spec - added user:group dovecot
charles
charles at pld-linux.org
Sun Jun 18 12:51:10 CEST 2006
Author: charles Date: Sun Jun 18 10:51:10 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- added user:group dovecot
---- Files affected:
SPECS:
dovecot.spec (1.25 -> 1.26)
---- Diffs:
================================================================
Index: SPECS/dovecot.spec
diff -u SPECS/dovecot.spec:1.25 SPECS/dovecot.spec:1.26
--- SPECS/dovecot.spec:1.25 Sun Jun 18 08:54:55 2006
+++ SPECS/dovecot.spec Sun Jun 18 12:51:04 2006
@@ -35,6 +35,15 @@
%{?with_pgsql:BuildRequires: postgresql-devel}
%{?with_sqlite:BuildRequires: sqlite3-devel}
Requires(post,preun): /sbin/chkconfig
+Requires(postun): /usr/sbin/groupdel
+Requires(postun): /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
+Provides: group(dovecot)
+Provides: user(dovecot)
+
Requires: pam >= 0.79.0
Provides: imapdaemon
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -148,6 +157,10 @@
%clean
rm -rf $RPM_BUILD_ROOT
+%pre
+%groupadd -g 172 dovecot
+%useradd -u 172 -d /usr/share/empty -s /bin/false -c "Dovecot server" -g dovecot dovecot
+
%post
/sbin/chkconfig --add dovecot
if [ -f /var/lock/subsys/dovecot ]; then
@@ -164,6 +177,12 @@
/sbin/chkconfig --del dovecot
fi
+%postun
+if [ "$1" = "0" ]; then
+ %userremove dovecot
+ %groupremove dovecot
+fi
+
%files
%defattr(644,root,root,755)
# COPYING contains some notes, not actual LGPL text
@@ -176,8 +195,8 @@
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(755,root,root) %{_libdir}/%{name}
-%attr(755,root,root) %dir /var/run/dovecot
-%attr(750,root,root) %dir /var/run/dovecot/login
+%dir /var/run/dovecot
+%attr(750,root,dovecot) %dir /var/run/dovecot/login
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -185,6 +204,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.26 2006/06/18 10:51:04 charles
+- added user:group dovecot
+
Revision 1.25 2006/06/18 06:54:55 charles
- updated to 1.0.beta9
- fixed /var/run/dovecot{/login} perms; before:
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/dovecot.spec?r1=1.25&r2=1.26&f=u
More information about the pld-cvs-commit
mailing list