[SCM] [contrib] Quake III: Arena launcher branch, master, updated. debian/1.2-9-g633318b

Simon McVittie smcv at debian.org
Sat Jun 23 00:26:19 UTC 2012


The following commit has been merged in the master branch:
commit 633318b1802518f8f0ab549bb25bcb5f06b6f8b0
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Jun 23 01:25:39 2012 +0100

    Run a server from the quake3-server package by default (as per Policy), unless this is an upgrade from 1.3 or older

diff --git a/debian/changelog b/debian/changelog
index 26adc53..c13aa66 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ quake3 (1.4) UNRELEASED; urgency=low
   * Standards-Version: 3.9.3 (no changes)
   * Update copyright dates
   * Add a Description to the init script
+  * Run a server from the quake3-server package by default (as per Policy),
+    unless this is an upgrade from 1.3 or older
 
  -- Simon McVittie <smcv at debian.org>  Sat, 23 Jun 2012 00:34:40 +0100
 
diff --git a/debian/quake3-server.NEWS b/debian/quake3-server.NEWS
new file mode 100644
index 0000000..c664976
--- /dev/null
+++ b/debian/quake3-server.NEWS
@@ -0,0 +1,20 @@
+quake3-server (1.4) unstable; urgency=low
+
+  In earlier Debian packaging for Quake III Arena, the quake3-server
+  package did not run a server by default.
+
+  Since version 1.4, new installations of quake3-server will run a server
+  from the init script by default.
+
+  The upgrade from 1.3 to 1.4 attempts to detect whether the server was
+  enabled. If it was not, it creates a file
+  "/var/games/quake3-server/init-script-disabled-by-upgrade";
+  if that file exists, the init script does not start the server.
+  You can restore normal behaviour by deleting it.
+
+  This special upgrade behaviour is likely to be removed after Debian 7
+  is released, so if you do not intend to run a Quake III Arena dedicated
+  server, please remove the quake3-server package before upgrading
+  to Debian 8.
+
+ -- Simon McVittie <smcv at debian.org>  Sat, 23 Jun 2012 00:34:40 +0100
diff --git a/debian/quake3-server.README.Debian b/debian/quake3-server.README.Debian
index ae7f8cb..e0e8ddb 100644
--- a/debian/quake3-server.README.Debian
+++ b/debian/quake3-server.README.Debian
@@ -1,16 +1,13 @@
 Quake III Arena dedicated server for Debian
 ===========================================
 
-Running the server via sysvinit
--------------------------------
+Running the server via the init script
+--------------------------------------
 
-By default, quake3-server adds a user under which to run the dedicated server
-(Debian-quake3) but does not actually start the dedicated server.
-
-To run the dedicated server in the conventional Debian way, edit
-/etc/default/quake3-server and set START_DAEMON to 1. This is a simple
-setup suitable for running one server on a machine; by default it will
-cycle through the standard Quake III Arena deathmatch maps.
+The quake3-server init script runs a dedicated server as the user
+"Debian-quake3". This is a simple setup suitable for running one server
+on a machine; by default it will cycle through the standard
+Quake III Arena deathmatch maps.
 
 The Debian-quake3 user's home directory is /var/games/quake3-server, so you
 can find Quake III files in the /var/games/quake3-server/.q3a directory.
@@ -21,8 +18,21 @@ By default, the init script will use
 configuration in /var/games/quake3-server/.q3a/baseq3 and change
 /etc/default/quake3-server to exec that.
 
-There are various alternative ways you can run the server if this doesn't
-meet your requirements.
+Disabling the init script
+-------------------------
+
+To disable the init script, use the facilities provided by your init system.
+For instance, under sysvinit, use
+
+    update-rc.d quake3-server disable
+
+or under systemd, use
+
+    ln -s /dev/null /etc/systemd/system/quake3-server.service
+
+Changing the value of the START_DAEMON variable in
+/etc/default/quake3-server is deprecated. Please leave it set to
+"unless-disabled-by-upgrade".
 
 Running the server with cron and screen
 ---------------------------------------
diff --git a/debian/quake3-server.default b/debian/quake3-server.default
index 4c16d92..3f27f37 100644
--- a/debian/quake3-server.default
+++ b/debian/quake3-server.default
@@ -2,8 +2,10 @@
 # sourced by /etc/init.d/quake3-server
 # installed at /etc/default/quake3-server by the maintainer scripts
 
-# set to 1 to enable
-START_DAEMON=0
+# To disable the server, please use the normal mechanisms provided by init:
+# see /usr/share/doc/quake3-server/README.Debian.gz. Changing the value
+# of this variable is deprecated.
+START_DAEMON=unless-disabled-by-upgrade
 
 # Additional options that are passed to the daemon.
 # Add "+set dedicated 2" here, or "set dedicated 2" in server.cfg, if you want
diff --git a/debian/quake3-server.init b/debian/quake3-server.init
index 455e2fe..c6cff31 100644
--- a/debian/quake3-server.init
+++ b/debian/quake3-server.init
@@ -28,8 +28,13 @@ if [ -f /etc/default/$NAME ] ; then
 fi
 
 q3_start() {
-    if [ "$START_DAEMON" != 1 ]; then
-        echo -n " (not starting - disabled in /etc/default/$NAME)"
+    if [ "$START_DAEMON" = "unless-disabled-by-upgrade" ]; then
+        if [ -e /var/games/quake3-server/init-script-disabled-by-upgrade ]; then
+            echo -n " (disabled during upgrade, not starting - see /usr/share/doc/quake3-server/NEWS.Debian.gz)"
+            return 0
+        fi
+    elif [ "$START_DAEMON" != 1 ]; then
+        echo -n " (disabled in /etc/default/quake3-server - deprecated, see /usr/share/doc/quake3-server/README.Debian.gz)"
         return 0
     fi
     start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
diff --git a/debian/quake3-server.postinst b/debian/quake3-server.postinst
index d676ee4..02a3f19 100644
--- a/debian/quake3-server.postinst
+++ b/debian/quake3-server.postinst
@@ -11,7 +11,8 @@ case "$1" in
 	--ingroup games --force-badname Debian-quake3
     fi
     install -d /var/games
-    install -d -o Debian-quake3 -g games /var/games/quake3-server
+    install -d /var/games/quake3-server
+    chown Debian-quake3:games /var/games/quake3-server
   ;;
   abort-upgrade|abort-remove|abort-deconfigure)
   ;;
diff --git a/debian/quake3-server.preinst b/debian/quake3-server.preinst
new file mode 100644
index 0000000..9f55b83
--- /dev/null
+++ b/debian/quake3-server.preinst
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+  (upgrade)
+    if dpkg --compare-versions "$2" lt 1.4; then
+      def=/etc/default/quake3-server
+      home=/var/games/quake3-server
+      inhibit=$home/init-script-disabled-by-upgrade
+
+      if test -e $def && grep '^START_DAEMON=1$' $def; then
+        echo "Not disabling quake3-server init script (previously enabled in $def)" >&2
+      else
+        echo "Disabling quake3-server init script (previously disabled in $def)" >&2
+        echo "Remove $inhibit to restore normal behaviour."
+	install -d $home
+	touch $inhibit
+      fi
+    fi
+  ;;
+  (install|abort-upgrade)
+  ;;
+  *)
+    echo "preinst called with unknown argument '$1'" >&2
+    exit 1
+  ;;
+esac
+
+#DEBHELPER#

-- 
[contrib] Quake III: Arena launcher



More information about the Pkg-games-commits mailing list