Commit Graph

42 Commits (main)

Author SHA1 Message Date
Yiwei Zhang 2aba33b703 cipd: allow overriding the location of where cipd binary is installed
Bug: 360140318
Change-Id: I384ffe511a1f05df244cdd282cd1702c242f3380
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5797338
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Yiwei Zhang <yiwzhang@google.com>
6 months ago
Gaby Baghdadi 9d64acedea enable fetch and gclient to run on z/OS part 1
See https://issues.chromium.org/issues/323790693#comment12 for the manual steps still required.

R=gavinmak@google.com

Bug: 323790693
Change-Id: Id0ac2d8a6027cbb5e0554574471c160d5fae807c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5277474
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Josip Sokcevic d6f65bfa32 Revert "[cipd] Detect Mac ARM running under Rosetta"
This reverts commit e121d14b12.

Reason for revert: git for mac arm is widely available now so
this hack is no longer needed. See: b/228226478

Original change's description:
> [cipd] Detect Mac ARM running under Rosetta
>
> If a user has git for x64, `git cl` results in downloading x64 cipd
> packages. Other operations, such as gclient or git-cl will result in
> downloading arm64. This flip-flopping between architectures causes
> unexpected behavior:
> (1) slows down commands since packages are wiped and new ones are
> downloaded.
> (2) long running processes, such as goma may crash.
>
> This change adds additional check for all macs running on x86 to check
> if is running under Rosetta and sets ARCH=arm64 if true.
>
> R=bryner@google.com, masonf@chromium.org
>
> Bug: 1311733
> Change-Id: I65b127467d5c47d5bf07952d2ecdcb93630c7c87
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3573068
> Reviewed-by: Brian Ryner <bryner@google.com>
> Reviewed-by: Mason Freed <masonf@chromium.org>
> Commit-Queue: Josip Sokcevic <sokcevic@google.com>

Bug: 1311733
Bug: b/228226478
Change-Id: I3888769944d7fe200a0bff8cf0a1c04407d50bdf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4763444
Reviewed-by: Jonathan Nieder <jrn@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Mike Frysinger b7c550a6bc cipd: delay reading version files
This info is only used when bootstrapping for the first time,
so move these vars to that function to avoid wasted effort.

Bug: 1469696
Change-Id: I21b97b2429cf2dac6242e2e86aa7668b09ed47c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4752396
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2 years ago
Mike Frysinger b9b690ec0e setup & share current uname -s value
Avoid recomputing this value multiple times between vpython & cipd.

Bug: 1469696
Change-Id: If82d58180f94cb2833a5a177f7b1e431e08f2892
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4750040
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
2 years ago
Mike Frysinger 248aa8ba81 setup & share path to depot_tools checkout
A lot of scripts like to compute the dirname of $0 to find itself to
load more files.  Have some scripts export & resuse this value so we
avoid recalculating when not needed.

Bug: 1469696
Change-Id: I3aac2e6119dbfa3c68715208df2786f67cdce92e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4750430
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Robbie Iannucci 3db3276489 Revert "loongarch64: Add loongarch64 architecture detection support."
This reverts commit 0648830632.

Reason for revert: Pending clarity on https://bugs.chromium.org/p/chromium/issues/detail?id=1361860

Original change's description:
> loongarch64: Add loongarch64 architecture detection support.
>
> Bug: 1361860
> Change-Id: I432208fd78fb99140a97b3979a257f4e2e513807
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3886536
> Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Brian Ryner <bryner@google.com>
> Reviewed-by: Gavin Mak <gavinmak@google.com>

Bug: 1361860
Change-Id: Icf9f88a7173d4d403f4846fe01342794a0f5db9e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4667669
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
2 years ago
Wang Qing 0648830632 loongarch64: Add loongarch64 architecture detection support.
Bug: 1361860
Change-Id: I432208fd78fb99140a97b3979a257f4e2e513807
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3886536
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Brian Ryner <bryner@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Josip Sokcevic b4b22453f3 Revert "Resolve symlinks to cipd, vpython3"
This reverts commit c962e86f7b.

Reason for revert: broke MacOS:
realpath: command not found

Original change's description:
> Resolve symlinks to cipd, vpython3
>
> If we point a symlink at vpython3 (or various other tools), it will try
> to resolve the depot_tools path to wherever that symlink is stored. We
> should instead follow the symlink before determining the path.
>
> Prior art:
>
> * in python, we're doing Path.resolve() in many cases
> * in shell, there's a "$(readlink "$(dirname "$0"))" (man/push_to_gs.sh)
>
> BUG=b:270994985
> TEST=symlink to vpython3 works
>
> Change-Id: Ifee014d2571ccf58d830a2702c8a0ea225dd4821
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4295094
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Brian Norris <briannorris@chromium.org>

Bug: b:270994985
Change-Id: I69342f3a52153b8cb1ed4366ede5883dfe5ec0b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4310530
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
2 years ago
Brian Norris c962e86f7b Resolve symlinks to cipd, vpython3
If we point a symlink at vpython3 (or various other tools), it will try
to resolve the depot_tools path to wherever that symlink is stored. We
should instead follow the symlink before determining the path.

Prior art:

* in python, we're doing Path.resolve() in many cases
* in shell, there's a "$(readlink "$(dirname "$0"))" (man/push_to_gs.sh)

BUG=b:270994985
TEST=symlink to vpython3 works

Change-Id: Ifee014d2571ccf58d830a2702c8a0ea225dd4821
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4295094
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
2 years ago
Mike Frysinger 67702834cc cipd/python: optimize cat usage
Bash has a builtin for reading files, so use that instead of running
the cat program to save on time & overhead.

Change-Id: Ia90fc22a47f2ead4ef056020a79ebdebd7bd70ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4111082
Reviewed-by: Brian Ryner <bryner@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2 years ago
Theodore Siu d9db3f6fd8 Add arch flag and env variable for overriding on mac
R=sokcevic@google.com

Change-Id: I2c07c2157a404b0eb29da8b46b22990a470576c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4005186
Commit-Queue: Theodore Siu <theosiu@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
2 years ago
Rebecca Chang Swee Fun eb16162e00 Add riscv64 architecture detection
Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
Bug: 1331190
Change-Id: I7c751e5cf02f088f2145c3c701547f0412f2bd69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3686858
Reviewed-by: Gavin Mak <gavinmak@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
3 years ago
Josip Sokcevic e121d14b12 [cipd] Detect Mac ARM running under Rosetta
If a user has git for x64, `git cl` results in downloading x64 cipd
packages. Other operations, such as gclient or git-cl will result in
downloading arm64. This flip-flopping between architectures causes
unexpected behavior:
(1) slows down commands since packages are wiped and new ones are
downloaded.
(2) long running processes, such as goma may crash.

This change adds additional check for all macs running on x86 to check
if is running under Rosetta and sets ARCH=arm64 if true.

R=bryner@google.com, masonf@chromium.org

Bug: 1311733
Change-Id: I65b127467d5c47d5bf07952d2ecdcb93630c7c87
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3573068
Reviewed-by: Brian Ryner <bryner@google.com>
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Nico Weber f7dcbfee0a Default to arm64 cipd packages on arm macs
Enough works in that config that it seems like a better default by now.
Checking out, building, and uploading patches works (but uploading still
requires `--bypass-hooks` for now until crbug.com/1205263 is fixed).

(In case something important I'm not aware of breaks, we can revert this.)

Bug: 1103236,1205263
Change-Id: Id432ffd4ab19b15c019614953a2cefa787b46225
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2896468
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Nico Weber <thakis@chromium.org>
4 years ago
Nico Weber 36179f5548 Update a bug number in a TODO
Bug: 1205263
Change-Id: Iff55491a058d2f75747b6206c39fa77e092196d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2895148
Commit-Queue: Dirk Pranke <dpranke@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@google.com>
4 years ago
Nico Weber 993b65e4c5 cipd: Add a note about .cipd_client_platform
No behavior change.

Bug: 1102967
Change-Id: Ic5aca441ee62f9c61a06cf2a0d510a8b72733688
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2778081
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
4 years ago
Vadim Shtayura c2358f484d [cipd] Make CIPD client platform overridable per installation.
To switch a depot_tools installation to use mac-arm64 binaries,
run:

  $ cd depot_tools
  $ echo "mac-arm64" > .cipd_client_platform
  $ ./cipd help
  $ <observe "infra/tools/cipd/mac-arm64" in the version string>

Deleting .cipd_client_platform file restores the original logic
(which is currently to use mac-amd64 binaries even on arm64 host).

R=iannucci@chromium.org, tandrii@chromium.org
CC=thakis@chromium.org
BUG=1102967

Change-Id: I0248fd913eb3d71f2a228f74a601dc4b12fc8824
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2699692
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
4 years ago
Matt Kotsenas 1607bf453a Retry CIPD client download on Linux / macOS
Transient network conditions can cause the CIPD client download to fail,
so add a retry to the download.

When using `wget` we additionally retry usually fatal errors like
"connection refused" via `--retry-connrefused`. `curl` also has that
parameter, but it was added more recently in version 7.52.0, which isn't
available on supported platforms like Ubuntu 16.04. Once we raise the
minimum supported version of curl, we should add that parameter as well.

In either case, we retry 3 times and wait 5 seconds between each try,
which matches the retries recently added for Windows.

Bug: 1145741
Change-Id: Ib73bb3413ba4d5251c2b027a87dabd1378ab6c44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2532896
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Matthew Kotsenas <mattkot@microsoft.com>
4 years ago
Vadim Shtayura 5af069b049 [cipd] Always bootstrap mac-amd64, even on arm64.
There's no mac-arm64 yet, since Go doesn't support this. Presumably
mac-amd64 should work fine on ARM Mac too, see the bug.

Note that this will transitively affect all binaries fetched by
CIPD, they all will be mac-amd64.

BUG=1102967
R=iannucci@chromium.org, thakis@chromium.org

Change-Id: Ie3c5b5776c3d2f83b5dfa411016862dbbc53a9e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2282940
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
5 years ago
Robert Iannucci 87c8b91639 [cipd] Update to version with aix-ppc64 binary.
R=vadimsh@chromium.org

Bug: 1098127
Change-Id: I5a520adbeff035c2c381ab23feb92571831eb12a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2261440
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
5 years ago
Robert Nagy 059f26bcb4 do not hardcode the path to bash by using the #!/usr/bin/env bash shebang
on non-linux systems bash is not the default shell (by default) and
lives in a completely different path

Change-Id: I6580c776dda1b60b3d5c5f5f1ce4d6694ac45fe9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1605902
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
6 years ago
Vadim Shtayura 3d429cf513 [cipd] Check CIPD client hash against pinned SHA256 during updates.
Linux and OSX only for now. This also rolls CIPD client to a version that
supports pinned hashes (v2.2.5).

CIPD_CLIENT_VER and CIPD_CLIENT_SRV are no longer supported as env vars, since
it makes no sense when pinning hashes of the binaries at specific version on
the specific backend.

Also somewhat cleanup 'cipd' script to use "${VAR}", stderr and colored output
consistently.

R=iannucci@chromium.org, nodir@chromium.org
BUG=870166, 874586

Change-Id: Iac67fbb6b5d07dcd81d44536737b03b146f1ad14
Reviewed-on: https://chromium-review.googlesource.com/1176727
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
7 years ago
Vadim Shtayura 5e5c2173ba Revert "[cipd] Check CIPD client hash against pinned SHA256 during updates."
This reverts commit eebc3d8232.

Reason for revert: crbug.com/874586

Original change's description:
> [cipd] Check CIPD client hash against pinned SHA256 during updates.
> 
> Linux and OSX only for now. This also rolls CIPD client to a version that
> supports pinned hashes (v2.2.5).
> 
> CIPD_CLIENT_VER and CIPD_CLIENT_SRV are no longer supported as env vars, since
> it makes no sense when pinning hashes of the binaries at specific version on
> the specific backend.
> 
> Also somewhat cleanup 'cipd' script to use "${VAR}", stderr and colored output
> consistently.
> 
> R=​iannucci@chromium.org, nodir@chromium.org
> BUG=870166
> 
> Change-Id: I9e61f9f8fbdcf10985c52828b2bfbec64b4234f0
> Reviewed-on: https://chromium-review.googlesource.com/1171957
> Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
> Reviewed-by: Nodir Turakulov <nodir@chromium.org>

TBR=iannucci@chromium.org,vadimsh@chromium.org,nodir@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 870166
Change-Id: I9aa8e7a7f07520aa69d366c76e4dbccae345bc00
Reviewed-on: https://chromium-review.googlesource.com/1175294
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
7 years ago
Vadim Shtayura eebc3d8232 [cipd] Check CIPD client hash against pinned SHA256 during updates.
Linux and OSX only for now. This also rolls CIPD client to a version that
supports pinned hashes (v2.2.5).

CIPD_CLIENT_VER and CIPD_CLIENT_SRV are no longer supported as env vars, since
it makes no sense when pinning hashes of the binaries at specific version on
the specific backend.

Also somewhat cleanup 'cipd' script to use "${VAR}", stderr and colored output
consistently.

R=iannucci@chromium.org, nodir@chromium.org
BUG=870166

Change-Id: I9e61f9f8fbdcf10985c52828b2bfbec64b4234f0
Reviewed-on: https://chromium-review.googlesource.com/1171957
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Wang Qing 82bb756217 [cipd] Detect mips64le vs mips64.
Bug: 867819
Change-Id: Iff107adb7efe366c5ab58f5221c1b9bf3ebb7d5f
Reviewed-on: https://chromium-review.googlesource.com/1159545
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Vadim Shtayura 7e50ee376b [cipd] Try to bootstrap CIPD from scratch if selfupdate fails.
When updating the CIPD client to be identified by SHA256 hash, old clients (that
have no idea about SHA256) fail during 'selfupdate'.

We'll roll our SHA256 support in two stages:
  1. Deploy new client that understand SHA256 using its SHA1 name, so
     self-update from old clients works.
  2. Deploy same (or newer) client using its SHA256 name. This would work since
     the client doing the self-update already understands SHA256 at this point.

But we can't guarantee that ALL depot_tools deployments will update through
stages (1) and (2) sequentially. Some of them may skip (1) and end-up directly
in (2), failing on 'selfupdate'.

This CL makes sure they can recover from this state by rebootstraping the client
from scratch (this works with SHA256 hashes).

R=nodir@chromium.org, iannucci@chromium.org
BUG=821194

Change-Id: I27dece19e0305b5b2d6f8b0130631c1bf5f6499c
Reviewed-on: https://chromium-review.googlesource.com/1149454
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Wang Qing 254538b955 MIPS64: Add support for depot_tools on mips64.
BUG= 865294

R= tandrii@chromium.org

Change-Id: I8ad56887882b897d605dc92e0e61c17de0a74967
Reviewed-on: https://chromium-review.googlesource.com/1141563
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Vasili Skurydzin 179059f63e AIX: Enable usage of fetch and gclient
Change-Id: I4fe559cb44ccd9c6b037b7b096b088adf652ef9b
Reviewed-on: https://chromium-review.googlesource.com/1102718
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Brian White 361822cb2d Convert CygWin paths to Windows native for CIPD.
Bug: 828981
Change-Id: Ibd4b31413bcdbbfe9bb1076334c892f1a30c768e
Reviewed-on: https://chromium-review.googlesource.com/996432
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
7 years ago
Benjamin Pastene e346e411d5 depot_tools: Use armv6 for cipd's GOARCH when on armv7 host.
We only compile and tag cipd packages with armv6, so armv7 hosts get
404s from cipd. This will use armv6 packages on armv7 bots, which should
work.

Bug: 776703
Change-Id: I6e54c2f9e1b220ce038a99af1df28cb6c0a9e579
Reviewed-on: https://chromium-review.googlesource.com/730850
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Benjamin Pastene <bpastene@chromium.org>
7 years ago
Dan Jacques 1e0b7a5ad4 [cipd] Fix ppc64le uname.
The uname was reported incorrectly, and should have read "ppc64le".
Update the script to reference this.

TBR=iannucci@chromium.org
BUG=chromium:773857
TEST=None

Change-Id: Ice5ffe1257333b2bc1bfef7da60dcea4ead4d4c8
Reviewed-on: https://chromium-review.googlesource.com/723162
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
7 years ago
Dan Jacques 6342128c3c [cipd] Add support for ppc64 and ppc64le.
BUG=chromium:773857
TEST=None

Change-Id: I9deb95f7f6c30b5970d74bf3d43df2038db3087e
Reviewed-on: https://chromium-review.googlesource.com/721165
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
7 years ago
William Hesse 6fd2484386 Allow cipd to interpret UNAME aarch64 as arm64 architecture
BUG=768318
R=phajdan.jr@chromium.org
R=dnj@chromium.org
R=iannucci@chromium.org

Change-Id: I2c85f9d30e74cfaebf2718bee075d6a21a6e0421
Reviewed-on: https://chromium-review.googlesource.com/708738
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: William Hesse <whesse@google.com>
7 years ago
Robert Iannucci ff2bf09daf Add s390x support for cipd client bootstrap script.
This is best-effort only; s390x is still not a supported platform.

CIPD pin bump contains no client changes; just points to a version
which is built for s390x as well our normal platforms.

R=dnj@chromium.org, vadimsh@chromium.org

Bug: 764087
Change-Id: I777246712eea1b39036f3b14b88cbd41c7cf0507
Reviewed-on: https://chromium-review.googlesource.com/661787
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
8 years ago
Pawel Hajdan, Jr 8c8a0a56d4 cipd: also support wget as fetch command
On Debian's default install curl is not available, but wget is.

Bug: 762568
Change-Id: Ibc8c52676fd5e37ef1b9f1ffc061b2be27ec80c4
Reviewed-on: https://chromium-review.googlesource.com/653517
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Dan Jacques eb1feb9090 [cipd] Bump version, log at warning (#2).
Bump the CIPD client version to
b482bfa19d3fa79b4b40dd5ac7a34479052e3df1. This version inculdes support
for the "-log-level" flag.

Update CIPD bootstrap scripts and tool installation scripts to log at
warning level, so that standard operation doesn't produce any logs.

This version differs from the previous CL in that the "selfupdate"
command no longer uses "-log-level". This fixes an issue where the
current CIPD, which doesn't support "-log-level", is given the flag
prior to actually updating to a version that does.

BUG=chromium:748651
TEST=canary
  - Tested this CIPD version on canary waterfall successfully.

Change-Id: I69dfe522d890eb307214f18d0467ce921a766446
Reviewed-on: https://chromium-review.googlesource.com/589568
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Daniel Jacques 9f9d82ac94 Revert "[cipd] Bump version, log at warning."
This reverts commit 18aa2d93ed.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> [cipd] Bump version, log at warning.
> 
> Bump the CIPD client version to
> e2a98b41adb3403b5b7771c4101b42a55dc2dd9e. This version inculdes support
> for the "-log-level" flag.
> 
> Update CIPD bootstrap scripts and tool installation scripts to log at
> warning level, so that standard operation doesn't produce any logs.
> 
> BUG=chromium:748651
> TEST=canary
>   - Tested this CIPD version on canary waterfall successfully.
>   - Tested "gclient" bootstrap and "vpython" / "led" on Windows system,
>     no output and works.
>   - Tested "vpython" / "led" on OSX system, no output and works.
> 
> Change-Id: Iae316908283c43c504f293aafdf897df83dccf8d
> Reviewed-on: https://chromium-review.googlesource.com/588889
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Daniel Jacques <dnj@chromium.org>

TBR=iannucci@chromium.org,dnj@chromium.org

Change-Id: Ia611c1aeb204c609ff3469076b8256c54e702230
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:748651
Reviewed-on: https://chromium-review.googlesource.com/589527
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Dan Jacques 18aa2d93ed [cipd] Bump version, log at warning.
Bump the CIPD client version to
e2a98b41adb3403b5b7771c4101b42a55dc2dd9e. This version inculdes support
for the "-log-level" flag.

Update CIPD bootstrap scripts and tool installation scripts to log at
warning level, so that standard operation doesn't produce any logs.

BUG=chromium:748651
TEST=canary
  - Tested this CIPD version on canary waterfall successfully.
  - Tested "gclient" bootstrap and "vpython" / "led" on Windows system,
    no output and works.
  - Tested "vpython" / "led" on OSX system, no output and works.

Change-Id: Iae316908283c43c504f293aafdf897df83dccf8d
Reviewed-on: https://chromium-review.googlesource.com/588889
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Dan Jacques 7c2e05b430 [cipd] Fix CIPD bootstraps run concurrently.
It's currently possible for CIPD bootstraps that provision concurrently to:
1) On Linux, step on each other during download, and
2) On Windows, fail.

Fix these respective scripts so that bootstraps are safe to use
concurrently.

On Linux and Mac, we download to a temporary file and use "mv" (atomic)
to write it to the final destination. Concurrent initializations will
perform parallel downloads, execute the "mv", and copy their downloaded
file to the destination path.

On Windows, we use filesystem locking to lock the operation and ensure
that only one download can happen.

BUG=chromium:739195
TEST=local
  - Ran in parallel on Windows, Linux, and Max.

Change-Id: Ie050d37598da67389f21728e781bd58904ef9c17
Reviewed-on: https://chromium-review.googlesource.com/560521
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Dan Jacques e82c0dec65 [cipd] Fail if setup has an error.
Make Linux/Mac CIPD wrapper fail if any step returns an error.

Include the "-f" curl flag, which will cause it to error on non-200
status.

BUG=chromium:739195
TEST=local
R=iannucci@chromium.org

Change-Id: I3efea3f38c1ee322cb9d63f29819472564107ddc
Reviewed-on: https://chromium-review.googlesource.com/560723
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Daniel Jacques <dnj@chromium.org>
8 years ago
Robert Iannucci 2188fe944f Add cipd bootstrap scripts to depot_tools.
This takes advantage of powershell on windows for a cleanish duplicate of the
posix version.

R=dnj@chromium.org, vadimsh@chromium.org
BUG=663843

Change-Id: Ib23a044ff912e3239b58848a26143eb6575826d5
Reviewed-on: https://chromium-review.googlesource.com/414228
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
8 years ago