Your message dated Tue, 15 Oct 2019 20:21:46 +0200
with message-id <[email protected]>
and subject line Re: Bug#942355: dumb defaults for LogDir and CacheDir
has caused the Debian Bug report #942355,
regarding dumb defaults for LogDir and CacheDir
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
942355: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942355
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: apt-cacher-ng
Version: 3.2-2
Severity: minor

Right now apt-cacher-ng ships with TWO sets of default values:
the ones hard-coded into the binary, and
the ones in the default config file.

They don't match.  This is confusing.
Please make them match, and then (ideally) make the default acng.conf be just 
comments.

    # mkdir fnord   # empty directory, i.e. compiled-in config
    # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord LogDir
    /var/tmp
    # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord CacheDir
    /var/tmp
    # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord SupportDir
    /usr/lib/apt-cacher-ng

Those first two defaults are clearly dumb, and should be fixed.
Hopefully this is straightforward to do.

These also don't match the default acnf.conf.

    # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord ExThreshold
    20
    # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord ReportPage

    # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord Remap-debrep
    #



The reason I want this is because I want apt-cacher-ng to allow *only* these:

    http://apt-cacher-ng.example.net:3142/debian
    http://apt-cacher-ng.example.net:3142/debian-security

...but AFAICT to achieve that I have to DELETE "Remap"-gentoo &c from acng.conf.
I don't think I can do that from a dropin, e.g. this doesn't work:

    # cat /etc/apt-cacher-ng/zzz_cyber.conf
    Remap-gentoo:

    # /usr/sbin/apt-cacher-ng SocketPath=/run/apt-cacher-ng/socket -c 
/etc/apt-cacher-ng ForeGround=1
    WARNING: No configuration was read from file:sfnet_mirrors
    Invalid entry, no configuration: Remap-gentoo:
    Error reading main options, terminating.

So I have to edit acng.conf itself.
augtool doesn't have a lens for acng.conf, because it's a weird "unique 
snowflake" format.
So I have to replace acng.conf entirely.
But LogDir and CacheDir have the wrong "default defaults".
So I have to set those back to the "non-default defaults" explicitly.
But that's ugly.
So I am writing this bug report. :-)


-- System Information:
Debian Release: 10.1
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 
'proposed-updates'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

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

--- End Message ---
--- Begin Message ---
Hallo,
* Trent W. Buck [Tue, Oct 15 2019, 01:41:53PM]:
> Package: apt-cacher-ng
> Version: 3.2-2
> Severity: minor
>
> Right now apt-cacher-ng ships with TWO sets of default values:
> the ones hard-coded into the binary, and
> the ones in the default config file.

Wrong. Because there is no "default config file". Someone has to specify
the config folder (or files) to incorporate those settings into the
config set. Try:

systemctl status apt-cacher-ng | grep etc.apt.cacher.ng

> They don't match.  This is confusing.
> Please make them match, and then (ideally) make the default acng.conf be just 
> comments.

No. The bits in the config folder are configured at runtime. Why should
I hardcode different values now? To make a pitfall for people who make
some system setup and mistakenly assume that the configuration is read
from /etc/apt-cacher-ng while it in reality doesn't? Only to make YOU
less confused?

>     # mkdir fnord   # empty directory, i.e. compiled-in config
>     # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord LogDir
>     /var/tmp
>     # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord CacheDir
>     /var/tmp
>     # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord SupportDir
>     /usr/lib/apt-cacher-ng
>
> Those first two defaults are clearly dumb, and should be fixed.

Hear, hear. Dude, "dumb" is not a synonym for "broken" and is also
something very subjective.

> Hopefully this is straightforward to do.
>
> These also don't match the default acnf.conf.

As mentioned, only the command line option makes it "the default".

>     # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord ExThreshold
>     20

WTF is "fnord" and what do you want to demonstrate?

>     # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord ReportPage
>
>     # /usr/lib/apt-cacher-ng/acngtool printvar -c fnord Remap-debrep
>     #
>
>
>
> The reason I want this is because I want apt-cacher-ng to allow *only* these:
>
>     http://apt-cacher-ng.example.net:3142/debian
>     http://apt-cacher-ng.example.net:3142/debian-security

Then please cook your own config and don't mess around with the one
created by the Debian setup.

> ...but AFAICT to achieve that I have to DELETE "Remap"-gentoo &c from 
> acng.conf.
> I don't think I can do that from a dropin, e.g. this doesn't work:
>
>     # cat /etc/apt-cacher-ng/zzz_cyber.conf
>     Remap-gentoo:

Why don't you start with that, instead of calling things "dumb"?
Sound like all you want is "picking all bits from the config folder
except for the ones I don't like". Is this your requirement?

>     # /usr/sbin/apt-cacher-ng SocketPath=/run/apt-cacher-ng/socket -c 
> /etc/apt-cacher-ng ForeGround=1
>     WARNING: No configuration was read from file:sfnet_mirrors
>     Invalid entry, no configuration: Remap-gentoo:
>     Error reading main options, terminating.
>
> So I have to edit acng.conf itself.
> augtool doesn't have a lens for acng.conf, because it's a weird "unique 
> snowflake" format.

The WHAT? Am I supposed to guess what you mean now?

Sorry, I am out. If you really want me to change anything, feel free to
rephrase your wishes without this aggressive tone and in more
constructive and pragmatic manner.

(That said, I have a plan to extend the configuration processing to have a 
git-config like format, making it more flexible... but don't keep your breath)

Best regards,
Eduard.

--- End Message ---

Reply via email to