Bug#1055510: Best way to coordinate this fix

2023-11-11 Thread Francois Marier
On 2023-11-10 at 02:45:14, Helmut Grohne (hel...@subdivi.de) wrote:
> Thank you. The package built and dumat has imported it. I locally forked
> its analysis database pretending that systemd would not declare a
> conflict for molly-guard and reran it on that database. It does not
> report any issues for molly-guard 0.8. I also checked the underlying
> database and see that it recognizes the duplicated diversions there.

Thanks for all of the help Helmut!

I have uploaded 0.8.1 to unstable.

Francois

-- 
https://fmarier.org/



Bug#1055510: Best way to coordinate this fix

2023-11-10 Thread Helmut Grohne
Hi Francois,

On Thu, Nov 09, 2023 at 10:27:51PM -0800, Francois Marier wrote:
> I've just uploaded to experimental. If there are any tests you can easily
> run there, please do so.

Thank you. The package built and dumat has imported it. I locally forked
its analysis database pretending that systemd would not declare a
conflict for molly-guard and reran it on that database. It does not
report any issues for molly-guard 0.8. I also checked the underlying
database and see that it recognizes the duplicated diversions there.

> I've upgraded in unstable from the current version to 0.8 without problems,
> so that should in theory work when I eventually upload to unstable.

>From a /usr-merge pov, I have no objections to uploading this to
unstable immediately. Do note that backporting 0.8 to bookworm should
not be done without reverting the file moves that I added. I hope that
backporting molly-guard is not an important user story.

Helmut



Bug#1055510: Best way to coordinate this fix

2023-11-09 Thread Francois Marier
On 2023-11-08 at 21:15:58, Helmut Grohne (hel...@subdivi.de) wrote:
> Thank you. I suggest going via experimental first.

I've just uploaded to experimental. If there are any tests you can easily
run there, please do so.

I've upgraded in unstable from the current version to 0.8 without problems,
so that should in theory work when I eventually upload to unstable.

Francois

-- 
https://fmarier.org/



Bug#1055510: Best way to coordinate this fix

2023-11-08 Thread Helmut Grohne
Hi Francois,

On Wed, Nov 08, 2023 at 01:00:33PM -0800, Francois Marier wrote:
> If anybody would like to double-check (or test) the package I've prepared,
> it's in salsa right now.

Thank you. I suggest going via experimental first.
https://wiki.debian.org/UsrMerge recommends uploading to experimental
when moving files from / to /usr. This allows some qa already and in
particular dumat will have a second look at it. That look is fairly
limited at this time, because systemd conflicts with molly-guard now,
but I can locally make it pretend it would not and feed back the result
to you. Alternatively, Luca can perform another experimental upload of
systemd adding a version constraint to the conflict for molly-guard.
Does that extra detour make sense to you?

Helmut



Bug#1055510: Best way to coordinate this fix

2023-11-08 Thread Simó Albert i Beltran




On Thu, Nov 9 2023 at 12:13:25 AM +01:00:00, Simó Albert i Beltran 
 wrote:
Please take a look at 
https://salsa.debian.org/debian/molly-guard/-/commit/c1120c0c3602955abe02d4d810985ad13d02cdba




Sorry, I meant 
https://salsa.debian.org/debian/molly-guard/-/commit/c1120c0c3602955abe02d4d810985ad13d02cdba#note_440065






Bug#1055510: Best way to coordinate this fix

2023-11-08 Thread Simó Albert i Beltran
Please take a look at 
https://salsa.debian.org/debian/molly-guard/-/commit/c1120c0c3602955abe02d4d810985ad13d02cdba




Bug#1055510: Best way to coordinate this fix

2023-11-08 Thread Francois Marier
If anybody would like to double-check (or test) the package I've prepared,
it's in salsa right now.

Francois



Bug#1055510: Best way to coordinate this fix

2023-11-08 Thread Helmut Grohne
Control: tags -1 + patch

On Tue, Nov 07, 2023 at 09:35:54PM +0100, Helmut Grohne wrote:
> On Tue, Nov 07, 2023 at 08:11:19PM +, Luca Boccassi wrote:
> > On Tue, 7 Nov 2023 at 20:04, Francois Marier  wrote:
> > > What's the best way to coordinate a fix for this?
> > >
> > > I assume that we shouldn't upload a new molly-guard packages until the 
> > > files
> > > have actually moved in the systemd package?
> > >
> > > Should we wait until systemd is in unstable to push a new molly-guard out?
> 
> If the workaround is correctly implemented, it can go to unstable
> directly. Note that it's not simply changing the diversions from the old
> location to the new location. The workaround is duplicating them. At
> that point, you can no longer use --rename and have to do the renaming
> by hand. I'm happy to review a patch. For opensysusers I sent one, but I
> haven't gotten down to molly-guard yet.

Proposed patch attached.

Helmut
diff --minimal -Nru molly-guard-0.7.2/Makefile molly-guard-0.7.2+nmu1/Makefile
--- molly-guard-0.7.2/Makefile  2019-07-09 18:50:53.0 +0200
+++ molly-guard-0.7.2+nmu1/Makefile 2023-11-08 14:16:52.0 +0100
@@ -1,7 +1,7 @@
 PREFIX?=/usr
 cfgdir?=/etc/molly-guard
-libdir?=/lib
-sbindir?=/sbin
+libdir?=$(PREFIX)/lib
+sbindir?=$(PREFIX)/sbin
 REALPATH?=$(libdir)/molly-guard
 
 all: molly-guard.8 shutdown
diff --minimal -Nru molly-guard-0.7.2/debian/changelog 
molly-guard-0.7.2+nmu1/debian/changelog
--- molly-guard-0.7.2/debian/changelog  2019-07-09 18:50:53.0 +0200
+++ molly-guard-0.7.2+nmu1/debian/changelog 2023-11-08 14:47:40.0 
+0100
@@ -1,3 +1,11 @@
+molly-guard (0.7.2+nmu1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Duplicate aliased diversions for DEP17 M18. (Closes: #-1)
+  * Move all files to /usr.
+
+ -- Helmut Grohne   Wed, 08 Nov 2023 14:47:40 +0100
+
 molly-guard (0.7.2) unstable; urgency=medium
 
   * upload to unstable
diff --minimal -Nru molly-guard-0.7.2/debian/molly-guard.lintian-overrides 
molly-guard-0.7.2+nmu1/debian/molly-guard.lintian-overrides
--- molly-guard-0.7.2/debian/molly-guard.lintian-overrides  2019-07-09 
18:50:53.0 +0200
+++ molly-guard-0.7.2+nmu1/debian/molly-guard.lintian-overrides 2023-11-08 
14:47:40.0 +0100
@@ -1,9 +1,9 @@
-molly-guard: binary-without-manpage sbin/coldreboot
-molly-guard: binary-without-manpage sbin/halt
-molly-guard: binary-without-manpage sbin/pm-hibernate
-molly-guard: binary-without-manpage sbin/pm-suspend
-molly-guard: binary-without-manpage sbin/pm-suspend-hybrid
-molly-guard: binary-without-manpage sbin/poweroff
-molly-guard: binary-without-manpage sbin/reboot
-molly-guard: binary-without-manpage sbin/shutdown
-molly-guard: diversion-for-unknown-file usr/sbin/* preinst:29
+molly-guard: no-manual-page [usr/sbin/coldreboot]
+molly-guard: no-manual-page [usr/sbin/halt]
+molly-guard: no-manual-page [usr/sbin/pm-hibernate]
+molly-guard: no-manual-page [usr/sbin/pm-suspend]
+molly-guard: no-manual-page [usr/sbin/pm-suspend-hybrid]
+molly-guard: no-manual-page [usr/sbin/poweroff]
+molly-guard: no-manual-page [usr/sbin/reboot]
+molly-guard: no-manual-page [usr/sbin/shutdown]
+molly-guard: diversion-for-unknown-file sbin/* preinst:*
diff --minimal -Nru molly-guard-0.7.2/debian/molly-guard.postrm 
molly-guard-0.7.2+nmu1/debian/molly-guard.postrm
--- molly-guard-0.7.2/debian/molly-guard.postrm 2019-07-09 18:50:53.0 
+0200
+++ molly-guard-0.7.2+nmu1/debian/molly-guard.postrm2023-11-08 
14:47:40.0 +0100
@@ -20,7 +20,11 @@
 case "$1" in
 remove)
 for cmd in halt poweroff reboot shutdown coldreboot ; do
-dpkg-divert --package molly-guard --rename --remove /sbin/$cmd
+dpkg-divert --package molly-guard --no-rename --remove /sbin/$cmd
+dpkg-divert --package molly-guard --no-rename --remove 
"/usr/sbin/$cmd"
+   if test -e "/usr/lib/molly-guard/$cmd"; then
+mv "/usr/lib/molly-guard/$cmd" "/usr/sbin/$cmd"
+fi
 done
 
 for cmd in pm-hibernate pm-suspend pm-suspend-hybrid ; do
diff --minimal -Nru molly-guard-0.7.2/debian/molly-guard.preinst 
molly-guard-0.7.2+nmu1/debian/molly-guard.preinst
--- molly-guard-0.7.2/debian/molly-guard.preinst2019-07-09 
18:50:53.0 +0200
+++ molly-guard-0.7.2+nmu1/debian/molly-guard.preinst   2023-11-08 
14:47:40.0 +0100
@@ -14,7 +14,7 @@
 
 case "$1" in
 install|upgrade)
-mkdir -p /lib/molly-guard
+mkdir -p /usr/lib/molly-guard
 
 # Cleanup erroneous diversions added in 0.6.0
 for cmd in pm-hibernate pm-suspend pm-suspend-hybrid ; do
@@ -22,11 +22,27 @@
 done
 
 for cmd in halt poweroff reboot shutdown coldreboot ; do
-dpkg-divert --package molly-guard --divert /lib/molly-guard/$cmd 
--rename /sbin/$cmd
+dpkg-divert --package molly-guard --divert 
"/usr/lib/molly-guard/$cmd" --no-rename --add "/usr/sbin/$cmd"
+# 

Bug#1055510: Best way to coordinate this fix

2023-11-07 Thread Helmut Grohne
Hi Francois,

On Tue, Nov 07, 2023 at 08:11:19PM +, Luca Boccassi wrote:
> On Tue, 7 Nov 2023 at 20:04, Francois Marier  wrote:
> > What's the best way to coordinate a fix for this?
> >
> > I assume that we shouldn't upload a new molly-guard packages until the files
> > have actually moved in the systemd package?
> >
> > Should we wait until systemd is in unstable to push a new molly-guard out?

If the workaround is correctly implemented, it can go to unstable
directly. Note that it's not simply changing the diversions from the old
location to the new location. The workaround is duplicating them. At
that point, you can no longer use --rename and have to do the renaming
by hand. I'm happy to review a patch. For opensysusers I sent one, but I
haven't gotten down to molly-guard yet.

Helmut



Bug#1055510: Best way to coordinate this fix

2023-11-07 Thread Luca Boccassi
On Tue, 7 Nov 2023 at 20:04, Francois Marier  wrote:
>
> Hi Luca,
>
> What's the best way to coordinate a fix for this?
>
> I assume that we shouldn't upload a new molly-guard packages until the files
> have actually moved in the systemd package?
>
> Should we wait until systemd is in unstable to push a new molly-guard out?

Hi,

I believe you can upload to unstable straight away, as it would be
adding new diversions which should be fine if nothing is there. For
confirmation CC'ing Helmut.

Kind regards,
Luca Boccassi



Bug#1055510: Best way to coordinate this fix

2023-11-07 Thread Francois Marier
Hi Luca,

What's the best way to coordinate a fix for this?

I assume that we shouldn't upload a new molly-guard packages until the files
have actually moved in the systemd package?

Should we wait until systemd is in unstable to push a new molly-guard out?

Francois

-- 
https://fmarier.org/