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

Bug#862327: jessie-pu: package apt-cacher/1.7.10+deb8u1



Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

I would like approval to update apt-cacher in jessie by backporting the fix for
#786661.This ensures that /var/run/apt-cacher is created in the initscript when
operating under inetd.

Debdiff:

diff -Nru apt-cacher-1.7.10+deb8u1/debian/apt-cacher.init apt-cacher-1.7.10+deb8u2/debian/apt-cacher.init
--- apt-cacher-1.7.10+deb8u1/debian/apt-cacher.init	2017-05-09 09:38:53.000000000 +0100
+++ apt-cacher-1.7.10+deb8u2/debian/apt-cacher.init	2017-05-11 11:01:09.000000000 +0100
@@ -15,7 +15,8 @@
 DESC="Apt-Cacher"
 NAME=apt-cacher
 DAEMON=/usr/sbin/$NAME
-PIDFILE=/var/run/$NAME/$NAME.pid
+RUNDIR=/var/run/$NAME
+PIDFILE=$RUNDIR/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 
 # Gracefully exit if the package has been removed.
@@ -40,6 +41,17 @@
 	    echo "$NAME."
     else
         echo "Not started (AUTOSTART not enabled in /etc/default/$NAME)";
+
+        # apt-cacher needs $RUNDIR, but is not able to create it in inetd or CGI mode
+	if test ! -d "$RUNDIR"; then
+	    mkdir -m 755 "$RUNDIR"
+	    CONFIG_FILES="/etc/$NAME/$NAME.conf $(run-parts --list /etc/$NAME/conf.d)"
+	    RUN_AS_USER=$(sed -n 's/^\s*user\s*=//p' $CONFIG_FILES  | tail -1 | tr -d '[:blank:]')
+	    RUN_AS_GROUP=$(sed -n 's/^\s*group\s*=//p' $CONFIG_FILES | tail -1 | tr -d '[:blank:]')
+	    [ "$RUN_AS_USER" ] && chown $RUN_AS_USER "$RUNDIR"
+	    [ "$RUN_AS_GROUP" ] && chgrp $RUN_AS_GROUP "$RUNDIR"
+	fi
+
     fi
 }
 
diff -Nru apt-cacher-1.7.10+deb8u1/debian/changelog apt-cacher-1.7.10+deb8u2/debian/changelog
--- apt-cacher-1.7.10+deb8u1/debian/changelog	2017-05-11 12:10:55.000000000 +0100
+++ apt-cacher-1.7.10+deb8u2/debian/changelog	2017-05-11 11:54:14.000000000 +0100
@@ -1,3 +1,10 @@
+apt-cacher (1.7.10+deb8u2) jessie; urgency=medium
+
+  * Backport of fix for #786661: ensure /var/run/apt-cacher is created in
+    inetd mode.
+
+ -- Mark Hindley <mark@hindley.org.uk>  Thu, 11 May 2017 11:16:34 +0100
+
 apt-cacher (1.7.10+deb8u1) jessie; urgency=medium
 
   * Prevent HTTP response splitting with encoded newlines in


Many thanks,

Mark

-- System Information:
Debian Release: 8.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


Reply to: