зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1728471 - Produce MSIX packages with Mozilla's Microsoft Partner Centre identity values for the Microsoft Store. r=bhearsum
Some of these values can be computed from the relevant packages and various defaults, but the logic is sufficiently complicated that I would prefer to have the values come directly from the YAML configuration file. This is breaking new ground: now some configuration depends on the `package-format`. The existing packages like `target.installer.msix` that are signed with the "Mozilla Corporation" key for enterprise customers have package family name like `Mozilla.MozillaFirefox`. The new packages that are unsigned for the Microsoft Store are named like `target.store.msix` and have package family name like `Mozilla.Firefox`. This allows the two to coexist on a single system, which is most flexible and may prove useful. Differential Revision: https://phabricator.services.mozilla.com/D128431
This commit is contained in:
Родитель
7debb35262
Коммит
f1e5fa3b39
|
@ -46,7 +46,7 @@ job-template:
|
|||
- repackage/base.py
|
||||
- repackage/win64-aarch64_sfx_stub.py
|
||||
- repackage/win64_signed.py
|
||||
package-formats: [msix]
|
||||
package-formats: [msix, msix-store]
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-msix-packaging
|
||||
|
@ -61,7 +61,36 @@ job-template:
|
|||
release.*: official
|
||||
esr.*: official
|
||||
default: nightly
|
||||
identity-name:
|
||||
by-package-format:
|
||||
msix:
|
||||
by-release-type:
|
||||
nightly.*: MozillaFirefoxNightly
|
||||
beta.*:
|
||||
by-shipping-product:
|
||||
devedition: MozillaFirefoxDevedition
|
||||
default: MozillaFirefoxBeta
|
||||
release.*: MozillaFirefox
|
||||
esr.*: MozillaFirefox
|
||||
default: MozillaFirefoxNightly
|
||||
msix-store:
|
||||
by-release-type:
|
||||
nightly.*: FirefoxNightly
|
||||
beta.*:
|
||||
by-shipping-product:
|
||||
devedition: FirefoxDevedition
|
||||
default: FirefoxBeta
|
||||
release.*: Firefox
|
||||
esr.*: Firefox
|
||||
default: FirefoxNightly
|
||||
publisher:
|
||||
by-level:
|
||||
"3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US"
|
||||
default: "CN=Mozilla Fake SPC"
|
||||
by-package-format:
|
||||
msix:
|
||||
by-level:
|
||||
"3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US"
|
||||
default: "CN=Mozilla Fake SPC"
|
||||
msix-store: "CN=082E9164-EE6C-4EC8-B62C-441FAE7BEFA1"
|
||||
publisher-display-name:
|
||||
by-package-format:
|
||||
msix: "Mozilla Corporation"
|
||||
msix-store: "Mozilla"
|
||||
|
|
|
@ -48,7 +48,7 @@ job-template:
|
|||
- repackage/base.py
|
||||
- repackage/win64-aarch64_sfx_stub.py
|
||||
- repackage/win64_signed.py
|
||||
package-formats: [msix]
|
||||
package-formats: [msix, msix-store]
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-msix-packaging
|
||||
|
@ -63,7 +63,36 @@ job-template:
|
|||
release.*: official
|
||||
esr.*: official
|
||||
default: nightly
|
||||
identity-name:
|
||||
by-package-format:
|
||||
msix:
|
||||
by-release-type:
|
||||
nightly.*: MozillaFirefoxNightly
|
||||
beta.*:
|
||||
by-shipping-product:
|
||||
devedition: MozillaFirefoxDevedition
|
||||
default: MozillaFirefoxBeta
|
||||
release.*: MozillaFirefox
|
||||
esr.*: MozillaFirefox
|
||||
default: MozillaFirefoxNightly
|
||||
msix-store:
|
||||
by-release-type:
|
||||
nightly.*: FirefoxNightly
|
||||
beta.*:
|
||||
by-shipping-product:
|
||||
devedition: FirefoxDevedition
|
||||
default: FirefoxBeta
|
||||
release.*: Firefox
|
||||
esr.*: Firefox
|
||||
default: FirefoxNightly
|
||||
publisher:
|
||||
by-level:
|
||||
"3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US"
|
||||
default: "CN=Mozilla Fake SPC"
|
||||
by-package-format:
|
||||
msix:
|
||||
by-level:
|
||||
"3": "CN=Mozilla Corporation, OU=Firefox Engineering Operations, O=Mozilla Corporation, L=Mountain View, S=California, C=US"
|
||||
default: "CN=Mozilla Fake SPC"
|
||||
msix-store: "CN=082E9164-EE6C-4EC8-B62C-441FAE7BEFA1"
|
||||
publisher-display-name:
|
||||
by-package-format:
|
||||
msix: "Mozilla Corporation"
|
||||
msix-store: "Mozilla"
|
||||
|
|
|
@ -49,10 +49,36 @@ packaging_description_schema = schema.extend(
|
|||
),
|
||||
Optional("msix"): {
|
||||
Optional("channel"): optionally_keyed_by(
|
||||
"level", "build-platform", "release-type", "shipping-product", str
|
||||
"package-format",
|
||||
"level",
|
||||
"build-platform",
|
||||
"release-type",
|
||||
"shipping-product",
|
||||
str,
|
||||
),
|
||||
Optional("identity-name"): optionally_keyed_by(
|
||||
"package-format",
|
||||
"level",
|
||||
"build-platform",
|
||||
"release-type",
|
||||
"shipping-product",
|
||||
str,
|
||||
),
|
||||
Optional("publisher"): optionally_keyed_by(
|
||||
"level", "build-platform", "release-type", "shipping-product", str
|
||||
"package-format",
|
||||
"level",
|
||||
"build-platform",
|
||||
"release-type",
|
||||
"shipping-product",
|
||||
str,
|
||||
),
|
||||
Optional("publisher-display-name"): optionally_keyed_by(
|
||||
"package-format",
|
||||
"level",
|
||||
"build-platform",
|
||||
"release-type",
|
||||
"shipping-product",
|
||||
str,
|
||||
),
|
||||
},
|
||||
# All l10n jobs use mozharness
|
||||
|
@ -121,10 +147,14 @@ PACKAGE_FORMATS = {
|
|||
"msix",
|
||||
"--channel",
|
||||
"{msix-channel}",
|
||||
"--arch",
|
||||
"{architecture}",
|
||||
"--publisher",
|
||||
"{msix-publisher}",
|
||||
"--publisher-display-name",
|
||||
"{msix-publisher-display-name}",
|
||||
"--identity-name",
|
||||
"{msix-identity-name}",
|
||||
"--arch",
|
||||
"{architecture}",
|
||||
# For langpacks. Ignored if directory does not exist.
|
||||
"--distribution-dir",
|
||||
"{fetch-dir}/distribution",
|
||||
|
@ -137,6 +167,31 @@ PACKAGE_FORMATS = {
|
|||
},
|
||||
"output": "target.installer.msix",
|
||||
},
|
||||
"msix-store": {
|
||||
"args": [
|
||||
"msix",
|
||||
"--channel",
|
||||
"{msix-channel}",
|
||||
"--publisher",
|
||||
"{msix-publisher}",
|
||||
"--publisher-display-name",
|
||||
"{msix-publisher-display-name}",
|
||||
"--identity-name",
|
||||
"{msix-identity-name}",
|
||||
"--arch",
|
||||
"{architecture}",
|
||||
# For langpacks. Ignored if directory does not exist.
|
||||
"--distribution-dir",
|
||||
"{fetch-dir}/distribution",
|
||||
"--verbose",
|
||||
"--makeappx",
|
||||
"{fetch-dir}/msix-packaging/makemsix",
|
||||
],
|
||||
"inputs": {
|
||||
"input": "target{archive_format}",
|
||||
},
|
||||
"output": "target.store.msix",
|
||||
},
|
||||
"dmg": {
|
||||
"args": ["dmg"],
|
||||
"inputs": {
|
||||
|
@ -203,7 +258,9 @@ def handle_keyed_by(config, jobs):
|
|||
"mozharness.config",
|
||||
"package-formats",
|
||||
"msix.channel",
|
||||
"msix.identity-name",
|
||||
"msix.publisher",
|
||||
"msix.publisher-display-name",
|
||||
]
|
||||
for job in jobs:
|
||||
job = copy.deepcopy(job) # don't overwrite dict values here
|
||||
|
@ -216,6 +273,7 @@ def handle_keyed_by(config, jobs):
|
|||
"release-type": config.params["release_type"],
|
||||
"level": config.params["level"],
|
||||
},
|
||||
defer=["package-format"],
|
||||
)
|
||||
yield job
|
||||
|
||||
|
@ -351,13 +409,30 @@ def make_job_description(config, jobs):
|
|||
"version_display": config.params["version"],
|
||||
"mar-channel-id": attributes["mar-channel-id"],
|
||||
}
|
||||
# Allow us to replace args a well, but specifying things expanded in mozharness
|
||||
# Without breaking .format and without allowing unknown through
|
||||
# Allow us to replace `args` as well, but specifying things expanded in mozharness
|
||||
# without breaking .format and without allowing unknown through.
|
||||
substs.update({name: f"{{{name}}}" for name in MOZHARNESS_EXPANSIONS})
|
||||
for msix_key in ("channel", "publisher"):
|
||||
# Turn `msix.channel` into `msix-channel` and `msix.publisher`
|
||||
# into `msix-publisher`.
|
||||
value = job.get("msix", {}).get(msix_key)
|
||||
|
||||
# We need to resolve values keyed by "package-format" for each format, not
|
||||
# just once, so we update a temporary copy just for extracting these values.
|
||||
temp_job = copy.deepcopy(job)
|
||||
for msix_key in (
|
||||
"channel",
|
||||
"identity-name",
|
||||
"publisher",
|
||||
"publisher-display-name",
|
||||
):
|
||||
resolve_keyed_by(
|
||||
item=temp_job,
|
||||
field=f"msix.{msix_key}",
|
||||
item_name="?",
|
||||
**{
|
||||
"package-format": format,
|
||||
},
|
||||
)
|
||||
|
||||
# Turn `msix.channel` into `msix-channel`, etc.
|
||||
value = temp_job.get("msix", {}).get(msix_key)
|
||||
if value:
|
||||
substs.update(
|
||||
{f"msix-{msix_key}": value},
|
||||
|
|
Загрузка…
Ссылка в новой задаче