libv8 5.3.332.38.5 → 5.6.326.50.0beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +2 -0
- data/ext/libv8/builder.rb +2 -2
- data/lib/libv8/version.rb +1 -1
- data/patches/0001-Build-a-standalone-static-library.patch +4 -4
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +16 -11
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +4 -4
- data/patches/{0005-Do-not-embed-debug-symbols-in-macOS-libraries.patch → 0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch} +4 -4
- data/vendor/depot_tools/.gitignore +4 -0
- data/vendor/depot_tools/OWNERS +0 -2
- data/vendor/depot_tools/PRESUBMIT.py +20 -23
- data/vendor/depot_tools/README.gclient.md +3 -3
- data/vendor/depot_tools/README.git-cl.md +13 -12
- data/vendor/depot_tools/README.md +2 -3
- data/vendor/depot_tools/WATCHLISTS +0 -1
- data/vendor/depot_tools/appengine_mapper.py +23 -0
- data/vendor/depot_tools/apply_issue.py +2 -8
- data/vendor/depot_tools/bootstrap/win/README.md +1 -8
- data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +6 -16
- data/vendor/depot_tools/bootstrap/win/git_version.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/checkout.py +20 -433
- data/vendor/depot_tools/cipd +73 -0
- data/vendor/depot_tools/cipd.bat +12 -0
- data/vendor/depot_tools/cipd.ps1 +57 -0
- data/vendor/depot_tools/cipd_client_version +1 -0
- data/vendor/depot_tools/clang_format.py +9 -6
- data/vendor/depot_tools/clang_format_merge_driver +8 -0
- data/vendor/depot_tools/clang_format_merge_driver.bat +11 -0
- data/vendor/depot_tools/clang_format_merge_driver.py +67 -0
- data/vendor/depot_tools/codereview.settings +3 -2
- data/vendor/depot_tools/commit_queue.py +1 -1
- data/vendor/depot_tools/cpplint.py +2 -0
- data/vendor/depot_tools/fetch.py +1 -54
- data/vendor/depot_tools/fetch_configs/android.py +2 -2
- data/vendor/depot_tools/fetch_configs/breakpad.py +2 -3
- data/vendor/depot_tools/fetch_configs/chromium.py +2 -3
- data/vendor/depot_tools/fetch_configs/crashpad.py +2 -2
- data/vendor/depot_tools/fetch_configs/dart.py +2 -3
- data/vendor/depot_tools/fetch_configs/dartino.py +2 -3
- data/vendor/depot_tools/fetch_configs/dartium.py +2 -3
- data/vendor/depot_tools/fetch_configs/depot_tools.py +3 -6
- data/vendor/depot_tools/fetch_configs/gyp.py +2 -3
- data/vendor/depot_tools/fetch_configs/infra.py +2 -2
- data/vendor/depot_tools/fetch_configs/infra_internal.py +2 -2
- data/vendor/depot_tools/fetch_configs/ios.py +2 -2
- data/vendor/depot_tools/fetch_configs/ios_internal.py +2 -3
- data/vendor/depot_tools/fetch_configs/mojo.py +2 -3
- data/vendor/depot_tools/fetch_configs/nacl.py +2 -3
- data/vendor/depot_tools/fetch_configs/naclports.py +2 -3
- data/vendor/depot_tools/fetch_configs/pdfium.py +2 -2
- data/vendor/depot_tools/fetch_configs/skia.py +2 -2
- data/vendor/depot_tools/fetch_configs/skia_buildbot.py +2 -2
- data/vendor/depot_tools/fetch_configs/syzygy.py +2 -2
- data/vendor/depot_tools/fetch_configs/v8.py +2 -3
- data/vendor/depot_tools/fetch_configs/webrtc.py +5 -3
- data/vendor/depot_tools/fetch_configs/webrtc_android.py +2 -2
- data/vendor/depot_tools/fetch_configs/webrtc_ios.py +2 -2
- data/vendor/depot_tools/fix_encoding.py +6 -6
- data/vendor/depot_tools/gclient.py +136 -368
- data/vendor/depot_tools/gclient_scm.py +108 -647
- data/vendor/depot_tools/gclient_utils.py +22 -86
- data/vendor/depot_tools/gerrit_client.py +105 -0
- data/vendor/depot_tools/gerrit_util.py +174 -67
- data/vendor/depot_tools/git-crrev-parse +6 -7
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git_cache.py +68 -18
- data/vendor/depot_tools/git_cherry_pick_upload.py +4 -4
- data/vendor/depot_tools/git_cl.py +1028 -961
- data/vendor/depot_tools/git_common.py +2 -3
- data/vendor/depot_tools/git_drover.py +0 -1
- data/vendor/depot_tools/git_footers.py +3 -43
- data/vendor/depot_tools/git_rebase_update.py +9 -1
- data/vendor/depot_tools/git_squash_branch.py +1 -1
- data/vendor/depot_tools/infra/config/cq.cfg +8 -1
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/man/html/depot_tools.html +3 -11
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +9 -9
- data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +2 -2
- data/vendor/depot_tools/man/html/git-drover.html +17 -17
- data/vendor/depot_tools/man/html/git-footers.html +2 -2
- data/vendor/depot_tools/man/html/git-freeze.html +4 -4
- data/vendor/depot_tools/man/html/git-hyper-blame.html +2 -2
- data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
- data/vendor/depot_tools/man/html/git-map.html +2 -2
- data/vendor/depot_tools/man/html/git-mark-merge-base.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-downstream.html +2 -2
- data/vendor/depot_tools/man/html/git-nav-upstream.html +2 -2
- data/vendor/depot_tools/man/html/git-new-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-rebase-update.html +2 -2
- data/vendor/depot_tools/man/html/git-rename-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-reparent-branch.html +2 -2
- data/vendor/depot_tools/man/html/git-retry.html +3 -3
- data/vendor/depot_tools/man/html/git-squash-branch.html +3 -3
- data/vendor/depot_tools/man/html/git-thaw.html +2 -2
- data/vendor/depot_tools/man/html/git-upstream-diff.html +3 -3
- data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +4 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +19 -19
- data/vendor/depot_tools/man/man1/git-footers.1 +4 -4
- data/vendor/depot_tools/man/man1/git-freeze.1 +6 -6
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map-branches.1 +4 -4
- data/vendor/depot_tools/man/man1/git-map.1 +4 -4
- data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-downstream.1 +4 -4
- data/vendor/depot_tools/man/man1/git-nav-upstream.1 +4 -4
- data/vendor/depot_tools/man/man1/git-new-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -4
- data/vendor/depot_tools/man/man1/git-rename-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-reparent-branch.1 +4 -4
- data/vendor/depot_tools/man/man1/git-retry.1 +5 -5
- data/vendor/depot_tools/man/man1/git-squash-branch.1 +5 -5
- data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +5 -5
- data/vendor/depot_tools/man/man7/depot_tools.7 +5 -10
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +4 -4
- data/vendor/depot_tools/man/src/depot_tools.txt +1 -1
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +7 -7
- data/vendor/depot_tools/man/src/filter_demo_output.py +2 -2
- data/vendor/depot_tools/man/src/git-footers.demo.1.sh +1 -1
- data/vendor/depot_tools/man/src/git-retry.txt +1 -1
- data/vendor/depot_tools/man/src/git-squash-branch.txt +2 -2
- data/vendor/depot_tools/man/src/git-upstream-diff.txt +1 -1
- data/vendor/depot_tools/my_activity.py +6 -3
- data/vendor/depot_tools/my_reviews.py +1 -1
- data/vendor/depot_tools/ninja +2 -2
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/owners.py +14 -3
- data/vendor/depot_tools/presubmit_canned_checks.py +46 -67
- data/vendor/depot_tools/presubmit_support.py +109 -371
- data/vendor/depot_tools/pylintrc +83 -56
- data/vendor/depot_tools/recipe_modules/OWNERS +1 -0
- data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +18 -9
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +56 -55
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/buildbot.json +52 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +19 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +3 -7
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +2 -54
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_buildbot.json +56 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/{forced.json → trychange_oauth2_json.json} +6 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_json_win.json +54 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +20 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +59 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +9 -9
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +20 -10
- data/vendor/depot_tools/recipe_modules/bot_update/example.py +45 -63
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +210 -807
- data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +34 -45
- data/vendor/depot_tools/recipe_modules/cipd/api.py +59 -84
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/basic.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-failed.json +14 -60
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-many-instances.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/mac64.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/win64.json +71 -117
- data/vendor/depot_tools/recipe_modules/cipd/example.py +2 -12
- data/vendor/depot_tools/recipe_modules/cipd/test_api.py +0 -9
- data/vendor/depot_tools/recipe_modules/depot_tools/api.py +6 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/basic.json +7 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/win.json +7 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/example.py +3 -0
- data/vendor/depot_tools/recipe_modules/gclient/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +9 -22
- data/vendor/depot_tools/recipe_modules/gclient/config.py +18 -5
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +14 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/buildbot.json +211 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +16 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +16 -14
- data/vendor/depot_tools/recipe_modules/gclient/example.py +13 -11
- data/vendor/depot_tools/recipe_modules/gerrit/__init__.py +6 -0
- data/vendor/depot_tools/recipe_modules/gerrit/api.py +63 -0
- data/vendor/depot_tools/recipe_modules/gerrit/example.expected/basic.json +64 -0
- data/vendor/depot_tools/recipe_modules/gerrit/example.py +35 -0
- data/vendor/depot_tools/recipe_modules/gerrit/test_api.py +24 -0
- data/vendor/depot_tools/recipe_modules/git/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git/api.py +155 -142
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +13 -13
- data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +45 -19
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +45 -19
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +8 -8
- data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +44 -18
- data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +48 -22
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +42 -16
- data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +43 -17
- data/vendor/depot_tools/recipe_modules/git/example.py +9 -3
- data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +8 -8
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +1 -1
- data/vendor/depot_tools/recipe_modules/gsutil/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/gsutil/api.py +196 -0
- data/vendor/depot_tools/recipe_modules/gsutil/example.expected/basic.json +186 -0
- data/vendor/depot_tools/recipe_modules/gsutil/example.py +77 -0
- data/vendor/depot_tools/recipe_modules/gsutil/resources/gsutil_smart_retry.py +69 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +3 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/api.py +20 -3
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +3 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +6 -1
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +4 -6
- data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
- data/vendor/depot_tools/recipe_modules/rietveld/api.py +12 -9
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +2 -24
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/buildbot.json +30 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.py +12 -6
- data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +46 -70
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/set_failure_hash_with_no_steps.json +8 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/{with_svn_patch.json → with_gerrit_patch.json} +1 -31
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_gerrit_patch_deprecated.json +39 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +2 -2
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch_luci.json +8 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +3 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +3 -3
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +1 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +1 -1
- data/vendor/depot_tools/recipe_modules/tryserver/example.py +35 -5
- data/vendor/depot_tools/recipes.py +52 -28
- data/vendor/depot_tools/repo +216 -69
- data/vendor/depot_tools/rietveld.py +20 -15
- data/vendor/depot_tools/roll_dep.py +1 -1
- data/vendor/depot_tools/scm.py +11 -826
- data/vendor/depot_tools/subprocess2.py +5 -5
- data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +2 -0
- data/vendor/depot_tools/third_party/cq_client/README.md +5 -1
- data/vendor/depot_tools/third_party/cq_client/cq.pb.go +183 -104
- data/vendor/depot_tools/third_party/cq_client/cq.proto +43 -27
- data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +95 -29
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_both.cfg +67 -0
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +1 -2
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_rietveld.cfg +0 -3
- data/vendor/depot_tools/third_party/upload.py +44 -24
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +0 -5
- metadata +38 -93
- data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +0 -25
- data/vendor/depot_tools/git-auto-svn +0 -6
- data/vendor/depot_tools/git_auto_svn.py +0 -122
- data/vendor/depot_tools/man/html/git-auto-svn.html +0 -837
- data/vendor/depot_tools/man/man1/git-auto-svn.1 +0 -113
- data/vendor/depot_tools/man/src/_git-auto-svn_desc.helper.txt +0 -1
- data/vendor/depot_tools/man/src/git-auto-svn.txt +0 -69
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +0 -43
- data/vendor/depot_tools/recipe_modules/cipd/example.expected/install-failed.json +0 -31
- data/vendor/depot_tools/recipe_modules/cipd/resources/bootstrap.py +0 -218
- data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +0 -7
- data/vendor/depot_tools/third_party/gsutil/CHECKSUM +0 -1
- data/vendor/depot_tools/third_party/gsutil/COPYING +0 -202
- data/vendor/depot_tools/third_party/gsutil/LICENSE.third_party +0 -295
- data/vendor/depot_tools/third_party/gsutil/MANIFEST.in +0 -5
- data/vendor/depot_tools/third_party/gsutil/README +0 -38
- data/vendor/depot_tools/third_party/gsutil/README.chromium +0 -25
- data/vendor/depot_tools/third_party/gsutil/README.pkg +0 -49
- data/vendor/depot_tools/third_party/gsutil/ReleaseNotes.txt +0 -825
- data/vendor/depot_tools/third_party/gsutil/VERSION +0 -1
- data/vendor/depot_tools/third_party/gsutil/gslib/README +0 -5
- data/vendor/depot_tools/third_party/gsutil/gslib/__init__.py +0 -22
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/__init__.py +0 -15
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/acls.py +0 -234
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/anon.py +0 -57
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/command_opts.py +0 -116
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/dev.py +0 -139
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/metadata.py +0 -186
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/naming.py +0 -173
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/prod.py +0 -160
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/projects.py +0 -130
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/subdirs.py +0 -110
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/support.py +0 -86
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/versioning.py +0 -242
- data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/wildcards.py +0 -170
- data/vendor/depot_tools/third_party/gsutil/gslib/bucket_listing_ref.py +0 -175
- data/vendor/depot_tools/third_party/gsutil/gslib/command.py +0 -725
- data/vendor/depot_tools/third_party/gsutil/gslib/command_runner.py +0 -102
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/__init__.py +0 -15
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/cat.py +0 -131
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/chacl.py +0 -523
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/config.py +0 -662
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/cp.py +0 -1819
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/disablelogging.py +0 -101
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/enablelogging.py +0 -149
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getacl.py +0 -82
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getcors.py +0 -121
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getdefacl.py +0 -86
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getlogging.py +0 -137
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getversioning.py +0 -116
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/getwebcfg.py +0 -122
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/help.py +0 -218
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/ls.py +0 -578
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/mb.py +0 -172
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/mv.py +0 -159
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/perfdiag.py +0 -903
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/rb.py +0 -113
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/rm.py +0 -237
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setacl.py +0 -138
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setcors.py +0 -145
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setdefacl.py +0 -105
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setmeta.py +0 -420
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setversioning.py +0 -114
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/setwebcfg.py +0 -190
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/update.py +0 -305
- data/vendor/depot_tools/third_party/gsutil/gslib/commands/version.py +0 -150
- data/vendor/depot_tools/third_party/gsutil/gslib/exception.py +0 -76
- data/vendor/depot_tools/third_party/gsutil/gslib/help_provider.py +0 -81
- data/vendor/depot_tools/third_party/gsutil/gslib/name_expansion.py +0 -550
- data/vendor/depot_tools/third_party/gsutil/gslib/no_op_auth_plugin.py +0 -30
- data/vendor/depot_tools/third_party/gsutil/gslib/plurality_checkable_iterator.py +0 -56
- data/vendor/depot_tools/third_party/gsutil/gslib/project_id.py +0 -67
- data/vendor/depot_tools/third_party/gsutil/gslib/storage_uri_builder.py +0 -56
- data/vendor/depot_tools/third_party/gsutil/gslib/thread_pool.py +0 -79
- data/vendor/depot_tools/third_party/gsutil/gslib/util.py +0 -167
- data/vendor/depot_tools/third_party/gsutil/gslib/wildcard_iterator.py +0 -498
- data/vendor/depot_tools/third_party/gsutil/gsutil +0 -384
- data/vendor/depot_tools/third_party/gsutil/gsutil.spec.in +0 -75
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/__init__.py +0 -22
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client.py +0 -630
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client_test.py +0 -374
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_helper.py +0 -103
- data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_plugin.py +0 -24
- data/vendor/depot_tools/third_party/gsutil/pkg_util.py +0 -60
- data/vendor/depot_tools/third_party/gsutil/plugins/__init__.py +0 -0
- data/vendor/depot_tools/third_party/gsutil/plugins/sso_auth.py +0 -105
@@ -1,113 +0,0 @@
|
|
1
|
-
'\" t
|
2
|
-
.\" Title: git-auto-svn
|
3
|
-
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
4
|
-
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
|
5
|
-
.\" Date: 07/21/2016
|
6
|
-
.\" Manual: Chromium depot_tools Manual
|
7
|
-
.\" Source: depot_tools bf2a341
|
8
|
-
.\" Language: English
|
9
|
-
.\"
|
10
|
-
.TH "GIT\-AUTO\-SVN" "1" "07/21/2016" "depot_tools bf2a341" "Chromium depot_tools Manual"
|
11
|
-
.\" -----------------------------------------------------------------
|
12
|
-
.\" * Define some portability stuff
|
13
|
-
.\" -----------------------------------------------------------------
|
14
|
-
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
15
|
-
.\" http://bugs.debian.org/507673
|
16
|
-
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
17
|
-
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
18
|
-
.ie \n(.g .ds Aq \(aq
|
19
|
-
.el .ds Aq '
|
20
|
-
.\" -----------------------------------------------------------------
|
21
|
-
.\" * set default formatting
|
22
|
-
.\" -----------------------------------------------------------------
|
23
|
-
.\" disable hyphenation
|
24
|
-
.nh
|
25
|
-
.\" disable justification (adjust text to left margin only)
|
26
|
-
.ad l
|
27
|
-
.\" -----------------------------------------------------------------
|
28
|
-
.\" * MAIN CONTENT STARTS HERE *
|
29
|
-
.\" -----------------------------------------------------------------
|
30
|
-
.SH "NAME"
|
31
|
-
git-auto-svn \- Automatically set up git\-svn metadata for a repo mirrored from SVN\&.
|
32
|
-
.SH "SYNOPSIS"
|
33
|
-
.sp
|
34
|
-
.nf
|
35
|
-
\fIgit auto\-svn\fR
|
36
|
-
.fi
|
37
|
-
.sp
|
38
|
-
.SH "DESCRIPTION"
|
39
|
-
.sp
|
40
|
-
git auto\-svn automatically sets up git\-svn metadata and runs git\-svn fetch for repos that are homed in SVN but mirrored to Git (such as depot_tools itself)\&.
|
41
|
-
.sp
|
42
|
-
It determines the metadata to use by inspecting the git\-svn\-id footer of the HEAD of the remote upstream ref (by default, origin/master)\&. git\-svn\-id footers look like this:
|
43
|
-
.sp
|
44
|
-
.if n \{\
|
45
|
-
.RS 4
|
46
|
-
.\}
|
47
|
-
.nf
|
48
|
-
git\-svn\-id: svn://some\&.host\&.org/repo/path/to/a/sub/folder@123456 0039d316\-1c4b\-4281\-b951\-d872f2087c98
|
49
|
-
.fi
|
50
|
-
.if n \{\
|
51
|
-
.RE
|
52
|
-
.\}
|
53
|
-
.sp
|
54
|
-
git auto\-svn extracts the repository url (svn://some\&.host\&.org/repo/path/to/a/sub/folder) from the git\-svn\-id, and splits it into the root repository (svn://some\&.host\&.org/repo) and the path within that repository (/path/to/a/sub/folder)\&.
|
55
|
-
.sp
|
56
|
-
It then sets up the following stanza in \&.git/config:
|
57
|
-
.sp
|
58
|
-
.if n \{\
|
59
|
-
.RS 4
|
60
|
-
.\}
|
61
|
-
.nf
|
62
|
-
[svn\-remote "svn"]
|
63
|
-
url = svn://some\&.host\&.org/repo
|
64
|
-
fetch = path/to/a/sub/folder:refs/remotes/origin/master
|
65
|
-
.fi
|
66
|
-
.if n \{\
|
67
|
-
.RE
|
68
|
-
.\}
|
69
|
-
.sp
|
70
|
-
Finally, it runs git svn fetch to pull in the data from the svn remote\&.
|
71
|
-
.SH "CONFIGURATION VARIABLES"
|
72
|
-
.SS "svn\-remote\&.svn\&.url"
|
73
|
-
.sp
|
74
|
-
This is the url of the root of the remote svn repository\&.
|
75
|
-
.SS "svn\-remote\&.svn\&.fetch"
|
76
|
-
.sp
|
77
|
-
This looks like a git refspec, but maps a subdirectory of the svn repository to a single ref in the git remote\&.
|
78
|
-
.SH "EXAMPLE"
|
79
|
-
.sp
|
80
|
-
.if n \{\
|
81
|
-
.RS 4
|
82
|
-
.\}
|
83
|
-
.nf
|
84
|
-
git clone https://chromium\&.googlesource\&.com/chromium/tools/depot_tools
|
85
|
-
cd depot_tools
|
86
|
-
git auto\-svn
|
87
|
-
.fi
|
88
|
-
.if n \{\
|
89
|
-
.RE
|
90
|
-
.\}
|
91
|
-
.sp
|
92
|
-
This results in the following stanza in depot_tools/\&.git/config:
|
93
|
-
.sp
|
94
|
-
.if n \{\
|
95
|
-
.RS 4
|
96
|
-
.\}
|
97
|
-
.nf
|
98
|
-
[svn\-remote "svn"]
|
99
|
-
url = svn://svn\&.chromium\&.org/chrome
|
100
|
-
fetch = trunk/tools/depot_tools:refs/remotes/origin/master
|
101
|
-
.fi
|
102
|
-
.if n \{\
|
103
|
-
.RE
|
104
|
-
.\}
|
105
|
-
.SH "CHROMIUM DEPOT_TOOLS"
|
106
|
-
.sp
|
107
|
-
Part of the chromium \fBdepot_tools\fR(7) suite\&. These tools are meant to assist with the development of chromium and related projects\&. Download the tools from \m[blue]\fBhere\fR\m[]\&\s-2\u[1]\d\s+2\&.
|
108
|
-
.SH "NOTES"
|
109
|
-
.IP " 1." 4
|
110
|
-
here
|
111
|
-
.RS 4
|
112
|
-
\%https://chromium.googlesource.com/chromium/tools/depot_tools
|
113
|
-
.RE
|
@@ -1 +0,0 @@
|
|
1
|
-
Automatically set up git-svn metadata for a repo mirrored from SVN.
|
@@ -1,69 +0,0 @@
|
|
1
|
-
git-auto-svn(1)
|
2
|
-
===============
|
3
|
-
|
4
|
-
NAME
|
5
|
-
----
|
6
|
-
git-auto-svn -
|
7
|
-
include::_git-auto-svn_desc.helper.txt[]
|
8
|
-
|
9
|
-
SYNOPSIS
|
10
|
-
--------
|
11
|
-
[verse]
|
12
|
-
'git auto-svn'
|
13
|
-
|
14
|
-
DESCRIPTION
|
15
|
-
-----------
|
16
|
-
|
17
|
-
`git auto-svn` automatically sets up git-svn metadata and runs git-svn fetch for
|
18
|
-
repos that are homed in SVN but mirrored to Git (such as depot_tools itself).
|
19
|
-
|
20
|
-
It determines the metadata to use by inspecting the `git-svn-id` footer of the
|
21
|
-
HEAD of the remote upstream ref (by default, `origin/master`). `git-svn-id`
|
22
|
-
footers look like this:
|
23
|
-
|
24
|
-
git-svn-id: svn://some.host.org/repo/path/to/a/sub/folder@123456 0039d316-1c4b-4281-b951-d872f2087c98
|
25
|
-
|
26
|
-
`git auto-svn` extracts the repository url
|
27
|
-
(svn://some.host.org/repo/path/to/a/sub/folder) from the `git-svn-id`, and
|
28
|
-
splits it into the root repository (svn://some.host.org/repo) and the path
|
29
|
-
within that repository (/path/to/a/sub/folder).
|
30
|
-
|
31
|
-
It then sets up the following stanza in .git/config:
|
32
|
-
|
33
|
-
[svn-remote "svn"]
|
34
|
-
url = svn://some.host.org/repo
|
35
|
-
fetch = path/to/a/sub/folder:refs/remotes/origin/master
|
36
|
-
|
37
|
-
Finally, it runs `git svn fetch` to pull in the data from the svn remote.
|
38
|
-
|
39
|
-
CONFIGURATION VARIABLES
|
40
|
-
-----------------------
|
41
|
-
|
42
|
-
svn-remote.svn.url
|
43
|
-
~~~~~~~~~~~~~~~~~~
|
44
|
-
|
45
|
-
This is the url of the root of the remote svn repository.
|
46
|
-
|
47
|
-
svn-remote.svn.fetch
|
48
|
-
~~~~~~~~~~~~~~~~~~~~
|
49
|
-
|
50
|
-
This looks like a git refspec, but maps a subdirectory of the svn repository
|
51
|
-
to a single ref in the git remote.
|
52
|
-
|
53
|
-
EXAMPLE
|
54
|
-
-------
|
55
|
-
|
56
|
-
git clone https://chromium.googlesource.com/chromium/tools/depot_tools
|
57
|
-
cd depot_tools
|
58
|
-
git auto-svn
|
59
|
-
|
60
|
-
This results in the following stanza in `depot_tools/.git/config`:
|
61
|
-
|
62
|
-
[svn-remote "svn"]
|
63
|
-
url = svn://svn.chromium.org/chrome
|
64
|
-
fetch = trunk/tools/depot_tools:refs/remotes/origin/master
|
65
|
-
|
66
|
-
|
67
|
-
include::_footer.txt[]
|
68
|
-
|
69
|
-
// vim: ft=asciidoc:
|
@@ -1,43 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"cmd": [
|
4
|
-
"python",
|
5
|
-
"-u",
|
6
|
-
"RECIPE_MODULE[depot_tools::bot_update]/resources/bot_update.py",
|
7
|
-
"--master",
|
8
|
-
"experimental",
|
9
|
-
"--builder",
|
10
|
-
"Experimental Builder",
|
11
|
-
"--slave",
|
12
|
-
"somehost",
|
13
|
-
"--spec",
|
14
|
-
"cache_dir = '[GIT_CACHE]'\nsolutions = [{'deps_file': '.DEPS.git', 'managed': True, 'name': 'src', 'url': 'https://chromium.googlesource.com/chromium/src.git'}]",
|
15
|
-
"--root",
|
16
|
-
"src",
|
17
|
-
"--revision_mapping_file",
|
18
|
-
"{\"src\": \"got_cr_revision\"}",
|
19
|
-
"--git-cache-dir",
|
20
|
-
"[GIT_CACHE]",
|
21
|
-
"--output_json",
|
22
|
-
"/path/to/tmp/json",
|
23
|
-
"--revision",
|
24
|
-
"src@HEAD"
|
25
|
-
],
|
26
|
-
"env": {
|
27
|
-
"PATH": "%(PATH)s:RECIPE_PACKAGE_REPO[depot_tools]"
|
28
|
-
},
|
29
|
-
"name": "bot_update",
|
30
|
-
"~followup_annotations": [
|
31
|
-
"@@@STEP_LOG_LINE@json.output@{@@@",
|
32
|
-
"@@@STEP_LOG_LINE@json.output@ \"did_run\": false, @@@",
|
33
|
-
"@@@STEP_LOG_LINE@json.output@ \"patch_failure\": false@@@",
|
34
|
-
"@@@STEP_LOG_LINE@json.output@}@@@",
|
35
|
-
"@@@STEP_LOG_END@json.output@@@"
|
36
|
-
]
|
37
|
-
},
|
38
|
-
{
|
39
|
-
"name": "$result",
|
40
|
-
"recipe_result": null,
|
41
|
-
"status_code": 0
|
42
|
-
}
|
43
|
-
]
|
@@ -1,31 +0,0 @@
|
|
1
|
-
[
|
2
|
-
{
|
3
|
-
"cmd": [
|
4
|
-
"python",
|
5
|
-
"-u",
|
6
|
-
"RECIPE_MODULE[depot_tools::cipd]/resources/bootstrap.py",
|
7
|
-
"--platform",
|
8
|
-
"linux-amd64",
|
9
|
-
"--dest-directory",
|
10
|
-
"[SLAVE_BUILD]/cipd",
|
11
|
-
"--json-output",
|
12
|
-
"/path/to/tmp/json"
|
13
|
-
],
|
14
|
-
"name": "install cipd",
|
15
|
-
"~followup_annotations": [
|
16
|
-
"step returned non-zero exit code: 1",
|
17
|
-
"@@@STEP_LOG_LINE@json.output@{@@@",
|
18
|
-
"@@@STEP_LOG_LINE@json.output@ \"executable\": \"[SLAVE_BUILD]/cipd/cipd\", @@@",
|
19
|
-
"@@@STEP_LOG_LINE@json.output@ \"instance_id\": \"40-chars-fake-of-the-package-instance_id\"@@@",
|
20
|
-
"@@@STEP_LOG_LINE@json.output@}@@@",
|
21
|
-
"@@@STEP_LOG_END@json.output@@@",
|
22
|
-
"@@@STEP_FAILURE@@@"
|
23
|
-
]
|
24
|
-
},
|
25
|
-
{
|
26
|
-
"name": "$result",
|
27
|
-
"reason": "Step('install cipd') failed with return_code 1",
|
28
|
-
"recipe_result": null,
|
29
|
-
"status_code": 1
|
30
|
-
}
|
31
|
-
]
|
@@ -1,218 +0,0 @@
|
|
1
|
-
# Copyright 2015 The Chromium Authors. All rights reserved.
|
2
|
-
# Use of this source code is governed by a BSD-style license that can be
|
3
|
-
# found in the LICENSE file.
|
4
|
-
|
5
|
-
import argparse
|
6
|
-
import errno
|
7
|
-
import hashlib
|
8
|
-
import json
|
9
|
-
import os
|
10
|
-
import sys
|
11
|
-
import tempfile
|
12
|
-
import time
|
13
|
-
import traceback
|
14
|
-
import urllib
|
15
|
-
import urllib2
|
16
|
-
|
17
|
-
|
18
|
-
# Default package repository URL.
|
19
|
-
CIPD_BACKEND_URL = 'https://chrome-infra-packages.appspot.com'
|
20
|
-
|
21
|
-
# ./cipd resolve \
|
22
|
-
# infra/tools/cipd/ \
|
23
|
-
# -version=git_revision:768586a9aa72fe6a41a8a0205ed56ceb1495625c
|
24
|
-
CLIENT_VERSIONS = {
|
25
|
-
'linux-386': '3f5d6d3906c3b2c6a057d1ab1634ac06aa418708',
|
26
|
-
'linux-amd64': '1ea0b6b254ad3f546c826dd3e437798ace2c2480',
|
27
|
-
'mac-amd64': 'c111be343c692e5285113a6b1c999887adbb268e',
|
28
|
-
'windows-386': 'dc3d1bd5b4b93945640bac4bb047c333a8fa12fd',
|
29
|
-
'windows-amd64': 'bccdb9a605037e3dd2a8a64e79e08f691a6f159d',
|
30
|
-
}
|
31
|
-
|
32
|
-
|
33
|
-
class CipdBootstrapError(Exception):
|
34
|
-
"""Raised by install_cipd_client on fatal error."""
|
35
|
-
|
36
|
-
def install_cipd_client(path, package, version):
|
37
|
-
"""Installs CIPD client to <path>/cipd.
|
38
|
-
|
39
|
-
Args:
|
40
|
-
path: root directory to install CIPD client into.
|
41
|
-
package: cipd client package name, e.g. infra/tools/cipd/linux-amd64.
|
42
|
-
version: version of the package to install.
|
43
|
-
|
44
|
-
Returns:
|
45
|
-
Absolute path to CIPD executable.
|
46
|
-
"""
|
47
|
-
print 'Ensuring CIPD client is up-to-date'
|
48
|
-
version_file = os.path.join(path, 'VERSION')
|
49
|
-
bin_file = os.path.join(path, 'cipd')
|
50
|
-
|
51
|
-
# Resolve version to concrete instance ID, e.g "live" -> "abcdef0123....".
|
52
|
-
instance_id = call_cipd_api(
|
53
|
-
'repo/v1/instance/resolve',
|
54
|
-
{'package_name': package, 'version': version})['instance_id']
|
55
|
-
print 'CIPD client %s => %s' % (version, instance_id)
|
56
|
-
|
57
|
-
# Already installed?
|
58
|
-
installed_instance_id = (read_file(version_file) or '').strip()
|
59
|
-
if installed_instance_id == instance_id and os.path.exists(bin_file):
|
60
|
-
return bin_file, instance_id
|
61
|
-
|
62
|
-
# Resolve instance ID to an URL to fetch client binary from.
|
63
|
-
client_info = call_cipd_api(
|
64
|
-
'repo/v1/client',
|
65
|
-
{'package_name': package, 'instance_id': instance_id})
|
66
|
-
print 'CIPD client binary info:\n%s' % dump_json(client_info)
|
67
|
-
|
68
|
-
# Fetch the client. It is ~10 MB, so don't bother and fetch it into memory.
|
69
|
-
status, raw_client_bin = fetch_url(client_info['client_binary']['fetch_url'])
|
70
|
-
if status != 200:
|
71
|
-
print 'Failed to fetch client binary, HTTP %d' % status
|
72
|
-
raise CipdBootstrapError('Failed to fetch client binary, HTTP %d' % status)
|
73
|
-
digest = hashlib.sha1(raw_client_bin).hexdigest()
|
74
|
-
if digest != client_info['client_binary']['sha1']:
|
75
|
-
raise CipdBootstrapError('Client SHA1 mismatch')
|
76
|
-
|
77
|
-
# Success.
|
78
|
-
print 'Fetched CIPD client %s:%s at %s' % (package, instance_id, bin_file)
|
79
|
-
write_file(bin_file, raw_client_bin)
|
80
|
-
os.chmod(bin_file, 0755)
|
81
|
-
write_file(version_file, instance_id + '\n')
|
82
|
-
return bin_file, instance_id
|
83
|
-
|
84
|
-
|
85
|
-
def call_cipd_api(endpoint, query):
|
86
|
-
"""Sends GET request to CIPD backend, parses JSON response."""
|
87
|
-
url = '%s/_ah/api/%s' % (CIPD_BACKEND_URL, endpoint)
|
88
|
-
if query:
|
89
|
-
url += '?' + urllib.urlencode(query)
|
90
|
-
status, body = fetch_url(url)
|
91
|
-
if status != 200:
|
92
|
-
raise CipdBootstrapError('Server replied with HTTP %d' % status)
|
93
|
-
try:
|
94
|
-
body = json.loads(body)
|
95
|
-
except ValueError:
|
96
|
-
raise CipdBootstrapError('Server returned invalid JSON')
|
97
|
-
status = body.get('status')
|
98
|
-
if status != 'SUCCESS':
|
99
|
-
m = body.get('error_message') or '<no error message>'
|
100
|
-
raise CipdBootstrapError('Server replied with error %s: %s' % (status, m))
|
101
|
-
return body
|
102
|
-
|
103
|
-
|
104
|
-
def fetch_url(url, headers=None):
|
105
|
-
"""Sends GET request (with retries).
|
106
|
-
|
107
|
-
Args:
|
108
|
-
url: URL to fetch.
|
109
|
-
headers: dict with request headers.
|
110
|
-
|
111
|
-
Returns:
|
112
|
-
(200, reply body) on success.
|
113
|
-
(HTTP code, None) on HTTP 401, 403, or 404 reply.
|
114
|
-
|
115
|
-
Raises:
|
116
|
-
Whatever urllib2 raises.
|
117
|
-
"""
|
118
|
-
req = urllib2.Request(url)
|
119
|
-
req.add_header('User-Agent', 'cipd recipe bootstrap.py')
|
120
|
-
for k, v in (headers or {}).iteritems():
|
121
|
-
req.add_header(str(k), str(v))
|
122
|
-
i = 0
|
123
|
-
while True:
|
124
|
-
i += 1
|
125
|
-
try:
|
126
|
-
print 'GET %s' % url
|
127
|
-
return 200, urllib2.urlopen(req, timeout=60).read()
|
128
|
-
except Exception as e:
|
129
|
-
if isinstance(e, urllib2.HTTPError):
|
130
|
-
print 'Failed to fetch %s, server returned HTTP %d' % (url, e.code)
|
131
|
-
if e.code in (401, 403, 404):
|
132
|
-
return e.code, None
|
133
|
-
else:
|
134
|
-
print 'Failed to fetch %s' % url
|
135
|
-
if i == 20:
|
136
|
-
raise
|
137
|
-
print 'Retrying in %d sec.' % i
|
138
|
-
time.sleep(i)
|
139
|
-
|
140
|
-
|
141
|
-
def ensure_directory(path):
|
142
|
-
"""Creates a directory."""
|
143
|
-
# Handle a case where a file is being converted into a directory.
|
144
|
-
chunks = path.split(os.sep)
|
145
|
-
for i in xrange(len(chunks)):
|
146
|
-
p = os.sep.join(chunks[:i+1])
|
147
|
-
if os.path.exists(p) and not os.path.isdir(p):
|
148
|
-
os.remove(p)
|
149
|
-
break
|
150
|
-
try:
|
151
|
-
os.makedirs(path)
|
152
|
-
except OSError as e:
|
153
|
-
if e.errno != errno.EEXIST:
|
154
|
-
raise
|
155
|
-
|
156
|
-
|
157
|
-
def read_file(path):
|
158
|
-
"""Returns contents of a file or None if missing."""
|
159
|
-
try:
|
160
|
-
with open(path, 'r') as f:
|
161
|
-
return f.read()
|
162
|
-
except IOError as e:
|
163
|
-
if e.errno == errno.ENOENT:
|
164
|
-
return None
|
165
|
-
raise
|
166
|
-
|
167
|
-
|
168
|
-
def write_file(path, data):
|
169
|
-
"""Puts a file on disk, atomically."""
|
170
|
-
ensure_directory(os.path.dirname(path))
|
171
|
-
fd, temp_file = tempfile.mkstemp(dir=os.path.dirname(path))
|
172
|
-
with os.fdopen(fd, 'w') as f:
|
173
|
-
f.write(data)
|
174
|
-
if not sys.platform in ('linux2', 'darwin'):
|
175
|
-
# On windows we should remove destination file if it exists.
|
176
|
-
if os.path.exists(path):
|
177
|
-
os.remove(path)
|
178
|
-
# At this point we may crash, and it's OK, as next time we'll just
|
179
|
-
# re-install CIPD from scratch.
|
180
|
-
os.rename(temp_file, path)
|
181
|
-
|
182
|
-
|
183
|
-
def dump_json(obj):
|
184
|
-
"""Pretty-formats object to JSON."""
|
185
|
-
return json.dumps(obj, indent=2, sort_keys=True, separators=(',',':'))
|
186
|
-
|
187
|
-
|
188
|
-
def main(args):
|
189
|
-
parser = argparse.ArgumentParser('bootstrap cipd')
|
190
|
-
parser.add_argument('--json-output', default=None)
|
191
|
-
parser.add_argument('--version', default=None)
|
192
|
-
parser.add_argument('--platform', required=True)
|
193
|
-
parser.add_argument('--dest-directory', required=True)
|
194
|
-
opts = parser.parse_args(args)
|
195
|
-
|
196
|
-
package = "infra/tools/cipd/%s" % opts.platform
|
197
|
-
version = opts.version or CLIENT_VERSIONS[opts.platform]
|
198
|
-
|
199
|
-
try:
|
200
|
-
exe_path, instance_id = install_cipd_client(opts.dest_directory,
|
201
|
-
package, version)
|
202
|
-
result = {
|
203
|
-
'executable': exe_path,
|
204
|
-
'instance_id': instance_id
|
205
|
-
}
|
206
|
-
if opts.json_output:
|
207
|
-
with open(opts.json_output, 'w') as f:
|
208
|
-
json.dump(result, f)
|
209
|
-
except Exception as e:
|
210
|
-
print 'Exception installing cipd: %s' % e
|
211
|
-
_exc_type, _exc_value, exc_traceback = sys.exc_info()
|
212
|
-
traceback.print_tb(exc_traceback)
|
213
|
-
return 1
|
214
|
-
|
215
|
-
return 0
|
216
|
-
|
217
|
-
if __name__ == '__main__':
|
218
|
-
sys.exit(main(sys.argv[1:]))
|