From fad3730e80171ce2723a48f4cc08682c6f19d640 Mon Sep 17 00:00:00 2001 From: Jiewei Qian Date: Tue, 19 Aug 2025 23:29:32 -0700 Subject: [PATCH] add luci-auth-ssh-* entrypoints Add entrypoints to luci-auth-ssh-* executables to fetch cipd packages then run the binary. Bug:b/435528916 Change-Id: Ic39b104d0ade8a65950fbbb755fa21c0b6514bb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6864760 Auto-Submit: Jiewei Qian Reviewed-by: Chenlin Fan Commit-Queue: Chenlin Fan --- luci-auth-ssh-helper | 20 ++++++++++++++++++++ luci-auth-ssh-helper.bat | 9 +++++++++ luci-auth-ssh-plugin | 20 ++++++++++++++++++++ luci-auth-ssh-plugin.bat | 9 +++++++++ 4 files changed, 58 insertions(+) create mode 100755 luci-auth-ssh-helper create mode 100644 luci-auth-ssh-helper.bat create mode 100755 luci-auth-ssh-plugin create mode 100644 luci-auth-ssh-plugin.bat diff --git a/luci-auth-ssh-helper b/luci-auth-ssh-helper new file mode 100755 index 0000000000..42dd1046a6 --- /dev/null +++ b/luci-auth-ssh-helper @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Copyright 2025 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# See revert instructions in cipd_manifest.txt + +# In git bash on Windows, invoke the batch file. +if [ "$(expr "$(uname -s)" : "^MINGW64_NT")" == "10" ]; then + luci-auth-ssh-helper.bat "$@" + exit +fi + +MYPATH=$(dirname "${BASH_SOURCE[0]}") + +source "$MYPATH/cipd_bin_setup.sh" +CIPD_ROOT=$(cipd_bin_setup) &> /dev/null + +exec "$CIPD_ROOT/luci-auth-ssh-helper" "$@" diff --git a/luci-auth-ssh-helper.bat b/luci-auth-ssh-helper.bat new file mode 100644 index 0000000000..7fe8bb9435 --- /dev/null +++ b/luci-auth-ssh-helper.bat @@ -0,0 +1,9 @@ +@echo off +:: Copyright 2025 The Chromium Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style license that can be +:: found in the LICENSE file. + +:: See revert instructions in cipd_manifest.txt + +call "%~dp0\cipd_bin_setup.bat" > nul 2>&1 +"%~dp0\.cipd_bin\luci-auth-ssh-helper.exe" %* diff --git a/luci-auth-ssh-plugin b/luci-auth-ssh-plugin new file mode 100755 index 0000000000..40a592d86a --- /dev/null +++ b/luci-auth-ssh-plugin @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Copyright 2025 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# See revert instructions in cipd_manifest.txt + +# In git bash on Windows, invoke the batch file. +if [ "$(expr "$(uname -s)" : "^MINGW64_NT")" == "10" ]; then + luci-auth-ssh-plugin.bat "$@" + exit +fi + +MYPATH=$(dirname "${BASH_SOURCE[0]}") + +source "$MYPATH/cipd_bin_setup.sh" +CIPD_ROOT=$(cipd_bin_setup) &> /dev/null + +exec "$CIPD_ROOT/luci-auth-ssh-plugin" "$@" diff --git a/luci-auth-ssh-plugin.bat b/luci-auth-ssh-plugin.bat new file mode 100644 index 0000000000..b5eed4a332 --- /dev/null +++ b/luci-auth-ssh-plugin.bat @@ -0,0 +1,9 @@ +@echo off +:: Copyright 2025 The Chromium Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style license that can be +:: found in the LICENSE file. + +:: See revert instructions in cipd_manifest.txt + +call "%~dp0\cipd_bin_setup.bat" > nul 2>&1 +"%~dp0\.cipd_bin\luci-auth-ssh-plugin.exe" %*