# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """
Defines artifacts to sign before repackage. """
from taskgraph.util.taskcluster import get_artifact_path
from gecko_taskgraph.util.declarative_artifacts import get_geckoview_upstream_artifacts
LANGPACK_SIGN_PLATFORMS = { # set "linux64-shippable", "linux64-devedition", "macosx64-shippable", "macosx64-devedition",
}
def is_partner_kind(kind): if kind and kind.startswith(("release-partner", "release-eme-free")): returnTrue
def is_notarization_kind(kind): if kind and"notarization"in kind: returnTrue
if is_partner_kind(kind):
artifacts_specifications = _strip_widevine_for_partners(
artifacts_specifications
)
return artifacts_specifications
def _strip_locale_template(artifacts_without_locales): for spec in artifacts_without_locales: for index, artifact in enumerate(spec["artifacts"]):
stripped_artifact = artifact.format(locale="")
stripped_artifact = stripped_artifact.replace("//", "/")
spec["artifacts"][index] = stripped_artifact
return artifacts_without_locales
def _strip_widevine_for_partners(artifacts_specifications): """Partner repacks should not resign that's previously signed for fear of breaking partial
updates """ for spec in artifacts_specifications: if"autograph_widevine"in spec["formats"]:
spec["formats"].remove("autograph_widevine")
return artifacts_specifications
def get_signed_artifacts(input, formats, behavior=None): """
Get the list of signed artifacts for the given input and formats. """
artifacts = set() if input.endswith(".dmg"):
artifacts.add(input.replace(".dmg", ".tar.gz")) if behavior and behavior != "mac_sign":
artifacts.add(input.replace(".dmg", ".pkg")) else:
artifacts.add(input) if"autograph_gpg"in formats:
artifacts.add(f"{input}.asc")
return artifacts
def get_geckoview_artifacts_to_sign(config, job):
upstream_artifacts = [] for package in job["attributes"]["maven_packages"]:
upstream_artifacts += get_geckoview_upstream_artifacts(config, job, package) return [
path for upstream_artifact in upstream_artifacts for path in upstream_artifact["paths"] ifnot path.endswith(".md5") andnot path.endswith(".sha1")
]
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.