On Sun, May 24, 2015 at 11:27:09AM +0200, Robert Luberda wrote:
> Package: apt-cacher
> Version: 1.7.10
> Severity: serious
> Justification: Policy 9.1.4
> 
> In inetd mode apt-cacher is run as www-data user, who does not
> have permission to create /var/run/apt-cacher directory. This
> makes apt-cacher die() in /usr/share/apt-cacher/lib/apt-cacher.pl:429:

Thanks.

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:


diff --git a/lib/apt-cacher.pl b/lib/apt-cacher.pl
index ff56a08..d8524cc 100755
--- a/lib/apt-cacher.pl
+++ b/lib/apt-cacher.pl
@@ -18,6 +18,7 @@ use IO::Uncompress::AnyUncompress qw($AnyUncompressError);
 use Module::Load::Conditional;
 use File::Spec;
 use File::Path ();
+use List::Util;
 use Carp::Always;
 use Carp;
 our $cfg;
@@ -53,7 +54,7 @@ sub read_config {
                  generate_reports => 1,
                  group => eval {my $g = $); $g =~ s/\s.*$//; $g},
                  http_proxy => '',
-                 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',
                  limit => 0,
                  limit_global => 0,
                  log_dir => '/var/log/apt-cacher',


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to