Bug#1030212: puppet-agent: conffiles not removed: /etc/init.d/puppet-agent /etc/default/puppet-agent

2023-02-02 Thread Paul Wise
On Wed, 2023-02-01 at 23:39 -0500, Jérôme Charaoui wrote:

> Thanks for the clarification. I think you meant that I should have used 
> prior-version "7.21.0-3~" instead of "7.21.0.2~", because the first 
> version of the package with the service renamed was "7.21.0-3", and that 
> is also the version where I added those lines in d/puppet-agent.maintscript.

The key is to base the prior-version on the version of the upload you
are doing that adds the conffile removal, not the version that actually
dropped the conffile from the .deb.

> I'll adjust the prior-version to "7.22.0-4~" in my next upload, 
> hopefully that fixes things.

That should do it yeah.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#1030212: puppet-agent: conffiles not removed: /etc/init.d/puppet-agent /etc/default/puppet-agent

2023-02-01 Thread Jérôme Charaoui

Le 2023-02-01 à 23 h 14, Paul Wise a écrit :

On Wed, 2023-02-01 at 08:22 -0500, Jérôme Charaoui wrote:


Specifically, I added to d/puppet-agent.maintscript:

  mv_conffile /etc/default/puppet-agent /etc/default/puppet 7.21.0-2~
  mv_conffile /etc/init.d/puppet-agent /etc/init.d/puppet 7.21.0-2~

Do you know why this isn't working as intended?


According to the dpkg-maintscript-helper manual page:

    If the conffile has not been shipped for several versions, and you
    are now modifying the maintainer scripts to clean up the obsolete
    file, prior-version should be based on the version of the package
    that you are now preparing, not the first version of the package
    that lacked the conffile.

    For example, for a conffile removed in version 2.0-1 of a package,

    prior-version should be set to 2.0-1~. This will cause the conffile
    to be removed even if the user rebuilt the previous version 1.0-1 as
    1.0-1local1. Or a package switching a path from a symlink (shipped
    in version 1.0-1) to a directory (shipped in version 2.0-1), but
    only performing the actual switch in the maintainer scripts in
    version 3.0-1, should set prior-version to 3.0-1~.

So 7.22.0-3~ should have been used for the version number, but
for the next upload it should be 7.22.0-4~ or similar instead.


Thanks for the clarification. I think you meant that I should have used 
prior-version "7.21.0-3~" instead of "7.21.0.2~", because the first 
version of the package with the service renamed was "7.21.0-3", and that 
is also the version where I added those lines in d/puppet-agent.maintscript.


I'll adjust the prior-version to "7.22.0-4~" in my next upload, 
hopefully that fixes things.


-- Jérôme



Bug#1030212: puppet-agent: conffiles not removed: /etc/init.d/puppet-agent /etc/default/puppet-agent

2023-02-01 Thread Paul Wise
On Wed, 2023-02-01 at 08:22 -0500, Jérôme Charaoui wrote:

> Specifically, I added to d/puppet-agent.maintscript:
> 
>  mv_conffile /etc/default/puppet-agent /etc/default/puppet 7.21.0-2~
>  mv_conffile /etc/init.d/puppet-agent /etc/init.d/puppet 7.21.0-2~
> 
> Do you know why this isn't working as intended?

According to the dpkg-maintscript-helper manual page:

   If the conffile has not been shipped for several versions, and you
   are now modifying the maintainer scripts to clean up the obsolete
   file, prior-version should be based on the version of the package
   that you are now preparing, not the first version of the package
   that lacked the conffile.
   
   For example, for a conffile removed in version 2.0-1 of a package,
   prior-version should be set to 2.0-1~. This will cause the conffile
   to be removed even if the user rebuilt the previous version 1.0-1 as
   1.0-1local1. Or a package switching a path from a symlink (shipped
   in version 1.0-1) to a directory (shipped in version 2.0-1), but
   only performing the actual switch in the maintainer scripts in
   version 3.0-1, should set prior-version to 3.0-1~.

So 7.22.0-3~ should have been used for the version number, but
for the next upload it should be 7.22.0-4~ or similar instead.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part


Bug#1030212: puppet-agent: conffiles not removed: /etc/init.d/puppet-agent /etc/default/puppet-agent

2023-02-01 Thread Jérôme Charaoui

Le 2023-02-01 à 03 h 14, Paul Wise a écrit :

Package: puppet-agent
Version: 7.22.0-3
Severity: normal
User: debian...@lists.debian.org
Usertags: obsolete-conffile adequate

The recent upgrade did not deal with obsolete conffiles properly.
Please use the dpkg-maintscript-helper support provided by
dh_installdeb to remove these obsolete conffiles on upgrade.

https://www.debian.org/doc/debian-policy/ch-files.html#s-config-files
https://manpages.debian.org/man/1/dh_installdeb

$ p=puppet-agent ; adequate $p ; dpkg-query -W -f='${Conffiles}\n' $p | 
grep obsolete
puppet-agent: obsolete-conffile /etc/init.d/puppet-agent
puppet-agent: obsolete-conffile /etc/default/puppet-agent
 /etc/init.d/puppet-agent e57bcd8733d0b1f87def2289c80e1598 obsolete
 /etc/default/puppet-agent b1a39e98f886262927fe4ab56a5c5991 obsolete


I thought that would be dealt with in this commit:

https://salsa.debian.org/puppet-team/puppet-agent/-/commit/20b3ba73d86ed69a3ec31c11277198dd8a906b2e

Specifically, I added to d/puppet-agent.maintscript:

mv_conffile /etc/default/puppet-agent /etc/default/puppet 7.21.0-2~
mv_conffile /etc/init.d/puppet-agent /etc/init.d/puppet 7.21.0-2~

Do you know why this isn't working as intended?

Thanks,

-- Jérôme



Bug#1030212: puppet-agent: conffiles not removed: /etc/init.d/puppet-agent /etc/default/puppet-agent

2023-02-01 Thread Paul Wise
Package: puppet-agent
Version: 7.22.0-3
Severity: normal
User: debian...@lists.debian.org
Usertags: obsolete-conffile adequate

The recent upgrade did not deal with obsolete conffiles properly.
Please use the dpkg-maintscript-helper support provided by
dh_installdeb to remove these obsolete conffiles on upgrade.

https://www.debian.org/doc/debian-policy/ch-files.html#s-config-files
https://manpages.debian.org/man/1/dh_installdeb

   $ p=puppet-agent ; adequate $p ; dpkg-query -W -f='${Conffiles}\n' $p | grep 
obsolete
   puppet-agent: obsolete-conffile /etc/init.d/puppet-agent
   puppet-agent: obsolete-conffile /etc/default/puppet-agent
    /etc/init.d/puppet-agent e57bcd8733d0b1f87def2289c80e1598 obsolete
    /etc/default/puppet-agent b1a39e98f886262927fe4ab56a5c5991 obsolete

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing-debug
  APT policy: (900, 'testing-debug'), (900, 'testing'), (800, 
'unstable-debug'), (800, 'unstable'), (790, 'buildd-unstable'), (700, 
'experimental-debug'), (700, 'experimental'), (690, 'buildd-experimental')
merged-usr: no
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-3-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU:en
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages puppet-agent depends on:
ii  adduser    3.130
ii  debconf [debconf-2.0]  1.5.82
ii  facter 4.2.13-2
ii  hiera  3.10.0-1
ii  init-system-helpers    1.65.2
ii  ruby   1:3.1
ii  ruby-augeas    1:0.5.0+gem-1
ii  ruby-concurrent    1.1.6+dfsg-5
ii  ruby-deep-merge    1.1.1-2
ii  ruby-semantic-puppet   1.0.4-1
ii  ruby-shadow    2.5.1-1
ii  ruby-sorted-set    1.0.3-3

Versions of packages puppet-agent recommends:
ii  augeas-tools   1.14.0-1
ii  debconf-utils  1.5.82
ii  lsb-release    12.0-1
pn  ruby-selinux   

Versions of packages puppet-agent suggests:
pn  hiera-eyaml    
pn  puppet-module-puppetlabs-augeas-core   
pn  puppet-module-puppetlabs-cron-core 
pn  puppet-module-puppetlabs-host-core 
pn  puppet-module-puppetlabs-mount-core    
pn  puppet-module-puppetlabs-selinux-core  
pn  puppet-module-puppetlabs-sshkeys-core  
pn  puppet-module-puppetlabs-stdlib    
ii  ruby-hocon 1.3.1-2
pn  ruby-msgpack   

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part