Closed Bug 1815019 Opened 2 years ago Closed 2 years ago

Write provenance data from installer into the install directory

Categories

(Firefox :: Installer, task, P3)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(3 files)

In order for the installer provenance data to be available to Telemetry, we need to read it out of the installer's :Zone.Identifier data stream and save it in the install directory. This is much like what we do for existing attribution data, here.

If we can't read the :Zone.Identifier data stream, we should write some sort of sentinel data to that file so that Telemetry can convey different values for when the installer failed to read the data and when an installer was used that didn't have the capability of reading the data.

Priority: -- → P3
OS: Unspecified → Windows

This could be useful for both telemetry and crash reports, assuming we can resolve any privacy concerns. For example it would be real interesting to see that a build installed from foobar.com was particularly crashy.

I wanted to figure out how to re-generate mozilla_customizations.diff in a way that matched the way that it was originally created. This is so that (a) I could ensure that I was starting with a clean slate and that the current mozilla_customizations.diff matched the existing changes to other-licenses/7zstub/src and (b) when I regenerated mozilla_customizations.diff after making further changes to it, the patch of the diff changes would be at least somewhat readable rather than being a huge mess.

Some aspects of regenerating it created changes that I think are appropriate (ex: the full path to the user directory being present in the diff'ed file names). There were also some changes that I just couldn't figure out how to avoid (ex: the length of the function name context line). I'm not sure what diff utility was originally used, but I'm hoping that documenting how I generated it this time will allow it to be generated consistently in the future. And this commit should bring it in line with that consistency.

Assignee: nobody → bytesized
Status: NEW → ASSIGNED

After the 7z stub saves the provenance data to the same directory as the installer, the installer should copy it to the installation directory. If the user runs the full installer, it should copy the provenance data of the full installer download. But if the user runs the stub installer, only the stub should copy its provenance data and the full installer should avoid overwriting the useful data from the stub.

Depends on D171109

This patch was heavily inspired by the existing 7z customizations that read the download token into the "postSigningData" file. In both cases, the installation self-extractor copies some data into the same temporary directory where the installer is written. It will then be up to the NSIS installer to copy that file into the installation directory (that work will be done later in this stack).

This patch also includes changes to some files that were regenerated based on the code changes made.

  • mozilla_customizations.diff was updated so that it still reflects all Mozilla-made code changes to 7z.
  • The 7zSD.ARM64.sfx and 7zSD.Win32.sfx executables were re-built from the new code.
  • SFXSetup.vcxproj was updated to use newer toolchains.
Pushed by rsteuber@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/49cb08b25e46 Document procedure for changing 7zstub r=nalexander https://hg.mozilla.org/integration/autoland/rev/938aca2c57f7 Customize 7z to write provenance data r=nalexander https://hg.mozilla.org/integration/autoland/rev/d20d37c2751a Saved provenance data should be copied to the install directory r=nalexander
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: