Bug#1043322: cockpit-tests: prone to loosing /lib/systemd/system/cockpit.service.d during /usr-merge

2023-08-10 Thread Helmut Grohne
Hi Martin,

On Wed, Aug 09, 2023 at 09:19:41AM +0200, Martin Pitt wrote:
> > I'm attaching a patch for your convenience and hope you agree.
> 
> You didn't actually, but it's fairly straightforward (I think). I sent an
> upstream PR to fix that. I didn't test it at all, let's see what CI says -- 
> but
> I'm fairly sure about it.

Oh dang, sorry. But I see you came up with exactly the same patch that I
had.

> If all goes well, that can go into today's release, then I can fix this in sid
> in the next day or two.

Cool. Note that this problem won't be practically relevant for about a
month. I hope that we progress well enough for it to become relevant
then.

Helmut



Bug#1043322: cockpit-tests: prone to loosing /lib/systemd/system/cockpit.service.d during /usr-merge

2023-08-09 Thread Martin Pitt
Control: forwarded -1 https://github.com/cockpit-project/cockpit/pull/19188

Hello Helmut,

Helmut Grohne [2023-08-08 12:38 +0200]:
> cockpit-tests has a non-trivial aspect when it comes to finalizing the
> /usr-merge. As we move all files from / to /usr, we'll likely also move
> /lib/systemd/system/cockpit.service.d. Such a move is currently
> prevented by the CTTE moratorium, but we are preparing for lifting that
> and this bug is part of that preparation. When performing that move for
> cockpit-tests, dpkg will delete this particular directory during package
> upgrade. Thus the dpkg database will be inconsistent with the actual
> filesystem, which generally is a bad outcome.

Thanks for pointing this out! I'm all for clearing up all obstacles for getting
usrmerge over the line at last. I wasn't even aware that we ship that
directory. https://packages.debian.org/sid/amd64/cockpit-tests/filelist
doesn't have it, but I suppose that doesn't show empty directories.

> I'm attaching a patch for your convenience and hope you agree.

You didn't actually, but it's fairly straightforward (I think). I sent an
upstream PR to fix that. I didn't test it at all, let's see what CI says -- but
I'm fairly sure about it.

If all goes well, that can go into today's release, then I can fix this in sid
in the next day or two.

Cheers!

Martin



Bug#1043322: cockpit-tests: prone to loosing /lib/systemd/system/cockpit.service.d during /usr-merge

2023-08-09 Thread Helmut Grohne
Package: cockpit-tests
Version: 297-1
Severity: important
Tags: patch upstream

Hi,

cockpit-tests has a non-trivial aspect when it comes to finalizing the
/usr-merge. As we move all files from / to /usr, we'll likely also move
/lib/systemd/system/cockpit.service.d. Such a move is currently
prevented by the CTTE moratorium, but we are preparing for lifting that
and this bug is part of that preparation. When performing that move for
cockpit-tests, dpkg will delete this particular directory during package
upgrade. Thus the dpkg database will be inconsistent with the actual
filesystem, which generally is a bad outcome.

Don't panic. We're lucky and cockpit does not actually need this
directory. The tests actually use /etc/systemd/system/cockpit.service.d,
so the affected location is entirely unused and we can simply delete it.
Once deleted, there cannot be an inconsistency between dpkg database and
filesystem as both agree it to be absent. So removing it now will save
us trouble later. This removal is not prohibited by the moratorium and
can be implemented without waiting.

I'm attaching a patch for your convenience and hope you agree.

This report does not imply that cockpit is unaffected by other issues
related to the /usr-merge. It merely asks for removing this single
instance that is well understood and actionable now.

Helmut