Bug#820984: proftpd-basic: cannot preseed / ignores local config changes

2017-01-26 Thread Niels Thykier
Francesco Paolo Lovergine:
> Package: proftpd-dfsg
> Version: 1.3.5b-2
> Followup-For: Bug #820984
> 
> About this, we are going to drop the non-standalone support in maintainer
> scripts for the following reasons:
> 
> - inetd/xinetd/systemd support is of little interest for a serious ftp server

(In my reply below I assume you meant "systemd socket activation" here
rather than systemd in general)

> [...]
> What is the RMs tought about this issue?
> 
> [...]

In the end, this is your decision as the package maintainer.  But please
remember to consider upgrade paths and how to handle that for sysadmins
that picked the "non-standalone" option.
  For assistance with handling the upgrades, please use
debian-mentors@l.d.o or other packaging related support channels.

Thanks,
~Niels



Bug#820984: proftpd-basic: cannot preseed / ignores local config changes

2017-01-26 Thread Francesco Paolo Lovergine
Package: proftpd-dfsg
Version: 1.3.5b-2
Followup-For: Bug #820984

About this, we are going to drop the non-standalone support in maintainer
scripts for the following reasons:

- inetd/xinetd/systemd support is of little interest for a serious ftp server
- maintainer scripts cannot currently support fully the three different
  alternatives now available
- it is much more easy allowing manual non-standalone configuration
- debconf issue here documented is still unknown (and unexpected) 

What is the RMs tought about this issue?


-- System Information:
Debian Release: 8.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)



Bug#820984: proftpd-basic: cannot preseed / ignores local config changes

2016-09-16 Thread Hilmar Preuße

tags 820984 + help
stop

On 14.04.2016 12:25, Florian Ernst wrote:

Hi,


please consider the following (abridged) transcript of trying to run
proftpd-basic from inetd, but ending up having it running
standalone:

Im played a little bit on that bug, w/o success. Initially there was the 
following code in the ...config file:



#!/bin/sh

set -e

# Source debconf library.
. /usr/share/debconf/confmodule

action=$1
version=$2

db_title ProFTPD configuration
db_input high shared/proftpd/inetd_or_standalone || true
db_go


and here is the relevant part of the template file:


Template: shared/proftpd/inetd_or_standalone
Type: select
__Choices: from inetd, standalone
Default: standalone


However I'm failing to understand, what is wrong on that code as it is 
nearly a copy of the template examples delivered w/ debconf. Of course 
the fix for debbug#707689 was wrong:


+db_set shared/proftpd/inetd_or_standalone standalone
 db_input high shared/proftpd/inetd_or_standalone || true
-db_go
+db_go || true

At first I suspected the  in the possible values "from inetd" 
could be a problem, I replaced it by "_" w/o solving the problem.


Could anybody have a look at the problem and give an advise? Tagging it 
"help" for now.


Hilmar
--
http://www.hilmar-preusse.de.vu/   #206401 http://counter.li.org



Bug#820984: proftpd-basic: cannot preseed / ignores local config changes

2016-08-31 Thread Hilmar Preusse
On 14.04.16 Florian Ernst (f...@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@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # no match
> root@testvz12:~# echo 'proftpd-basic   shared/proftpd/inetd_or_standalone 
>  select  from inetd' | debconf-set-selections
> root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> proftpd-basic   shared/proftpd/inetd_or_standalone  select   from inetd
> root@testvz12:~# apt-get install -y openbsd-inetd
> [...]
> root@testvz12:~# DEBIAN_FRONTEND=noninteractive apt-get install -y 
> proftpd-basic
> [...]
> root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # Run proftpd:
> proftpd-basic   shared/proftpd/inetd_or_standalone  select  standalone
> root@testvz12:~# ps auxww | grep '[p]roftpd'
> proftpd   2138  0.0  0.2 119900  2524 ?Ss   11:28   0:00 proftpd: 
> (accepting connections)  
> root@testvz12:~# netstat -tulpen | grep 21
> tcp6   0  0 :::21   :::*LISTEN
>   1081069993275  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@testvz12:~# echo 'proftpd-basic   shared/proftpd/inetd_or_standalone 
>  select  from inetd' | debconf-set-selections
> root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
> # Run proftpd:
> proftpd-basic   shared/proftpd/inetd_or_standalone  select   from inetd
> root@testvz12:~# dpkg-reconfigure -fnoninteractive proftpd-basic
> usermod: no changes
> root@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


signature.asc
Description: Digital signature


Bug#820984: proftpd-basic: cannot preseed / ignores local config changes

2016-04-14 Thread Florian Ernst
Package: proftpd-basic
Version: 1.3.5-1.1+deb8u1
Severity: serious
Justification: rc_policy.txt 3. Configuration files: "Changes to configuration 
files must be preserved during a package upgrade."

Dear Maintainer(s),

please consider the following (abridged) transcript of trying to run
proftpd-basic from inetd, but ending up having it running standalone:

root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
# no match
root@testvz12:~# echo 'proftpd-basic   shared/proftpd/inetd_or_standalone  
select  from inetd' | debconf-set-selections
root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
proftpd-basic   shared/proftpd/inetd_or_standalone  select   from inetd
root@testvz12:~# apt-get install -y openbsd-inetd
[...]
root@testvz12:~# DEBIAN_FRONTEND=noninteractive apt-get install -y proftpd-basic
[...]
root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
# Run proftpd:
proftpd-basic   shared/proftpd/inetd_or_standalone  select  standalone
root@testvz12:~# ps auxww | grep '[p]roftpd'
proftpd   2138  0.0  0.2 119900  2524 ?Ss   11:28   0:00 proftpd: 
(accepting connections)  
root@testvz12:~# netstat -tulpen | grep 21
tcp6   0  0 :::21   :::*LISTEN  
1081069993275  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 same applies to any reconfiguring, of course:

root@testvz12:~# echo 'proftpd-basic   shared/proftpd/inetd_or_standalone  
select  from inetd' | debconf-set-selections
root@testvz12:~# debconf-get-selections | grep proftpd || echo '# no match'
# Run proftpd:
proftpd-basic   shared/proftpd/inetd_or_standalone  select   from inetd
root@testvz12:~# dpkg-reconfigure -fnoninteractive proftpd-basic
usermod: no changes
root@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.


Best regards,
Flo

-- System Information:
Debian Release: 8.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 
'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)