• [gentoo-dev] [PATCH v2 3/4] cvs.eclass: New eclass variable ECVS_SSH_EX

    From =?UTF-8?q?Ulrich=20M=C3=BCller?=@21:1/5 to All on Thu Oct 17 18:20:01 2024
    This allows passing additional options to ssh.

    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    v2: Quote the options in the wrapper script

    eclass/cvs.eclass | 12 ++++++++++++
    1 file changed, 12 insertions(+)

    diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
    index 1289ee54cc3b..007240e6ba25 100644
    --- a/eclass/cvs.eclass
    +++ b/eclass/cvs.eclass
    @@ -174,6 +174,12 @@ _CVS_ECLASS=1
    # WARNING: If a SSH host key is not specified using this variable, the
    # remote host key will not be verified.

    +# @ECLASS_VARIABLE: ECVS_SSH_EXTRA_OPTS
    +# @DEFAULT_UNSET
    +# @DESCRIPTION:
    +# If SSH is used for "ext" authentication, this array variable can be
    +# used to pass additional options to the SSH command.
    +
    # @ECLASS_VARIABLE: ECVS_CLEAN
    # @DEFAULT_UNSET
    # @DESCRIPTION:
    @@ -376,6 +382,11 @@ cvs_fetch() {
    echo "${ECVS_SSH_HOST_KEY}" > "${known_hosts_file}" || die
    fi

    + local i quoted_opts=()
    + for i in "${!ECVS_SSH_EXTRA_OPTS[@]}"; do
    + printf -v "quoted_opts[i]" "%q" "${ECVS_SSH_EXTRA_OPTS[i]}"
    + done
    +
    # Create a wrapper script to pass additional options