Dear maintainer,

I've prepared an NMU for xpilot-ng (versioned as 1:4.7.3-1.4). The diff
is attached to this message.

Cheers,
    Olly
diff -Nru xpilot-ng-4.7.3/debian/changelog xpilot-ng-4.7.3/debian/changelog
--- xpilot-ng-4.7.3/debian/changelog	2011-10-17 00:30:48.000000000 +1300
+++ xpilot-ng-4.7.3/debian/changelog	2011-11-25 23:12:27.000000000 +1300
@@ -1,3 +1,13 @@
+xpilot-ng (1:4.7.3-1.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Migrate to use /run instead of /var/run and make sure to create
+    /run/xpilot-ng-server and set the correct owner, group and permissions
+    before using it, since it won't persist over reboot when /run is a tmpfs.
+    (Closes: #645868)
+
+ -- Olly Betts <o...@survex.com>  Fri, 25 Nov 2011 09:42:17 +0000
+
 xpilot-ng (1:4.7.3-1.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru xpilot-ng-4.7.3/debian/start-xpilot-ng-server xpilot-ng-4.7.3/debian/start-xpilot-ng-server
--- xpilot-ng-4.7.3/debian/start-xpilot-ng-server	2010-06-03 06:03:29.000000000 +1200
+++ xpilot-ng-4.7.3/debian/start-xpilot-ng-server	2011-11-25 22:20:37.000000000 +1300
@@ -3,8 +3,8 @@
 set -e
 
 USER=`whoami`
-PIDFILE="/var/run/xpilot-ng-server/xpilot-ng-server.pid"
-LOGFIFO="/var/run/xpilot-ng-server/xpilot-ng-server.fifo"
+PIDFILE="/run/xpilot-ng-server/xpilot-ng-server.pid"
+LOGFIFO="/run/xpilot-ng-server/xpilot-ng-server.fifo"
 
 if [ "$USER" = "xpilotng" ]; then
   source /etc/default/xpilot-ng-server
diff -Nru xpilot-ng-4.7.3/debian/xpilot-ng-server.init xpilot-ng-4.7.3/debian/xpilot-ng-server.init
--- xpilot-ng-4.7.3/debian/xpilot-ng-server.init	2010-06-03 06:03:29.000000000 +1200
+++ xpilot-ng-4.7.3/debian/xpilot-ng-server.init	2011-11-25 22:36:26.000000000 +1300
@@ -20,7 +20,7 @@
 test -x /usr/games/start-xpilot-ng-server || exit 0
 
 USER=xpilotng
-PIDFILE=/var/run/xpilot-ng-server/xpilot-ng-server.pid
+PIDFILE=/run/xpilot-ng-server/xpilot-ng-server.pid
 
 set -e
 
@@ -32,6 +32,9 @@
 	test -f "$DEFAULTMAP" || exit 0
 
 	echo -n "Starting XPilot NG server: "
+	RUNDIR=$(dirname $PIDFILE)
+	mkdir -m700 -p $RUNDIR
+	chown xpilotng:xpilotng $RUNDIR
 	start-stop-daemon --start --quiet --chuid $USER --background \
 		--oknodo --exec /usr/games/start-xpilot-ng-server
 	echo "xpilot-ng-server."
@@ -47,6 +50,9 @@
 	;;
   restart|force-reload)
 	echo -n "Restarting XPilot NG server: "
+	RUNDIR=$(dirname $PIDFILE)
+	mkdir -m700 -p $RUNDIR
+	chown xpilotng:xpilotng $RUNDIR
 	start-stop-daemon --stop --quiet --pidfile $PIDFILE \
 		--oknodo --retry 5 >/dev/null 2>&1
 	echo "$AUTOSTART" |grep -iq yes || exit 0
diff -Nru xpilot-ng-4.7.3/debian/xpilot-ng-server.postinst xpilot-ng-4.7.3/debian/xpilot-ng-server.postinst
--- xpilot-ng-4.7.3/debian/xpilot-ng-server.postinst	2010-06-03 06:03:29.000000000 +1200
+++ xpilot-ng-4.7.3/debian/xpilot-ng-server.postinst	2011-11-25 22:47:19.000000000 +1300
@@ -5,11 +5,10 @@
 # create xpilotng user/group if they do not exist
 if [ "$1" = "configure" ] && ! getent passwd | grep -q "^xpilotng:"; then
     echo "Adding xpilotng group and user..."
-    adduser --quiet --system --home /var/run/xpilot-ng-server --group \
+    adduser --quiet --system --home /run/xpilot-ng-server --group \
        --shell /bin/sh --disabled-password xpilotng || true
 fi
 
-chmod 700 /var/run/xpilot-ng-server
 chown -R xpilotng:xpilotng /etc/xpilot-ng
 chmod -f 600 /etc/xpilot-ng/password.txt
 

Reply via email to