Bug#820984: proftpd-basic: cannot preseed / ignores local config changes
Hilmar Preusse
hille42 at web.de
Wed Aug 31 22:42:50 UTC 2016
On 14.04.16 Florian Ernst (fe at LF.net) wrote:
Hi Flo,
I'm trying to understand the problem.
> please consider the following (abridged) transcript of trying to run
> proftpd-basic from inetd, but ending up having it running standalone:
>
> root at testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # no match
> root at testvz12:~# echo 'proftpd-basic shared/proftpd/inetd_or_standalone select from inetd' | debconf-set-selections
> root at testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> proftpd-basic shared/proftpd/inetd_or_standalone select from inetd
> root at testvz12:~# apt-get install -y openbsd-inetd
> [...]
> root at testvz12:~# DEBIAN_FRONTEND=noninteractive apt-get install -y proftpd-basic
> [...]
> root at testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # Run proftpd:
> proftpd-basic shared/proftpd/inetd_or_standalone select standalone
> root at testvz12:~# ps auxww | grep '[p]roftpd'
> proftpd 2138 0.0 0.2 119900 2524 ? Ss 11:28 0:00 proftpd: (accepting connections)
> root at testvz12:~# netstat -tulpen | grep 21
> tcp6 0 0 :::21 :::* LISTEN 108 1069993275 2138/proftpd: (acce
>
> As you can see, the preseeding had no effect. This is due to
> /var/lib/dpkg/info/proftpd-basic.config unconditionally calling
> "db_set shared/proftpd/inetd_or_standalone standalone" before calling
> "db_input high shared/proftpd/inetd_or_standalone", thus overwriting any
> previous setting. JFTR, apparently it was debbug#707689 which triggered
> adding the explicit db_set.
>
The patch which "solved" the problem was [1]
diff --git a/debian/proftpd-basic.config b/debian/proftpd-basic.config
index 9e3b174..d787c4e 100644
--- a/debian/proftpd-basic.config
+++ b/debian/proftpd-basic.config
@@ -9,6 +9,7 @@ action=$1
version=$2
db_title ProFTPD configuration
-
+db_set shared/proftpd/inetd_or_standalone standalone
db_input high shared/proftpd/inetd_or_standalone || true
-db_go
+db_go || true
+
As you already noticed it introduced a simple default before even the
question was asked what the end user expects.
Unfortunately I'm failing to understand why this change was
introduced. At this time we had a template file with a default
configured [2]:
Template: shared/proftpd/inetd_or_standalone
Type: select
__Choices: from inetd, standalone
Default: standalone
Therefore an explicit "db_set shared/proftpd/inetd_or_standalone
standalone" should not have been ever necessary...and I don't
understand why the problem described in #707689 did even occur.
1. Was there a problem in debconf?
2. Can we simply revert the change made in the past?
At least when looking @the samples in debconf.config &
debconf.templatesdebconf.templates simply removing the line
db_set shared/proftpd/inetd_or_standalone standalone
should do the trick. What am I missing?
> The same applies to any reconfiguring, of course:
>
> root at testvz12:~# echo 'proftpd-basic shared/proftpd/inetd_or_standalone select from inetd' | debconf-set-selections
> root at testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # Run proftpd:
> proftpd-basic shared/proftpd/inetd_or_standalone select from inetd
> root at testvz12:~# dpkg-reconfigure -fnoninteractive proftpd-basic
> usermod: no changes
> root at testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # Run proftpd:
> proftpd-basic shared/proftpd/inetd_or_standalone select standalone
>
> As such, the package cannot be preseeded to run from inetd at all.
>
> Furthermore, given the current .config, any unattended (thus:
> noninteractive) upgrade (or even a mere reinstall) will
> unconditionally overwrite the local configuration just the same,
> leading to proftpd running standalone instead of from inetd. I
> consider this to be in violation of Debian policy requiring local
> configuration changes to be preserved.
>
Many thanks!
Hilmar
[1] https://anonscm.debian.org/cgit/pkg-proftpd/proftpd-dfsg.git/patch/?id=8e07454023648c213ee9f9f3a1f28716b48a1544
[2] https://anonscm.debian.org/cgit/pkg-proftpd/proftpd-dfsg.git/tree/debian/proftpd-basic.templates?id=8e07454023648c213ee9f9f3a1f28716b48a1544
--
sigfault
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-proftpd-maintainers/attachments/20160901/0504449b/attachment.sig>
More information about the Pkg-proftpd-maintainers
mailing list