wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth ./configure.ac src/Makefile.am src/serv...


From: Jon Daniel
Subject: [Wesnoth-cvs-commits] wesnoth ./configure.ac src/Makefile.am src/serv...
Date: Sun, 20 Mar 2005 17:49:53 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Jon Daniel <address@hidden>     05/03/20 22:49:53

Modified files:
        .              : configure.ac 
        src            : Makefile.am 
        src/server     : server.cpp 

Log message:
        fixed bug #9780 now the $localstatedir/wesnothd directory is created 
with specified uid and gid
        removed the --fifo command line option

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/configure.ac.diff?tr1=1.128&tr2=1.129&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/Makefile.am.diff?tr1=1.82&tr2=1.83&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/server/server.cpp.diff?tr1=1.73&tr2=1.74&r1=text&r2=text

Patches:
Index: wesnoth/configure.ac
diff -u wesnoth/configure.ac:1.128 wesnoth/configure.ac:1.129
--- wesnoth/configure.ac:1.128  Fri Mar 11 23:25:18 2005
+++ wesnoth/configure.ac        Sun Mar 20 22:49:53 2005
@@ -9,7 +9,7 @@
 dnl AC_DEFINE([WESNOTH_DEFAULT_SERVER], ["server.wesnoth.org"], [The default 
server for this version])
 AC_DEFINE([WESNOTH_DEFAULT_SERVER], ["devsrv.wesnoth.org"], [The default 
server for this version])
 
-AC_REVISION([$Revision: 1.128 $])
+AC_REVISION([$Revision: 1.129 $])
 
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_SRCDIR([src/actions.cpp])
@@ -131,6 +131,18 @@
              [server=$enableval],
              [server=no])
 
+AC_ARG_WITH([server-uid],
+                 AS_HELP_STRING([--with-server-uid]. [user id of the user who 
runs wesnothd]),
+             [serveruid=$withval],
+             [serveruid=0])
+AC_SUBST([serveruid])
+
+AC_ARG_WITH([server-gid],
+                 AS_HELP_STRING([--with-server-gid]. [group id of the user who 
runs wesnothd]),
+             [servergid=$withval],
+             [servergid=0])
+AC_SUBST([servergid])
+
 AC_ARG_ENABLE([campaign_server],
               AS_HELP_STRING([--enable-campaign-server], [enable compilation 
of campaign server]),
              [campaignserver=$enableval],
Index: wesnoth/src/Makefile.am
diff -u wesnoth/src/Makefile.am:1.82 wesnoth/src/Makefile.am:1.83
--- wesnoth/src/Makefile.am:1.82        Sat Mar 19 13:22:38 2005
+++ wesnoth/src/Makefile.am     Sun Mar 20 22:49:53 2005
@@ -538,7 +538,7 @@
 wesnoth_zip_LDADD = @SDL_LIBS@ @SDL_NET_LIBS@
 
 AM_CXXFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ 
-DWESNOTH_PATH=\"$(pkgdatadir)\" \
-       -DLOCALEDIR=\"$(LOCALEDIR)\" 
-DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR)
+       -DLOCALEDIR=\"$(LOCALEDIR)\" 
-DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR) 
-DLOCALSTATEDIR=\"$(localstatedir)\"
 
 AM_CFLAGS = -I $(srcdir)/sdl_ttf -I../intl -I$(top_srcdir)/intl @SDL_CFLAGS@ 
-DWESNOTH_PATH=\"$(pkgdatadir)\" \
        -DLOCALEDIR=\"$(LOCALEDIR)\" 
-DHAS_RELATIVE_LOCALEDIR=$(HAS_RELATIVE_LOCALEDIR)
@@ -571,3 +571,13 @@
 #-lSDL_image -lSDL_mixer -lSDL_net -lSDL_ttf -lstdc++ -lm -lSM -lICE -ljpeg \
 #-lpng -lz -lvorbisfile -lvorbis -logg -lsmpeg -lfreetype
 #endif
+
+if SERVER
+install-exec-hook:
+       mkdir -p -m 0700 $(localstatedir)/wesnothd
+       chown $(serveruid):$(servergid) $(localstatedir)/wesnothd
+
+uninstall-hook:
+       rm -rf $(localstatedir)/wesnothd/
+       
+endif
Index: wesnoth/src/server/server.cpp
diff -u wesnoth/src/server/server.cpp:1.73 wesnoth/src/server/server.cpp:1.74
--- wesnoth/src/server/server.cpp:1.73  Mon Mar 14 21:07:36 2005
+++ wesnoth/src/server/server.cpp       Sun Mar 20 22:49:53 2005
@@ -870,7 +870,10 @@
 
        network::set_default_send_size(4096);
 
-       std::string fifo_path = "/var/run/wesnothd/socket";
+#ifndef LOCALSTATEDIR
+# define LOCALSTATEDIR "/var/run"
+#endif
+       std::string fifo_path = std::string(LOCALSTATEDIR) + "/wesnothd/socket";
 
        for(int arg = 1; arg != argc; ++arg) {
                const std::string val(argv[arg]);
@@ -887,7 +890,6 @@
                        std::cout << "usage: " << argv[0]
                                << " [options]\n"
                                << "  -d  --daemon               Runs wesnothd 
as a daemon\n"
-                               << "      --fifo file            Sets the path 
for the FIFO used to communicate with the server\n"
                                << "  -m, --max_packet_size n    Sets the 
maximal packet size to n\n" 
                                << "  -p, --port                 Binds the 
server to the specified port\n"
                                << "  -v, --version              Returns the 
server version\n";
@@ -896,14 +898,6 @@
                        std::cout << "Battle for Wesnoth server " << 
game_config::version
                                << "\n";
                        return 0;
-               } else if(val == "--fifo") {
-                       ++arg;
-                       if(arg == argc) {
-                               std::cerr << "option --fifo requires a path 
argument\n";
-                               return 0;
-                       }
-
-                       fifo_path = argv[arg];
                } else if(val == "--daemon" || val == "-d") {
 #ifdef WIN32
                        std::cerr << "Running as a daemon is not supported on 
this platform\n";




reply via email to

[Prev in Thread] Current Thread [Next in Thread]