Mark Hindley pisze:
Hi,
> Yes, I had already noticed this. I already had a fix queued which is to
> fallback
> to /tmp/apt-cacher if /var/run is not writable (inetd or CGI mode).
>
> I think this might have been the underlying cause of bug #760141 as well.
>
> Try this:
>
> - libcurl_socket => '/var/run/apt-cacher/libcurl.socket',
> + libcurl_socket => (List::Util::first { -w || -w
> (File::Spec->splitpath($_))[1] } glob('{/var/run,/tmp}/apt-cacher')) .
> '/libcurl.socket',
Yes, this work, but I think this might be considered as rather insecure
use of /tmp. You can consider changing init script instead or in
addition to the change, for example like this:
diff --git a/init.d/apt-cacher b/init.d/apt-cacher
index 2c38b7f..46500f9 100755
--- a/init.d/apt-cacher
+++ b/init.d/apt-cacher
@@ -15,7 +15,8 @@
DESC="Apt-Cacher"
NAME=apt-cacher
DAEMON=/usr/sbin/$NAME
-PIDFILE=/var/run/$NAME/$NAME.pid
+PIDDIR=/var/run/$NAME
+PIDFILE=$PIDDIR/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Gracefully exit if the package has been removed.
@@ -33,7 +34,12 @@ fi
# Function that starts the daemon/service.
#
d_start() {
-
+ # apt-cacher needs $PIDDIR, but is not able to create it in the
inetd mode
+ if test ! -d "$PIDDIR"; then
+ mkdir -m 755 "$PIDDIR"
+ chown www-data:www-data "$PIDDIR"
+ fi
+
if test "$AUTOSTART" = 1 ; then
start-stop-daemon --start --quiet \
--exec $DAEMON -- -R 3 -d -p $PIDFILE $EXTRAOPT && \
Regards,
robert
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]