-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gui: package signing changes (bug 1810744) (#1324)
- add entitlements/requirements files for codesign - add app bundle to gzipped tarball and remove dmg - add script to generate manifest - add script to generate dmg package - add build step to generate signing manifest
- Loading branch information
Showing
9 changed files
with
118 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#! /usr/bin/env python | ||
|
||
import argparse | ||
import hashlib | ||
|
||
import yaml | ||
import requests | ||
|
||
|
||
def main(args: argparse.Namespace): | ||
release = args.release[0] | ||
filename = "mozregression-gui-app-bundle.tar.gz" | ||
urls = { | ||
"macOS": "https://github.com/mozilla/mozregression" | ||
f"/releases/download/{release}/{filename}", | ||
"windows": "https://github.com/mozilla/mozregression" | ||
f"/releases/download/{release}/mozregression-gui.exe", | ||
} | ||
|
||
operating_systems = { | ||
"macOS": ["macapp"], | ||
} | ||
|
||
params = {} | ||
|
||
for os, signing_formats in operating_systems.items(): | ||
url = urls[os] | ||
response = requests.get(url) | ||
if response.status_code != 200: | ||
raise ValueError(f"Could not fetch {url} ({response.status_code})") | ||
|
||
params[os] = { | ||
"artifact-name": url.split("/")[-1], | ||
"bug": int(args.bug), | ||
"fetch": {"url": url}, | ||
"filesize": len(response.content), | ||
"private-artifact": False, | ||
"product": "mozregression", | ||
"reason": f"Sign application bundle for mozregression {release}.", | ||
"requestor": args.requestor, | ||
"sha256": hashlib.sha256(response.content).hexdigest(), | ||
"signing-formats": signing_formats, | ||
"signingscript-notarization": True, | ||
} | ||
|
||
if os == "macOS": | ||
params[os]["mac-behavior"] = "mac_sign" | ||
|
||
print(yaml.dump_all(params.values())) | ||
|
||
|
||
def create_parser(): | ||
parser = argparse.ArgumentParser(description="print ad-hoc signing manifest") | ||
parser.add_argument("release", nargs=1, help="signing manifest release tag") | ||
parser.add_argument("--bug", default="0", help="optional bug number to include") | ||
parser.add_argument( | ||
"--requestor", | ||
default="Zeid Zabaneh <[email protected]>", | ||
help="the person who is requesting the signing", | ||
) | ||
return parser | ||
|
||
|
||
if __name__ == "__main__": | ||
parser = create_parser() | ||
args = parser.parse_args() | ||
main(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
|
||
source env/bin/activate | ||
cd gui/dist | ||
dmgbuild -s ../dmg_settings.py "mozregression GUI" mozregression-gui.dmg | ||
cd ../.. | ||
echo "Finished building dmg." | ||
ls -alh gui/dist |grep dmg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<!-- | ||
Entitlements to apply during codesigning of mozregression builds. | ||
--> | ||
<plist version="1.0"> | ||
<dict> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>arch</key> | ||
<array> | ||
<string>x86_64</string> | ||
<string>arm64</string> | ||
</array> | ||
</dict> | ||
</plist> |