rpms/cyphesis/devel cyphesis-0.5.17-gcrypt-init-fix.patch, NONE, 1.1 cyphesis-0.5.17-sockpath.patch, NONE, 1.1 .cvsignore, 1.9, 1.10 cyphesis.spec, 1.24, 1.25 sources, 1.9, 1.10

Alexey Torkhov atorkhov at fedoraproject.org
Tue Nov 4 13:41:13 UTC 2008


Author: atorkhov

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

Modified Files:
	.cvsignore cyphesis.spec sources 
Added Files:
	cyphesis-0.5.17-gcrypt-init-fix.patch 
	cyphesis-0.5.17-sockpath.patch 
Log Message:
* Tue Nov 04 2008 Alexey Torkhov <atorkhov at gmail.com> 0.5.17-1
- Update to 0.5.17
- Add patch for libgcrypt proper initialisation
- Fix full socket patch to be applicable for command line tools
- Make tests actually do the checks


cyphesis-0.5.17-gcrypt-init-fix.patch:

--- NEW FILE cyphesis-0.5.17-gcrypt-init-fix.patch ---
diff -u -d -p -r1.36 system.cpp
--- common/system.cpp	1 Nov 2008 02:38:32 -0000	1.36
+++ common/system.cpp	3 Nov 2008 16:55:02 -0000
@@ -76,6 +76,13 @@ const std::string get_hostname()
 #endif // HAVE_UNAME
 }
 
+unsigned int security_init()
+{
+    gcry_check_version(0);
+
+    return 0;
+}
+
 unsigned int security_check()
 {
 #ifdef HAVE_GETUID
@@ -97,7 +104,6 @@ static int security_new_key(const std::s
         return -1;
     }
 
-    gcry_check_version(0);
     gcry_control( GCRYCTL_INIT_SECMEM, 16384, 0 );
 
     gcry_sexp_t key_parameters, key;
diff -u -d -p -r1.14 system.h
--- common/system.h	12 Aug 2008 20:40:14 -0000	1.14
+++ common/system.h	3 Nov 2008 16:55:02 -0000
@@ -40,6 +40,7 @@
 #include <string>
 
 const std::string get_hostname();
+unsigned int security_init();
 unsigned int security_check();
 unsigned int security_setup();
 void reduce_priority(int);
diff -u -d -p -r1.164 server.cpp
--- server/server.cpp	27 Oct 2008 00:53:29 -0000	1.164
+++ server/server.cpp	3 Nov 2008 16:55:02 -0000
@@ -61,6 +61,11 @@ static const bool debug_flag = false;
 
 int main(int argc, char ** argv)
 {
+    if (security_init() != 0) {
+        log(CRITICAL, "Security initialisation Error. Exiting.");
+        return EXIT_SECURITY_ERROR;
+    }
+
     if (security_check() != SECURITY_OKAY) {
         log(CRITICAL, "Security Error. Exiting.");
         return EXIT_SECURITY_ERROR;
diff -u -d -p -r1.7 systemtest.cpp
--- tests/systemtest.cpp	23 Apr 2007 11:22:15 -0000	1.7
+++ tests/systemtest.cpp	3 Nov 2008 16:55:02 -0000
@@ -40,7 +40,13 @@ int main()
     std::string hostname = get_hostname();
     assert(!hostname.empty());
 
-    assert(security_check() == SECURITY_OKAY);
+    int res;
+
+    res = security_init();
+    assert(res == 0);
+
+    res = security_check();
+    assert(res == SECURITY_OKAY);
 
     reduce_priority(1);
     
diff -u -d -p -r1.38 cypasswd.cpp
--- tools/cypasswd.cpp	14 Nov 2007 22:40:18 -0000	1.38
+++ tools/cypasswd.cpp	3 Nov 2008 16:55:02 -0000
@@ -33,6 +33,7 @@
 #include "common/accountbase.h"
 #include "common/globals.h"
 #include "common/log.h"
+#include "common/system.h"
 
 #include <string>
 #include <iostream>
@@ -128,6 +129,11 @@ int main(int argc, char ** argv)
         return 1;
     }
 
+    if (security_init() != 0) {
+        log(CRITICAL, "Security initialisation Error. Exiting.");
+        return EXIT_SECURITY_ERROR;
+    }
+
     AccountBase db;
 
     if (db.init() != 0) {

cyphesis-0.5.17-sockpath.patch:

--- NEW FILE cyphesis-0.5.17-sockpath.patch ---
diff -urp cyphesis-0.5.17.old/client/ClientConnection.cpp cyphesis-0.5.17/client/ClientConnection.cpp
--- cyphesis-0.5.17.old/client/ClientConnection.cpp	2008-01-13 04:32:54.000000000 +0300
+++ cyphesis-0.5.17/client/ClientConnection.cpp	2008-11-04 11:32:05.000000000 +0300
@@ -142,7 +142,7 @@ int ClientConnection::connectLocal(const
     debug(std::cout << "Attempting local connect." << std::endl << std::flush;);
     std::string socket;
     if (sockname == "") {
-        socket = var_directory + "/tmp/" + client_socket_name;
+        socket = client_socket_name;
     } else if (sockname[0] != '/') {
         socket = var_directory + "/tmp/" + sockname;
     } else {
diff -urp cyphesis-0.5.17.old/common/globals.cpp cyphesis-0.5.17/common/globals.cpp
--- cyphesis-0.5.17.old/common/globals.cpp	2008-04-28 21:26:09.000000000 +0400
+++ cyphesis-0.5.17/common/globals.cpp	2008-11-04 11:31:11.000000000 +0300
@@ -339,10 +339,18 @@ void readInstanceConfiguration(const std
         client_socket_name = String::compose("cyphesis_%1.sock", section);
     }
 
+    if (client_socket_name[0] != '/') {
+        client_socket_name = var_directory + "/tmp/" + client_socket_name;
+    }
+
     readConfigItem("slave", "tcpport", slave_port_num);
 
     readConfigItem("slave", "unixport", slave_socket_name);
 
+    if (slave_socket_name[0] != '/') {
+        slave_socket_name = var_directory + "/tmp/" + slave_socket_name;
+    }
+
     readConfigItem("game", "player_vs_player", pvp_flag);
 
     readConfigItem("game", "player_vs_player_offline", pvp_offl_flag);
diff -urp cyphesis-0.5.17.old/server/CommUnixListener.cpp cyphesis-0.5.17/server/CommUnixListener.cpp
--- cyphesis-0.5.17.old/server/CommUnixListener.cpp	2007-05-29 04:39:18.000000000 +0400
+++ cyphesis-0.5.17/server/CommUnixListener.cpp	2008-11-04 11:26:20.000000000 +0300
@@ -91,7 +91,7 @@ void CommUnixListener::dispatch()
 /// will never be called in an instance of cyphesis already exists.
 int CommUnixListener::setup(const std::string & name)
 {
-    m_path = var_directory + "/tmp/" + name;
+    m_path = name;
 
     m_unixListener.open(m_path);
     m_bound = m_unixListener.is_open();
diff -urp cyphesis-0.5.17.old/tools/cyaddrules.cpp cyphesis-0.5.17/tools/cyaddrules.cpp
--- cyphesis-0.5.17.old/tools/cyaddrules.cpp	2007-11-15 01:40:18.000000000 +0300
+++ cyphesis-0.5.17/tools/cyaddrules.cpp	2008-11-04 11:33:16.000000000 +0300
@@ -166,11 +166,11 @@ int main(int argc, char ** argv)
     passwd.clear();
 
     if (server.empty()) {
-        std::string localSocket = var_directory + "/tmp/";
+        std::string localSocket;
         if (useslave != 0) {
-            localSocket += slave_socket_name;
+            localSocket = slave_socket_name;
         } else {
-            localSocket += client_socket_name;
+            localSocket = client_socket_name;
         }
 
         if (bridge.connect_unix(localSocket) != 0) {
diff -urp cyphesis-0.5.17.old/tools/cycmd.cpp cyphesis-0.5.17/tools/cycmd.cpp
--- cyphesis-0.5.17.old/tools/cycmd.cpp	2008-09-15 22:16:03.000000000 +0400
+++ cyphesis-0.5.17/tools/cycmd.cpp	2008-11-04 11:33:05.000000000 +0300
@@ -1299,11 +1299,11 @@ int main(int argc, char ** argv)
     }
 
     if (server.empty()) {
-        std::string localSocket = var_directory + "/tmp/";
+        std::string localSocket;
         if (useslave != 0) {
-            localSocket += slave_socket_name;
+            localSocket = slave_socket_name;
         } else {
-            localSocket += client_socket_name;
+            localSocket = client_socket_name;
         }
 
         std::cout << "Attempting local connection" << std::endl << std::flush;


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/cyphesis/devel/.cvsignore,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- .cvsignore	24 Jul 2008 04:36:10 -0000	1.9
+++ .cvsignore	4 Nov 2008 13:40:43 -0000	1.10
@@ -1 +1 @@
-cyphesis-0.5.16.tar.gz
+cyphesis-0.5.17.tar.bz2


Index: cyphesis.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cyphesis/devel/cyphesis.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- cyphesis.spec	28 Aug 2008 16:09:47 -0000	1.24
+++ cyphesis.spec	4 Nov 2008 13:40:43 -0000	1.25
@@ -3,21 +3,21 @@
 %define logwatch_scripts %{logwatch_root}/scripts
 
 Name:           cyphesis
-Version:        0.5.16
-Release:        3%{?dist}
+Version:        0.5.17
+Release:        1%{?dist}
 Summary:        WorldForge game server
 Group:          System Environment/Libraries
 License:        GPLv2+
 URL:            http://www.worldforge.org
-Source0:        http://downloads.sourceforge.net/worldforge/%{name}-%{version}.tar.gz
+Source0:        http://downloads.sourceforge.net/worldforge/%{name}-%{version}.tar.bz2
 Source4:        logwatch.logconf.cyphesis
 Source5:        logwatch.script.cyphesis
 Source6:        logwatch.serviceconf.cyphesis
 Source7:        logwatch.shared.applycyphesisdate
 Patch0:         cyphesis-0.5.15-init.patch
 Patch1:         cyphesis-0.5.11-logdir.patch
-Patch2:         cyphesis-0.5.16-destdir.patch
-Patch3:         cyphesis-0.5.15-sockpath.patch
+Patch3:         cyphesis-0.5.17-sockpath.patch
+Patch4:         cyphesis-0.5.17-gcrypt-init-fix.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  python-devel libgcrypt-devel pkgconfig atlascpp-devel
 BuildRequires:  varconf-devel libsigc++20-devel mercator-devel skstream-devel
@@ -52,8 +52,8 @@
 %setup -q
 %patch0 -p1
 %patch1 -p0
-%patch2 -p1
 %patch3 -p1
+%patch4 -p0
 
 chmod a-x rulesets/basic/mind/dictlist.py
 chmod a-x rulesets/mason/world/objects/buildings/House.py
@@ -100,6 +100,8 @@
 
 
 %check
+# Run tests in debug mode so asserts won't be skipped
+sed -i -e 's/-DNDEBUG/-DDEBUG/' tests/Makefile
 make check
 
 %pre
@@ -162,6 +164,12 @@
 
 
 %changelog
+* Tue Nov 04 2008 Alexey Torkhov <atorkhov at gmail.com> 0.5.17-1
+- Update to 0.5.17
+- Add patch for libgcrypt proper initialisation
+- Fix full socket patch to be applicable for command line tools
+- Make tests actually do the checks
+
 * Thu Aug 28 2008 Wart <wart at kobold.org> 0.5.16-3
 - Rebuild for new mercator
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/cyphesis/devel/sources,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- sources	24 Jul 2008 04:36:10 -0000	1.9
+++ sources	4 Nov 2008 13:40:43 -0000	1.10
@@ -1 +1 @@
-18b0527fb74f9c2bfb8b3610bca8b13a  cyphesis-0.5.16.tar.gz
+aff1b807d1a2e39531b3c488a1df6187  cyphesis-0.5.17.tar.bz2




More information about the fedora-extras-commits mailing list