Ver código fonte

build: Quote dirname argument

We should protect this argument in case the user has the source tree
in a pathname with spaces.

Reported-by: Carsten Hey <carsten@debian.org>
Guillem Jover 10 anos atrás
pai
commit
11912fc691
2 arquivos alterados com 3 adições e 1 exclusões
  1. 2 0
      debian/changelog
  2. 1 1
      run-script

+ 2 - 0
debian/changelog

@@ -92,6 +92,8 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
     - Add a configuration summary to configure output.
     - Make git log invocation immune to local configuration.
     - Do not require passing the perl interpreter to run-script.
+    - Quote dirname argument in run-script, to handle spaces in pathname.
+      Reported by Carsten Hey <carsten@debian.org>.
   * Packaging:
     - Enable all hardening flags, starting with gcc-5 there is no performance
       loss anymore when enabling PIE on i386.

+ 1 - 1
run-script

@@ -1,6 +1,6 @@
 #!/bin/sh
 
-top_srcdir="`dirname $0`"
+top_srcdir="`dirname "$0"`"
 
 # To avoid using «readlink -f» or «realpath» we just change into the
 # desired directory and work from there.