Package: apt-cacher-ng
Version: 3.2-1
Severity: normal
Tags: patch

Hello maintainer,

I've moved my CacheDir to a folder on another mount point (/media/data/apt-
cacher-ng). I've noticed that systemd was not able to start apt-cacher-ng,
because in its service file it verifies that /var/cache/apt-cacher-ng is
available, but it does not automagically use the new value that I set in
acng.conf.

The attached patch makes one aware that the new folder name needs to be set in
two locations.
I don't know enough about systemd to let it automagically extract the required
folder name from the settings file(s) of apt-cacher-ng.
This patch also does not help when using 'dpkg-reconfigure' (see also #929031),
but IMHO this is a first step.

With kind regards,
Roland Clobus



-- Package-specific info:

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'testing-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages apt-cacher-ng depends on:
ii  adduser                3.118
ii  debconf [debconf-2.0]  1.5.71
ii  dpkg                   1.19.6
ii  libbz2-1.0             1.0.6-9
ii  libc6                  2.28-10
ii  libgcc1                1:8.3.0-6
ii  liblzma5               5.2.4-1
ii  libssl1.1              1.1.1b-2
ii  libstdc++6             8.3.0-6
ii  libsystemd0            241-3
ii  libwrap0               7.6.q-28
ii  lsb-base               10.2019031300
ii  zlib1g                 1:1.2.11.dfsg-1

apt-cacher-ng recommends no packages.

Versions of packages apt-cacher-ng suggests:
ii  avahi-daemon  0.7-4+b1
pn  doc-base      <none>
ii  libfuse2      2.9.9-1

-- Configuration Files:
/etc/apt-cacher-ng/security.conf [Errno 13] Permission denied: 
'/etc/apt-cacher-ng/security.conf'

-- debconf information:
* apt-cacher-ng/bindaddress: keep
* apt-cacher-ng/cachedir: keep
* apt-cacher-ng/tunnelenable: false
* apt-cacher-ng/gentargetmode: Set up now and update later
* apt-cacher-ng/port: keep
* apt-cacher-ng/proxy: keep
diff --git a/conf/acng.conf.in b/conf/acng.conf.in
index cedbaf5..ad95f13 100644
--- a/conf/acng.conf.in
+++ b/conf/acng.conf.in
@@ -19,6 +19,9 @@
 
 # Storage directory for downloaded data and related maintenance activity.
 #
+# Note: When the value for CacheDir is changed, change the file
+# /lib/systemd/system/apt-cacher-ng.service too
+#
 CacheDir: /var/cache/apt-cacher-ng
 
 # Log file directory, can be set empty to disable logging
diff --git a/systemd/apt-cacher-ng.service.in b/systemd/apt-cacher-ng.service.in
index b1368cf..a048bae 100644
--- a/systemd/apt-cacher-ng.service.in
+++ b/systemd/apt-cacher-ng.service.in
@@ -1,6 +1,7 @@
 [Unit]
 Description=Apt-Cacher NG software download proxy
 After=network.target
+# Note: when the CacheDir folder in /etc/apt-cacher-ng/acng.conf is changed, 
change the next line too
 RequiresMountsFor=/var/cache/apt-cacher-ng
 
 [Service]

Reply via email to