Closed Bug 1816992 Opened 2 years ago Closed 1 year ago

Produce "attributable" macOS DMGs with placeholder attribution details in automation

Categories

(Firefox :: Installer, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox120 --- fixed

People

(Reporter: nalexander, Assigned: hneiva)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidedi-attribution])

Attachments

(5 files, 2 obsolete files)

This ticket tracks using the functionality added in Bug 1816982 and Bug 1816986 to set an extended attribute on the main Firefox.app bundle containing placeholder attribution details, and then producing an "attributable" macOS DMG with that extended attribution as part of the release pipeline.

This is sibling to https://bugzilla.mozilla.org/show_bug.cgi?id=1814727, which tracks adding placeholder attribution to Windows installers.

It would be nice to always set the xattr when producing DMGs, even just for local builds. My guess is that the "attributable" macOS DMG would be part of the macOS repackage job.

Priority: -- → P3

(In reply to Nick Alexander :nalexander [he/him] from comment #1)

It would be nice to always set the xattr when producing DMGs, even just for local builds. My guess is that the "attributable" macOS DMG would be part of the macOS repackage job.

Indeed! There's a few things that will need to happen here:

  • Update to a newer libdmg-hfsplus after https://github.com/mozilla/libdmg-hfsplus/pull/6 lands
  • Produce attributable DMGs as part of repackage - these dmg.py changes will probably be a decent starting point for this, but no doubt it will need some tweaks. At the very least to make attributable build support conditional, and only enable it for certain builds (most likely shippable and devedition). We also need to switch the tag to something consistent across tasks (most likely __MOZCUSTOM__, since it's what we already use for this purpose on Windows). Other tweaks will likely be needed too.
  • Create attribution tasks for macOS that will use dmg attribute to replace the tag with sentinel attribution information. Most likely this will be the same as what we use for windows, but I still need to double check with a few stakeholders to confirm that. The implementation will probably end up looking similar to the sentinel attribution implementation for Windows.
  • Update beetomver tasks to pull DMGs from the new attribution tasks instead of repackage (pkgs will still need to come from repackage, however).
Assignee: nobody → hneiva

Depends on D188855

Depends on D189404

Attachment #9355146 - Attachment is obsolete: true
Attachment #9354395 - Attachment is obsolete: true
Attachment #9355382 - Attachment description: WIP: Bug 1816992 - Add sentinel attribution to repackage jobs r?bhearsum → Bug 1816992 - Add sentinel attribution to repackage jobs r?bhearsum
Attachment #9355383 - Attachment description: WIP: Bug 1816992 - Add attribution job for DMGs r?bhearsum → Bug 1816992 - Add attribution job for DMGs r?bhearsum
Pushed by bhearsum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/63af389f8fe2 Add sentinel attribution to repackage jobs r=taskgraph-reviewers,releng-reviewers,bhearsum https://hg.mozilla.org/integration/autoland/rev/c06f8d8a7bdc Add attribution job for DMGs r=taskgraph-reviewers,releng-reviewers,bhearsum

Backed out for causing repackage bustage.

[task 2023-10-06T04:44:34.390Z] 04:44:34     INFO -  file: /.VolumeIcon.icns
[task 2023-10-06T04:44:34.394Z] 04:44:34     INFO -  Setting permissions to 100644 for /.VolumeIcon.icns
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  Error running mach:
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -      mach --log-no-times repackage dmg --attribution_sentinel __MOZCUSTOM__ --input /builds/worker/fetches/target.tar.gz --output /builds/worker/workspace/outputs/target.dmg
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  The error occurred in code that was called by the mach command. This is either
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  a bug in the called code itself or in the way that mach is calling it.
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  You can invoke ``./mach busted`` to check if this issue is already on file. If it
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  isn't, please use ``./mach busted file repackage`` to report it. If ``./mach busted`` is
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  misbehaving, you can also inspect the dependencies of bug 1543241.
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  If filing a bug, please include the full output of mach, including this error
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  message.
[task 2023-10-06T04:44:34.524Z] 04:44:34     INFO -  The details of the failure are as follows:
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -  subprocess.CalledProcessError: Command '[PosixPath('/builds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\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t']' died with <Signals.SIGSEGV: 11>.
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/mach_commands.py", line 2418, in repackage_dmg
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -      repackage_dmg(input, output, attribution_sentinel)
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/repackaging/dmg.py", line 47, in repackage_dmg
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -      create_dmg(
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozpack/dmg.py", line 194, in create_dmg
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -      create_dmg_from_staged(
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -    File "/builds/worker/checkouts/gecko/python/mozbuild/mozpack/dmg.py", line 104, in create_dmg_from_staged
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -      subprocess.check_call(
[task 2023-10-06T04:44:34.526Z] 04:44:34     INFO -    File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
[task 2023-10-06T04:44:34.527Z] 04:44:34     INFO -      raise CalledProcessError(retcode, cmd)
[task 2023-10-06T04:44:34.631Z] 04:44:34     INFO - Return code: 1
[task 2023-10-06T04:44:34.631Z] 04:44:34    ERROR - 1 not in success codes: [0]
[task 2023-10-06T04:44:34.631Z] 04:44:34  WARNING - setting return code to 2
[task 2023-10-06T04:44:34.631Z] 04:44:34    FATAL - Halting on failure while running ['/builds/worker/.mozbuild/srcdirs/gecko-8a5b87fe5d69/_virtualenvs/common/bin/python', 'mach', '--log-no-times', 'repackage', 'dmg', '--attribution_sentinel', '__MOZCUSTOM__', '--input', '/builds/worker/fetches/target.tar.gz', '--output', '/builds/worker/workspace/outputs/target.dmg']
[task 2023-10-06T04:44:34.631Z] 04:44:34    FATAL - Running post_fatal callback...
[task 2023-10-06T04:44:34.631Z] 04:44:34    FATAL - Exiting 2
[task 2023-10-06T04:44:34.631Z] 04:44:34     INFO - [mozharness: 2023-10-06 04:44:34.631947Z] Finished repackage step (failed)
[taskcluster 2023-10-06 04:44:35.477Z] === Task Finished ===
[taskcluster 2023-10-06 04:44:35.519Z] Artifact "public/build" not found at "/builds/worker/artifacts/": (HTTP code 404) no such container - Could not find the file /builds/worker/artifacts/ in container 39b965265fd5265f3f84185543df2b827f2f8ca1160612abb48e689a946b323d 
[taskcluster 2023-10-06 04:44:35.520Z] Artifact "public/build/target.dmg" not found at "/builds/worker/workspace/outputs/target.dmg": (HTTP code 404) no such container - Could not find the file /builds/worker/workspace/outputs/target.dmg in container 39b965265fd5265f3f84185543df2b827f2f8ca1160612abb48e689a946b323d 
[taskcluster 2023-10-06 04:44:35.705Z] Unsuccessful task run with exit code: 2 completed in 18.141 seconds
Flags: needinfo?(mpohle)
Flags: needinfo?(mpohle) → needinfo?(hneiva)

Fixed the problem in autoland, re-landing it now.

Flags: needinfo?(hneiva)
Pushed by hneiva@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7628ecf70973 Add sentinel attribution to repackage jobs r=taskgraph-reviewers,releng-reviewers,bhearsum https://hg.mozilla.org/integration/autoland/rev/1d25ed23e85a Add attribution job for DMGs r=taskgraph-reviewers,releng-reviewers,bhearsum
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Pushed by bhearsum@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/591b45ea8b8d Add sentinel attribution to repackage jobs r=taskgraph-reviewers,releng-reviewers,bhearsum https://hg.mozilla.org/integration/autoland/rev/3e09d9541b69 Add attribution job for DMGs r=taskgraph-reviewers,releng-reviewers,bhearsum https://hg.mozilla.org/integration/autoland/rev/1069b61535ad continue repackaging mac builds into mar and pkg formats r=releng-reviewers,gbrown
Status: REOPENED → RESOLVED
Closed: 1 year ago1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
Regressions: 1857792
No longer regressions: 1857792

This fixes a regression that has caused us to stop publishing new mac installers for localized builds

This was removed presumably by mistake in commit 3e09d954 "Add attribution job
for DMGs"

Pushed by jcristau@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7ededf14ac32 pull target.dmg from attribution-l10n jobs r=releng-reviewers,taskgraph-reviewers,jcristau https://hg.mozilla.org/integration/autoland/rev/56d67c43bc00 restore build_type attribute for attribution-l10n jobs. r=jlorenzo
Regressions: 1858159
Flags: needinfo?(hneiva)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: