chiark / gitweb /
dgit: Properly shellquote --git-builder argument to gbp
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 3 Aug 2017 11:48:05 +0000 (12:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 4 Aug 2017 22:06:19 +0000 (23:06 +0100)
This is about to contain more exciting shell metacharacters.
(Even now, it is wrong without quoting as we end up telling gbp to
pass -i.git/ rather than -i\.git/ to dpkg-source.)

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit

index 81059b504491a21932ff11bca458bf5cb8530b9d..00cee5f997c22037c9a92721cff3ff2b1deb82c0 100644 (file)
@@ -9,6 +9,7 @@ dgit (4.1~) experimental; urgency=medium
   Other improvements to dgit:
   * New print-dpkg-source-ignores option to print the big rune
     you need to pass to dpkg-source to make it work exactly the right.
+  * Properly shell-quote the --git-builder argument to gbp.
 
   Documentation:
   * dgit-user(7): Provide information about how to use sbuild.
diff --git a/dgit b/dgit
index 3c94f036ac144da9742718a75745ac1dc6b6e53a..9834d03b8d682b75108beb9f489b9cd56b2982b4 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -6072,7 +6072,8 @@ sub cmd_gbp_build {
     }
     my @cmd = opts_opt_multi_cmd @gbp_build;
 
-    push @cmd, (qw(-us -uc --git-no-sign-tags), "--git-builder=@dbp");
+    push @cmd, (qw(-us -uc --git-no-sign-tags),
+               "--git-builder=".(shellquote @dbp));
 
     if ($gbp_make_orig) {
        my $priv = dgit_privdir();