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.
Files changed (352) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +0 -1
  3. data/CHANGELOG.md +2 -0
  4. data/ext/libv8/builder.rb +2 -2
  5. data/lib/libv8/version.rb +1 -1
  6. data/patches/0001-Build-a-standalone-static-library.patch +4 -4
  7. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +16 -11
  8. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +4 -4
  9. data/patches/{0005-Do-not-embed-debug-symbols-in-macOS-libraries.patch → 0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch} +4 -4
  10. data/vendor/depot_tools/.gitignore +4 -0
  11. data/vendor/depot_tools/OWNERS +0 -2
  12. data/vendor/depot_tools/PRESUBMIT.py +20 -23
  13. data/vendor/depot_tools/README.gclient.md +3 -3
  14. data/vendor/depot_tools/README.git-cl.md +13 -12
  15. data/vendor/depot_tools/README.md +2 -3
  16. data/vendor/depot_tools/WATCHLISTS +0 -1
  17. data/vendor/depot_tools/appengine_mapper.py +23 -0
  18. data/vendor/depot_tools/apply_issue.py +2 -8
  19. data/vendor/depot_tools/bootstrap/win/README.md +1 -8
  20. data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +6 -16
  21. data/vendor/depot_tools/bootstrap/win/git_version.txt +1 -1
  22. data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +1 -1
  23. data/vendor/depot_tools/checkout.py +20 -433
  24. data/vendor/depot_tools/cipd +73 -0
  25. data/vendor/depot_tools/cipd.bat +12 -0
  26. data/vendor/depot_tools/cipd.ps1 +57 -0
  27. data/vendor/depot_tools/cipd_client_version +1 -0
  28. data/vendor/depot_tools/clang_format.py +9 -6
  29. data/vendor/depot_tools/clang_format_merge_driver +8 -0
  30. data/vendor/depot_tools/clang_format_merge_driver.bat +11 -0
  31. data/vendor/depot_tools/clang_format_merge_driver.py +67 -0
  32. data/vendor/depot_tools/codereview.settings +3 -2
  33. data/vendor/depot_tools/commit_queue.py +1 -1
  34. data/vendor/depot_tools/cpplint.py +2 -0
  35. data/vendor/depot_tools/fetch.py +1 -54
  36. data/vendor/depot_tools/fetch_configs/android.py +2 -2
  37. data/vendor/depot_tools/fetch_configs/breakpad.py +2 -3
  38. data/vendor/depot_tools/fetch_configs/chromium.py +2 -3
  39. data/vendor/depot_tools/fetch_configs/crashpad.py +2 -2
  40. data/vendor/depot_tools/fetch_configs/dart.py +2 -3
  41. data/vendor/depot_tools/fetch_configs/dartino.py +2 -3
  42. data/vendor/depot_tools/fetch_configs/dartium.py +2 -3
  43. data/vendor/depot_tools/fetch_configs/depot_tools.py +3 -6
  44. data/vendor/depot_tools/fetch_configs/gyp.py +2 -3
  45. data/vendor/depot_tools/fetch_configs/infra.py +2 -2
  46. data/vendor/depot_tools/fetch_configs/infra_internal.py +2 -2
  47. data/vendor/depot_tools/fetch_configs/ios.py +2 -2
  48. data/vendor/depot_tools/fetch_configs/ios_internal.py +2 -3
  49. data/vendor/depot_tools/fetch_configs/mojo.py +2 -3
  50. data/vendor/depot_tools/fetch_configs/nacl.py +2 -3
  51. data/vendor/depot_tools/fetch_configs/naclports.py +2 -3
  52. data/vendor/depot_tools/fetch_configs/pdfium.py +2 -2
  53. data/vendor/depot_tools/fetch_configs/skia.py +2 -2
  54. data/vendor/depot_tools/fetch_configs/skia_buildbot.py +2 -2
  55. data/vendor/depot_tools/fetch_configs/syzygy.py +2 -2
  56. data/vendor/depot_tools/fetch_configs/v8.py +2 -3
  57. data/vendor/depot_tools/fetch_configs/webrtc.py +5 -3
  58. data/vendor/depot_tools/fetch_configs/webrtc_android.py +2 -2
  59. data/vendor/depot_tools/fetch_configs/webrtc_ios.py +2 -2
  60. data/vendor/depot_tools/fix_encoding.py +6 -6
  61. data/vendor/depot_tools/gclient.py +136 -368
  62. data/vendor/depot_tools/gclient_scm.py +108 -647
  63. data/vendor/depot_tools/gclient_utils.py +22 -86
  64. data/vendor/depot_tools/gerrit_client.py +105 -0
  65. data/vendor/depot_tools/gerrit_util.py +174 -67
  66. data/vendor/depot_tools/git-crrev-parse +6 -7
  67. data/vendor/depot_tools/git-gs +1 -1
  68. data/vendor/depot_tools/git_cache.py +68 -18
  69. data/vendor/depot_tools/git_cherry_pick_upload.py +4 -4
  70. data/vendor/depot_tools/git_cl.py +1028 -961
  71. data/vendor/depot_tools/git_common.py +2 -3
  72. data/vendor/depot_tools/git_drover.py +0 -1
  73. data/vendor/depot_tools/git_footers.py +3 -43
  74. data/vendor/depot_tools/git_rebase_update.py +9 -1
  75. data/vendor/depot_tools/git_squash_branch.py +1 -1
  76. data/vendor/depot_tools/infra/config/cq.cfg +8 -1
  77. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  78. data/vendor/depot_tools/man/html/depot_tools.html +3 -11
  79. data/vendor/depot_tools/man/html/depot_tools_tutorial.html +9 -9
  80. data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +2 -2
  81. data/vendor/depot_tools/man/html/git-drover.html +17 -17
  82. data/vendor/depot_tools/man/html/git-footers.html +2 -2
  83. data/vendor/depot_tools/man/html/git-freeze.html +4 -4
  84. data/vendor/depot_tools/man/html/git-hyper-blame.html +2 -2
  85. data/vendor/depot_tools/man/html/git-map-branches.html +2 -2
  86. data/vendor/depot_tools/man/html/git-map.html +2 -2
  87. data/vendor/depot_tools/man/html/git-mark-merge-base.html +2 -2
  88. data/vendor/depot_tools/man/html/git-nav-downstream.html +2 -2
  89. data/vendor/depot_tools/man/html/git-nav-upstream.html +2 -2
  90. data/vendor/depot_tools/man/html/git-new-branch.html +2 -2
  91. data/vendor/depot_tools/man/html/git-rebase-update.html +2 -2
  92. data/vendor/depot_tools/man/html/git-rename-branch.html +2 -2
  93. data/vendor/depot_tools/man/html/git-reparent-branch.html +2 -2
  94. data/vendor/depot_tools/man/html/git-retry.html +3 -3
  95. data/vendor/depot_tools/man/html/git-squash-branch.html +3 -3
  96. data/vendor/depot_tools/man/html/git-thaw.html +2 -2
  97. data/vendor/depot_tools/man/html/git-upstream-diff.html +3 -3
  98. data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +4 -4
  99. data/vendor/depot_tools/man/man1/git-drover.1 +19 -19
  100. data/vendor/depot_tools/man/man1/git-footers.1 +4 -4
  101. data/vendor/depot_tools/man/man1/git-freeze.1 +6 -6
  102. data/vendor/depot_tools/man/man1/git-hyper-blame.1 +4 -4
  103. data/vendor/depot_tools/man/man1/git-map-branches.1 +4 -4
  104. data/vendor/depot_tools/man/man1/git-map.1 +4 -4
  105. data/vendor/depot_tools/man/man1/git-mark-merge-base.1 +4 -4
  106. data/vendor/depot_tools/man/man1/git-nav-downstream.1 +4 -4
  107. data/vendor/depot_tools/man/man1/git-nav-upstream.1 +4 -4
  108. data/vendor/depot_tools/man/man1/git-new-branch.1 +4 -4
  109. data/vendor/depot_tools/man/man1/git-rebase-update.1 +4 -4
  110. data/vendor/depot_tools/man/man1/git-rename-branch.1 +4 -4
  111. data/vendor/depot_tools/man/man1/git-reparent-branch.1 +4 -4
  112. data/vendor/depot_tools/man/man1/git-retry.1 +5 -5
  113. data/vendor/depot_tools/man/man1/git-squash-branch.1 +5 -5
  114. data/vendor/depot_tools/man/man1/git-thaw.1 +4 -4
  115. data/vendor/depot_tools/man/man1/git-upstream-diff.1 +5 -5
  116. data/vendor/depot_tools/man/man7/depot_tools.7 +5 -10
  117. data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +4 -4
  118. data/vendor/depot_tools/man/src/depot_tools.txt +1 -1
  119. data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +7 -7
  120. data/vendor/depot_tools/man/src/filter_demo_output.py +2 -2
  121. data/vendor/depot_tools/man/src/git-footers.demo.1.sh +1 -1
  122. data/vendor/depot_tools/man/src/git-retry.txt +1 -1
  123. data/vendor/depot_tools/man/src/git-squash-branch.txt +2 -2
  124. data/vendor/depot_tools/man/src/git-upstream-diff.txt +1 -1
  125. data/vendor/depot_tools/my_activity.py +6 -3
  126. data/vendor/depot_tools/my_reviews.py +1 -1
  127. data/vendor/depot_tools/ninja +2 -2
  128. data/vendor/depot_tools/ninja-linux32 +0 -0
  129. data/vendor/depot_tools/ninja-linux64 +0 -0
  130. data/vendor/depot_tools/ninja-mac +0 -0
  131. data/vendor/depot_tools/ninja.exe +0 -0
  132. data/vendor/depot_tools/owners.py +14 -3
  133. data/vendor/depot_tools/presubmit_canned_checks.py +46 -67
  134. data/vendor/depot_tools/presubmit_support.py +109 -371
  135. data/vendor/depot_tools/pylintrc +83 -56
  136. data/vendor/depot_tools/recipe_modules/OWNERS +1 -0
  137. data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +18 -9
  138. data/vendor/depot_tools/recipe_modules/bot_update/api.py +56 -55
  139. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +3 -7
  140. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +3 -7
  141. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +3 -7
  142. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/buildbot.json +52 -0
  143. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +19 -10
  144. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +19 -10
  145. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +19 -10
  146. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +19 -10
  147. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +19 -10
  148. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +3 -7
  149. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +2 -54
  150. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_buildbot.json +56 -0
  151. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/{forced.json → trychange_oauth2_json.json} +6 -9
  152. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2_json_win.json +54 -0
  153. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +9 -9
  154. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +9 -9
  155. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +9 -9
  156. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +9 -9
  157. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +20 -10
  158. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle_deprecated.json +59 -0
  159. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +9 -9
  160. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +20 -10
  161. data/vendor/depot_tools/recipe_modules/bot_update/example.py +45 -63
  162. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +210 -807
  163. data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +34 -45
  164. data/vendor/depot_tools/recipe_modules/cipd/api.py +59 -84
  165. data/vendor/depot_tools/recipe_modules/cipd/example.expected/basic.json +71 -117
  166. data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-failed.json +14 -60
  167. data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-many-instances.json +71 -117
  168. data/vendor/depot_tools/recipe_modules/cipd/example.expected/mac64.json +71 -117
  169. data/vendor/depot_tools/recipe_modules/cipd/example.expected/win64.json +71 -117
  170. data/vendor/depot_tools/recipe_modules/cipd/example.py +2 -12
  171. data/vendor/depot_tools/recipe_modules/cipd/test_api.py +0 -9
  172. data/vendor/depot_tools/recipe_modules/depot_tools/api.py +6 -0
  173. data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/basic.json +7 -0
  174. data/vendor/depot_tools/recipe_modules/depot_tools/example.expected/win.json +7 -0
  175. data/vendor/depot_tools/recipe_modules/depot_tools/example.py +3 -0
  176. data/vendor/depot_tools/recipe_modules/gclient/__init__.py +4 -0
  177. data/vendor/depot_tools/recipe_modules/gclient/api.py +9 -22
  178. data/vendor/depot_tools/recipe_modules/gclient/config.py +18 -5
  179. data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +14 -14
  180. data/vendor/depot_tools/recipe_modules/gclient/example.expected/buildbot.json +211 -0
  181. data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +16 -14
  182. data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +16 -14
  183. data/vendor/depot_tools/recipe_modules/gclient/example.py +13 -11
  184. data/vendor/depot_tools/recipe_modules/gerrit/__init__.py +6 -0
  185. data/vendor/depot_tools/recipe_modules/gerrit/api.py +63 -0
  186. data/vendor/depot_tools/recipe_modules/gerrit/example.expected/basic.json +64 -0
  187. data/vendor/depot_tools/recipe_modules/gerrit/example.py +35 -0
  188. data/vendor/depot_tools/recipe_modules/gerrit/test_api.py +24 -0
  189. data/vendor/depot_tools/recipe_modules/git/__init__.py +4 -0
  190. data/vendor/depot_tools/recipe_modules/git/api.py +155 -142
  191. data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +43 -17
  192. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +43 -17
  193. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +43 -17
  194. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +43 -17
  195. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +43 -17
  196. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +43 -17
  197. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +13 -13
  198. data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +43 -17
  199. data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +45 -19
  200. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +45 -19
  201. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +43 -17
  202. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +43 -17
  203. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +8 -8
  204. data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +44 -18
  205. data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +48 -22
  206. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +43 -17
  207. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +42 -16
  208. data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +43 -17
  209. data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +43 -17
  210. data/vendor/depot_tools/recipe_modules/git/example.py +9 -3
  211. data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
  212. data/vendor/depot_tools/recipe_modules/git_cl/api.py +8 -8
  213. data/vendor/depot_tools/recipe_modules/git_cl/example.py +1 -1
  214. data/vendor/depot_tools/recipe_modules/gsutil/__init__.py +4 -0
  215. data/vendor/depot_tools/recipe_modules/gsutil/api.py +196 -0
  216. data/vendor/depot_tools/recipe_modules/gsutil/example.expected/basic.json +186 -0
  217. data/vendor/depot_tools/recipe_modules/gsutil/example.py +77 -0
  218. data/vendor/depot_tools/recipe_modules/gsutil/resources/gsutil_smart_retry.py +69 -0
  219. data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +3 -0
  220. data/vendor/depot_tools/recipe_modules/infra_paths/api.py +20 -3
  221. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +3 -1
  222. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +3 -1
  223. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +3 -1
  224. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +3 -1
  225. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +3 -1
  226. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +3 -1
  227. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +3 -1
  228. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_linux.json +3 -1
  229. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_mac.json +3 -1
  230. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_swarmbucket_win.json +3 -1
  231. data/vendor/depot_tools/recipe_modules/infra_paths/example.py +6 -1
  232. data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +4 -6
  233. data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
  234. data/vendor/depot_tools/recipe_modules/rietveld/api.py +12 -9
  235. data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +2 -24
  236. data/vendor/depot_tools/recipe_modules/rietveld/example.expected/buildbot.json +30 -0
  237. data/vendor/depot_tools/recipe_modules/rietveld/example.py +12 -6
  238. data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +4 -0
  239. data/vendor/depot_tools/recipe_modules/tryserver/api.py +46 -70
  240. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/set_failure_hash_with_no_steps.json +8 -0
  241. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/{with_svn_patch.json → with_gerrit_patch.json} +1 -31
  242. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_gerrit_patch_deprecated.json +39 -0
  243. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +2 -2
  244. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch_luci.json +8 -0
  245. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +3 -3
  246. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +3 -3
  247. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +1 -1
  248. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +1 -1
  249. data/vendor/depot_tools/recipe_modules/tryserver/example.py +35 -5
  250. data/vendor/depot_tools/recipes.py +52 -28
  251. data/vendor/depot_tools/repo +216 -69
  252. data/vendor/depot_tools/rietveld.py +20 -15
  253. data/vendor/depot_tools/roll_dep.py +1 -1
  254. data/vendor/depot_tools/scm.py +11 -826
  255. data/vendor/depot_tools/subprocess2.py +5 -5
  256. data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +2 -0
  257. data/vendor/depot_tools/third_party/cq_client/README.md +5 -1
  258. data/vendor/depot_tools/third_party/cq_client/cq.pb.go +183 -104
  259. data/vendor/depot_tools/third_party/cq_client/cq.proto +43 -27
  260. data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +95 -29
  261. data/vendor/depot_tools/third_party/cq_client/testdata/cq_both.cfg +67 -0
  262. data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +1 -2
  263. data/vendor/depot_tools/third_party/cq_client/testdata/cq_rietveld.cfg +0 -3
  264. data/vendor/depot_tools/third_party/upload.py +44 -24
  265. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +0 -5
  266. metadata +38 -93
  267. data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +0 -25
  268. data/vendor/depot_tools/git-auto-svn +0 -6
  269. data/vendor/depot_tools/git_auto_svn.py +0 -122
  270. data/vendor/depot_tools/man/html/git-auto-svn.html +0 -837
  271. data/vendor/depot_tools/man/man1/git-auto-svn.1 +0 -113
  272. data/vendor/depot_tools/man/src/_git-auto-svn_desc.helper.txt +0 -1
  273. data/vendor/depot_tools/man/src/git-auto-svn.txt +0 -69
  274. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +0 -43
  275. data/vendor/depot_tools/recipe_modules/cipd/example.expected/install-failed.json +0 -31
  276. data/vendor/depot_tools/recipe_modules/cipd/resources/bootstrap.py +0 -218
  277. data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +0 -7
  278. data/vendor/depot_tools/third_party/gsutil/CHECKSUM +0 -1
  279. data/vendor/depot_tools/third_party/gsutil/COPYING +0 -202
  280. data/vendor/depot_tools/third_party/gsutil/LICENSE.third_party +0 -295
  281. data/vendor/depot_tools/third_party/gsutil/MANIFEST.in +0 -5
  282. data/vendor/depot_tools/third_party/gsutil/README +0 -38
  283. data/vendor/depot_tools/third_party/gsutil/README.chromium +0 -25
  284. data/vendor/depot_tools/third_party/gsutil/README.pkg +0 -49
  285. data/vendor/depot_tools/third_party/gsutil/ReleaseNotes.txt +0 -825
  286. data/vendor/depot_tools/third_party/gsutil/VERSION +0 -1
  287. data/vendor/depot_tools/third_party/gsutil/gslib/README +0 -5
  288. data/vendor/depot_tools/third_party/gsutil/gslib/__init__.py +0 -22
  289. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/__init__.py +0 -15
  290. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/acls.py +0 -234
  291. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/anon.py +0 -57
  292. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/command_opts.py +0 -116
  293. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/dev.py +0 -139
  294. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/metadata.py +0 -186
  295. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/naming.py +0 -173
  296. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/prod.py +0 -160
  297. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/projects.py +0 -130
  298. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/subdirs.py +0 -110
  299. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/support.py +0 -86
  300. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/versioning.py +0 -242
  301. data/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/wildcards.py +0 -170
  302. data/vendor/depot_tools/third_party/gsutil/gslib/bucket_listing_ref.py +0 -175
  303. data/vendor/depot_tools/third_party/gsutil/gslib/command.py +0 -725
  304. data/vendor/depot_tools/third_party/gsutil/gslib/command_runner.py +0 -102
  305. data/vendor/depot_tools/third_party/gsutil/gslib/commands/__init__.py +0 -15
  306. data/vendor/depot_tools/third_party/gsutil/gslib/commands/cat.py +0 -131
  307. data/vendor/depot_tools/third_party/gsutil/gslib/commands/chacl.py +0 -523
  308. data/vendor/depot_tools/third_party/gsutil/gslib/commands/config.py +0 -662
  309. data/vendor/depot_tools/third_party/gsutil/gslib/commands/cp.py +0 -1819
  310. data/vendor/depot_tools/third_party/gsutil/gslib/commands/disablelogging.py +0 -101
  311. data/vendor/depot_tools/third_party/gsutil/gslib/commands/enablelogging.py +0 -149
  312. data/vendor/depot_tools/third_party/gsutil/gslib/commands/getacl.py +0 -82
  313. data/vendor/depot_tools/third_party/gsutil/gslib/commands/getcors.py +0 -121
  314. data/vendor/depot_tools/third_party/gsutil/gslib/commands/getdefacl.py +0 -86
  315. data/vendor/depot_tools/third_party/gsutil/gslib/commands/getlogging.py +0 -137
  316. data/vendor/depot_tools/third_party/gsutil/gslib/commands/getversioning.py +0 -116
  317. data/vendor/depot_tools/third_party/gsutil/gslib/commands/getwebcfg.py +0 -122
  318. data/vendor/depot_tools/third_party/gsutil/gslib/commands/help.py +0 -218
  319. data/vendor/depot_tools/third_party/gsutil/gslib/commands/ls.py +0 -578
  320. data/vendor/depot_tools/third_party/gsutil/gslib/commands/mb.py +0 -172
  321. data/vendor/depot_tools/third_party/gsutil/gslib/commands/mv.py +0 -159
  322. data/vendor/depot_tools/third_party/gsutil/gslib/commands/perfdiag.py +0 -903
  323. data/vendor/depot_tools/third_party/gsutil/gslib/commands/rb.py +0 -113
  324. data/vendor/depot_tools/third_party/gsutil/gslib/commands/rm.py +0 -237
  325. data/vendor/depot_tools/third_party/gsutil/gslib/commands/setacl.py +0 -138
  326. data/vendor/depot_tools/third_party/gsutil/gslib/commands/setcors.py +0 -145
  327. data/vendor/depot_tools/third_party/gsutil/gslib/commands/setdefacl.py +0 -105
  328. data/vendor/depot_tools/third_party/gsutil/gslib/commands/setmeta.py +0 -420
  329. data/vendor/depot_tools/third_party/gsutil/gslib/commands/setversioning.py +0 -114
  330. data/vendor/depot_tools/third_party/gsutil/gslib/commands/setwebcfg.py +0 -190
  331. data/vendor/depot_tools/third_party/gsutil/gslib/commands/update.py +0 -305
  332. data/vendor/depot_tools/third_party/gsutil/gslib/commands/version.py +0 -150
  333. data/vendor/depot_tools/third_party/gsutil/gslib/exception.py +0 -76
  334. data/vendor/depot_tools/third_party/gsutil/gslib/help_provider.py +0 -81
  335. data/vendor/depot_tools/third_party/gsutil/gslib/name_expansion.py +0 -550
  336. data/vendor/depot_tools/third_party/gsutil/gslib/no_op_auth_plugin.py +0 -30
  337. data/vendor/depot_tools/third_party/gsutil/gslib/plurality_checkable_iterator.py +0 -56
  338. data/vendor/depot_tools/third_party/gsutil/gslib/project_id.py +0 -67
  339. data/vendor/depot_tools/third_party/gsutil/gslib/storage_uri_builder.py +0 -56
  340. data/vendor/depot_tools/third_party/gsutil/gslib/thread_pool.py +0 -79
  341. data/vendor/depot_tools/third_party/gsutil/gslib/util.py +0 -167
  342. data/vendor/depot_tools/third_party/gsutil/gslib/wildcard_iterator.py +0 -498
  343. data/vendor/depot_tools/third_party/gsutil/gsutil +0 -384
  344. data/vendor/depot_tools/third_party/gsutil/gsutil.spec.in +0 -75
  345. data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/__init__.py +0 -22
  346. data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client.py +0 -630
  347. data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_client_test.py +0 -374
  348. data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_helper.py +0 -103
  349. data/vendor/depot_tools/third_party/gsutil/oauth2_plugin/oauth2_plugin.py +0 -24
  350. data/vendor/depot_tools/third_party/gsutil/pkg_util.py +0 -60
  351. data/vendor/depot_tools/third_party/gsutil/plugins/__init__.py +0 -0
  352. data/vendor/depot_tools/third_party/gsutil/plugins/sso_auth.py +0 -105
@@ -1,145 +0,0 @@
1
- # Copyright 2012 Google Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- import xml.sax
16
- from boto import handler
17
- from boto.gs.cors import Cors
18
- from gslib.command import Command
19
- from gslib.command import COMMAND_NAME
20
- from gslib.command import COMMAND_NAME_ALIASES
21
- from gslib.command import CONFIG_REQUIRED
22
- from gslib.command import FILE_URIS_OK
23
- from gslib.command import MAX_ARGS
24
- from gslib.command import MIN_ARGS
25
- from gslib.command import PROVIDER_URIS_OK
26
- from gslib.command import SUPPORTED_SUB_ARGS
27
- from gslib.command import URIS_START_ARG
28
- from gslib.exception import CommandException
29
- from gslib.help_provider import HELP_NAME
30
- from gslib.help_provider import HELP_NAME_ALIASES
31
- from gslib.help_provider import HELP_ONE_LINE_SUMMARY
32
- from gslib.help_provider import HELP_TEXT
33
- from gslib.help_provider import HelpType
34
- from gslib.help_provider import HELP_TYPE
35
- from gslib.util import NO_MAX
36
-
37
- _detailed_help_text = ("""
38
- <B>SYNOPSIS</B>
39
- gsutil setcors cors-xml-file uri...
40
-
41
-
42
- <B>DESCRIPTION</B>
43
- Sets the Cross-Origin Resource Sharing (CORS) configuration on one or more
44
- buckets. This command is supported for buckets only, not objects. The
45
- cors-xml-file specified on the command line should be a path to a local
46
- file containing an XML document with the following structure:
47
-
48
- <?xml version="1.0" ?>
49
- <CorsConfig>
50
- <Cors>
51
- <Origins>
52
- <Origin>http://origin1.example.com</Origin>
53
- </Origins>
54
- <Methods>
55
- <Method>GET</Method>
56
- </Methods>
57
- <ResponseHeaders>
58
- <ResponseHeader>Content-Type</ResponseHeader>
59
- </ResponseHeaders>
60
- </Cors>
61
- </CorsConfig>
62
-
63
- The above XML document explicitly allows cross-origin GET requests from
64
- http://origin1.example.com and may include the Content-Type response header.
65
-
66
- For more info about CORS, see http://www.w3.org/TR/cors/.
67
- """)
68
-
69
- class SetCorsCommand(Command):
70
- """Implementation of gsutil setcors command."""
71
-
72
- # Command specification (processed by parent class).
73
- command_spec = {
74
- # Name of command.
75
- COMMAND_NAME : 'setcors',
76
- # List of command name aliases.
77
- COMMAND_NAME_ALIASES : [],
78
- # Min number of args required by this command.
79
- MIN_ARGS : 2,
80
- # Max number of args required by this command, or NO_MAX.
81
- MAX_ARGS : NO_MAX,
82
- # Getopt-style string specifying acceptable sub args.
83
- SUPPORTED_SUB_ARGS : '',
84
- # True if file URIs acceptable for this command.
85
- FILE_URIS_OK : False,
86
- # True if provider-only URIs acceptable for this command.
87
- PROVIDER_URIS_OK : False,
88
- # Index in args of first URI arg.
89
- URIS_START_ARG : 1,
90
- # True if must configure gsutil before running command.
91
- CONFIG_REQUIRED : True,
92
- }
93
- help_spec = {
94
- # Name of command or auxiliary help info for which this help applies.
95
- HELP_NAME : 'setcors',
96
- # List of help name aliases.
97
- HELP_NAME_ALIASES : ['cors', 'cross-origin'],
98
- # Type of help)
99
- HELP_TYPE : HelpType.COMMAND_HELP,
100
- # One line summary of this help.
101
- HELP_ONE_LINE_SUMMARY : 'Set a CORS XML document for one or more buckets',
102
- # The full help text.
103
- HELP_TEXT : _detailed_help_text,
104
- }
105
-
106
- # Command entry point.
107
- def RunCommand(self):
108
- cors_arg = self.args[0]
109
- uri_args = self.args[1:]
110
- # Disallow multi-provider setcors requests.
111
- storage_uri = self.UrisAreForSingleProvider(uri_args)
112
- if not storage_uri:
113
- raise CommandException('"%s" command spanning providers not allowed.' %
114
- self.command_name)
115
-
116
- # Open, read and parse file containing XML document.
117
- cors_file = open(cors_arg, 'r')
118
- cors_txt = cors_file.read()
119
- cors_file.close()
120
- cors_obj = Cors()
121
-
122
- # Parse XML document and convert into Cors object.
123
- h = handler.XmlHandler(cors_obj, None)
124
- try:
125
- xml.sax.parseString(cors_txt, h)
126
- except xml.sax._exceptions.SAXParseException, e:
127
- raise CommandException('Requested CORS is invalid: %s at line %s, '
128
- 'column %s' % (e.getMessage(), e.getLineNumber(),
129
- e.getColumnNumber()))
130
-
131
- # Iterate over URIs, expanding wildcards, and setting the CORS on each.
132
- some_matched = False
133
- for uri_str in uri_args:
134
- for blr in self.WildcardIterator(uri_str):
135
- uri = blr.GetUri()
136
- if not uri.names_bucket():
137
- raise CommandException('URI %s must name a bucket for the %s command'
138
- % (str(uri), self.command_name))
139
- some_matched = True
140
- print 'Setting CORS on %s...' % uri
141
- uri.set_cors(cors_obj, False, self.headers)
142
- if not some_matched:
143
- raise CommandException('No URIs matched')
144
-
145
- return 0
@@ -1,105 +0,0 @@
1
- # Copyright 2011 Google Inc. All Rights Reserved.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- from gslib.command import Command
16
- from gslib.command import COMMAND_NAME
17
- from gslib.command import COMMAND_NAME_ALIASES
18
- from gslib.command import CONFIG_REQUIRED
19
- from gslib.command import FILE_URIS_OK
20
- from gslib.command import MAX_ARGS
21
- from gslib.command import MIN_ARGS
22
- from gslib.command import PROVIDER_URIS_OK
23
- from gslib.command import SUPPORTED_SUB_ARGS
24
- from gslib.command import URIS_START_ARG
25
- from gslib.exception import CommandException
26
- from gslib.help_provider import HELP_NAME
27
- from gslib.help_provider import HELP_NAME_ALIASES
28
- from gslib.help_provider import HELP_ONE_LINE_SUMMARY
29
- from gslib.help_provider import HELP_TEXT
30
- from gslib.help_provider import HelpType
31
- from gslib.help_provider import HELP_TYPE
32
- from gslib.util import NO_MAX
33
-
34
- _detailed_help_text = ("""
35
- <B>SYNOPSIS</B>
36
- gsutil setdefacl file-or-canned_acl_name uri...
37
-
38
-
39
- <B>DESCRIPTION</B>
40
-
41
- The setdefacl command sets default object ACLs for the specified buckets. If
42
- you specify a default object ACL for a certain bucket, Google Cloud Storage
43
- applies the default object ACL to all new objects uploaded to that bucket.
44
-
45
- Similar to the setacl command, the file-or-canned_acl_name names either a
46
- canned ACL or the path to a file that contains ACL XML. (See "gsutil
47
- help setacl" for examples of editing and setting ACLs via the
48
- getacl/setacl commands.)
49
-
50
- If you don't set a default object ACL on a bucket, the bucket's default
51
- object ACL will be project-private.
52
-
53
- Setting a default object ACL on a bucket provides a convenient way
54
- to ensure newly uploaded objects have a specific ACL, and avoids the
55
- need to back after the fact and set ACLs on a large number of objects
56
- for which you forgot to set the ACL at object upload time (which can
57
- happen if you don't set a default object ACL on a bucket, and get the
58
- default project-private ACL).
59
- """)
60
-
61
-
62
- class SetDefAclCommand(Command):
63
- """Implementation of gsutil setdefacl command."""
64
-
65
- # Command specification (processed by parent class).
66
- command_spec = {
67
- # Name of command.
68
- COMMAND_NAME : 'setdefacl',
69
- # List of command name aliases.
70
- COMMAND_NAME_ALIASES : [],
71
- # Min number of args required by this command.
72
- MIN_ARGS : 2,
73
- # Max number of args required by this command, or NO_MAX.
74
- MAX_ARGS : NO_MAX,
75
- # Getopt-style string specifying acceptable sub args.
76
- SUPPORTED_SUB_ARGS : '',
77
- # True if file URIs acceptable for this command.
78
- FILE_URIS_OK : False,
79
- # True if provider-only URIs acceptable for this command.
80
- PROVIDER_URIS_OK : False,
81
- # Index in args of first URI arg.
82
- URIS_START_ARG : 1,
83
- # True if must configure gsutil before running command.
84
- CONFIG_REQUIRED : True,
85
- }
86
- help_spec = {
87
- # Name of command or auxiliary help info for which this help applies.
88
- HELP_NAME : 'setdefacl',
89
- # List of help name aliases.
90
- HELP_NAME_ALIASES : ['default acl'],
91
- # Type of help:
92
- HELP_TYPE : HelpType.COMMAND_HELP,
93
- # One line summary of this help.
94
- HELP_ONE_LINE_SUMMARY : 'Set default ACL on buckets',
95
- # The full help text.
96
- HELP_TEXT : _detailed_help_text,
97
- }
98
-
99
- # Command entry point.
100
- def RunCommand(self):
101
- if not self.suri_builder.StorageUri(self.args[-1]).names_bucket():
102
- raise CommandException('URI must name a bucket for the %s command' %
103
- self.command_name)
104
- self.SetAclCommandHelper()
105
- return 0
@@ -1,420 +0,0 @@
1
- # Copyright 2012 Google Inc. All Rights Reserved.
2
- #coding=utf8
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
-
16
- import boto
17
- import csv
18
- import random
19
- import StringIO
20
- import time
21
-
22
- from boto.exception import GSResponseError
23
- from boto.s3.key import Key
24
- from gslib.command import COMMAND_NAME
25
- from gslib.command import COMMAND_NAME_ALIASES
26
- from gslib.command import CONFIG_REQUIRED
27
- from gslib.command import Command
28
- from gslib.command import FILE_URIS_OK
29
- from gslib.command import MAX_ARGS
30
- from gslib.command import MIN_ARGS
31
- from gslib.command import PROVIDER_URIS_OK
32
- from gslib.command import SUPPORTED_SUB_ARGS
33
- from gslib.command import URIS_START_ARG
34
- from gslib.exception import CommandException
35
- from gslib.help_provider import HELP_NAME
36
- from gslib.help_provider import HELP_NAME_ALIASES
37
- from gslib.help_provider import HELP_ONE_LINE_SUMMARY
38
- from gslib.help_provider import HELP_TEXT
39
- from gslib.help_provider import HELP_TYPE
40
- from gslib.help_provider import HelpType
41
- from gslib.name_expansion import NameExpansionIterator
42
- from gslib.util import NO_MAX
43
- from gslib.util import Retry
44
-
45
- _detailed_help_text = ("""
46
- <B>SYNOPSIS</B>
47
- gsutil setmeta [-n] -h [header:value|header] ... uri...
48
-
49
-
50
- <B>DESCRIPTION</B>
51
- The gsutil setmeta command allows you to set or remove the metadata on one
52
- or more objects. It takes one or more header arguments followed by one or
53
- more URIs, where each header argument is in one of two forms:
54
-
55
- - if you specify header:value, it will set the given header on all
56
- named objects.
57
-
58
- - if you specify header (with no value), it will remove the given header
59
- from all named objects.
60
-
61
- For example, the following command would set the Content-Type and
62
- Cache-Control and remove the Content-Disposition on the specified objects:
63
-
64
- gsutil setmeta -h "Content-Type:text/html" \\
65
- -h "Cache-Control:public, max-age=3600" \\
66
- -h "Content-Disposition" gs://bucket/*.html
67
-
68
- If you have a large number of objects to update you might want to use the
69
- gsutil -m option, to perform a parallel (multi-threaded/multi-processing)
70
- update:
71
-
72
- gsutil -m setmeta -h "Content-Type:text/html" \\
73
- -h "Cache-Control:public, max-age=3600" \\
74
- -h "Content-Disposition" gs://bucket/*.html
75
-
76
- See "gsutil help metadata" for details about how you can set metadata
77
- while uploading objects, what metadata fields can be set and the meaning of
78
- these fields, use of custom metadata, and how to view currently set metadata.
79
-
80
-
81
- <B>OPERATION COST</B>
82
- This command uses four operations per URI (one to read the ACL, one to read
83
- the current metadata, one to set the new metadata, and one to set the ACL).
84
-
85
- For cases where you want all objects to have the same ACL you can avoid half
86
- these operations by setting a default ACL on the bucket(s) containing the
87
- named objects, and using the setmeta -n option. See "help gsutil setdefacl".
88
-
89
-
90
- <B>OPTIONS</B>
91
- -h Specifies a header:value to be added, or header to be removed,
92
- from each named object.
93
- -n Causes the operations for reading and writing the ACL to be
94
- skipped. This halves the number of operations performed per
95
- request, improving the speed and reducing the cost of performing
96
- the operations. This option makes sense for cases where you want
97
- all objects to have the same ACL, for which you have set a default
98
- ACL on the bucket(s) containing the objects. See "help gsutil
99
- setdefacl".
100
-
101
-
102
- <B>OLDER SYNTAX (DEPRECATED)</B>
103
- The first version of the setmeta command used more complicated syntax
104
- (described below). gsutil still supports this syntax, to avoid breaking
105
- existing customer uses, but it is now deprecated and will eventually
106
- be removed.
107
-
108
- With this older syntax, the setmeta command accepts a single metadata
109
- argument in one of two forms:
110
-
111
- gsutil setmeta [-n] header:value uri...
112
-
113
- or
114
-
115
- gsutil setmeta [-n] '"header:value","-header",...' uri...
116
-
117
- The first form allows you to specify a single header name and value to
118
- set. For example, the following command would set the Content-Type and
119
- Cache-Control and remove the Content-Disposition on the specified objects:
120
-
121
- gsutil setmeta -h "Content-Type:text/html" \\
122
- -h "Cache-Control:public, max-age=3600" \\
123
- -h "Content-Disposition" gs://bucket/*.html
124
-
125
- This form only works if the header name and value don't contain double
126
- quotes or commas, and only works for setting the header value (not for
127
- removing it).
128
-
129
- The more general form of the first argument allows both setting and removing
130
- multiple fields, without any of the content restrictions noted above. For
131
- this variant the first argument is a CSV-formatted list of headers to add
132
- or remove. Getting the CSV-formatted list to be passed correctly into gsutil
133
- requires different syntax on Linux or MacOS than it does on Windows.
134
-
135
- On Linux or MacOS you need to surround the entire argument in single quotes
136
- to avoid having the shell interpret/strip out the double-quotes in the CSV
137
- data. For example, the following command would set the Content-Type and
138
- Cache-Control and remove the Content-Disposition on the specified objects:
139
-
140
- gsutil setmeta '"Content-Type:text/html","Cache-Control:public, max-age=3600","-Content-Disposition"' gs://bucket/*.html
141
-
142
- To pass CSV data on Windows you need two sets of double quotes around
143
- each header/value pair, and one set of double quotes around the entire
144
- expression. For example, the following command would set the Content-Type
145
- and Cache-Control and remove the Content-Disposition on the specified objects:
146
-
147
- gsutil setmeta "\""Content-Type:text/html"",""Cache-Control:public, max-age=3600"",""-Content-Disposition""\" gs://bucket/*.html
148
-
149
-
150
- <B>WARNING ABOUT USING SETMETA WITH VERSIONING ENABLED</B>
151
-
152
- Note that if you use the gsutil setmeta command on an object in a bucket
153
- with versioning enabled (see 'gsutil help versioning'), it will create
154
- a new object version (and thus, you will get charged for the space required
155
- for holding the additional version).
156
- """)
157
-
158
-
159
- class SetMetaCommand(Command):
160
- """Implementation of gsutil setmeta command."""
161
-
162
- # Command specification (processed by parent class).
163
- command_spec = {
164
- # Name of command.
165
- COMMAND_NAME : 'setmeta',
166
- # List of command name aliases.
167
- COMMAND_NAME_ALIASES : ['setheader'],
168
- # Min number of args required by this command.
169
- MIN_ARGS : 1,
170
- # Max number of args required by this command, or NO_MAX.
171
- MAX_ARGS : NO_MAX,
172
- # Getopt-style string specifying acceptable sub args.
173
- SUPPORTED_SUB_ARGS : 'h:n',
174
- # True if file URIs acceptable for this command.
175
- FILE_URIS_OK : False,
176
- # True if provider-only URIs acceptable for this command.
177
- PROVIDER_URIS_OK : False,
178
- # Index in args of first URI arg.
179
- URIS_START_ARG : 1,
180
- # True if must configure gsutil before running command.
181
- CONFIG_REQUIRED : True,
182
- }
183
- help_spec = {
184
- # Name of command or auxiliary help info for which this help applies.
185
- HELP_NAME : 'setmeta',
186
- # List of help name aliases.
187
- HELP_NAME_ALIASES : ['setheader'],
188
- # Type of help:
189
- HELP_TYPE : HelpType.COMMAND_HELP,
190
- # One line summary of this help.
191
- HELP_ONE_LINE_SUMMARY : 'Set metadata on already uploaded objects',
192
- # The full help text.
193
- HELP_TEXT : _detailed_help_text,
194
- }
195
-
196
- # Command entry point.
197
- def RunCommand(self):
198
- headers = []
199
- preserve_acl = True
200
- if self.sub_opts:
201
- for o, a in self.sub_opts:
202
- if o == '-n':
203
- preserve_acl = False
204
- elif o == '-h':
205
- headers.append(a)
206
-
207
- if headers:
208
- (metadata_minus, metadata_plus) = self._ParseMetadataHeaders(headers)
209
- uri_args = self.args
210
- else:
211
- (metadata_minus, metadata_plus) = self._ParseMetadataSpec(self.args[0])
212
- uri_args = self.args[1:]
213
-
214
- if (len(uri_args) == 1
215
- and not self.suri_builder.StorageUri(uri_args[0]).names_object()):
216
- raise CommandException('URI (%s) must name an object' % uri_args[0])
217
-
218
- # Used to track if any objects' metadata failed to be set.
219
- self.everything_set_okay = True
220
-
221
- def _SetMetadataExceptionHandler(e):
222
- """Simple exception handler to allow post-completion status."""
223
- self.THREADED_LOGGER.error(str(e))
224
- self.everything_set_okay = False
225
-
226
- @Retry(GSResponseError, tries=3, delay=1, backoff=2)
227
- def _SetMetadataFunc(name_expansion_result):
228
- exp_src_uri = self.suri_builder.StorageUri(
229
- name_expansion_result.GetExpandedUriStr())
230
- self.THREADED_LOGGER.info('Setting metadata on %s...', exp_src_uri)
231
-
232
- key = exp_src_uri.get_key()
233
- meta_generation = key.meta_generation
234
- generation = key.generation
235
-
236
- headers = {}
237
- if generation:
238
- headers['x-goog-if-generation-match'] = generation
239
- if meta_generation:
240
- headers['x-goog-if-metageneration-match'] = meta_generation
241
-
242
- # If this fails because of a precondition, it will raise a
243
- # GSResponseError for @Retry to handle.
244
- exp_src_uri.set_metadata(metadata_plus, metadata_minus, preserve_acl,
245
- headers=headers)
246
-
247
- name_expansion_iterator = NameExpansionIterator(
248
- self.command_name, self.proj_id_handler, self.headers, self.debug,
249
- self.bucket_storage_uri_class, uri_args, self.recursion_requested,
250
- self.recursion_requested)
251
-
252
- # Perform requests in parallel (-m) mode, if requested, using
253
- # configured number of parallel processes and threads. Otherwise,
254
- # perform requests with sequential function calls in current process.
255
- self.Apply(_SetMetadataFunc, name_expansion_iterator,
256
- _SetMetadataExceptionHandler)
257
-
258
- if not self.everything_set_okay:
259
- raise CommandException('Metadata for some objects could not be set.')
260
-
261
- return 0
262
-
263
- def _ParseMetadataHeaders(self, headers):
264
- metadata_minus = set()
265
- cust_metadata_minus = set()
266
- metadata_plus = {}
267
- cust_metadata_plus = {}
268
- # Build a count of the keys encountered from each plus and minus arg so we
269
- # can check for dupe field specs.
270
- num_metadata_plus_elems = 0
271
- num_cust_metadata_plus_elems = 0
272
- num_metadata_minus_elems = 0
273
- num_cust_metadata_minus_elems = 0
274
-
275
- for md_arg in headers:
276
- parts = md_arg.split(':')
277
- if len(parts) not in (1, 2):
278
- raise CommandException(
279
- 'Invalid argument: must be either header or header:value (%s)' %
280
- md_arg)
281
- if len(parts) == 2:
282
- (header, value) = parts
283
- else:
284
- (header, value) = (parts[0], None)
285
- _InsistAsciiHeader(header)
286
- # Translate headers to lowercase to match the casing assumed by our
287
- # sanity-checking operations.
288
- header = header.lower()
289
- if value:
290
- if _IsCustomMeta(header):
291
- # Allow non-ASCII data for custom metadata fields. Don't unicode
292
- # encode other fields because that would perturb their content
293
- # (e.g., adding %2F's into the middle of a Cache-Control value).
294
- value = unicode(value, 'utf-8')
295
- cust_metadata_plus[header] = value
296
- num_cust_metadata_plus_elems += 1
297
- else:
298
- metadata_plus[header] = value
299
- num_metadata_plus_elems += 1
300
- else:
301
- if _IsCustomMeta(header):
302
- cust_metadata_minus.add(header)
303
- num_cust_metadata_minus_elems += 1
304
- else:
305
- metadata_minus.add(header)
306
- num_metadata_minus_elems += 1
307
- if (num_metadata_plus_elems != len(metadata_plus)
308
- or num_cust_metadata_plus_elems != len(cust_metadata_plus)
309
- or num_metadata_minus_elems != len(metadata_minus)
310
- or num_cust_metadata_minus_elems != len(cust_metadata_minus)
311
- or metadata_minus.intersection(set(metadata_plus.keys()))):
312
- raise CommandException('Each header must appear at most once.')
313
- other_than_base_fields = (set(metadata_plus.keys())
314
- .difference(Key.base_user_settable_fields))
315
- other_than_base_fields.update(
316
- metadata_minus.difference(Key.base_user_settable_fields))
317
- for f in other_than_base_fields:
318
- # This check is overly simple; it would be stronger to check, for each
319
- # URI argument, whether f.startswith the
320
- # uri.get_provider().metadata_prefix, but here we just parse the spec
321
- # once, before processing any of the URIs. This means we will not
322
- # detect if the user tries to set an x-goog-meta- field on an another
323
- # provider's object, for example.
324
- if not _IsCustomMeta(f):
325
- raise CommandException('Invalid or disallowed header (%s).\n'
326
- 'Only these fields (plus x-goog-meta-* fields)'
327
- ' can be set or unset:\n%s' % (f,
328
- sorted(list(Key.base_user_settable_fields))))
329
- metadata_plus.update(cust_metadata_plus)
330
- metadata_minus.update(cust_metadata_minus)
331
- return (metadata_minus, metadata_plus)
332
-
333
- def _ParseMetadataSpec(self, spec):
334
- self.THREADED_LOGGER.info('WARNING: metadata spec syntax (%s)\nis '
335
- 'deprecated and will eventually be removed.\n'
336
- 'Please see "gsutil help setmeta" for current '
337
- 'syntax' % spec)
338
- metadata_minus = set()
339
- cust_metadata_minus = set()
340
- metadata_plus = {}
341
- cust_metadata_plus = {}
342
- # Build a count of the keys encountered from each plus and minus arg so we
343
- # can check for dupe field specs.
344
- num_metadata_plus_elems = 0
345
- num_cust_metadata_plus_elems = 0
346
- num_metadata_minus_elems = 0
347
- num_cust_metadata_minus_elems = 0
348
-
349
- mdf = StringIO.StringIO(spec)
350
- for md_arg in csv.reader(mdf).next():
351
- if not md_arg:
352
- raise CommandException(
353
- 'Invalid empty metadata specification component.')
354
- if md_arg[0] == '-':
355
- header = md_arg[1:]
356
- if header.find(':') != -1:
357
- raise CommandException('Removal spec may not contain ":" (%s).' %
358
- header)
359
- _InsistAsciiHeader(header)
360
- # Translate headers to lowercase to match the casing required by
361
- # uri.set_metadata().
362
- header = header.lower()
363
- if _IsCustomMeta(header):
364
- cust_metadata_minus.add(header)
365
- num_cust_metadata_minus_elems += 1
366
- else:
367
- metadata_minus.add(header)
368
- num_metadata_minus_elems += 1
369
- else:
370
- parts = md_arg.split(':', 1)
371
- if len(parts) != 2:
372
- raise CommandException(
373
- 'Fields being added must include values (%s).' % md_arg)
374
- (header, value) = parts
375
- _InsistAsciiHeader(header)
376
- header = header.lower()
377
- if _IsCustomMeta(header):
378
- # Allow non-ASCII data for custom metadata fields. Don't unicode
379
- # encode other fields because that would perturb their content
380
- # (e.g., adding %2F's into the middle of a Cache-Control value).
381
- value = unicode(value, 'utf-8')
382
- cust_metadata_plus[header] = value
383
- num_cust_metadata_plus_elems += 1
384
- else:
385
- metadata_plus[header] = value
386
- num_metadata_plus_elems += 1
387
- mdf.close()
388
- if (num_metadata_plus_elems != len(metadata_plus)
389
- or num_cust_metadata_plus_elems != len(cust_metadata_plus)
390
- or num_metadata_minus_elems != len(metadata_minus)
391
- or num_cust_metadata_minus_elems != len(cust_metadata_minus)
392
- or metadata_minus.intersection(set(metadata_plus.keys()))):
393
- raise CommandException('Each header must appear at most once.')
394
- other_than_base_fields = (set(metadata_plus.keys())
395
- .difference(Key.base_user_settable_fields))
396
- other_than_base_fields.update(
397
- metadata_minus.difference(Key.base_user_settable_fields))
398
- for f in other_than_base_fields:
399
- # This check is overly simple; it would be stronger to check, for each
400
- # URI argument, whether f.startswith the
401
- # uri.get_provider().metadata_prefix, but here we just parse the spec
402
- # once, before processing any of the URIs. This means we will not
403
- # detect if the user tries to set an x-goog-meta- field on an another
404
- # provider's object, for example.
405
- if not _IsCustomMeta(f):
406
- raise CommandException('Invalid or disallowed header (%s).\n'
407
- 'Only these fields (plus x-goog-meta-* fields)'
408
- ' can be set or unset:\n%s' % (f,
409
- sorted(list(Key.base_user_settable_fields))))
410
- metadata_plus.update(cust_metadata_plus)
411
- metadata_minus.update(cust_metadata_minus)
412
- return (metadata_minus, metadata_plus)
413
-
414
-
415
- def _InsistAsciiHeader(header):
416
- if not all(ord(c) < 128 for c in header):
417
- raise CommandException('Invalid non-ASCII header (%s).' % header)
418
-
419
- def _IsCustomMeta(header):
420
- return header.startswith('x-goog-meta-') or header.startswith('x-amz-meta-')