Bug#687818: tomcat6: postinst modifies conffile /etc/logrotate.d/tomcat6

2012-09-21 Thread Andreas Beckmann
Version: 6.0.35-1
Followup-For: Bug #687818

[resending with the new, more informative bug template]

Hi,

during a test with piuparts I noticed your package modifies conffiles.
This is forbidden by the policy, see
http://www.debian.org/doc/debian-policy/ch-files.html#s-config-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 http://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...):

  /etc/logrotate.d/tomcat6


cheers,

Andreas

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.


Bug#687818: tomcat6: postinst modifies conffile /etc/logrotate.d/tomcat6

2012-09-20 Thread tony mancill
On 09/16/2012 02:48 AM, Andreas Beckmann wrote:
> Package: tomcat6
> Version: 6.0.35-4
> Severity: serious
> Justification: Policy 10.7.3
> User: debian...@lists.debian.org
> Usertags: piuparts
> Control: found -1 tomcat6/6.0.35-1+squeeze2
> 
> Hi,
> 
> during a test with piuparts I noticed that your package ships a conffile
> that is modified by the postinst script. This is forbidden by the
> policy, see
> http://www.debian.org/doc/debian-policy/ch-files.html#s-config-files
>   "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)."
> 
> The mishandled conffile is /etc/logrotate.d/tomcat6

Hello Andreas,

Thank you for the bug report.  The intention behind modifying the
logrotate.d file in the postinst is because the tomcat6 user isn't known
until the postinst runs.  Obviously it can't be done this way.

Perhaps it is better to assume that the tomcat user is "tomcat6" and add
a note to README.Debian for users who want to run tomcat as a different
user.

Thank you,
tony



signature.asc
Description: OpenPGP digital signature
__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.

Bug#687818: tomcat6: postinst modifies conffile /etc/logrotate.d/tomcat6

2012-09-16 Thread Andreas Beckmann
Package: tomcat6
Version: 6.0.35-4
Severity: serious
Justification: Policy 10.7.3
User: debian...@lists.debian.org
Usertags: piuparts
Control: found -1 tomcat6/6.0.35-1+squeeze2

Hi,

during a test with piuparts I noticed that your package ships a conffile
that is modified by the postinst script. This is forbidden by the
policy, see
http://www.debian.org/doc/debian-policy/ch-files.html#s-config-files
  "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)."

The mishandled conffile is /etc/logrotate.d/tomcat6


Cheers,

Andreas

__
This is the maintainer address of Debian's Java team
. 
Please use
debian-j...@lists.debian.org for discussions and questions.