Bug#1036443: ntpsec: leftover files on purge

2023-07-26 Thread Christoph Anton Mitterer
Hey.

Thanks for your efforts in this issue :-)


Uhm... I'm really not an expert... but from a first glance is looks
reasonable.


Cheers,
Chris.



Bug#1036443: ntpsec: leftover files on purge

2023-07-23 Thread Richard Laager

Fix pending as:
https://salsa.debian.org/debian/ntpsec/-/commit/ed7cf69b3c7ec6cc21a604e47fbf6ee9a9966117

Feedback welcome!

1. I brought back some of the (manual) postrm bits for the ntp &
   ntpdate packages.  This was something I should have preserved when
   making the transitional packages.

   ntpsec.service has ntp.service as an alias, so we do not mask
   ntp.service.

   I did not bring back the apparmor bits, as the apparmor profile
   still exists in the ntpsec package.

   I did not bring back the /etc/network/if-up.d/ntpdate removal in
   ntpdate, as that was conditionalized on 1:4.2.8p12+dfsg-2~, so that
   transition was completed in buster.

2. sntp needs to cleanup /var/lib/sntp because of /var/lib/sntp/kod.
   This seems to be a pre-existing bug in the ntp package.  (Though, if
   it wasn't, I still would have missed it with everything else.)

3. The obsolete ntp & ntpdate conffiles need to be cleaned up.  For
   most, this is accomplished by listing them in PACKAGE.conffiles with
   the "remove-on-upgrade" flag.

4. For /etc/default/ntp and /etc/ntp.conf, which are handled special in
   ntpsec.preinst, I'm not sure if the "remove-on-upgrade" functionality
   would even work; it seems like it would remove them too soon.

   The dpkg-maintscript-helper rm_conffile support seemed problematic
   too...

   If I run that in the ntpsec scripts (so I can get it to happen after
   the special handling), I don't think it would work, as it checks that
   the package in question owns the files, and in the ntp -> ntpsec
   case, it does not.

   If I run that in the ntp scripts, then it would run too early, so
   I'd need to make ntpsec.preinst look at some backup file.  I'm not
   sure how much ordering is guaranteed between the ntp and ntpsec
   maintainer scripts, so I might have to look at both the .dpkg-backup
   and .dpkg-bak versions.  It's also not clear to me whether I should
   care about the original name.

   Given that this already released in this state and I'm going to need
   a stable release update to fix this, it seems I should be
   conservative.  Policy 10.7.3 says I "should" remove these during
   upgrade, not that I "must".

   Ultimately, I am leaving these two files alone during the upgrade
   and removing them on purge of the ntp transitional package.

--
Richard



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1036443: ntpsec: leftover files on purge

2023-05-26 Thread Christoph Anton Mitterer
On Thu, 2023-05-25 at 21:52 -0500, Richard Laager wrote:
> At first glance, I agree that these should be cleaned up. I just need
> to 
> actually do the work on this, ASAP, of course.

I guess it will anyway not make it into bookworm... so no hurry neeed
:-)


Thanks,
Chris.



Bug#1036443: ntpsec: leftover files on purge

2023-05-25 Thread Richard Laager
At first glance, I agree that these should be cleaned up. I just need to 
actually do the work on this, ASAP, of course.


On 2023-05-22 08:40, Christoph Anton Mitterer wrote:

Oh and I've just noticed that I've had accidentally reported the bug
against ntpsec, not ntp.


That is correct, I believe. The ntpsec source package has taken over the 
ntp binary packages.


--
Richard



OpenPGP_signature
Description: OpenPGP digital signature


Bug#1036443: ntpsec: leftover files on purge

2023-05-22 Thread Christoph Anton Mitterer
Oh and I've just noticed that I've had accidentally reported the bug
against ntpsec, not ntp.

Not sure where these files should be ideally cleaned up.

I mean in principle of course ntp, but must people that follow sid,
will have already removed the package and thus never see the clean up.



Bug#1036443: ntpsec: leftover files on purge

2023-05-22 Thread Christoph Anton Mitterer
Hey.

I've just noted there are more leftover files, namely dangling symlinks
at:

l /etc/systemd/system/multi-user.target.wants/ntp.service /etc/rc*.d/*ntp
lrwxrwxrwx 1 root root 13 Jul 10  2017 /etc/rc2.d/S03ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 13 Jul 10  2017 /etc/rc3.d/S03ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 13 Jul 10  2017 /etc/rc4.d/S03ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 13 Jul 10  2017 /etc/rc5.d/S03ntp -> ../init.d/ntp
lrwxrwxrwx 1 root root 31 Jun 30  2021 
/etc/systemd/system/multi-user.target.wants/ntp.service -> 
/lib/systemd/system/ntp.service

Interestingly, these only showed up on a system where I've upgraded
straight from bullseye to bookwork.
They're not there on a sid system, which was regularly upgraded.


Cheers,
Chris.



Bug#1036443: ntpsec: leftover files on purge

2023-05-20 Thread Christoph Anton Mitterer
Source: ntpsec
Version: 1:4.2.8p15+dfsg-1
Severity: important


Hey.

When upgrading from bullseye to bookworm (and thus chaning from
ntp to ntpsec), the following files are leftover:
dpkg: warning: unable to delete old directory '/var/lib/ntp': Directory not 
empty
dpkg: warning: unable to delete old directory '/var/lib/sntp': Directory not 
empty

# find /var/lib/ntp /var/lib/sntp
/var/lib/ntp
/var/lib/ntp/ntp.drift
/var/lib/sntp
/var/lib/sntp/kod

I think these packages should be upgraded to properly clean up those files
or they'll likely remain as cruft forever.


Cheers,
Chris.