diff --git a/cipd b/cipd index f7f4133ac..0de9aea45 100755 --- a/cipd +++ b/cipd @@ -6,6 +6,12 @@ set -e -o pipefail +# Run custom-built cipd client. This is useful when cipd is not available upstream +# (i.e. unsupported platform). +if [ ! -z "${CUSTOM_CIPD_CLIENT}" ]; then + exec "${CUSTOM_CIPD_CLIENT}" "${@}" +fi + # Export for other depot_tools scripts to re-use. export DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$(dirname "${BASH_SOURCE[0]}")}" export DEPOT_TOOLS_UNAME_S="${DEPOT_TOOLS_UNAME_S:-$(uname -s | tr '[:upper:]' '[:lower:]')}" diff --git a/detect_host_arch.py b/detect_host_arch.py index 317b12a79..500e5dd92 100755 --- a/detect_host_arch.py +++ b/detect_host_arch.py @@ -34,6 +34,8 @@ def HostArch(): host_arch = 's390' elif host_arch.startswith('riscv'): host_arch = 'riscv64' + elif platform.system() == 'OS/390': + host_arch = 's390x' if host_arch == 'arm64': host_platform = platform.architecture() diff --git a/download_from_google_storage.py b/download_from_google_storage.py index f7e74e2bf..950a23999 100755 --- a/download_from_google_storage.py +++ b/download_from_google_storage.py @@ -35,6 +35,7 @@ PLATFORM_MAPPING = { 'win32': 'win', 'aix6': 'aix', 'aix7': 'aix', + 'zos': 'zos', } diff --git a/gclient.py b/gclient.py index 82c3909bc..9a4b16e10 100755 --- a/gclient.py +++ b/gclient.py @@ -1536,6 +1536,7 @@ _PLATFORM_MAPPING = { 'linux': 'linux', 'win32': 'win', 'aix6': 'aix', + 'zos': 'zos', } @@ -1624,6 +1625,7 @@ class GClient(GitDependency): "ios": "ios", "fuchsia": "fuchsia", "chromeos": "chromeos", + "zos": "zos", } DEFAULT_CLIENT_FILE_TEXT = ("""\ diff --git a/gclient_utils.py b/gclient_utils.py index eb911e7a0..dadd208e0 100644 --- a/gclient_utils.py +++ b/gclient_utils.py @@ -632,7 +632,7 @@ def CheckCallAndFilter(args, # subprocess when filtering its output. This makes the subproc believe # it was launched from a terminal, which will preserve ANSI color codes. os_type = GetOperatingSystem() - if sys.stdout.isatty() and os_type != 'win' and os_type != 'aix': + if sys.stdout.isatty() and os_type not in ['win', 'aix', 'zos']: pipe_reader, pipe_writer = os.openpty() else: pipe_reader, pipe_writer = os.pipe() diff --git a/gsutil.py b/gsutil.py index 353476068..ea0282705 100755 --- a/gsutil.py +++ b/gsutil.py @@ -37,7 +37,7 @@ LUCI_AUTH_SCOPES = [ # Platforms unsupported by luci-auth. -LUCI_AUTH_UNSUPPORTED_PLATFORMS = ['aix'] +LUCI_AUTH_UNSUPPORTED_PLATFORMS = ['aix', 'zos'] class InvalidGsutilError(Exception):