Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## use-core24 #181 +/- ##
==============================================
- Coverage 94.27% 94.19% -0.08%
==============================================
Files 16 16
Lines 3284 3310 +26
==============================================
+ Hits 3096 3118 +22
- Misses 120 123 +3
- Partials 68 69 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
I support this in general but are we sure that mmdebstrap behaviour is the same or sufficiently close to the same as debootstrap? |
I am investigating. There is a card in Jira with more context and this PR is to determine how hard it would be to replace debootstrap with mmdebstrap. From what I can read from the wiki, the README and the source code, they try to stay close to the result debootstrap produce, but try to do it more efficiently and with more options. So far I think I have found a decent set of arguments to reproduce the chroot we build with debootstrap but I need to compare the package lists and probably go further to compare the resulting chroots. If you know any efficient method to do so, I am interested :). |
Great.
I don't, I'm afraid. I only got as far as "run debootstrap mantic, run mmdebstrap mantic, notice the results are not identical" ... |
|
When trying to build the current Currently u-i as a snap is base on core22, so the installed version of mmdebstrap is 0.8.4. The changelog for more recent version mention several fixes to implement the same behavior as debootstrap regarding usrmerge. I see several possible solutions:
I think the first solution is the best one because we are not in a hurry to replace debootstrap for now. |
|
Note: You can use diffoscope to compare the output of debootstrap and mmdebstrap to actually see the difference. |
2556607 to
f57cdc4
Compare
|
Apart from a specific error with qemu for one build, this is now working (no need for core24). I should now compare outputs using diffoscope. |
7a90854 to
2722bec
Compare
62cf97b to
b018cf9
Compare
|
QQ -- with mmdebstrap in universe, is there a plan to move it to main, for full support? regardless of packaging, it seems odd to have something meant to be a fundamental piece of software for Ubuntu relying on a |
Nice catch. Since in the end we only package ubuntu-image as a snap, consumers are supposed to have "everything" and not really worry of the details on this. But from our maintainer's point of view I agree it could also be a problem. I will discuss it and see if this is worth a MIR process. @sil2100 What do you think? |
5664784 to
0051551
Compare
…ccess compatible versions
Signed-off-by: Paul Mars <paul.mars@canonical.com>
Signed-off-by: Paul Mars <paul.mars@canonical.com>
Signed-off-by: Paul Mars <paul.mars@canonical.com>
Signed-off-by: Paul Mars <paul.mars@canonical.com>
| if len(imageDefinition.Rootfs.Components) > 0 { | ||
| components := strings.Join(imageDefinition.Rootfs.Components, ",") | ||
| debootstrapCmd.Args = append(debootstrapCmd.Args, "--components="+components) | ||
| mmdebstrapCmd.Args = append(mmdebstrapCmd.Args, "--components="+components) | ||
| } | ||
|
|
||
| // add the SUITE TARGET and MIRROR arguments | ||
| debootstrapCmd.Args = append(debootstrapCmd.Args, []string{ | ||
| mmdebstrapCmd.Args = append(mmdebstrapCmd.Args, []string{ | ||
| imageDefinition.Series, | ||
| targetDir, | ||
| imageDefinition.Rootfs.Mirror, | ||
| }...) |
There was a problem hiding this comment.
We need to align used mirrors with rootfs.pocket. We should do something like:
- if len(imageDefinition.Rootfs.Components) > 0 {
- components := strings.Join(imageDefinition.Rootfs.Components, ",")
- mmdebstrapCmd.Args = append(mmdebstrapCmd.Args, "--components="+components)
- }
-
- // add the SUITE TARGET and MIRROR arguments
+ // add the SUITE and TARGET arguments
mmdebstrapCmd.Args = append(mmdebstrapCmd.Args, []string{
imageDefinition.Series,
targetDir,
- imageDefinition.Rootfs.Mirror,
}...)
+ // add MIRROR list
+ for _, line := range strings.Split(imageDefinition.LegacyBuildSourcesList(), "\n") {
+ if strings.HasPrefix(line, "deb") {
+ mmdebstrapCmd.Args = append(mmdebstrapCmd.Args, line)
+ }
+ }
+
To speed up the build time and for various future improvements we are replacing debootstrap with mmdebstrap.
Bonus: the test suite is now ~10min shorter.
Fixes: FR-6576