[dspam] fix user/group issues
Nathanael Noblet
gnat at fedoraproject.org
Thu Mar 3 18:57:16 UTC 2011
commit 0249b4146f37f803157240d9d24444bca6bba219
Author: Nathanael D. Noblet <nathanael at gnat.ca>
Date: Thu Mar 3 11:56:39 2011 -0700
fix user/group issues
dspam.spec | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/dspam.spec b/dspam.spec
index 68efd23..5e61f2e 100644
--- a/dspam.spec
+++ b/dspam.spec
@@ -11,7 +11,7 @@
Summary: A library and Mail Delivery Agent for Bayesian SPAM filtering
Name: dspam
Version: 3.9.0
-Release: 16%{?dist}
+Release: 17%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -23,9 +23,9 @@ Source5: dspam-front
Source6: dspam-sysconfig
Source99: dspam-filter-requires.sh
Patch0: dspam-3.9.0-file-name.patch
-Patch1: dspam-3.9.0-docs.patch
-Patch2: dspam-3.9.0-dspamsock.patch
-Patch3: dspam-3.9.0-configure.patch
+Patch1: dspam-3.9.0-docs.patch
+Patch2: dspam-3.9.0-dspamsock.patch
+Patch3: dspam-3.9.0-configure.patch
URL: http://www.nuclearelephant.com/
# kept to be able to build EPEL versions
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -277,15 +277,13 @@ if [ $1 -ge 1 ]; then
fi
%pre libs
-getent passwd %{dspam_user} >/dev/null || useradd -r -g %{mail_group} -d %{dspam_homedir} -s /sbin/nologin -c 'User to own dspam directories and default processes' %{dspam_user}
+getent group %{dspam_user} >/dev/null || groupadd -r %{dspam_user}
+getent passwd %{dspam_user} >/dev/null || useradd -r -g %{dspam_user} -G %{dspam_user},%{mail_group} -d %{dspam_homedir} -s /sbin/nologin -c 'User to own dspam directories and default processes' %{dspam_user}
exit 0
%post libs -p /sbin/ldconfig
-%postun libs -p /sbin/ldconfig
-%post web
-chown -R %{dspam_user}:%{dspam_user} %{dspam_web_docroot}/
-service httpd condrestart
+%postun libs -p /sbin/ldconfig
%clean
%{__rm} -rf $RPM_BUILD_ROOT
@@ -295,8 +293,8 @@ service httpd condrestart
%doc README CHANGELOG RELEASE.NOTES UPGRADING
%attr(0770,%{dspam_user},%{mail_group}) %dir %{dspam_logdir}
%attr(0770,%{dspam_user},%{mail_group}) %dir %{dspam_homedir}
-%dir %{dspam_homedir}/opt-in
-%dir %{dspam_homedir}/opt-out
+%attr(0770,%{dspam_user},root) %dir %{dspam_homedir}/opt-in
+%attr(0770,%{dspam_user},root) %dir %{dspam_homedir}/opt-out
%attr(0770,%{dspam_user},%{mail_group}) %dir %{dspam_homedir}/data
%dir %{dspam_homedir}/txt/
%config(noreplace) %{dspam_homedir}/txt/*
@@ -373,6 +371,10 @@ service httpd condrestart
%config(noreplace) %{_sysconfdir}/httpd/conf.d/dspam-web.conf
%changelog
+* Thu Mar 3 2011 Nathanael Noblet <nathanael at gnat.ca> - 3.9.0-17
+- Fixed packaging issue with non-existent group
+- Removed chown -R in web post as well as httpd restart
+
* Wed Mar 2 2011 Nathanael Noblet <nathanael at gnat.ca> - 3.9.0-16
- Added configure patch to build on F15+
More information about the scm-commits
mailing list