SPECS: wesnoth.spec - use wesnothd user for game server - rel 2

jareq jareq at pld-linux.org
Wed Jan 3 13:16:21 CET 2007


Author: jareq                        Date: Wed Jan  3 12:16:21 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use wesnothd user for game server
- rel 2

---- Files affected:
SPECS:
   wesnoth.spec (1.60 -> 1.61) 

---- Diffs:

================================================================
Index: SPECS/wesnoth.spec
diff -u SPECS/wesnoth.spec:1.60 SPECS/wesnoth.spec:1.61
--- SPECS/wesnoth.spec:1.60	Mon Dec 25 13:46:18 2006
+++ SPECS/wesnoth.spec	Wed Jan  3 13:16:16 2007
@@ -8,7 +8,7 @@
 Summary(pl):	Strategiczna gra z motywem fantasy
 Name:		wesnoth
 Version:	1.2
-Release:	1
+Release:	2
 License:	GPL v2+
 Group:		X11/Applications/Games/Strategy
 Source0:	http://www.wesnoth.org/files/%{name}-%{version}.tar.gz
@@ -52,6 +52,10 @@
 Summary(pl):	Sieciowy serwer dla Wesnoth
 Group:		X11/Applications/Games/Strategy
 Requires(post,preun):	/sbin/chkconfig
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
 
 %description server
 Server for playing networked games of Wesnoth.
@@ -116,6 +120,10 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre server
+%groupadd -P %{name}-server -g 178  wesnothd
+%useradd -P %{name}-server -u 178 -d /var/run/wesnothd -c "Wesnothd User" -g wesnothd wesnothd
+
 %post server
 /sbin/chkconfig --add wesnothd
 %service wesnothd restart
@@ -124,6 +132,8 @@
 if [ "$1" = "0" ]; then
 	%service wesnothd stop
 	/sbin/chkconfig --del wesnothd
+	%userremove wesnothd
+	%groupremove wesnothd
 fi
 
 %files -f %{name}.lang
@@ -158,7 +168,7 @@
 %lang(pt_BR) %{_mandir}/pt_BR/man6/wesnothd.6*
 %lang(sk) %{_mandir}/sk/man6/wesnothd.6*
 %lang(sv) %{_mandir}/sv/man6/wesnothd.6*
-%dir /var/run/wesnothd
+%attr(770,wesnothd,wesnothd) %dir /var/run/wesnothd
 %endif
 
 %if %{with tools}
@@ -185,6 +195,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.61  2007/01/03 12:16:16  jareq
+- use wesnothd user for game server
+- rel 2
+
 Revision 1.60  2006/12/25 12:46:18  megabajt
 - fixed locale names and removed unsupported(?) la and ca_ES at valencia locale
 - removed manuals from %{_mandir}/en_GB (the same as manuals from %{_mandir}/man?)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/wesnoth.spec?r1=1.60&r2=1.61&f=u



More information about the pld-cvs-commit mailing list