Bug#1059417: ed: install (r)ed into /usr/bin
Hi Ian, On Sun, Dec 24, 2023 at 10:39:43PM +, Ian Jackson wrote: > Chris Hofstaedtler writes ("Bug#1059417: ed: install (r)ed into /usr/bin"): > > I'm attaching a trivial patch to implement such a move. > > As explained in debian/changelog, the update-alternatives calls are > > intentionally kept unchanged, to preserve existing user > > configuration. > > I assume that you are following a plan developed by Helmut et al, as > part of the overall Debian usrmerge mitigation plan. I confirm. > I don't think I agree with this change, as provided, because it will > cause ed to move to /usr/bin on downstreams that don't do usrmerge. I don't think there is any reasonable way to continue supporting unmerged layouts. There are many places already that break subtly there. For instance, the protective diversions for m-a:same shared file loss generally leave the old file around in the aliased location on umerged systems. We do not have the resources to support both merged and unmerged layouts. A main reason to switching to merged-only was reducing the support cost down the line. > And then, without changing the diversion, the package is actually > broken. Could it be that you mean s/diversion/alternatives/ here? I am having difficulty locating said diversion and your argument becomes true when interpreting it the other way. > I think there could be an affordance in dh_auto_configure that allows > this all to work properly. > > I assume there is some reason why we aren't, in Debian, changing > dh_auto_configure to interpret --bindir=/bin as --bindir=/usr/bin. I am all ears. I do not harm unmerged users intentionally. When there is a cheap way to implement mitigations without hurting unmerged, I do so. The change you propose here is not without issues. For one thing dh_auto_configure has never inspected user's arguments so far. The promise has always been appending them. What you propose is a significant departure from those semantics. If we were to change debhelper in such a way, packages would move their files on a binNMU. Such moves tend to cause RC bugs. Cases such as ed are (hopefully) simple. If this change were to be done to e.g. gzip (which is diverted by zutils), we could end up with /bin/zgrep missing after upgrade. While the intention is to make this as easy as possible on the maintainer side, every time we changed such a default location (dh_installinit, dh_installudev, systemd.pc, udev.pc) we were faced with a number of packages breaking and filed patches for them beforehand. A similar approach could be used here in principle. The approach that probably is the easiest to unmerged downstreams is dh-sequence-movetousr / dh_movetousr. It's a noop in bookworm-backports and downstreams can similarly disable it when doing rebuilds. Helmut
Bug#1059417: ed: install (r)ed into /usr/bin
Chris Hofstaedtler writes ("Bug#1059417: ed: install (r)ed into /usr/bin"): > Your package installs ed and red into /bin. For the ongoing Debian > UsrMerge effort [1] these should move to /usr/bin in the trixie > cycle. Hi. FTR, I am not the maintainer. > I'm attaching a trivial patch to implement such a move. > As explained in debian/changelog, the update-alternatives calls are > intentionally kept unchanged, to preserve existing user > configuration. I assume that you are following a plan developed by Helmut et al, as part of the overall Debian usrmerge mitigation plan. I don't think I agree with this change, as provided, because it will cause ed to move to /usr/bin on downstreams that don't do usrmerge. And then, without changing the diversion, the package is actually broken. I think there could be an affordance in dh_auto_configure that allows this all to work properly. I assume there is some reason why we aren't, in Debian, changing dh_auto_configure to interpret --bindir=/bin as --bindir=/usr/bin. > If during the trixie cycle your package will undergo structural > changes or any other file moves, please also see the wiki and upload > to experimental first when these changes are done. I don't believe this is planned, but, once again, I am not the maintainer. Thanks, Ian. -- Ian JacksonThese opinions are my own. Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk, that is a private address which bypasses my fierce spamfilter.
Bug#1059417: ed: install (r)ed into /usr/bin
Source: ed Version: 1.19-1 Severity: normal Tags: patch User: helm...@debian.org Usertags: dep17m2 Hi! Your package installs ed and red into /bin. For the ongoing Debian UsrMerge effort [1] these should move to /usr/bin in the trixie cycle. I'm attaching a trivial patch to implement such a move. As explained in debian/changelog, the update-alternatives calls are intentionally kept unchanged, to preserve existing user configuration. However, please still read the wiki page on moving files, especially if you intend to backport to bookworm or earlier. The patch has already been checked by a local dumat copy. If during the trixie cycle your package will undergo structural changes or any other file moves, please also see the wiki and upload to experimental first when these changes are done. Chris [1] https://wiki.debian.org/UsrMerge diff -Nru ed-1.19/debian/changelog ed-1.19/debian/changelog --- ed-1.19/debian/changelog 2023-01-16 08:11:57.0 +0100 +++ ed-1.19/debian/changelog 2023-12-24 22:45:06.0 +0100 @@ -1,3 +1,12 @@ +ed (1.19-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Install ed, red into /usr/bin. (Closes: #-1) +Keep update-alternatives calls unchanged, to preserve existing +user configuration. + + -- Chris Hofstaedtler Sun, 24 Dec 2023 22:45:06 +0100 + ed (1.19-1) unstable; urgency=medium * New upstream version 1.19 diff -Nru ed-1.19/debian/rules ed-1.19/debian/rules --- ed-1.19/debian/rules 2023-01-16 08:11:57.0 +0100 +++ ed-1.19/debian/rules 2023-12-24 22:44:57.0 +0100 @@ -13,5 +13,5 @@ .PHONY: override_dh_auto_configure override_dh_auto_configure: - dh_auto_configure -- --bindir=/bin $(CROSS) \ + dh_auto_configure -- $(CROSS) \ $(foreach v,CPPFLAGS CFLAGS LDFLAGS,'$(v)=$($(v))')