update-verify fails to unpack lzma-compressed dmg
Categories
(Release Engineering :: Release Automation, defect, P1)
Tracking
(firefox-esr115 unaffected, firefox-esr128 unaffected, firefox135 unaffected, firefox136+ fixed, firefox137+ fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox135 | --- | unaffected |
| firefox136 | + | fixed |
| firefox137 | + | fixed |
People
(Reporter: jcristau, Assigned: hneiva)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
tools/update-verify/release/common/unpack.sh uses 7z x to unpack a dmg, and expects something like Firefox/Firefox.app/ inside.
But since 136.0b1 it's only seeing:
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
..... 512 76 0.ddm
..... 32256 260 1.Apple_partition_map
..... 4096 88 2.Apple_Driver_ATAPI
..... 452984832 132230176 3.hfsx
..... 5120 0 4.free
------------------- ----- ------------ ------------ ------------------------
453026816 132230600 5 files
| Reporter | ||
Comment 1•1 year ago
|
||
Looks to be from the lzma compression.
7z l output from https://archive.mozilla.org/pub/firefox/nightly/2024/12/2024-12-03-21-40-41-mozilla-central/firefox-135.0a1.en-US.mac.dmg vs https://archive.mozilla.org/pub/firefox/nightly/2024/12/2024-12-04-09-26-16-mozilla-central/firefox-135.0a1.en-US.mac.dmg is wildly different.
Updated•1 year ago
|
Comment 2•1 year ago
|
||
:vasi, since you are the author of the regressor, bug 1935015, could you take a look?
For more information, please visit BugBot documentation.
| Reporter | ||
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Taking a look.
Comment 4•1 year ago
|
||
Do we know where this script is running? A 7zz from 7zip upstream seems to work ok, maybe we can just upgrade the 7z version.
Comment 5•1 year ago
|
||
(We could also consider using libdmg's dmg and hfsplus scripts for unpacking.)
Updated•1 year ago
|
| Reporter | ||
Comment 6•1 year ago
|
||
It's running in a docker image based on ubuntu 20.04, and 7z is from the p7zip-full package.
https://searchfox.org/mozilla-central/source/taskcluster/docker/update-verify
Comment 7•1 year ago
|
||
Thanks for the info. OOC, how can I tell that's based on 20.04? I don't know how to figure out what DOCKER_IMAGE_PARENT refers to. Ubuntu 20.04 is nearly EOL, so that's exciting.
Anyhow, it looks like only Ubuntu 24.11 oracular has the new 7zip in the repo. (The package has also changed names in modern Ubuntu versions.) I don't see us switching to a non-LTS version.
Some options:
- Fetch a moden 7z binary from eg: upstream 7zip. These seem to run fine on 20.04, and can handle lzma-compressed Firefox.
- Use libdmg to unpack the dmg, instead of 7zip. We'd have to get the libdmg toolchain into the docker image.
- Figure out if it's possible to make lzma dmgs acceptable to an old version of 7zip, debugging the 7zip code to figure out what it expects.
I'm most inclined towards option 1. Does that seem reasonable to folks?
Comment 8•1 year ago
|
||
The docker image is:
https://searchfox.org/mozilla-central/source/taskcluster/docker/update-verify/Dockerfile
Which is referenced https://searchfox.org/mozilla-central/rev/6fc1a107c44e011a585614cbbe8826f9e01ec802/taskcluster/kinds/docker-image/kind.yml#255 (you can see the parent there)
So could be relevant to update that parent to ubuntu2204-base or ubuntu2404-base. What I'm not sure about though, is if this was pinned at 2004-base due to wanting to validate on "oldest linux Firefox supports" due to glibc/etc for the updater binary itself.
Comment 9•1 year ago
|
||
Adding a 7z fetch to the task graph and using it instead of using the distro package seems like a good approach to me too.
Comment 10•1 year ago
|
||
Maybe add something like this in taskcluster/kinds/fetch/toolchains.yml and use that in UV?
@@ -743,3 +743,14 @@ uv:
type: git
repo: https://github.com/astral-sh/uv
revision: 0652800cb018eb086fbbf220a1f73af7e320be54
+
+7z-2409-linux64:
+ description: 7zip 24.09 for x64 Linux
+ fetch:
+ type: static-url
+ url: https://github.com/ip7z/7zip/releases/download/24.09/7z2409-linux-x64.tar.xz
+ sha256: 914c7e20ad5ef8e4d3cf08620ff8894b28fe11b7eb99809d6930870fbe48a281
+ size: 1565344
+ artifact-name: 7z.tar.zst
+ strip-components: 1
+ add-prefix: 7z/
Comment 11•1 year ago
|
||
I'm having trouble finding any existing examples of adding a fetched artifact to a docker image for use in taskcluster. How would I do that?
Comment 12•1 year ago
|
||
Also, is there a job I can run on Try to repro this, and later test that it's fixed? "release-update-verify-firefox-macosx64-*/30" looked plausible, but it didn't surface any errors.
Comment 13•1 year ago
•
|
||
(In reply to Gabriel Bustamante [:gabriel] from comment #10)
Maybe add something like this in
taskcluster/kinds/fetch/toolchains.ymland use that in UV?
Good news: I see bug 1863288 added the right fetch and toolchain tasks to make this exact version of 7zip available to downstream tasks.
I'm currently testing which approach would work best between upgrading the Ubuntu base image or just upgrading 7z in the update-verify tasks.
Comment 14•1 year ago
|
||
Marking this bug as P1/S1 because this bug creates a hole in our test coverage in the release pipeline.
Comment 15•1 year ago
|
||
The bug is marked as tracked for firefox136 (beta) and tracked for firefox137 (nightly). However, the bug still isn't assigned.
:jlorenzo, could you please find an assignee for this tracked bug? Given that it is a regression and we know the cause, we could also simply backout the regressor. If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Comment 16•1 year ago
•
|
||
(In reply to Dave Vasilevsky [:vasi] from comment #7)
Anyhow, it looks like only Ubuntu 24.11 oracular has the new 7zip in the repo. (The package has also changed names in modern Ubuntu versions.) I don't see us switching to a non-LTS version.
I confirm you're right. 24.04 doesn't have it. This try commit still outputs:
[task 2025-02-05T11:37:06.519Z] Retrieving 'http://ftp.stage.mozaws.net/pub/firefox/candidates/136.0b1-candidates/build2/mac/en-US/Firefox 136.0b1.dmg' from cache...
[task 2025-02-05T11:37:06.645Z] ERROR: Dangerous link path was ignored : Firefox/[] : /Applications
[task 2025-02-05T11:37:12.724Z] ERROR: Unsupported Method : 0.ddm
[task 2025-02-05T11:37:12.724Z] ERROR: Unsupported Method : 1.Apple_partition_map
[task 2025-02-05T11:37:12.724Z] ERROR: Unsupported Method : 2.Apple_Driver_ATAPI
[task 2025-02-05T11:37:13.193Z] ERROR: Unsupported Method : 3.hfsx
[task 2025-02-05T11:37:13.196Z] Couldn't find .app package
I could repro the behavior locally and here's the version I got:
$ 7z -h
7-Zip 23.01 (x64) : Copyright (c) 1999-2023 Igor Pavlov : 2023-06-20
64-bit locale=en_US.UTF-8 Threads:10 OPEN_MAX:1048576
Some options:
- Fetch a moden 7z binary from eg: upstream 7zip. These seem to run fine on 20.04, and can handle lzma-compressed Firefox.
I tried locally and this approach works on the 24.04 image but not the 20.04. Here's what I get:
$ ./7zz Firefox\ 136.0b1.dmg
./7zz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./7zz)
./7zz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./7zz)
./7zz: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./7zz)
That makes sense to me because 20.04 turns out to ship libc6 v2.31.
So I guess we need to upgrade both the Ubuntu base image and download 7zip 24.09.
Comment 17•1 year ago
•
|
||
I just chatted with :bhearsum and :dmeehan. We are going to back bug 1863288 out of beta in order to unblock update-verify.
For the long term fix, :bhearsum suggested we go with that option instead:
(In reply to Dave Vasilevsky [:vasi] from comment #7)
- Use libdmg to unpack the dmg, instead of 7zip. We'd have to get the libdmg toolchain into the docker image.
:bhearsum mentioned we already have a toolchain for it which I just found.
Comment 18•1 year ago
|
||
The following should work fine to extract them:
./dmg extract target.dmg extracted
./hfsplus extracted extractall
And will end up with a .app bundle in the cwd. This is a notable change from extracting with 7z, which creates a directory with the .app bundle inside. This logic will need to be adjusted to cope with that.
Comment 19•1 year ago
|
||
Yeah. Also, the DMG seems to be just like... a disk image?
We could use dmg2img (which might be in the 20.04 distro repo)
And do something like:
dmg2img "firefox.dmg" "output.img"
And then mount that.
That should also get us a .app inside the mnt/ directory.
Could be tricky if the image has multiple partitions tho...
Comment 20•1 year ago
|
||
Ah it doesn't seem like dmg2img it's in the distro package :/
and it seems very outdated never-mind.
Comment 21•1 year ago
|
||
(In reply to Gabriel Bustamante [:gabriel] from comment #19)
Yeah. Also, the DMG seems to be just like... a disk image?
We could use
dmg2img(which might be in the 20.04 distro repo)And do something like:
dmg2img "firefox.dmg" "output.img"And then mount that.
That should also get us a
.appinside themnt/directory.Could be tricky if the image has multiple partitions tho...
Theoretically this could work, yes. I think it might be best to stick to unpacking with the same tools with package with though? (this could help avoid future bustage if we make additional enhancements in libdmg-hfsplus.)
Comment 22•1 year ago
|
||
We should try libdmg from what I can see it hasn’t seen active maintenance for years either.
Comment 23•1 year ago
|
||
Ah well if we package it with that... it... should... work
Comment 24•1 year ago
|
||
If the patch it's getting backed out maybe we have time to update both Ubuntu and 7z. That's probably closer to the current thing.
Comment 25•1 year ago
|
||
(In reply to Gabriel Bustamante [:gabriel] from comment #22)
We should try
libdmgfrom what I can see it hasn’t seen active maintenance for years either.
We maintain it in https://github.com/mozilla/libdmg-hfsplus :)
Comment 26•1 year ago
|
||
(In reply to bhearsum@mozilla.com (:bhearsum) from comment #25)
(In reply to Gabriel Bustamante [:gabriel] from comment #22)
We should try
libdmgfrom what I can see it hasn’t seen active maintenance for years either.We maintain it in https://github.com/mozilla/libdmg-hfsplus :)
TIL (we have a libdmg fork)
| Assignee | ||
Comment 27•1 year ago
|
||
Updated•1 year ago
|
Comment 28•1 year ago
|
||
Comment 29•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Comment 30•1 year ago
|
||
| bugherder | ||
Description
•