Your message dated Fri, 05 Mar 2021 11:50:55 +0000
with message-id <e1li8yt-0006om...@fasolo.debian.org>
and subject line Bug#984115: fixed in wims-lti 0.4.4-4
has caused the Debian Bug report #984115,
regarding wims-lti: modifies conffiles (policy 10.7.3): 
/etc/apache2/sites-available/wims-lti-django.conf-dist
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 ow...@bugs.debian.org
immediately.)


-- 
984115: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984115
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: wims-lti
Version: 0.4.4-3
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed your package modifies conffiles.
This is forbidden by the policy, see
https://www.debian.org/doc/debian-policy/ch-files.html#configuration-files

10.7.3: "[...] The easy way to achieve this behavior is to make the
configuration file a conffile. [...] This implies that the default
version will be part of the package distribution, and must not be
modified by the maintainer scripts during installation (or at any
other time)."

Note that once a package ships a modified version of that conffile,
dpkg will prompt the user for an action how to handle the upgrade of
this modified conffile (that was not modified by the user).

Further in 10.7.3: "[...] must not ask unnecessary questions
(particularly during upgrades) [...]"

If a configuration file is customized by a maintainer script after
having asked some debconf questions, it may not be marked as a
conffile. Instead a template could be installed in /usr/share and used
by the postinst script to fill in the custom values and create (or
update) the configuration file (preserving any user modifications!).
This file must be removed during postrm purge.
ucf(1) may help with these tasks.
See also https://wiki.debian.org/DpkgConffileHandling

In https://lists.debian.org/debian-devel/2012/09/msg00412.html and
followups it has been agreed that these bugs are to be filed with
severity serious.

debsums reports modification of the following files,
from the attached log (scroll to the bottom...):

0m37.1s ERROR: FAIL: debsums reports modifications inside the chroot:
  /etc/apache2/sites-available/wims-lti-django.conf-dist

The diff from the shipped to the installed version is
=====
@@ -5,7 +5,7 @@
 
 <VirtualHost *:80>
     DocumentRoot "/var/lib/wims-lti"
-    ServerName SERVERNAME
+    ServerName 
 
     Alias /static/ /var/lib/wims-lti/collected_static/
     <Directory /var/lib/wims-lti/collected_static>
=====

What is happening in postinst?
=====
        ## create the distribution's configuration for Apache
        sed -i "s/SERVERNAME/$virtualHost/" $apacheConfDist
        ## copy it to Apache configuration if the file does not exist
        [ -f $apacheConf ] || cp $apacheConfDist $apacheConf
=====

You probably want to use ucf here ... the following is completely
untested:

* ship the template as /usr/share/wims-lti/wims-lti-django.conf-dist

* depend on ucf

* update the maintainer scripts:

===== postinst configure =====
    apacheConfDist=/usr/share/wims-lti/wims-lti-django.conf-dist

    sed "s/SERVERNAME/$virtualHost/" $apacheConfDist > $apacheConf.new
    ucf --debconf-ok $apacheConf.new $apacheConf
    rm -f $apacheConf.new
    ucfr $DPKG_MAINTSCRIPT_PACKAGE $apacheConf
===== =====

===== postrm purge =====
    apacheConf=/etc/apache2/sites-available/wims-lti-django.conf

    rm -f $apacheConf
    if which ucf >/dev/null; then
        ucf --purge $apacheConf
    fi
    if which ucfr >/dev/null; then
        ucfr --purge $DPKG_MAINTSCRIPT_PACKAGE $apacheConf
    fi
===== =====

* get rid of /etc/apache2/sites-available/wims-lti-django.conf-dist

===== preinst, before #DEBHELPER# =====
if [ "$1" = "upgrade" ] && dpkg --compare-versions "$2" lt-nl "0.4.4-4~" ; then
  if [ -f /etc/apache2/sites-available/wims-lti-django.conf-dist ]; then
    # undo modifications s.t. it can be removed by dpkg-maintscript-helper
    sed -i 's/ServerName .*/ServerName SERVERNAME/' 
/etc/apache2/sites-available/wims-lti-django.conf-dist
  fi
fi
===== =====

===== debian/wims-lti.maintscript =====
rm_conffile /etc/apache2/sites-available/wims-lti-django.conf-dist 0.4.4-4~
===== =====


cheers,

Andreas

Attachment: wims-lti_0.4.4-3.log.gz
Description: application/gzip


--- End Message ---
--- Begin Message ---
Source: wims-lti
Source-Version: 0.4.4-4
Done: Georges Khaznadar <georg...@debian.org>

We believe that the bug you reported is fixed in the latest version of
wims-lti, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 984...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Georges Khaznadar <georg...@debian.org> (supplier of updated wims-lti package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Thu, 04 Mar 2021 14:52:21 +0100
Source: wims-lti
Architecture: source
Version: 0.4.4-4
Distribution: unstable
Urgency: medium
Maintainer: Georges Khaznadar <georg...@debian.org>
Changed-By: Georges Khaznadar <georg...@debian.org>
Closes: 984115
Changes:
 wims-lti (0.4.4-4) unstable; urgency=medium
 .
   * modified the postinst script to avoid the mofification of
     the file wims-lti-django.conf-dist, which is considered as a conffile,
     hence not modifiable per the Policy (10.7.3). Closes: #984115
Checksums-Sha1:
 de2d3eb1cbd3f9ad7745fc36c87d18733319551b 1888 wims-lti_0.4.4-4.dsc
 88220682591313ef41f81d3a444c1afcc0b065e2 9448 wims-lti_0.4.4-4.debian.tar.xz
 f6db4f6cb87877f64839321489db1e7c6d234603 6382 wims-lti_0.4.4-4_source.buildinfo
Checksums-Sha256:
 e4d64e12b65d56a61659a9cd1e787377726e1c8a49682a8dc02bd92c02a3ef70 1888 
wims-lti_0.4.4-4.dsc
 641202cb72ba1c4b4ca7a04ef253ce49a6af41ecd394dd81dc99bd21f49a7fa5 9448 
wims-lti_0.4.4-4.debian.tar.xz
 bb603693f36bc343ff4383bb5a49af9635c876ca1b1a1cabc18e8c4ccaafeb8c 6382 
wims-lti_0.4.4-4_source.buildinfo
Files:
 0c5387773213e6e698871a1b91d2eeb8 1888 web optional wims-lti_0.4.4-4.dsc
 e013bcc9d11edc61a83131ced0228f07 9448 web optional 
wims-lti_0.4.4-4.debian.tar.xz
 ac923e68add49667d847fc59bc81405f 6382 web optional 
wims-lti_0.4.4-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJIBAEBCAAyFiEEM0CzZP9nFT+3zK6FHCgWkHE2rjkFAmBA5jwUHGdlb3JnZXNr
QGRlYmlhbi5vcmcACgkQHCgWkHE2rjnEPw/6Asz0EMBnvpgI20Q/Lx4U24j+8f4m
rpD4CBGfxeKGkvYIL6rxedJkIheUxo28OyiZ0UNYwEVMR8JBpZSRl/lrg8R6l4zF
lk4NZqsyR7ECNOpGmhUjEg5n7ewflE6dwIsQrmGMi5TDl7F9bPILFZpoqRvvhrc4
6WqSXXd7T4XSXl/hfFXzerERbweAekpsvj9d+TgTfmNK/mQVfotOa5bA89+Gfbxq
niSjfcOO+usQng2z3+VGDtQJDIT90TCaOXY20mu1Eiyp0P1EXzhY1+y/Opb+edKY
0FCvqph2q/UtJOehvV0WK4go/pHvFJQCJ4m0AWvEYW4huKRab40nxftQ9GzRUxmG
uzvYnIiAiN7W3QER4zH/IP3ebpXAbhhWyVWf0CWrS2HnO9apJwmacQt7xoM5Z69l
W3s00VziE6ZTj+DrP7Xw1ImVL38XjqdQdFh+6lcbkMo0gQE2iiwPiDm6lXMfw2lM
G772p8grWNTNgZbqKREDj3YqMgkSDVO/CdIa7qMfOJoDDirThaO0wx0XNeTa2nOR
jTzMxx7BoE5kn7e1cxSvK8V/v1rmZAEY5cfHes0PKgkOki1TTK0LngUgnqLJAt5B
YyE25MPlVgBmtagIjxve5lFNEVuBBweHiwrSoS2G1wfatLQvT0krcgqTgyc5GjRk
z5jVMZotIJv88pI=
=+PjS
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to