Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-07-31 17:04:02 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-08-04 17:21:47 +0300
commitaacedd786177f0e8689bbcd5f96c157cd1e156d5 (patch)
tree15154e18aa7f7d3cdf84bb0e26582893055931c0
parentd5809b39d5b27ce34d55f00e3d41c4d0409aa6ab (diff)
Buildbot: make code signing of packages optional with --codesign parameter
This is in preparation of doing builds per commit that will not be code signed. Ref D8438 Differential Revision: https://developer.blender.org/D8451
-rw-r--r--build_files/buildbot/buildbot_utils.py1
-rwxr-xr-xbuild_files/buildbot/worker_bundle_dmg.py17
-rw-r--r--build_files/buildbot/worker_compile.py5
-rw-r--r--build_files/buildbot/worker_pack.py5
4 files changed, 21 insertions, 7 deletions
diff --git a/build_files/buildbot/buildbot_utils.py b/build_files/buildbot/buildbot_utils.py
index acede05869a..fd0f90e48d4 100644
--- a/build_files/buildbot/buildbot_utils.py
+++ b/build_files/buildbot/buildbot_utils.py
@@ -67,6 +67,7 @@ def create_builder_from_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('builder_name')
parser.add_argument('branch', default='master', nargs='?')
+ parser.add_argument("--codesign", action="store_true")
args = parser.parse_args()
return Builder(args.builder_name, args.branch)
diff --git a/build_files/buildbot/worker_bundle_dmg.py b/build_files/buildbot/worker_bundle_dmg.py
index cd3da85e12a..31e10d51610 100755
--- a/build_files/buildbot/worker_bundle_dmg.py
+++ b/build_files/buildbot/worker_bundle_dmg.py
@@ -82,6 +82,10 @@ def create_argument_parser():
type=Path,
help="Optional path to applescript to set up folder looks of DMG."
"If not provided default Blender's one is used.")
+ parser.add_argument(
+ '--codesign',
+ action="store_true"
+ help="Code sign and notarize DMG contents.")
return parser
@@ -395,7 +399,8 @@ def create_final_dmg(app_bundles: List[Path],
dmg_filepath: Path,
background_image_filepath: Path,
volume_name: str,
- applescript: Path) -> None:
+ applescript: Path,
+ codesign: bool) -> None:
"""
Create DMG with all app bundles
@@ -421,7 +426,8 @@ def create_final_dmg(app_bundles: List[Path],
#
# This allows to recurs into the content of bundles without worrying about
# possible interfereice of Application symlink.
- codesign_app_bundles_in_dmg(mount_directory)
+ if codesign:
+ codesign_app_bundles_in_dmg(mount_directory)
copy_background_if_needed(background_image_filepath, mount_directory)
create_applications_link(mount_directory)
@@ -434,7 +440,8 @@ def create_final_dmg(app_bundles: List[Path],
compress_dmg(writable_dmg_filepath, dmg_filepath)
writable_dmg_filepath.unlink()
- codesign_and_notarize_dmg(dmg_filepath)
+ if codesign:
+ codesign_and_notarize_dmg(dmg_filepath)
def ensure_dmg_extension(filepath: Path) -> Path:
@@ -521,6 +528,7 @@ def main():
source_dir = args.source_dir.absolute()
background_image_filepath = get_background_image(args.background_image)
applescript = get_applescript(args.applescript)
+ codesign = args.codesign
app_bundles = collect_and_log_app_bundles(source_dir)
if not app_bundles:
@@ -535,7 +543,8 @@ def main():
dmg_filepath,
background_image_filepath,
volume_name,
- applescript)
+ applescript,
+ codesign)
if __name__ == "__main__":
diff --git a/build_files/buildbot/worker_compile.py b/build_files/buildbot/worker_compile.py
index 705614660cf..6df112713a4 100644
--- a/build_files/buildbot/worker_compile.py
+++ b/build_files/buildbot/worker_compile.py
@@ -24,7 +24,7 @@ import shutil
import buildbot_utils
def get_cmake_options(builder):
- post_install_script = os.path.join(
+ codesign_script = os.path.join(
builder.blender_dir, 'build_files', 'buildbot', 'worker_codesign.cmake')
config_file = "build_files/cmake/config/blender_release.cmake"
@@ -36,7 +36,8 @@ def get_cmake_options(builder):
options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET=10.9')
elif builder.platform == 'win':
options.extend(['-G', 'Visual Studio 15 2017 Win64'])
- options.extend(['-DPOSTINSTALL_SCRIPT:PATH=' + post_install_script])
+ if builder.codesign:
+ options.extend(['-DPOSTINSTALL_SCRIPT:PATH=' + codesign_script])
elif builder.platform == 'linux':
config_file = "build_files/buildbot/config/blender_linux.cmake"
diff --git a/build_files/buildbot/worker_pack.py b/build_files/buildbot/worker_pack.py
index 87ee49c87d8..96c8db8e6c8 100644
--- a/build_files/buildbot/worker_pack.py
+++ b/build_files/buildbot/worker_pack.py
@@ -117,6 +117,8 @@ def pack_mac(builder):
if info.is_development_build:
background_image = os.path.join(release_dir, 'buildbot', 'background.tif')
command += ['--background-image', background_image]
+ if builder.codesign:
+ command += ['--codesign']
command += [builder.install_dir]
buildbot_utils.call(command)
@@ -150,7 +152,8 @@ def pack_win(builder):
package_filename = package_name + '.msi'
package_filepath = os.path.join(builder.build_dir, package_filename)
- sign_file_or_directory(package_filepath)
+ if builder.codesign:
+ sign_file_or_directory(package_filepath)
package_files += [(package_filepath, package_filename)]