On Sun, 18 Sep 2022 16:15:28 +0200 Helmut Grohne <[email protected]> wrote: > Package: usrmerge > Version: 30+nmu1 > Severity: serious > Justification: essential packages should not fail to install > Control: affects -1 + src:mmdebstrap > > If you happen to be on an overlayfs filesystem (doesn't have to be /) > and then install usrmerge into a chroot on that filesystem (for instance > by doing using mmdebstrap), then usrmerge.postinst fails due to the > check for overlayfs. In this case, conversion is actually desired and > would actually work on overlayfs (since all the files reside on the > upper layer exclusively). usrmerge really shouldn't fail in this > situation. > > This is not limited to mmdebstrap. If I happen to create a bullseye > chroot (entirely inside the overlayfs) and then upgrade it to bookworm, > usrmerge will be pulled and fails in the same way. > > I recommend turning the check around. First actually attempt to perform > the conversion. If that happens to fails, check for overlayfs and > conditionally emit the helpful message. That way, conversion actually is > performed when it can be performed. When it cannot be performed, we > cannot do anything about it anyway.
So as talked on IRC, short-term users of memdebstrap can use --setup- hook=/usr/share/mmdebstrap/hooks/merged-usr/setup00.sh to unblock themselves while we figure this out - that will set up everything beforehand, so the conversion script will not run at all. Apart from that, this is a tricky issue, and there's a balance to strike. I do not think it is possible to detect whether an overlayfs tree has merged files/directories for a given subtree, which is what essentially a pre-run check for this should do. Hence, the only thing is attempting to move some files (suggested by Ansgar). But that is quite dangerous, and given any file/directory could be merged and not just the top level, at best you can do some sampling and hope for the best, but it would be far from ideal, but maybe that's the best we can do given the circumstances? -- Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part

