Regression in mcopy available in 22.04 fixed in later release

Bug #2052731 reported by Dilyn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mtools (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Incomplete
Undecided
Unassigned

Bug Description

[Impact]

There was a regression in behavior with mcopy after the 4.0.32 release which was fixed in the later 4.0.34 release.
This regression specifically causes an issue when copying a file using mcopy to some constructed partition when the directory tree to that file does not exist before the copy is made.

This was reported on the mtools mailing list in 2021 with the 4.0.34 release cut to fix this [1].

For whatever reason, this bug is observed in the version available on Jammy (4.0.33-1+really4.0.32-1build1), but should be resolved in later releases (though I myself have not tested them).

The current impact of this bug is under certain conditions, ubuntu-image 3.x will fail to create an Ubuntu Server image. Some rationale is given in this [2] PR I made against ubuntu-image. Instead of vendoring a more recent release of mtools within ubuntu-image itself, it would be preferable to have the fixed release available in Jammy just in case there is any blocker for moving the ubuntu-image snap to be based on core24, where this bug should already be fixed.

This bug is unrelated to #2010598 [3] but backporting the fix or simply updating to the version which fixes these issues would resolve both bugs.

[Test Plan]

The specific conditions under which this bug can be reproduced can be provided upon request; I have exactly one case at my disposal although I am sure there are many cases where this bug would manifest.

For the sufficiently motivated, it would be sufficient to create a classic gadget snap where in the gadget.yaml some bare partition has at least one target, and that gadget snap is used to produce a Classic image (I do not believe the contents of the image-definition.yaml matter aside from specifying that particular sort of gadget snap).
Reproduction is hard in this case because gadget snaps are not allowed to be published to the global store in general, making reproduction tricky for those without relevant access.

[Where problems could occur]

I do not forsee any potential issues arising from backporting the fixed release to Jammy; as far as I can tell, 4.0.33 and 4.0.34 are specific releases to fix two regressions in mtools behavior.

[1] https://lists.gnu.org/archive/html/info-mtools/2021-07/msg00006.html
[2] https://github.com/canonical/ubuntu-image/pull/163/commits/52796da7a4837a574e91e721272785c5a8fa6096
[3] https://bugs.launchpad.net/ubuntu/+source/mtools/+bug/2010598

Dilyn (dilyn-corner)
description: updated
Revision history for this message
Julian Andres Klode (juliank) wrote (last edit ):

This was asking for sponsorship but no debdiff has been attached nor is there a merge proposal, so I am unsubscribing sponsors and setting it to Incomplete. Please resubscribe once you have something to sponsor. This should be a minimal diff fixing your issue, and not a backport of the release.

Also we are going to need a concrete test plan.

Changed in mtools (Ubuntu):
status: New → Incomplete
Changed in mtools (Ubuntu Jammy):
status: New → Incomplete
Changed in mtools (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.