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

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

    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    eclass/cvs.eclass | 7 +++++++
    1 file changed, 7 insertions(+)

    diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
    index 1289ee54cc3b..5148daa2d57d 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:
    @@ -387,6 +393,7 @@ cvs_fetch() {
    -oUserKnownHostsFile="${known_hosts_file}" \\
    -oForwardX11=no \\
    -oClearAllForwardings=yes \\
    + ${ECVS_SSH_EXTRA_OPTS[*]} \\
    "\$@"
    EOF
    chmod a+x "${CVS_RSH}" || die
    --
    2.47.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Gilbert@21:1/5 to ulm@gentoo.org on Thu Oct 17 17:00:01 2024
    On Thu, Oct 17, 2024 at 1:58 AM Ulrich Müller <ulm@gentoo.org> wrote:

    This allows passing additional options to ssh.

    Signed-off-by: Ulrich Müller <ulm@gentoo.org>
    ---
    eclass/cvs.eclass | 7 +++++++
    1 file changed, 7 insertions(+)

    diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
    index 1289ee54cc3b..5148daa2d57d 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:
    @@ -387,6 +393,7 @@ cvs_fetch() {
    -oUserKnownHostsFile="${known_hosts_file}" \\
    -oForwardX11=no \\
    -oClearAllForwardings=yes \\
    + ${ECVS_SSH_EXTRA_OPTS[*]} \\

    Why use an array if you're going to collapse it using the "*"
    operator? Maybe use "${ECVS_SSH_EXTRA_OPTS[@]}" instead.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ulrich =?utf-8?Q?M=C3=BCller?=@21:1/5 to All on Thu Oct 17 18:20:01 2024
    On Thu, 17 Oct 2024, Mike Gilbert wrote:

    -oUserKnownHostsFile="${known_hosts_file}" \\
    -oForwardX11=no \\
    -oClearAllForwardings=yes \\
    + ${ECVS_SSH_EXTRA_OPTS[*]} \\

    Why use an array if you're going to collapse it using the "*"
    operator? Maybe use "${ECVS_SSH_EXTRA_OPTS[@]}" instead.

    This is in a here-document, so the resulting wrapper script will contain
    the variable as one word, i.e. "@" won't result in separate words.

    However, I now notice that there is a whitespace issue. Patch v2 will
    follow.

    Ulrich

    -----BEGIN PGP SIGNATURE-----

    iQFDBAEBCAAtFiEEtDnZ1O9xIP68rzDbUYgzUIhBXi4FAmcRNucPHHVsbUBnZW50 b28ub3JnAAoJEFGIM1CIQV4uX3EH+wU02xSzTh2ZweK2AM+QGGO+CZv+DdUsW4zL JKMWQ1ebYXd2Jt5AjzCT3DtKX4SJuWTM801XeF4Aedu78MbqXy1KNtJX8SAHRPXz uKHkDxp5E6jO/RstX4C5nMTwINN9Aj8PU3u9Wm7O5Dh4JbFbbiP2Aa3L9M3dJVG5 xcJp2elY5ccChBQ0+52rb2xGAL0tQxR4z6T3++rUd3dOHntW0DNVl7OsIXGYYOjz G2wOE//Zyum/XpPr7X74R6cY33dmsttOaG8r4mROyKeP04smxX0OLY1NC7FS+a+N VWt205mzHKUThHdRQeDF2uyvIFAPX3BrsGm+wcnbAKoZOt3ybU4=
    =nhYe
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)