summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-26 13:27:40 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2022-12-26 16:40:48 +0000
commit5c262a120643d8f079225a2b18b03ba52d60953e (patch)
treec593181da1d6f8606d12bbc36a953eb0c81b3872
parentab9ebfa7172a2d1dcd324a777e74ae45b92f6d1c (diff)
include-binaries: Silently tolerate mentions of debian/
Closes: #1026918 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit9
-rwxr-xr-xtests/tests/quilt-include-binaries3
2 files changed, 10 insertions, 2 deletions
diff --git a/dgit b/dgit
index 188c20c..4244991 100755
--- a/dgit
+++ b/dgit
@@ -6246,8 +6246,15 @@ END
$wrong->(f_ "forbidden path component '%s'", $ent)
if grep { $_ eq $ent } '', '.', '..';
if (!@bpath) { # check first component
+ # dpkg-source doesn't like files in debian/ which it
+ # considers binary, so the user may have listed
+ # them. We should silently ignore this. #1026918.
+ if ($ent eq 'debian') {
+ no warnings qw(exiting);
+ next BFILE;
+ }
$wrong->(f_ "path starts with '%s'", $ent)
- if grep { $_ eq $ent } qw(debian .git);
+ if grep { $_ eq $ent } qw(.git);
}
push @bpath, $ent;
$bpath_chk = join '/', @bpath;
diff --git a/tests/tests/quilt-include-binaries b/tests/tests/quilt-include-binaries
index c193e0b..74a0de9 100755
--- a/tests/tests/quilt-include-binaries
+++ b/tests/tests/quilt-include-binaries
@@ -25,6 +25,7 @@ debian/binfile
../bin-in-parent
$tmp/bin-with-abs
debian/../../bin-tricky-in-parent
+.git/index
bins/bin-via-link
$tmp/
..
@@ -88,7 +89,7 @@ t-roundtrips
for wrongness in \
"forbidden path component '..'" \
- "path starts with 'debian'" \
+ "path starts with '.git'" \
; do
grep "$wrongness" ../build-source-out.$r
done