rpms/cyphesis/devel cyphesis-0.5.19-init.patch, NONE, 1.1 .cvsignore, 1.11, 1.12 cyphesis.spec, 1.32, 1.33 sources, 1.11, 1.12 cyphesis-0.5.18-init.patch, 1.1, NONE

Alexey Torkhov atorkhov at fedoraproject.org
Fri Mar 27 21:35:03 UTC 2009


Author: atorkhov

Update of /cvs/pkgs/rpms/cyphesis/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21655

Modified Files:
	.cvsignore cyphesis.spec sources 
Added Files:
	cyphesis-0.5.19-init.patch 
Removed Files:
	cyphesis-0.5.18-init.patch 
Log Message:
* Fri Mar 27 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.5.19-1
- Update to 0.5.19


cyphesis-0.5.19-init.patch:

--- NEW FILE cyphesis-0.5.19-init.patch ---
diff -ur cyphesis-0.5.17.old/cyphesis.init cyphesis-0.5.17/cyphesis.init
--- cyphesis-0.5.17.old/cyphesis.init	2006-09-27 01:33:12.000000000 +0400
+++ cyphesis-0.5.17/cyphesis.init	2008-11-08 00:03:57.000000000 +0300
@@ -18,34 +18,36 @@
         CYPHESISUSER=cyphesis
 fi
 
+CYPHESISPARAMS="--cyphesis:unixport=/var/run/cyphesis/cyphesis.sock --cyphesis:pythonport=/var/run/cyphesis/cypython.sock"
+
 POSTGRESUSER=postgres
 
 start() {
         # Start the daemon.
 
         # Make sure postgres superuser exists
-        if ! su $POSTGRESUSER -c true >/dev/null 2>&1; then
+        if ! runuser $POSTGRESUSER -c true >/dev/null 2>&1; then
             echo
             echo $"Could not check for running PostgreSQL database."
             return 1
         fi
 
         # Make sure postgres is running
-        if ! su $POSTGRESUSER -c "psql -c \"\" template1" >/dev/null 2>&1; then
+        if ! runuser $POSTGRESUSER -c "psql -c \"\" template1" >/dev/null 2>&1; then
             echo $"PostgreSQL server is not running."
             return 1
         fi
 
         # Make sure the user we are going to run as exists
-        if ! su $CYPHESISUSER -c true >/dev/null 2>&1; then
+        if ! runuser $CYPHESISUSER -c true >/dev/null 2>&1; then
             echo $"Cannot find user $CYPHESISUSER to run cyphesis service."
             return 1
         fi
 
         # Make sure the user has a postgres account
-        if ! su $CYPHESISUSER -c "psql -c \"\" template1" >/dev/null 2>&1; then
+        if ! runuser $CYPHESISUSER -c "psql -c \"\" template1" >/dev/null 2>&1; then
             echo -n $"Creating PostgreSQL account: "
-            su $POSTGRESUSER -c "createuser -A -d -q -R $CYPHESISUSER" >/dev/null 2>&1
+            runuser $POSTGRESUSER -c "createuser -A -d -q -R $CYPHESISUSER" >/dev/null 2>&1
             RETVAL=$?
             if [ $RETVAL -eq 0 ]; then
                 echo_success
@@ -58,10 +60,10 @@
         fi
 
         # Make sure the database exists
-        if ! su $CYPHESISUSER -c "psql -c \"\" cyphesis" >/dev/null 2>&1; then
+        if ! runuser $CYPHESISUSER -c "psql -c \"\" cyphesis" >/dev/null 2>&1; then
             # Create the database
             echo -n $"Creating PostgreSQL database: "
-            su $CYPHESISUSER -c "createdb -q cyphesis" >/dev/null 2>&1
+            runuser $CYPHESISUSER -c "createdb -q cyphesis" >/dev/null 2>&1
             RETVAL=$?
             if [ $RETVAL -eq 0 ]; then
                 echo_success
@@ -73,7 +75,7 @@
             echo
             # Populate it with rules
             echo -n $"Loading database with rules: "
-            su $CYPHESISUSER -c "cyloadrules" >/dev/null 2>&1
+            runuser $CYPHESISUSER -c "cyloadrules $CYPHESISPARAMS" >/dev/null 2>&1
             RETVAL=$?
             if [ $RETVAL -eq 0 ]; then
                 echo_success
@@ -88,7 +90,7 @@
         echo -n $"Starting cyphesis: "
 
         # Run the server, in self daemonising mode
-        su $CYPHESISUSER -c "/usr/bin/cyphesis --cyphesis:daemon=true" >/dev/null 2>&1
+        runuser $CYPHESISUSER -c "/usr/bin/cyphesis --cyphesis:daemon=true $CYPHESISPARAMS" >/dev/null 2>&1
         RETVAL=$?
         if [ $RETVAL -eq 0 ]; then
             echo_success
@@ -96,8 +98,24 @@
         else
             echo_failure
             echo
+            return $RETVAL
         fi
         echo
+
+        if [ "$POPULATE_WORLD" == "1" ] ; then
+            echo -n $"Populating cyphesis world: "
+
+            # Populate the world with game data
+            runuser $CYPHESISUSER -c "/usr/bin/cyclient $CYPHESISPARAMS" >/dev/null 2>&1
+            RETVAL=$?
+            if [ $RETVAL -eq 0 ]; then
+                echo_success
+            else
+                echo_failure
+            fi
+            echo
+        fi
+
         return $RETVAL
 }
 
@@ -107,7 +125,10 @@
         killproc cyphesis
         RETVAL=$?
         echo
-        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/cyphesis
+        if [ $RETVAL -eq 0 ] ; then
+            rm -f /var/lock/subsys/cyphesis
+        fi
+
         return $RETVAL
 }
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/cyphesis/devel/.cvsignore,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- .cvsignore	20 Dec 2008 10:56:38 -0000	1.11
+++ .cvsignore	27 Mar 2009 21:34:32 -0000	1.12
@@ -1 +1 @@
-cyphesis-0.5.18.tar.bz2
+cyphesis-0.5.19.tar.bz2


Index: cyphesis.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cyphesis/devel/cyphesis.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- cyphesis.spec	28 Feb 2009 13:38:56 -0000	1.32
+++ cyphesis.spec	27 Mar 2009 21:34:33 -0000	1.33
@@ -3,8 +3,8 @@
 %define logwatch_scripts %{logwatch_root}/scripts
 
 Name:           cyphesis
-Version:        0.5.18
-Release:        3%{?dist}
+Version:        0.5.19
+Release:        1%{?dist}
 Summary:        WorldForge game server
 Group:          System Environment/Libraries
 License:        GPLv2+
@@ -14,9 +14,8 @@
 Source5:        logwatch.script.cyphesis
 Source6:        logwatch.serviceconf.cyphesis
 Source7:        logwatch.shared.applycyphesisdate
-Patch0:         cyphesis-0.5.18-init.patch
+Patch0:         cyphesis-0.5.19-init.patch
 Patch1:         cyphesis-0.5.11-logdir.patch
-Patch2:         cyphesis-0.5.18-gcc44.patch
 Patch5:         cyphesis-0.5.17-py26.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  python-devel libgcrypt-devel pkgconfig atlascpp-devel
@@ -53,7 +52,6 @@
 %setup -q
 %patch0 -p1
 %patch1 -p0
-%patch2 -p1
 %patch5 -p1 -b .py26
 
 chmod a-x rulesets/basic/mind/dictlist.py
@@ -167,6 +165,9 @@
 
 
 %changelog
+* Fri Mar 27 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.5.19-1
+- Update to 0.5.19
+
 * Sat Feb 28 2009 Alexey Torkhov <atorkhov at gmail.com> - 0.5.18-3
 - Fixing build with recent compilers
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cyphesis/devel/sources,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- sources	20 Dec 2008 10:56:38 -0000	1.11
+++ sources	27 Mar 2009 21:34:33 -0000	1.12
@@ -1 +1 @@
-88fec32955e8d6806b7234d3aec3096b  cyphesis-0.5.18.tar.bz2
+363997a5c61f0607b34222a9cc72a86e  cyphesis-0.5.19.tar.bz2


--- cyphesis-0.5.18-init.patch DELETED ---




More information about the fedora-extras-commits mailing list