From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Todd Zullinger <tmz@pobox.com>
Cc: git@vger.kernel.org, Henning Schild <henning.schild@siemens.com>
Subject: Re: [PATCH 1/2] t/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txt
Date: Fri, 8 Feb 2019 21:11:05 +0100 [thread overview]
Message-ID: <20190208201105.GA10587@szeder.dev> (raw)
In-Reply-To: <20190208031746.22683-2-tmz@pobox.com>
On Thu, Feb 07, 2019 at 10:17:45PM -0500, Todd Zullinger wrote:
> When gpgsm is installed, lib-gpg.sh attempts to update trustlist.txt to
> relax the checking of some root certificate requirements. The path to
> "${GNUPGHOME}" contains spaces which cause an "ambiguous redirect"
> warning when bash is used to run the tests:
s/error/warning/
> $ bash t7030-verify-tag.sh
> /git/t/lib-gpg.sh: line 66: ${GNUPGHOME}/trustlist.txt: ambiguous redirect
> ok 1 - create signed tags
> ok 2 # skip create signed tags x509 (missing GPGSM)
> ...
>
> No warning is issued when using bash called as /bin/sh, dash, or mksh.
Likewise.
POSIX says that no field splitting should be performed on the result
of a parameter expansion that is used as the target of a redirection,
but Bash doesn't conform in this respect (unless in POSIX mode).
> Quote the path to ensure the redirect works as intended and sets the
> GPGSM prereq. While we're here, drop the space after ">>".
>
> Signed-off-by: Todd Zullinger <tmz@pobox.com>
> ---
> t/lib-gpg.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/t/lib-gpg.sh b/t/lib-gpg.sh
> index f1277bef4f..207009793b 100755
> --- a/t/lib-gpg.sh
> +++ b/t/lib-gpg.sh
> @@ -63,7 +63,7 @@ then
> cut -d" " -f4 |
> tr -d '\n' >"${GNUPGHOME}/trustlist.txt" &&
>
> - echo " S relax" >> ${GNUPGHOME}/trustlist.txt &&
> + echo " S relax" >>"${GNUPGHOME}/trustlist.txt" &&
> (gpgconf --kill gpg-agent >/dev/null 2>&1 || : ) &&
> echo hello | gpgsm --homedir "${GNUPGHOME}" >/dev/null \
> -u committer@example.com -o /dev/null --sign - 2>&1 &&
> --
> Todd
next prev parent reply other threads:[~2019-02-08 20:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-08 3:17 [PATCH 0/2] t/lib-gpg: a gpgsm fix, a minor improvement, and a question Todd Zullinger
2019-02-08 3:17 ` [PATCH 1/2] t/lib-gpg: quote path to ${GNUPGHOME}/trustlist.txt Todd Zullinger
2019-02-08 20:11 ` SZEDER Gábor [this message]
2019-02-08 20:25 ` Todd Zullinger
2019-02-08 20:35 ` SZEDER Gábor
2019-02-08 3:17 ` [PATCH 2/2] t/lib-gpg: drop redundant killing of gpg-agent Todd Zullinger
2019-02-08 8:33 ` [PATCH 0/2] t/lib-gpg: a gpgsm fix, a minor improvement, and a question Henning Schild
2019-02-08 18:04 ` Junio C Hamano
2019-02-09 14:06 ` SZEDER Gábor
2019-02-09 23:05 ` Todd Zullinger
2019-02-11 19:51 ` SZEDER Gábor
2019-02-14 6:32 ` Todd Zullinger
2019-02-12 0:44 ` Jeff King
2019-02-12 2:38 ` Junio C Hamano
2019-02-12 2:45 ` SZEDER Gábor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190208201105.GA10587@szeder.dev \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--cc=henning.schild@siemens.com \
--cc=tmz@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).