Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-24 Thread Martin-Éric Racine
On Fri, Jun 23, 2023 at 10:36 PM Andreas Beckmann  wrote:
>
> On 23/06/2023 19.50, Martin-Éric Racine wrote:
> > Is /etc/dhcpc the correct path or should it be /etc/dhcpcd instead?
>
> That's a really ancient location used by the 3.x version.

Noted.

> > Shouldn't we instead try to move that resolv.conf instead of deleting it?
>
> That was only a symlink to some location in /var, nothing to be
> preserved. And I only delete it if it is a symlink (to any target).
>
>
>  From the old .postinst:
>
> ...
> # /etc/dhcpc/resolv.conf is now a link to /var/lib/dhcpcd/resolv.conf
> rm -f /etc/dhcpc/resolv.conf
> ln -s /var/lib/dhcpcd/resolv.conf /etc/dhcpc/resolv.conf
> ...

Noted.

> PS: there are some obsolete conffiles still lingering around, but
> dpkg-maintscript-helper rm_conffile does not seem to work reliably when
> switching between arch:all and arch:any, so maybe I'll revisit that later.

I could always change these to arch:any if it simplifies migration.

My suggested strategy:

Produce and test the necessary fixes on dhcpcd 10 first, then backport
cherry-picks to dhcpcd 9 for bookworm-proposed-updates.

Martin-Éric



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-23 Thread Andreas Beckmann

On 23/06/2023 19.50, Martin-Éric Racine wrote:

Is /etc/dhcpc the correct path or should it be /etc/dhcpcd instead?


That's a really ancient location used by the 3.x version.


Shouldn't we instead try to move that resolv.conf instead of deleting it?


That was only a symlink to some location in /var, nothing to be 
preserved. And I only delete it if it is a symlink (to any target).



From the old .postinst:

...
# /etc/dhcpc/resolv.conf is now a link to /var/lib/dhcpcd/resolv.conf
rm -f /etc/dhcpc/resolv.conf
ln -s /var/lib/dhcpcd/resolv.conf /etc/dhcpc/resolv.conf
...


Andreas

PS: there are some obsolete conffiles still lingering around, but 
dpkg-maintscript-helper rm_conffile does not seem to work reliably when 
switching between arch:all and arch:any, so maybe I'll revisit that later.




Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-23 Thread Martin-Éric Racine
On Fri, Jun 23, 2023 at 5:43 PM Andreas Beckmann  wrote:
>
> On 22/06/2023 12.15, Martin-Éric Racine wrote:
> >>> To solve that, we need to add Conflicts: dhcpcd (<< 1:5~) to usrmerge
> >>> which will make dhcpcd in sid (and bookworm) uninstallable due to the
> >>> missing epoch.
> >>
> >> Ack.
> >>
> >> Currently in NEW.
>
> That probably won't work and will cause a reject, since it drops the
> epoch from a source package that previously (up to wheezy) had an epoch.

No, it re-introduces the epoch.

> I've tested adding the epoch to the bookworm package in my piuparts
> framework, and that seems to make the upgrades succeed if the package
> version from wheezy is still installed.
>
> Please also add this dhcpcd.preinst script to clean up leftovers from
> the wheezy package.
>
> = >8 =
> #!/bin/sh
> set -e
>
> if dpkg --compare-versions "$2" lt-nl "1:10.0.1-2~" ; then
>  # cleanup leftovers from dhcpcd 1:3.* in wheezy
> # can be removed after the release of trixie
>  update-alternatives --remove dhcpcd /sbin/dhcpcd3
>  if [ -d /etc/dhcpc ]; then
>  test ! -h /etc/dhcpc/resolv.conf || rm -fv
> /etc/dhcpc/resolv.conf
>  rmdir --ignore-fail-on-non-empty /etc/dhcpc
>  fi
> fi
>
> #DEBHELPER#
> = 8< =
> (the version "1:10.0.1-2~" assumes the preinst gets added in the
> 1:10.0.1-2 upload)

Is /etc/dhcpc the correct path or should it be /etc/dhcpcd instead?

Shouldn't we instead try to move that resolv.conf instead of deleting it?

> > Btw, if you think that this or anything else is worthy of a
> > cherry-pick for bookworm-updates, suggestions are welcome.
>
> The re-addition of the epoch definitively needs to backported to
> bookworm-pu, otherwise the upcoming usrmerge upload (with additional
> Breaks) to bookworm-pu will make dhcpcd uninstallable.

Noted.

> The preinst is needed as well (but with a version of
> "1:9.4.1-22+deb12u1~" in the test) as the leftover alternative seems to
> be the source of the usrmerge conflict noticed in wicd-daemon.

I vaguely recall something in Scott's old maintainer files
adding/removing a symbolic link. That's probably what causes this.

> (The bookworm-pu upload needs to use the old source package name dhcpcd5
> (and version 9.4.1-22+deb12u1), but you can update the Vcs-* URLs if you
> want to put the bookworm branch in the "new" repository location.)

Indeed.

Martin-Éric



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-23 Thread Andreas Beckmann

On 22/06/2023 12.15, Martin-Éric Racine wrote:

To solve that, we need to add Conflicts: dhcpcd (<< 1:5~) to usrmerge
which will make dhcpcd in sid (and bookworm) uninstallable due to the
missing epoch.


Ack.

Currently in NEW.


That probably won't work and will cause a reject, since it drops the 
epoch from a source package that previously (up to wheezy) had an epoch.


I've tested adding the epoch to the bookworm package in my piuparts 
framework, and that seems to make the upgrades succeed if the package 
version from wheezy is still installed.


Please also add this dhcpcd.preinst script to clean up leftovers from 
the wheezy package.


= >8 =
#!/bin/sh
set -e

if dpkg --compare-versions "$2" lt-nl "1:10.0.1-2~" ; then
# cleanup leftovers from dhcpcd 1:3.* in wheezy
# can be removed after the release of trixie
update-alternatives --remove dhcpcd /sbin/dhcpcd3
if [ -d /etc/dhcpc ]; then
test ! -h /etc/dhcpc/resolv.conf || rm -fv 
/etc/dhcpc/resolv.conf

rmdir --ignore-fail-on-non-empty /etc/dhcpc
fi
fi

#DEBHELPER#
= 8< =
(the version "1:10.0.1-2~" assumes the preinst gets added in the 
1:10.0.1-2 upload)



Btw, if you think that this or anything else is worthy of a
cherry-pick for bookworm-updates, suggestions are welcome.


The re-addition of the epoch definitively needs to backported to 
bookworm-pu, otherwise the upcoming usrmerge upload (with additional 
Breaks) to bookworm-pu will make dhcpcd uninstallable.
The preinst is needed as well (but with a version of 
"1:9.4.1-22+deb12u1~" in the test) as the leftover alternative seems to 
be the source of the usrmerge conflict noticed in wicd-daemon.
(The bookworm-pu upload needs to use the old source package name dhcpcd5 
(and version 9.4.1-22+deb12u1), but you can update the Vcs-* URLs if you 
want to put the bookworm branch in the "new" repository location.)


Andreas



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-22 Thread Martin-Éric Racine
On Thu, Jun 22, 2023 at 8:59 AM Martin-Éric Racine
 wrote:
> On Thu, Jun 22, 2023 at 12:44 AM Andreas Beckmann  wrote:
> > On 18/06/2023 04.41, Martin-Éric Racine wrote:
> > > override_dh_gencontrol:
> > >  dh_gencontrol --package=dhcpcd -- 
> > > -v1:$(DEB_VERSION_UPSTREAM_REVISION)
> > >  dh_gencontrol --remaining-packages
> > >
> > > Would probably be enough to make this policy-compliant again.
> >
> > Please do that.
> >
> > While doing more piuparts tests starting from ancient releases, I found
> > that the combination of dhcpcd/wheezy with dhcpcd5/bullseye prevents the
> > installation of usrmerge (and thus the upgrade to bookworm) with
> >
> >FATAL ERROR:
> >Both /sbin/dhcpcd and /usr/sbin/dhcpcd exist.
> >
> > This package combination is e.g. achieved by installing wicd-daemon in
> > wheezy and upgrading release by release to bookworm.
> >
> > To solve that, we need to add Conflicts: dhcpcd (<< 1:5~) to usrmerge
> > which will make dhcpcd in sid (and bookworm) uninstallable due to the
> > missing epoch.
>
> Ack.
>
> Currently in NEW.

Btw, if you think that this or anything else is worthy of a
cherry-pick for bookworm-updates, suggestions are welcome.

Martin-Éric



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-22 Thread Martin-Éric Racine
On Thu, Jun 22, 2023 at 12:44 AM Andreas Beckmann  wrote:
> On 18/06/2023 04.41, Martin-Éric Racine wrote:
> > override_dh_gencontrol:
> >  dh_gencontrol --package=dhcpcd -- -v1:$(DEB_VERSION_UPSTREAM_REVISION)
> >  dh_gencontrol --remaining-packages
> >
> > Would probably be enough to make this policy-compliant again.
>
> Please do that.
>
> While doing more piuparts tests starting from ancient releases, I found
> that the combination of dhcpcd/wheezy with dhcpcd5/bullseye prevents the
> installation of usrmerge (and thus the upgrade to bookworm) with
>
>FATAL ERROR:
>Both /sbin/dhcpcd and /usr/sbin/dhcpcd exist.
>
> This package combination is e.g. achieved by installing wicd-daemon in
> wheezy and upgrading release by release to bookworm.
>
> To solve that, we need to add Conflicts: dhcpcd (<< 1:5~) to usrmerge
> which will make dhcpcd in sid (and bookworm) uninstallable due to the
> missing epoch.

Ack.

Currently in NEW.

Martin-Éric



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-21 Thread Andreas Beckmann

On 18/06/2023 04.41, Martin-Éric Racine wrote:

override_dh_gencontrol:
 dh_gencontrol --package=dhcpcd -- -v1:$(DEB_VERSION_UPSTREAM_REVISION)
 dh_gencontrol --remaining-packages

Would probably be enough to make this policy-compliant again.


Please do that.

While doing more piuparts tests starting from ancient releases, I found 
that the combination of dhcpcd/wheezy with dhcpcd5/bullseye prevents the 
installation of usrmerge (and thus the upgrade to bookworm) with


  FATAL ERROR:
  Both /sbin/dhcpcd and /usr/sbin/dhcpcd exist.

This package combination is e.g. achieved by installing wicd-daemon in 
wheezy and upgrading release by release to bookworm.


To solve that, we need to add Conflicts: dhcpcd (<< 1:5~) to usrmerge 
which will make dhcpcd in sid (and bookworm) uninstallable due to the 
missing epoch.



Andreas



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-17 Thread Martin-Éric Racine
On Sat, Jun 17, 2023 at 11:44 PM Andreas Beckmann  wrote:
>
> On 17/06/2023 20.30, Martin-Éric Racine wrote:
> > This is what I would do if the archive policy demands it. Won't affect
> > transitional dhcpcd5 or dhcpcd-base.
>
> Ack.
>
> I'm not sure whether the transitional dhcpcd5 package should have a
> versioned dependency on the "right" dhcpcd, either
> (= 1:${binary:Version}) or (>= 1:9). IIRC you need to add the epoch
> manually in the former case.

Merely re-introducing the epoch for bin:dhcpcd ought to be enough.
dhcpcd5 depends on a versionless dhcpcd. Thus:

override_dh_gencontrol:
dh_gencontrol --package=dhcpcd -- -v1:$(DEB_VERSION_UPSTREAM_REVISION)
dh_gencontrol --remaining-packages

Would probably be enough to make this policy-compliant again.

Martin-Éric



Bug#1037190: re-introduction of epoch? #1037190 dhcpcd: version is lower than in wheezy

2023-06-17 Thread Andreas Beckmann

On 17/06/2023 20.30, Martin-Éric Racine wrote:

This is what I would do if the archive policy demands it. Won't affect
transitional dhcpcd5 or dhcpcd-base.


Ack.

I'm not sure whether the transitional dhcpcd5 package should have a 
versioned dependency on the "right" dhcpcd, either
(= 1:${binary:Version}) or (>= 1:9). IIRC you need to add the epoch 
manually in the former case.



Andreas