summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:32:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:32:59 +0000
commit4d57e0a8dab2139a631a21aab862487481548702 (patch)
treef7cea0b9939e2ecb7a301de6c83bada29452046d /test
parentInitial commit. (diff)
downloaddevscripts-upstream.tar.xz
devscripts-upstream.zip
Adding upstream version 2.23.7.upstream/2.23.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test')
-rw-r--r--test/Makefile49
-rw-r--r--test/bashisms/531327.sh6
-rw-r--r--test/bashisms/535368.mk6
-rw-r--r--test/bashisms/808271.sh9
-rw-r--r--test/bashisms/808271.sh.out4
-rw-r--r--test/bashisms/arith.sh21
-rw-r--r--test/bashisms/arith.sh.out16
-rw-r--r--test/bashisms/array-expansion.sh60
-rw-r--r--test/bashisms/array-expansion.sh.out80
-rw-r--r--test/bashisms/ash-setvar.sh4
-rw-r--r--test/bashisms/ash-setvar.sh.out2
-rw-r--r--test/bashisms/basic-bash-override.mk6
-rw-r--r--test/bashisms/basic-bash.mk6
-rw-r--r--test/bashisms/basic.mk21
-rw-r--r--test/bashisms/basic.mk.out10
-rw-r--r--test/bashisms/brace-expansion.sh9
-rw-r--r--test/bashisms/brace-expansion.sh.out10
-rw-r--r--test/bashisms/case-modification.sh19
-rw-r--r--test/bashisms/case-modification.sh.out24
-rw-r--r--test/bashisms/command.sh16
-rw-r--r--test/bashisms/command.sh.out12
-rw-r--r--test/bashisms/comments-in-quoted-strings1.sh7
-rw-r--r--test/bashisms/comments-in-quoted-strings2.sh4
-rw-r--r--test/bashisms/comments-parsing-fns.sh3
-rw-r--r--test/bashisms/comments-parsing-fns.sh.out2
-rw-r--r--test/bashisms/coproc.sh3
-rw-r--r--test/bashisms/coproc.sh.out2
-rw-r--r--test/bashisms/dynamic-length.sh9
-rw-r--r--test/bashisms/dynamic-length.sh.out8
-rw-r--r--test/bashisms/exit-code.sh7
-rw-r--r--test/bashisms/exit-code.sh.out6
-rw-r--r--test/bashisms/fail2ban.sh3
-rw-r--r--test/bashisms/fps.sh9
-rw-r--r--test/bashisms/fps.sh.out3
-rw-r--r--test/bashisms/functions.sh66
-rw-r--r--test/bashisms/functions.sh.out32
-rw-r--r--test/bashisms/gettext.sh5
-rw-r--r--test/bashisms/gettext.sh.out2
-rw-r--r--test/bashisms/glob-ignore.sh4
-rw-r--r--test/bashisms/glob-ignore.sh.out2
-rw-r--r--test/bashisms/hash.sh5
-rw-r--r--test/bashisms/hash.sh.out6
-rw-r--r--test/bashisms/heredoc-with-dash.sh35
-rw-r--r--test/bashisms/heredoc-with-others.sh77
-rw-r--r--test/bashisms/heredocs.sh52
-rw-r--r--test/bashisms/heredocs.sh.out10
-rw-r--r--test/bashisms/jobs.sh15
-rw-r--r--test/bashisms/jobs.sh.out16
-rw-r--r--test/bashisms/line-continuation.sh19
-rw-r--r--test/bashisms/line-continuation.sh.out6
-rw-r--r--test/bashisms/negations.sh11
-rw-r--r--test/bashisms/negations.sh.out2
-rw-r--r--test/bashisms/other-vars.sh15
-rw-r--r--test/bashisms/other-vars.sh.out14
-rw-r--r--test/bashisms/printf.sh7
-rw-r--r--test/bashisms/printf.sh.out6
-rw-r--r--test/bashisms/quoted-strings.sh37
-rw-r--r--test/bashisms/quoted-strings.sh.out18
-rw-r--r--test/bashisms/return.sh13
-rw-r--r--test/bashisms/return.sh.out6
-rw-r--r--test/bashisms/shell-vars.mk5
-rw-r--r--test/bashisms/source2
-rw-r--r--test/bashisms/source.out2
-rw-r--r--test/bashisms/special-case.sh13
-rw-r--r--test/bashisms/special-case.sh.out4
-rw-r--r--test/bashisms/special-expansions.sh26
-rw-r--r--test/bashisms/special-expansions.sh.out36
-rw-r--r--test/bashisms/subshell-no-arith.sh3
-rw-r--r--test/bashisms/tilde-expansion.sh41
-rw-r--r--test/bashisms/tilde-expansion.sh.out28
-rw-r--r--test/bashisms/traps.sh17
-rw-r--r--test/bashisms/traps.sh.out18
-rw-r--r--test/bashisms/underscore-var.sh3
-rw-r--r--test/bashisms/underscore-var.sh.out2
-rw-r--r--test/bashisms/unknown-fns.sh297
-rw-r--r--test/bashisms/unknown-fns.sh.out10
-rw-r--r--test/bashisms/unterminated-string.sh5
-rw-r--r--test/bashisms/unterminated-string2.sh5
-rw-r--r--test/dd-list/sources185
-rw-r--r--test/debdiff/devscripts_2.13.0_any.debbin0 -> 850 bytes
-rw-r--r--test/debdiff/devscripts_2.13.1_any.debbin0 -> 848 bytes
-rw-r--r--test/debrepro/reproducible/debian/changelog5
-rw-r--r--test/debrepro/reproducible/debian/compat1
-rw-r--r--test/debrepro/reproducible/debian/control15
-rwxr-xr-xtest/debrepro/reproducible/debian/rules4
-rw-r--r--test/debrepro/reproducible/debian/source/format1
-rw-r--r--test/debrepro/unreproducible/debian/changelog5
-rw-r--r--test/debrepro/unreproducible/debian/compat1
-rw-r--r--test/debrepro/unreproducible/debian/control15
-rwxr-xr-xtest/debrepro/unreproducible/debian/rules9
-rw-r--r--test/debrepro/unreproducible/debian/source/format1
-rw-r--r--test/debsign/private_key.asc106
-rw-r--r--test/debsign/public_key.asc52
-rw-r--r--test/debsign/sphinx_1.7.2-1.dsc30
-rw-r--r--test/debsign/sphinx_1.7.2-1_amd64.buildinfo472
-rw-r--r--test/debsign/sphinx_1.7.2-1_amd64.changes54
-rw-r--r--test/lib_test_uscan130
-rw-r--r--test/mass-bug/one-package1
-rw-r--r--test/mass-bug/packages4
-rw-r--r--test/mass-bug/template20
-rw-r--r--test/mergechanges/different-description.changes41
-rw-r--r--test/mergechanges/different-source.changes41
-rw-r--r--test/mergechanges/different-version.changes41
-rw-r--r--test/mergechanges/format-1.7.changes41
-rw-r--r--test/mergechanges/linux_4.9.161-1_amd64.changes2016
-rw-r--r--test/mergechanges/unsupported-checksum.changes44
-rw-r--r--test/mergechanges/unsupported-format.changes41
-rw-r--r--test/mergechanges/xdg-desktop-portal_1.2.0-1_all.changes41
-rw-r--r--test/mergechanges/xdg-desktop-portal_1.2.0-1_amd64.changes51
-rw-r--r--test/mergechanges/xdg-desktop-portal_1.2.0-1_source.changes64
-rw-r--r--test/sadt/README5
-rw-r--r--test/sadt/comma-separated-restrictions/debian/control0
-rw-r--r--test/sadt/comma-separated-restrictions/debian/tests/control2
-rwxr-xr-xtest/sadt/comma-separated-restrictions/debian/tests/test1
-rw-r--r--test/sadt/comma-separated-tests/debian/control0
-rw-r--r--test/sadt/comma-separated-tests/debian/tests/control1
-rwxr-xr-xtest/sadt/comma-separated-tests/debian/tests/test11
-rwxr-xr-xtest/sadt/comma-separated-tests/debian/tests/test22
-rw-r--r--test/sadt/fails/debian/control0
-rw-r--r--test/sadt/fails/debian/tests/control1
-rwxr-xr-xtest/sadt/fails/debian/tests/fails1
-rw-r--r--test/sadt/flaky/debian/control0
-rw-r--r--test/sadt/flaky/debian/tests/control2
-rwxr-xr-xtest/sadt/flaky/debian/tests/flaky-fails1
-rwxr-xr-xtest/sadt/flaky/debian/tests/flaky-succeeds1
-rw-r--r--test/sadt/ignore-udebs/debian/control0
-rw-r--r--test/sadt/ignore-udebs/debian/tests/control1
-rwxr-xr-xtest/sadt/new9
-rw-r--r--test/sadt/passes/debian/control0
-rw-r--r--test/sadt/passes/debian/tests/control1
-rwxr-xr-xtest/sadt/passes/debian/tests/test1
-rw-r--r--test/sadt/skippable/debian/control0
-rw-r--r--test/sadt/skippable/debian/tests/control2
-rwxr-xr-xtest/sadt/skippable/debian/tests/skipped2
-rw-r--r--test/sadt/space-separated-restrictions/debian/control0
-rw-r--r--test/sadt/space-separated-restrictions/debian/tests/control2
-rwxr-xr-xtest/sadt/space-separated-restrictions/debian/tests/test1
-rw-r--r--test/sadt/space-separated-tests/debian/control0
-rw-r--r--test/sadt/space-separated-tests/debian/tests/control1
-rwxr-xr-xtest/sadt/space-separated-tests/debian/tests/test11
-rwxr-xr-xtest/sadt/space-separated-tests/debian/tests/test22
-rw-r--r--test/sadt/superficial-fails/debian/control0
-rw-r--r--test/sadt/superficial-fails/debian/tests/control2
-rwxr-xr-xtest/sadt/superficial-fails/debian/tests/test1
-rw-r--r--test/sadt/superficial/debian/control0
-rw-r--r--test/sadt/superficial/debian/tests/control2
-rwxr-xr-xtest/sadt/superficial/debian/tests/test1
-rw-r--r--test/sadt/test-command/debian/control0
-rw-r--r--test/sadt/test-command/debian/tests/control1
-rw-r--r--test/sadt/tests-directory/debian/control0
-rw-r--r--test/sadt/tests-directory/debian/tests/control2
-rwxr-xr-xtest/sadt/tests-directory/foo/test1
-rw-r--r--test/sadt/unskippable/debian/control0
-rw-r--r--test/sadt/unskippable/debian/tests/control1
-rwxr-xr-xtest/sadt/unskippable/debian/tests/unskippable2
-rw-r--r--test/sadt/unskipped/debian/control0
-rw-r--r--test/sadt/unskipped/debian/tests/control2
-rwxr-xr-xtest/sadt/unskipped/debian/tests/fails1
-rw-r--r--test/shunit2-helper-functions.sh27
-rwxr-xr-xtest/t/common.t106
-rw-r--r--test/t/config112
-rw-r--r--test/t/config21
-rw-r--r--test/t/json-cache.t25
-rw-r--r--test/t/salsa-config.t18
-rw-r--r--test/t/salsa.conf4
-rw-r--r--test/t/salsa.pm228
-rw-r--r--test/t/salsa.t108
-rw-r--r--test/t/uscan-config.t20
-rwxr-xr-xtest/test_annotate-output58
-rwxr-xr-xtest/test_checkbashisms221
-rwxr-xr-xtest/test_dd-list47
-rwxr-xr-xtest/test_debchange252
-rwxr-xr-xtest/test_debdiff35
-rwxr-xr-xtest/test_debi285
-rwxr-xr-xtest/test_debrepro46
-rwxr-xr-xtest/test_debsign114
-rw-r--r--test/test_helper.sh26
-rwxr-xr-xtest/test_mass_bug161
-rwxr-xr-xtest/test_mergechanges551
-rwxr-xr-xtest/test_mk-origtargz750
-rwxr-xr-xtest/test_package_lifecycle386
-rwxr-xr-xtest/test_perl12
-rwxr-xr-xtest/test_perltidy39
-rwxr-xr-xtest/test_sadt100
-rwxr-xr-xtest/test_salsa106
-rwxr-xr-xtest/test_uscan548
-rwxr-xr-xtest/test_uscan_ftp489
-rwxr-xr-xtest/test_uscan_git207
-rwxr-xr-xtest/test_uscan_group210
-rwxr-xr-xtest/test_uscan_mangle1543
-rwxr-xr-xtest/test_uscan_online50
-rwxr-xr-xtest/test_uscan_svn201
-rwxr-xr-xtest/test_wrap-and-sort54
-rw-r--r--test/uscan/PRIVATE_KEY.asc106
-rw-r--r--test/uscan/PUBLIC_KEY.asc52
-rw-r--r--test/uscan/ftpserver.py29
-rw-r--r--test/uscan/httpserver.py25
-rw-r--r--test/uscan/manual-test/Makefile35
-rw-r--r--test/uscan/manual-test/_dh-make-golang/debian/changelog5
-rwxr-xr-xtest/uscan/manual-test/_dh-make-golang/debian/rules0
-rw-r--r--test/uscan/manual-test/_dh-make-golang/debian/source/format1
-rw-r--r--test/uscan/manual-test/_dh-make-golang/debian/watch5
-rw-r--r--test/uscan/manual-test/_dl-poly-classic/debian/changelog5
-rwxr-xr-xtest/uscan/manual-test/_dl-poly-classic/debian/rules0
-rw-r--r--test/uscan/manual-test/_dl-poly-classic/debian/source/format1
-rw-r--r--test/uscan/manual-test/_dl-poly-classic/debian/watch7
-rw-r--r--test/uscan/manual-test/_osamu-utils/debian/changelog5
-rwxr-xr-xtest/uscan/manual-test/_osamu-utils/debian/rules0
-rw-r--r--test/uscan/manual-test/_osamu-utils/debian/source/format1
-rw-r--r--test/uscan/manual-test/_osamu-utils/debian/watch5
-rw-r--r--test/uscan/manual-test/_tweeper/debian/changelog5
-rwxr-xr-xtest/uscan/manual-test/_tweeper/debian/rules0
-rw-r--r--test/uscan/manual-test/_tweeper/debian/source/format1
-rw-r--r--test/uscan/manual-test/_tweeper/debian/watch5
-rw-r--r--test/uscan/manual-test/_upspin/debian/changelog5
-rwxr-xr-xtest/uscan/manual-test/_upspin/debian/rules0
-rw-r--r--test/uscan/manual-test/_upspin/debian/source/format1
-rw-r--r--test/uscan/manual-test/_upspin/debian/watch5
-rw-r--r--test/uscan/s3bucket3
-rw-r--r--test/wrap-and-sort/control-templates/in/control.in7
-rw-r--r--test/wrap-and-sort/control-templates/in/control.in211
-rw-r--r--test/wrap-and-sort/control-templates/out/control.in5
-rw-r--r--test/wrap-and-sort/control-templates/out/control.in211
-rw-r--r--test/wrap-and-sort/install-comments/in/install12
-rw-r--r--test/wrap-and-sort/install-comments/out/install11
225 files changed, 12447 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 0000000..74c40b3
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,49 @@
+
+OUR_TESTS= \
+ perl \
+ annotate-output \
+ checkbashisms \
+ dd-list \
+ debchange \
+ debdiff \
+ debrepro \
+ debsign \
+ mergechanges \
+ mk-origtargz \
+ package_lifecycle \
+ sadt \
+ uscan \
+ uscan_ftp \
+ uscan_git \
+ uscan_svn \
+ uscan_mangle \
+ uscan_group \
+ perltidy \
+ wrap-and-sort \
+
+# Tests that must run as root, and alter the state of the system by
+# adding/removing packages
+DESTRUCTIVE_TESTS = \
+ debi \
+
+# unset some variables that might affect tests
+undefine DEB_CHECK_COMMAND
+
+test: $(foreach i,$(OUR_TESTS),test_$(i).test)
+
+destructive-test: $(foreach i,$(DESTRUCTIVE_TESTS),test_$(i).test)
+
+%.test: %
+ ./$<
+
+test-installed: $(foreach i,$(OUR_TESTS),test_$(i).test_installed)
+
+destructive-test-installed: $(foreach i,$(DESTRUCTIVE_TESTS),test_$(i).test_installed)
+
+%.test_installed: %
+ ./$< --installed
+
+online-test:
+ ./test_uscan_online
+
+.PHONY: test test-installed online-test destructive-test
diff --git a/test/bashisms/531327.sh b/test/bashisms/531327.sh
new file mode 100644
index 0000000..8dcc058
--- /dev/null
+++ b/test/bashisms/531327.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+foo() {}
+
+foo \
+source something
diff --git a/test/bashisms/535368.mk b/test/bashisms/535368.mk
new file mode 100644
index 0000000..adba007
--- /dev/null
+++ b/test/bashisms/535368.mk
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+foo:
+ if [ "$$(< $(DEBIAN)/foo md5sum)" != "$$(cat $(DEBIAN)/foo.md5)" ] ; then \
+ echo moo; \
+ fi
diff --git a/test/bashisms/808271.sh b/test/bashisms/808271.sh
new file mode 100644
index 0000000..0789d7e
--- /dev/null
+++ b/test/bashisms/808271.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if type which; then
+ echo "use which"
+fi
+
+if ! type which; then
+ echo "well, idk"
+fi
diff --git a/test/bashisms/808271.sh.out b/test/bashisms/808271.sh.out
new file mode 100644
index 0000000..6cb8156
--- /dev/null
+++ b/test/bashisms/808271.sh.out
@@ -0,0 +1,4 @@
+possible bashism in bashisms/808271.sh line 3 (type):
+if type which; then
+possible bashism in bashisms/808271.sh line 7 (type):
+if ! type which; then
diff --git a/test/bashisms/arith.sh b/test/bashisms/arith.sh
new file mode 100644
index 0000000..2cbe860
--- /dev/null
+++ b/test/bashisms/arith.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+metric=0
+echo $((metric=metric+1))
+
+m=0
+n=2
+echo $((n-m++)) # BASHISM
+echo $((++m)) # BASHISM
+echo $(( m-- )) # BASHISM
+echo $((--m)) # BASHISM
+
+foo_bar=0
+echo $((foo_bar++)) # BASHISM
+echo $((foo_bar=foo_bar*2))
+echo $((foo_bar*3/6))
+
+echo $((2*n++)) # BASHISM
+
+echo $(($n*n++)) # BASHISM
+
+echo $((3**2)) # BASHISM
diff --git a/test/bashisms/arith.sh.out b/test/bashisms/arith.sh.out
new file mode 100644
index 0000000..dae4b40
--- /dev/null
+++ b/test/bashisms/arith.sh.out
@@ -0,0 +1,16 @@
+possible bashism in bashisms/arith.sh line 7 ('$((n++))' should be '$n; $((n=n+1))'):
+echo $((n-m++)) # BASHISM
+possible bashism in bashisms/arith.sh line 8 ('$((++n))' should be '$((n=n+1))'):
+echo $((++m)) # BASHISM
+possible bashism in bashisms/arith.sh line 9 ('$((n--))' should be '$n; $((n=n-1))'):
+echo $(( m-- )) # BASHISM
+possible bashism in bashisms/arith.sh line 10 ('$((--n))' should be '$((n=n-1))'):
+echo $((--m)) # BASHISM
+possible bashism in bashisms/arith.sh line 13 ('$((n++))' should be '$n; $((n=n+1))'):
+echo $((foo_bar++)) # BASHISM
+possible bashism in bashisms/arith.sh line 17 ('$((n++))' should be '$n; $((n=n+1))'):
+echo $((2*n++)) # BASHISM
+possible bashism in bashisms/arith.sh line 19 ('$((n++))' should be '$n; $((n=n+1))'):
+echo $(($n*n++)) # BASHISM
+possible bashism in bashisms/arith.sh line 21 (exponentiation is not POSIX):
+echo $((3**2)) # BASHISM
diff --git a/test/bashisms/array-expansion.sh b/test/bashisms/array-expansion.sh
new file mode 100644
index 0000000..ca2b57a
--- /dev/null
+++ b/test/bashisms/array-expansion.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# This is a TO DO, but irrelevant to this test case:
+foo=(foo bar moo BASH ISM)
+
+n=1
+
+echo BASHISM ${foo[1]%r}
+echo BASHISM ${foo[$n]%r}
+echo BASHISM ${foo[*]%o}
+echo BASHISM ${foo[@]%o}
+
+echo BASHISM ${foo[1]%%r}
+echo BASHISM ${foo[$n]%%r}
+echo BASHISM ${foo[*]%%o}
+echo BASHISM ${foo[@]%%o}
+
+echo BASHISM ${foo[1]#*a}
+echo BASHISM ${foo[$n]#*a}
+echo BASHISM ${foo[*]#*o}
+echo BASHISM ${foo[@]#*o}
+
+echo BASHISM ${foo[1]##*a}
+echo BASHISM ${foo[$n]##*a}
+echo BASHISM ${foo[*]##*o}
+echo BASHISM ${foo[@]##*o}
+
+echo BASHISM ${#foo[1]}
+echo BASHISM ${#foo[$n]}
+echo BASHISM ${#foo[*]}
+echo BASHISM ${#foo[@]}
+
+# Technically, there are two bashisms here, but I'm happy if it at
+# least matches one. The regexes become more complex without real gain
+# otherwise. (hence the "BASH ISMS", with the extra space)
+
+echo BASHISM BASH ISMS ${foo[1]^*a}
+echo BASHISM BASH ISMS ${foo[$n]^*a}
+echo BASHISM BASH ISMS ${foo[*]^*o}
+echo BASHISM BASH ISMS ${foo[@]^*o}
+
+echo BASHISM BASH ISMS ${foo[1]^^*a}
+echo BASHISM BASH ISMS ${foo[$n]^^*a}
+echo BASHISM BASH ISMS ${foo[*]^^*o}
+echo BASHISM BASH ISMS ${foo[@]^^*o}
+
+echo BASHISM BASH ISMS ${foo[1],*a}
+echo BASHISM BASH ISMS ${foo[$n],*a}
+echo BASHISM BASH ISMS ${foo[*],*a}
+echo BASHISM BASH ISMS ${foo[@],*a}
+
+echo BASHISM BASH ISMS ${foo[1],,*a}
+echo BASHISM BASH ISMS ${foo[$n],,*a}
+echo BASHISM BASH ISMS ${foo[*],,*a}
+echo BASHISM BASH ISMS ${foo[@],,*a}
+
+echo BASHISM BASH ISMS ${foo[1]/a/R}
+echo BASHISM BASH ISMS ${foo[$n]/a/R}
+echo BASHISM BASH ISMS ${foo[*]/a/R}
+echo BASHISM BASH ISMS ${foo[@]/a/R}
diff --git a/test/bashisms/array-expansion.sh.out b/test/bashisms/array-expansion.sh.out
new file mode 100644
index 0000000..d14bea0
--- /dev/null
+++ b/test/bashisms/array-expansion.sh.out
@@ -0,0 +1,80 @@
+possible bashism in bashisms/array-expansion.sh line 8 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[1]%r}
+possible bashism in bashisms/array-expansion.sh line 9 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[$n]%r}
+possible bashism in bashisms/array-expansion.sh line 10 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[*]%o}
+possible bashism in bashisms/array-expansion.sh line 11 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[@]%o}
+possible bashism in bashisms/array-expansion.sh line 13 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[1]%%r}
+possible bashism in bashisms/array-expansion.sh line 14 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[$n]%%r}
+possible bashism in bashisms/array-expansion.sh line 15 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[*]%%o}
+possible bashism in bashisms/array-expansion.sh line 16 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[@]%%o}
+possible bashism in bashisms/array-expansion.sh line 18 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[1]#*a}
+possible bashism in bashisms/array-expansion.sh line 19 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[$n]#*a}
+possible bashism in bashisms/array-expansion.sh line 20 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[*]#*o}
+possible bashism in bashisms/array-expansion.sh line 21 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[@]#*o}
+possible bashism in bashisms/array-expansion.sh line 23 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[1]##*a}
+possible bashism in bashisms/array-expansion.sh line 24 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[$n]##*a}
+possible bashism in bashisms/array-expansion.sh line 25 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[*]##*o}
+possible bashism in bashisms/array-expansion.sh line 26 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${foo[@]##*o}
+possible bashism in bashisms/array-expansion.sh line 28 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${#foo[1]}
+possible bashism in bashisms/array-expansion.sh line 29 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${#foo[$n]}
+possible bashism in bashisms/array-expansion.sh line 30 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${#foo[*]}
+possible bashism in bashisms/array-expansion.sh line 31 (bash arrays, ${name[0|*|@]}):
+echo BASHISM ${#foo[@]}
+possible bashism in bashisms/array-expansion.sh line 37 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[1]^*a}
+possible bashism in bashisms/array-expansion.sh line 38 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[$n]^*a}
+possible bashism in bashisms/array-expansion.sh line 39 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[*]^*o}
+possible bashism in bashisms/array-expansion.sh line 40 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[@]^*o}
+possible bashism in bashisms/array-expansion.sh line 42 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[1]^^*a}
+possible bashism in bashisms/array-expansion.sh line 43 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[$n]^^*a}
+possible bashism in bashisms/array-expansion.sh line 44 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[*]^^*o}
+possible bashism in bashisms/array-expansion.sh line 45 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[@]^^*o}
+possible bashism in bashisms/array-expansion.sh line 47 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[1],*a}
+possible bashism in bashisms/array-expansion.sh line 48 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[$n],*a}
+possible bashism in bashisms/array-expansion.sh line 49 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[*],*a}
+possible bashism in bashisms/array-expansion.sh line 50 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[@],*a}
+possible bashism in bashisms/array-expansion.sh line 52 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[1],,*a}
+possible bashism in bashisms/array-expansion.sh line 53 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[$n],,*a}
+possible bashism in bashisms/array-expansion.sh line 54 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[*],,*a}
+possible bashism in bashisms/array-expansion.sh line 55 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[@],,*a}
+possible bashism in bashisms/array-expansion.sh line 57 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[1]/a/R}
+possible bashism in bashisms/array-expansion.sh line 58 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[$n]/a/R}
+possible bashism in bashisms/array-expansion.sh line 59 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[*]/a/R}
+possible bashism in bashisms/array-expansion.sh line 60 (bash arrays, ${name[0|*|@]}):
+echo BASHISM BASH ISMS ${foo[@]/a/R}
diff --git a/test/bashisms/ash-setvar.sh b/test/bashisms/ash-setvar.sh
new file mode 100644
index 0000000..c0ae403
--- /dev/null
+++ b/test/bashisms/ash-setvar.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+setvar foo bar # BASHISM
+[ bar = "$foo" ]
diff --git a/test/bashisms/ash-setvar.sh.out b/test/bashisms/ash-setvar.sh.out
new file mode 100644
index 0000000..121a65c
--- /dev/null
+++ b/test/bashisms/ash-setvar.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/ash-setvar.sh line 3 (setvar 'foo' 'bar' should be eval 'foo="'"$bar"'"'):
+setvar foo bar # BASHISM
diff --git a/test/bashisms/basic-bash-override.mk b/test/bashisms/basic-bash-override.mk
new file mode 100644
index 0000000..7904a5e
--- /dev/null
+++ b/test/bashisms/basic-bash-override.mk
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+ override SHELL := bash
+
+test:
+ @echo -e foo
diff --git a/test/bashisms/basic-bash.mk b/test/bashisms/basic-bash.mk
new file mode 100644
index 0000000..7a16131
--- /dev/null
+++ b/test/bashisms/basic-bash.mk
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+
+SHELL := bash
+
+test:
+ echo -e foo
diff --git a/test/bashisms/basic.mk b/test/bashisms/basic.mk
new file mode 100644
index 0000000..31d59a2
--- /dev/null
+++ b/test/bashisms/basic.mk
@@ -0,0 +1,21 @@
+#!/usr/bin/make -f
+
+# bug:
+overrideSHELL := bash
+
+test:
+ -echo -e "foo BASHISM"
+ @echo -e "bar BASHISM"
+ @-echo -e "bar BASHISM" && false
+ -@echo -e "bar BASHISM" && false
+ true
+
+dirs:
+source diff:
+source diff.gz::
+source file-stamp:
+caller %.so:
+ :
+
+foo: $(shell echo dir/BASHISM/{foo,bar})
+ :
diff --git a/test/bashisms/basic.mk.out b/test/bashisms/basic.mk.out
new file mode 100644
index 0000000..1fae795
--- /dev/null
+++ b/test/bashisms/basic.mk.out
@@ -0,0 +1,10 @@
+possible bashism in bashisms/basic.mk line 7 (echo -e):
+ -echo -e "foo BASHISM"
+possible bashism in bashisms/basic.mk line 8 (echo -e):
+ @echo -e "bar BASHISM"
+possible bashism in bashisms/basic.mk line 9 (echo -e):
+ @-echo -e "bar BASHISM" && false
+possible bashism in bashisms/basic.mk line 10 (echo -e):
+ -@echo -e "bar BASHISM" && false
+possible bashism in bashisms/basic.mk line 20 (brace expansion):
+foo: $(shell echo dir/BASHISM/{foo,bar})
diff --git a/test/bashisms/brace-expansion.sh b/test/bashisms/brace-expansion.sh
new file mode 100644
index 0000000..c34ea21
--- /dev/null
+++ b/test/bashisms/brace-expansion.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo BASHISM{1..10}
+echo BASHISM{1..10..2}
+echo BASHISM{a..z}
+echo BASHISM{Z..a}
+echo BASHISM{a..z..2}
+echo {a.._}
+echo {a..9}
diff --git a/test/bashisms/brace-expansion.sh.out b/test/bashisms/brace-expansion.sh.out
new file mode 100644
index 0000000..843dc32
--- /dev/null
+++ b/test/bashisms/brace-expansion.sh.out
@@ -0,0 +1,10 @@
+possible bashism in bashisms/brace-expansion.sh line 3 (brace expansion, {a..b[..c]}should be $(seq a [c] b)):
+echo BASHISM{1..10}
+possible bashism in bashisms/brace-expansion.sh line 4 (brace expansion, {a..b[..c]}should be $(seq a [c] b)):
+echo BASHISM{1..10..2}
+possible bashism in bashisms/brace-expansion.sh line 5 (brace expansion):
+echo BASHISM{a..z}
+possible bashism in bashisms/brace-expansion.sh line 6 (brace expansion):
+echo BASHISM{Z..a}
+possible bashism in bashisms/brace-expansion.sh line 7 (brace expansion):
+echo BASHISM{a..z..2}
diff --git a/test/bashisms/case-modification.sh b/test/bashisms/case-modification.sh
new file mode 100644
index 0000000..d163e6a
--- /dev/null
+++ b/test/bashisms/case-modification.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+foo=foo
+bar=BAR
+
+echo BASHISM: ${foo^f}
+echo BASHISM: ${foo^^o}
+echo BASHISM: ${bar,B}
+echo BASHISM: ${bar,,R}
+
+echo BASHISM: ${foo^}
+echo BASHISM: ${foo^^}
+echo BASHISM: ${bar,}
+echo BASHISM: ${bar,,}
+
+echo BASHISM: ${@^}
+echo BASHISM: ${*^^}
+echo BASHISM: ${@,}
+echo BASHISM: ${*,,}
diff --git a/test/bashisms/case-modification.sh.out b/test/bashisms/case-modification.sh.out
new file mode 100644
index 0000000..d60157f
--- /dev/null
+++ b/test/bashisms/case-modification.sh.out
@@ -0,0 +1,24 @@
+possible bashism in bashisms/case-modification.sh line 6 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${foo^f}
+possible bashism in bashisms/case-modification.sh line 7 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${foo^^o}
+possible bashism in bashisms/case-modification.sh line 8 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${bar,B}
+possible bashism in bashisms/case-modification.sh line 9 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${bar,,R}
+possible bashism in bashisms/case-modification.sh line 11 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${foo^}
+possible bashism in bashisms/case-modification.sh line 12 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${foo^^}
+possible bashism in bashisms/case-modification.sh line 13 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${bar,}
+possible bashism in bashisms/case-modification.sh line 14 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${bar,,}
+possible bashism in bashisms/case-modification.sh line 16 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${@^}
+possible bashism in bashisms/case-modification.sh line 17 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${*^^}
+possible bashism in bashisms/case-modification.sh line 18 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${@,}
+possible bashism in bashisms/case-modification.sh line 19 (${parm,[,][pat]} or ${parm^[^][pat]}):
+echo BASHISM: ${*,,}
diff --git a/test/bashisms/command.sh b/test/bashisms/command.sh
new file mode 100644
index 0000000..bdfb8c6
--- /dev/null
+++ b/test/bashisms/command.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+command test
+command -p test
+command -v test
+command -V test
+command -p test
+command -p -v test
+command -pv test
+command -p -v -a test # BASHISM
+command -p -a -v test # BASHISM
+command -pa test # BASHISM
+command -ap test # BASHISM
+command -p -a test # BASHISM
+command -pV -a test # BASHISM
+command -p test
diff --git a/test/bashisms/command.sh.out b/test/bashisms/command.sh.out
new file mode 100644
index 0000000..1e1e111
--- /dev/null
+++ b/test/bashisms/command.sh.out
@@ -0,0 +1,12 @@
+possible bashism in bashisms/command.sh line 10 ('command' with option other than -p, -v or -V):
+command -p -v -a test # BASHISM
+possible bashism in bashisms/command.sh line 11 ('command' with option other than -p, -v or -V):
+command -p -a -v test # BASHISM
+possible bashism in bashisms/command.sh line 12 ('command' with option other than -p, -v or -V):
+command -pa test # BASHISM
+possible bashism in bashisms/command.sh line 13 ('command' with option other than -p, -v or -V):
+command -ap test # BASHISM
+possible bashism in bashisms/command.sh line 14 ('command' with option other than -p, -v or -V):
+command -p -a test # BASHISM
+possible bashism in bashisms/command.sh line 15 ('command' with option other than -p, -v or -V):
+command -pV -a test # BASHISM
diff --git a/test/bashisms/comments-in-quoted-strings1.sh b/test/bashisms/comments-in-quoted-strings1.sh
new file mode 100644
index 0000000..36d4bd8
--- /dev/null
+++ b/test/bashisms/comments-in-quoted-strings1.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+echo 's#/##g
+s# #/#'
+
+echo '
+' # foo() {} "
diff --git a/test/bashisms/comments-in-quoted-strings2.sh b/test/bashisms/comments-in-quoted-strings2.sh
new file mode 100644
index 0000000..6c9ef0e
--- /dev/null
+++ b/test/bashisms/comments-in-quoted-strings2.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+echo "
+\" # " # foo() {} '
diff --git a/test/bashisms/comments-parsing-fns.sh b/test/bashisms/comments-parsing-fns.sh
new file mode 100644
index 0000000..933caee
--- /dev/null
+++ b/test/bashisms/comments-parsing-fns.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo $# ; echo -e BASHISM
diff --git a/test/bashisms/comments-parsing-fns.sh.out b/test/bashisms/comments-parsing-fns.sh.out
new file mode 100644
index 0000000..e0a8f6b
--- /dev/null
+++ b/test/bashisms/comments-parsing-fns.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/comments-parsing-fns.sh line 3 (echo -e):
+echo $# ; echo -e BASHISM
diff --git a/test/bashisms/coproc.sh b/test/bashisms/coproc.sh
new file mode 100644
index 0000000..6d6edcc
--- /dev/null
+++ b/test/bashisms/coproc.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+coproc true # BASHISM
diff --git a/test/bashisms/coproc.sh.out b/test/bashisms/coproc.sh.out
new file mode 100644
index 0000000..63b4caa
--- /dev/null
+++ b/test/bashisms/coproc.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/coproc.sh line 3 (coproc):
+coproc true # BASHISM
diff --git a/test/bashisms/dynamic-length.sh b/test/bashisms/dynamic-length.sh
new file mode 100644
index 0000000..fa76729
--- /dev/null
+++ b/test/bashisms/dynamic-length.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+len=1
+f=foo
+
+echo "${f:1}" # BASHISM
+echo "${f:$len}" # BASHISM
+echo "${f:$len$len}" # BASHISM
+echo "${f:${len}}" # BASHISM
diff --git a/test/bashisms/dynamic-length.sh.out b/test/bashisms/dynamic-length.sh.out
new file mode 100644
index 0000000..ffd0b13
--- /dev/null
+++ b/test/bashisms/dynamic-length.sh.out
@@ -0,0 +1,8 @@
+possible bashism in bashisms/dynamic-length.sh line 6 (${foo:3[:1]}):
+echo "${f:1}" # BASHISM
+possible bashism in bashisms/dynamic-length.sh line 7 (${foo:3[:1]}):
+echo "${f:$len}" # BASHISM
+possible bashism in bashisms/dynamic-length.sh line 8 (${foo:3[:1]}):
+echo "${f:$len$len}" # BASHISM
+possible bashism in bashisms/dynamic-length.sh line 9 (${foo:3[:1]}):
+echo "${f:${len}}" # BASHISM
diff --git a/test/bashisms/exit-code.sh b/test/bashisms/exit-code.sh
new file mode 100644
index 0000000..48b9fcd
--- /dev/null
+++ b/test/bashisms/exit-code.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# http://bugs.debian.org/687450
+exit -- 2 # BASHISM
+exit 255
+exit 256 # BASHISM
+exit -1 # BASHISM
diff --git a/test/bashisms/exit-code.sh.out b/test/bashisms/exit-code.sh.out
new file mode 100644
index 0000000..a1b0870
--- /dev/null
+++ b/test/bashisms/exit-code.sh.out
@@ -0,0 +1,6 @@
+possible bashism in bashisms/exit-code.sh line 4 ('exit --' should be 'exit' (idem for return)):
+exit -- 2 # BASHISM
+possible bashism in bashisms/exit-code.sh line 6 (exit|return status code greater than 255):
+exit 256 # BASHISM
+possible bashism in bashisms/exit-code.sh line 7 (exit|return with negative status code):
+exit -1 # BASHISM
diff --git a/test/bashisms/fail2ban.sh b/test/bashisms/fail2ban.sh
new file mode 100644
index 0000000..1ab61f8
--- /dev/null
+++ b/test/bashisms/fail2ban.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+eval $_INITSCRIPT force-reload ${HIDEOUTPUT:+\>/dev/null 2\>&1}
diff --git a/test/bashisms/fps.sh b/test/bashisms/fps.sh
new file mode 100644
index 0000000..b1a619e
--- /dev/null
+++ b/test/bashisms/fps.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+echo -e "BASHISM" \
+ "something else \n"
+
+#exec ${loclibdir}/tkcon.tcl \
+# -eval "source ${loclibdir}/console.tcl" \
+# -slave "package require Tk; set argc $#; set argv [list $*]; \
+# source ${loclibdir}/xcircuit.tcl"
diff --git a/test/bashisms/fps.sh.out b/test/bashisms/fps.sh.out
new file mode 100644
index 0000000..8f4b457
--- /dev/null
+++ b/test/bashisms/fps.sh.out
@@ -0,0 +1,3 @@
+possible bashism in bashisms/fps.sh line 4 (echo -e):
+echo -e "BASHISM" \
+ "something else \n"
diff --git a/test/bashisms/functions.sh b/test/bashisms/functions.sh
new file mode 100644
index 0000000..18adf3d
--- /dev/null
+++ b/test/bashisms/functions.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+foo() {
+ :
+}
+
+_all_good () {
+ :
+}
+
+_all_good101_ ( ) {
+ :
+}
+
+function BASHISM() {
+ :
+}
+
+function BASHISM {
+ :
+}
+
+function BASHISM {
+ echo foo
+} &>/dev/null # BASHISM
+
+,() { # BASHISM
+ :
+}
+
+function foo:bar:BASHISM { # BASHISMS
+ :
+}
+
+function foo-bar-BASHISM() { # BASHISMS
+ :
+}
+
+foo-bar-BASHISM ( ) {
+ :
+}
+
+_ () {
+ :
+}
+
+function _ { #BASHISM
+ :
+}
+
+=() { #BASHISM
+ :
+}
+
+function BASHISM=() { #BASHISMS
+ :
+}
+
+function BASHISM= { #BASHISMS
+ :
+}
+
+# This doesn't work:
+#foo=() {
+# :
+#}
diff --git a/test/bashisms/functions.sh.out b/test/bashisms/functions.sh.out
new file mode 100644
index 0000000..61a4c4d
--- /dev/null
+++ b/test/bashisms/functions.sh.out
@@ -0,0 +1,32 @@
+possible bashism in bashisms/functions.sh line 15 ('function' is useless):
+function BASHISM() {
+possible bashism in bashisms/functions.sh line 19 ('function' is useless):
+function BASHISM {
+possible bashism in bashisms/functions.sh line 23 ('function' is useless):
+function BASHISM {
+possible bashism in bashisms/functions.sh line 25 (should be >word 2>&1):
+} &>/dev/null # BASHISM
+possible bashism in bashisms/functions.sh line 27 (function names should only contain [a-z0-9_]):
+,() { # BASHISM
+possible bashism in bashisms/functions.sh line 31 (function names should only contain [a-z0-9_]):
+function foo:bar:BASHISM { # BASHISMS
+possible bashism in bashisms/functions.sh line 31 ('function' is useless):
+function foo:bar:BASHISM { # BASHISMS
+possible bashism in bashisms/functions.sh line 35 (function names should only contain [a-z0-9_]):
+function foo-bar-BASHISM() { # BASHISMS
+possible bashism in bashisms/functions.sh line 35 ('function' is useless):
+function foo-bar-BASHISM() { # BASHISMS
+possible bashism in bashisms/functions.sh line 39 (function names should only contain [a-z0-9_]):
+foo-bar-BASHISM ( ) {
+possible bashism in bashisms/functions.sh line 47 ('function' is useless):
+function _ { #BASHISM
+possible bashism in bashisms/functions.sh line 51 (function names should only contain [a-z0-9_]):
+=() { #BASHISM
+possible bashism in bashisms/functions.sh line 55 (function names should only contain [a-z0-9_]):
+function BASHISM=() { #BASHISMS
+possible bashism in bashisms/functions.sh line 55 ('function' is useless):
+function BASHISM=() { #BASHISMS
+possible bashism in bashisms/functions.sh line 59 (function names should only contain [a-z0-9_]):
+function BASHISM= { #BASHISMS
+possible bashism in bashisms/functions.sh line 59 ('function' is useless):
+function BASHISM= { #BASHISMS
diff --git a/test/bashisms/gettext.sh b/test/bashisms/gettext.sh
new file mode 100644
index 0000000..ebaec32
--- /dev/null
+++ b/test/bashisms/gettext.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo $"hello world -- BASHISM"
+
+echo "foo ' bar moo'$"
diff --git a/test/bashisms/gettext.sh.out b/test/bashisms/gettext.sh.out
new file mode 100644
index 0000000..a76578e
--- /dev/null
+++ b/test/bashisms/gettext.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/gettext.sh line 3 ($"foo" should be eval_gettext "foo"):
+echo $"hello world -- BASHISM"
diff --git a/test/bashisms/glob-ignore.sh b/test/bashisms/glob-ignore.sh
new file mode 100644
index 0000000..0c9cd9a
--- /dev/null
+++ b/test/bashisms/glob-ignore.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+GLOBIGNORE="run-tests.sh:BASHISM"
+echo *.sh | grep -q run-tests.sh || echo meh
diff --git a/test/bashisms/glob-ignore.sh.out b/test/bashisms/glob-ignore.sh.out
new file mode 100644
index 0000000..4688c7c
--- /dev/null
+++ b/test/bashisms/glob-ignore.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/glob-ignore.sh line 3 (GLOBIGNORE=):
+GLOBIGNORE="run-tests.sh:BASHISM"
diff --git a/test/bashisms/hash.sh b/test/bashisms/hash.sh
new file mode 100644
index 0000000..74fc7f4
--- /dev/null
+++ b/test/bashisms/hash.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+: BASHISM; hash
+hash which # BASHISM
+hash -r # BASHISM
diff --git a/test/bashisms/hash.sh.out b/test/bashisms/hash.sh.out
new file mode 100644
index 0000000..c9136bb
--- /dev/null
+++ b/test/bashisms/hash.sh.out
@@ -0,0 +1,6 @@
+possible bashism in bashisms/hash.sh line 3 (hash):
+: BASHISM; hash
+possible bashism in bashisms/hash.sh line 4 (hash):
+hash which # BASHISM
+possible bashism in bashisms/hash.sh line 5 (hash):
+hash -r # BASHISM
diff --git a/test/bashisms/heredoc-with-dash.sh b/test/bashisms/heredoc-with-dash.sh
new file mode 100644
index 0000000..9200886
--- /dev/null
+++ b/test/bashisms/heredoc-with-dash.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+cat << -EOF1- 1>&2
+CLEAN
+-EOF1-
+
+cat << -EOF2 1>&2
+CLEAN
+-EOF2
+
+cat <<-EOF3 1>&2
+CLEAN
+ EOF3
+
+cat <<- EOF4 1>&2
+CLEAN
+ EOF4
+
+foo=bar
+
+cat << '-EOF1-' 1>&2
+CLEAN $foo
+-EOF1-
+
+cat << '-EOF2' 1>&2
+CLEAN $foo
+-EOF2
+
+cat <<-'EOF3' 1>&2
+CLEAN $foo
+ EOF3
+
+cat <<- 'EOF4' 1>&2
+CLEAN $foo
+ EOF4
diff --git a/test/bashisms/heredoc-with-others.sh b/test/bashisms/heredoc-with-others.sh
new file mode 100644
index 0000000..9f0c04f
--- /dev/null
+++ b/test/bashisms/heredoc-with-others.sh
@@ -0,0 +1,77 @@
+#!/bin/sh
+
+cat << =EOF1
+function CLEAN() {}
+=EOF1
+
+cat << :EOF2
+function CLEAN() {}
+:EOF2
+
+cat << ,EOF3
+function CLEAN() {}
+,EOF3
+
+cat << ?EOF4
+function CLEAN() {}
+?EOF4
+
+cat << E$OF5
+function CLEAN() {}
+E$OF5
+
+cat << $EOF6
+function CLEAN() {}
+$EOF6
+
+cat << EOF_7
+function CLEAN() {}
+EOF_7
+
+cat << EOF;:
+function CLEAN() {}
+EOF
+
+cat << EOF{}9
+function CLEAN() {}
+EOF{}9
+
+cat << EOF\ 10
+function CLEAN() {}
+EOF 10
+
+cat << EOF\;11
+function CLEAN() {}
+EOF;11
+
+cat << EOF\12
+function CLEAN() {}
+EOF12
+
+cat << EOF\\13
+function CLEAN() {}
+EOF\13
+
+cat << EOF\\1\\4
+function CLEAN() {}
+EOF\1\4
+
+cat << \<EOF15\>
+function CLEAN() {}
+<EOF15>
+
+cat << "E\OF16"
+function CLEAN() {}
+E\OF16
+
+cat << 'E\OF17'
+function CLEAN() {}
+E\OF17
+
+cat << EOF18|:
+function CLEAN() {}
+EOF18
+
+cat << EOF19>/dev/null
+echo -e CLEAN() {}
+EOF19
diff --git a/test/bashisms/heredocs.sh b/test/bashisms/heredocs.sh
new file mode 100644
index 0000000..39dd076
--- /dev/null
+++ b/test/bashisms/heredocs.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+
+cat <<- FOO
+ foo
+ bar
+ moo
+FOO
+
+echo -e moo # BASHISM
+
+foo() {
+ cat <<- FOO
+ foo
+ bar
+ moo
+ FOO
+ echo -e BASHISM
+}
+
+bar() {
+ cat <<- FOO
+ foo
+ bar
+ moo
+ FOO
+ echo -e nothing wrong here
+FOO
+ echo -e BASHISM
+}
+
+
+moo() {
+ cat << FOO
+ foo
+ bar
+ moo
+ FOO
+ echo -e nothing wrong here
+ FOO
+ echo -e still nothing wrong here
+FOO
+ echo -e BASHISM
+}
+
+baz() {
+ cat << EOF1
+EOF1
+ echo -e still inside the here doc
+EOF1 ; echo -e still inside...
+EOF1
+ echo -e BASHISM
+}
diff --git a/test/bashisms/heredocs.sh.out b/test/bashisms/heredocs.sh.out
new file mode 100644
index 0000000..15e3910
--- /dev/null
+++ b/test/bashisms/heredocs.sh.out
@@ -0,0 +1,10 @@
+possible bashism in bashisms/heredocs.sh line 9 (echo -e):
+echo -e moo # BASHISM
+possible bashism in bashisms/heredocs.sh line 17 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/heredocs.sh line 28 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/heredocs.sh line 42 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/heredocs.sh line 51 (echo -e):
+ echo -e BASHISM
diff --git a/test/bashisms/jobs.sh b/test/bashisms/jobs.sh
new file mode 100644
index 0000000..9e2df54
--- /dev/null
+++ b/test/bashisms/jobs.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# POSIX+UP:
+jobs # BASHISM
+jobs -l # BASHISM
+jobs -p # BASHISM
+
+# Non-POSIX at all:
+
+sleep 10 &
+j=$(jobs -p) # possible BASHISM (context changes because of subshell)
+jobs -r # BASHISM
+jobs -s # BASHISM
+jobs -n # BASHISM
+jobs -x # BASHISM \ No newline at end of file
diff --git a/test/bashisms/jobs.sh.out b/test/bashisms/jobs.sh.out
new file mode 100644
index 0000000..de8f8b3
--- /dev/null
+++ b/test/bashisms/jobs.sh.out
@@ -0,0 +1,16 @@
+possible bashism in bashisms/jobs.sh line 4 (jobs):
+jobs # BASHISM
+possible bashism in bashisms/jobs.sh line 5 (jobs):
+jobs -l # BASHISM
+possible bashism in bashisms/jobs.sh line 6 (jobs):
+jobs -p # BASHISM
+possible bashism in bashisms/jobs.sh line 11 (jobs):
+j=$(jobs -p) # possible BASHISM (context changes because of subshell)
+possible bashism in bashisms/jobs.sh line 12 (jobs):
+jobs -r # BASHISM
+possible bashism in bashisms/jobs.sh line 13 (jobs):
+jobs -s # BASHISM
+possible bashism in bashisms/jobs.sh line 14 (jobs):
+jobs -n # BASHISM
+possible bashism in bashisms/jobs.sh line 15 (jobs):
+jobs -x # BASHISM
diff --git a/test/bashisms/line-continuation.sh b/test/bashisms/line-continuation.sh
new file mode 100644
index 0000000..e83b6d4
--- /dev/null
+++ b/test/bashisms/line-continuation.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+echo foo; \
+shopt something # BASHISM
+
+echo foo; echo \
+shopt something
+
+cat <<EOF \
+&>/dev/null #BASHISM
+bar
+moo
+EOF
+
+cat <<EOF
+foo\
+bar\
+moo
+EOF
diff --git a/test/bashisms/line-continuation.sh.out b/test/bashisms/line-continuation.sh.out
new file mode 100644
index 0000000..a243228
--- /dev/null
+++ b/test/bashisms/line-continuation.sh.out
@@ -0,0 +1,6 @@
+possible bashism in bashisms/line-continuation.sh line 4 (shopt):
+echo foo; \
+shopt something # BASHISM
+possible bashism in bashisms/line-continuation.sh line 10 (should be >word 2>&1):
+cat <<EOF \
+&>/dev/null #BASHISM
diff --git a/test/bashisms/negations.sh b/test/bashisms/negations.sh
new file mode 100644
index 0000000..8901357
--- /dev/null
+++ b/test/bashisms/negations.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "moo" in
+ [^f]oo) # BASHISM
+ echo hey
+ ;;
+ [!f]oo)
+ echo hey
+ ;;
+esac
+
diff --git a/test/bashisms/negations.sh.out b/test/bashisms/negations.sh.out
new file mode 100644
index 0000000..2a481c1
--- /dev/null
+++ b/test/bashisms/negations.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/negations.sh line 4 ([^] should be [!]):
+ [^f]oo) # BASHISM
diff --git a/test/bashisms/other-vars.sh b/test/bashisms/other-vars.sh
new file mode 100644
index 0000000..46dbedc
--- /dev/null
+++ b/test/bashisms/other-vars.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+test() {
+ echo $FUNCNAME BASHISM
+}
+
+test
+
+echo $DIRSTACK BASHISM
+echo $SECONDS BASHISM
+echo $TMOUT BASHISM
+echo $TIMEFORMAT BASHISM
+TMOUT=2 # BASHISM
+read REPLY
+TIMEFORMAT='' # BASHISM
diff --git a/test/bashisms/other-vars.sh.out b/test/bashisms/other-vars.sh.out
new file mode 100644
index 0000000..1f0e2b2
--- /dev/null
+++ b/test/bashisms/other-vars.sh.out
@@ -0,0 +1,14 @@
+possible bashism in bashisms/other-vars.sh line 4 ($FUNCNAME):
+ echo $FUNCNAME BASHISM
+possible bashism in bashisms/other-vars.sh line 9 ($DIRSTACK):
+echo $DIRSTACK BASHISM
+possible bashism in bashisms/other-vars.sh line 10 ($SECONDS):
+echo $SECONDS BASHISM
+possible bashism in bashisms/other-vars.sh line 11 ($TMOUT):
+echo $TMOUT BASHISM
+possible bashism in bashisms/other-vars.sh line 12 ($TIMEFORMAT):
+echo $TIMEFORMAT BASHISM
+possible bashism in bashisms/other-vars.sh line 13 (TMOUT=):
+TMOUT=2 # BASHISM
+possible bashism in bashisms/other-vars.sh line 15 (TIMEFORMAT=):
+TIMEFORMAT='' # BASHISM
diff --git a/test/bashisms/printf.sh b/test/bashisms/printf.sh
new file mode 100644
index 0000000..1ba20b8
--- /dev/null
+++ b/test/bashisms/printf.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+printf -v some_var "this is a BASHISM"
+
+printf "the use of %q is bad\n" "BASHISMS" >/dev/null
+
+printf "%q leading the string is bad\n" "BASHISMS" >/dev/null
diff --git a/test/bashisms/printf.sh.out b/test/bashisms/printf.sh.out
new file mode 100644
index 0000000..05472da
--- /dev/null
+++ b/test/bashisms/printf.sh.out
@@ -0,0 +1,6 @@
+possible bashism in bashisms/printf.sh line 3 ('printf -v var ...' should be var='$(printf ...)'):
+printf -v some_var "this is a BASHISM"
+possible bashism in bashisms/printf.sh line 5 (printf %q):
+printf "the use of %q is bad\n" "BASHISMS" >/dev/null
+possible bashism in bashisms/printf.sh line 7 (printf %q):
+printf "%q leading the string is bad\n" "BASHISMS" >/dev/null
diff --git a/test/bashisms/quoted-strings.sh b/test/bashisms/quoted-strings.sh
new file mode 100644
index 0000000..bf88104
--- /dev/null
+++ b/test/bashisms/quoted-strings.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+foo="
+echo -e nothing wrong here
+#crap"
+
+echo -e BASHISM
+
+foo="\
+#crap"
+
+echo -e BASHISM
+
+case foo in
+ *\'*)
+ echo -e BASHISM
+ ;;
+esac
+#'
+echo -e BASHISM
+
+case foo in
+ *\\"*")
+ echo -e BASHISM
+ ;;
+ *\\\"*)
+ echo -e BASHISM
+ ;;
+ *\"*)
+ echo -e BASHISM
+ ;;
+esac
+#"
+echo -e BASHISM
+
+foo='\'
+echo -e BASHISM
diff --git a/test/bashisms/quoted-strings.sh.out b/test/bashisms/quoted-strings.sh.out
new file mode 100644
index 0000000..a1fd9d7
--- /dev/null
+++ b/test/bashisms/quoted-strings.sh.out
@@ -0,0 +1,18 @@
+possible bashism in bashisms/quoted-strings.sh line 7 (echo -e):
+echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 12 (echo -e):
+echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 16 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 20 (echo -e):
+echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 24 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 27 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 30 (echo -e):
+ echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 34 (echo -e):
+echo -e BASHISM
+possible bashism in bashisms/quoted-strings.sh line 37 (echo -e):
+echo -e BASHISM
diff --git a/test/bashisms/return.sh b/test/bashisms/return.sh
new file mode 100644
index 0000000..c6735e0
--- /dev/null
+++ b/test/bashisms/return.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+foo() {
+ return -- 1 # BASHISM
+}
+
+bar () {
+ return 256 # BASHISM
+}
+
+moo () {
+ return -1 # BASHISM
+}
diff --git a/test/bashisms/return.sh.out b/test/bashisms/return.sh.out
new file mode 100644
index 0000000..ad1aae0
--- /dev/null
+++ b/test/bashisms/return.sh.out
@@ -0,0 +1,6 @@
+possible bashism in bashisms/return.sh line 4 ('exit --' should be 'exit' (idem for return)):
+ return -- 1 # BASHISM
+possible bashism in bashisms/return.sh line 8 (exit|return status code greater than 255):
+ return 256 # BASHISM
+possible bashism in bashisms/return.sh line 12 (exit|return with negative status code):
+ return -1 # BASHISM
diff --git a/test/bashisms/shell-vars.mk b/test/bashisms/shell-vars.mk
new file mode 100644
index 0000000..54b71cb
--- /dev/null
+++ b/test/bashisms/shell-vars.mk
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+
+foo:
+ read foo bar | echo $$foo and $$bar
+ echo my pid: $$$$
diff --git a/test/bashisms/source b/test/bashisms/source
new file mode 100644
index 0000000..412f8bd
--- /dev/null
+++ b/test/bashisms/source
@@ -0,0 +1,2 @@
+#!/bin/sh
+source foo.sh # BASHISM
diff --git a/test/bashisms/source.out b/test/bashisms/source.out
new file mode 100644
index 0000000..d17fa5f
--- /dev/null
+++ b/test/bashisms/source.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/source line 2 (should be '.', not 'source'):
+source foo.sh # BASHISM
diff --git a/test/bashisms/special-case.sh b/test/bashisms/special-case.sh
new file mode 100644
index 0000000..5dd43e0
--- /dev/null
+++ b/test/bashisms/special-case.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+case "foo" in
+ foo)
+ echo once
+ ;& # BASHISM
+ moo)
+ echo twice
+ ;;& # BASHISM
+ foo)
+ echo foo again
+ ;;
+esac
diff --git a/test/bashisms/special-case.sh.out b/test/bashisms/special-case.sh.out
new file mode 100644
index 0000000..2b0a5e3
--- /dev/null
+++ b/test/bashisms/special-case.sh.out
@@ -0,0 +1,4 @@
+possible bashism in bashisms/special-case.sh line 6 (;;& and ;& special case operators):
+ ;& # BASHISM
+possible bashism in bashisms/special-case.sh line 9 (;;& and ;& special case operators):
+ ;;& # BASHISM
diff --git a/test/bashisms/special-expansions.sh b/test/bashisms/special-expansions.sh
new file mode 100644
index 0000000..93a4f7f
--- /dev/null
+++ b/test/bashisms/special-expansions.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -- foo bar moo
+
+echo BASHISM: ${#@}
+echo BASHISM: ${#*}
+
+echo BASHISM: ${@%f*}
+echo BASHISM: ${*%f*}
+echo BASHISM: ${@%%f*}
+echo BASHISM: ${*%%f*}
+
+echo BASHISM: ${@#*o}
+echo BASHISM: ${*#*o}
+echo BASHISM: ${@##*o}
+echo BASHISM: ${*##*o}
+
+echo BASHISM: ${@/?/u}
+echo BASHISM: ${*/?/u}
+echo BASHISM: ${@/?/}
+echo BASHISM: ${*/?/}
+
+echo BASHISM: ${@:2}
+echo BASHISM: ${*:2}
+echo BASHISM: ${@:1:1}
+echo BASHISM: ${*:1:1}
diff --git a/test/bashisms/special-expansions.sh.out b/test/bashisms/special-expansions.sh.out
new file mode 100644
index 0000000..66e60fd
--- /dev/null
+++ b/test/bashisms/special-expansions.sh.out
@@ -0,0 +1,36 @@
+possible bashism in bashisms/special-expansions.sh line 5 (${#@} or ${#*}):
+echo BASHISM: ${#@}
+possible bashism in bashisms/special-expansions.sh line 6 (${#@} or ${#*}):
+echo BASHISM: ${#*}
+possible bashism in bashisms/special-expansions.sh line 8 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${@%f*}
+possible bashism in bashisms/special-expansions.sh line 9 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${*%f*}
+possible bashism in bashisms/special-expansions.sh line 10 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${@%%f*}
+possible bashism in bashisms/special-expansions.sh line 11 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${*%%f*}
+possible bashism in bashisms/special-expansions.sh line 13 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${@#*o}
+possible bashism in bashisms/special-expansions.sh line 14 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${*#*o}
+possible bashism in bashisms/special-expansions.sh line 15 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${@##*o}
+possible bashism in bashisms/special-expansions.sh line 16 (${[@|*]#[#]pat} or ${[@|*]%[%]pat}):
+echo BASHISM: ${*##*o}
+possible bashism in bashisms/special-expansions.sh line 18 (${parm/?/pat[/str]}):
+echo BASHISM: ${@/?/u}
+possible bashism in bashisms/special-expansions.sh line 19 (${parm/?/pat[/str]}):
+echo BASHISM: ${*/?/u}
+possible bashism in bashisms/special-expansions.sh line 20 (${parm/?/pat[/str]}):
+echo BASHISM: ${@/?/}
+possible bashism in bashisms/special-expansions.sh line 21 (${parm/?/pat[/str]}):
+echo BASHISM: ${*/?/}
+possible bashism in bashisms/special-expansions.sh line 23 (${foo:3[:1]}):
+echo BASHISM: ${@:2}
+possible bashism in bashisms/special-expansions.sh line 24 (${foo:3[:1]}):
+echo BASHISM: ${*:2}
+possible bashism in bashisms/special-expansions.sh line 25 (${foo:3[:1]}):
+echo BASHISM: ${@:1:1}
+possible bashism in bashisms/special-expansions.sh line 26 (${foo:3[:1]}):
+echo BASHISM: ${*:1:1}
diff --git a/test/bashisms/subshell-no-arith.sh b/test/bashisms/subshell-no-arith.sh
new file mode 100644
index 0000000..f3a5a29
--- /dev/null
+++ b/test/bashisms/subshell-no-arith.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo $((echo foo); echo bar)
diff --git a/test/bashisms/tilde-expansion.sh b/test/bashisms/tilde-expansion.sh
new file mode 100644
index 0000000..e58069a
--- /dev/null
+++ b/test/bashisms/tilde-expansion.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+echo tilde alone: ~/
+echo tilde with name: ~root/
+
+cd ; cd - >/dev/null
+
+echo BASHISM: tilde plus: ~+
+echo BASHISM: tilde minus: ~-
+
+pushd ~ >/dev/null 2>&1 # BASHISM
+for i in $(seq 1 9); do
+ pushd / >/dev/null 2>&1 # BASHISM
+done
+
+echo BASHISM: tilde plus n: ~+1
+echo BASHISM: tilde implicit plus n: ~1
+echo BASHISM: tilde minus n: ~-1
+
+echo BASHISM: tilde plus 10: ~+10
+echo BASHISM: tilde implicit plus 10: ~10
+echo BASHISM: tilde minus 10: ~-10
+
+echo BASHISM=~-/bin
+echo BASHISM=/:~+/bin/
+BASHISM=~-/bin ; echo $BASHISM
+BASHISM=/:~+/bin/ ; echo $BASHISM
+
+echo nothing wrong here: ~+foo/
+echo nothing wrong here: ~-moo/
+echo nothing wrong here: ~+1foo/
+echo nothing wrong here: ~1foo/
+echo nothing wrong here: ~-1moo/
+
+# Again, but without the slash
+echo nothing wrong here: ~+foo
+echo nothing wrong here: ~-moo
+echo nothing wrong here: ~+1foo
+echo nothing wrong here: ~1foo
+echo nothing wrong here: ~-1moo
+
diff --git a/test/bashisms/tilde-expansion.sh.out b/test/bashisms/tilde-expansion.sh.out
new file mode 100644
index 0000000..6ae792e
--- /dev/null
+++ b/test/bashisms/tilde-expansion.sh.out
@@ -0,0 +1,28 @@
+possible bashism in bashisms/tilde-expansion.sh line 8 (non-standard tilde expansion):
+echo BASHISM: tilde plus: ~+
+possible bashism in bashisms/tilde-expansion.sh line 9 (non-standard tilde expansion):
+echo BASHISM: tilde minus: ~-
+possible bashism in bashisms/tilde-expansion.sh line 11 ((push|pop)d):
+pushd ~ >/dev/null 2>&1 # BASHISM
+possible bashism in bashisms/tilde-expansion.sh line 13 ((push|pop)d):
+ pushd / >/dev/null 2>&1 # BASHISM
+possible bashism in bashisms/tilde-expansion.sh line 16 (non-standard tilde expansion):
+echo BASHISM: tilde plus n: ~+1
+possible bashism in bashisms/tilde-expansion.sh line 17 (non-standard tilde expansion):
+echo BASHISM: tilde implicit plus n: ~1
+possible bashism in bashisms/tilde-expansion.sh line 18 (non-standard tilde expansion):
+echo BASHISM: tilde minus n: ~-1
+possible bashism in bashisms/tilde-expansion.sh line 20 (non-standard tilde expansion):
+echo BASHISM: tilde plus 10: ~+10
+possible bashism in bashisms/tilde-expansion.sh line 21 (non-standard tilde expansion):
+echo BASHISM: tilde implicit plus 10: ~10
+possible bashism in bashisms/tilde-expansion.sh line 22 (non-standard tilde expansion):
+echo BASHISM: tilde minus 10: ~-10
+possible bashism in bashisms/tilde-expansion.sh line 24 (non-standard tilde expansion):
+echo BASHISM=~-/bin
+possible bashism in bashisms/tilde-expansion.sh line 25 (non-standard tilde expansion):
+echo BASHISM=/:~+/bin/
+possible bashism in bashisms/tilde-expansion.sh line 26 (non-standard tilde expansion):
+BASHISM=~-/bin ; echo $BASHISM
+possible bashism in bashisms/tilde-expansion.sh line 27 (non-standard tilde expansion):
+BASHISM=/:~+/bin/ ; echo $BASHISM
diff --git a/test/bashisms/traps.sh b/test/bashisms/traps.sh
new file mode 100644
index 0000000..b357ce7
--- /dev/null
+++ b/test/bashisms/traps.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+trap foo ERR # BASHISM
+trap foo RETURN # BASHISM
+trap foo DEBUG # BASHISM
+
+trap "echo BASHISM" ERR
+trap "echo BASHISM" RETURN
+trap "echo BASHISM" DEBUG
+
+foo() {
+ echo ": dummy function"
+}
+
+trap $(foo BASHISM) ERR
+trap "$(foo BASHISM)" RETURN
+trap "echo $foo BASHISM" DEBUG
diff --git a/test/bashisms/traps.sh.out b/test/bashisms/traps.sh.out
new file mode 100644
index 0000000..300ad70
--- /dev/null
+++ b/test/bashisms/traps.sh.out
@@ -0,0 +1,18 @@
+possible bashism in bashisms/traps.sh line 3 (trap with ERR|DEBUG|RETURN):
+trap foo ERR # BASHISM
+possible bashism in bashisms/traps.sh line 4 (trap with ERR|DEBUG|RETURN):
+trap foo RETURN # BASHISM
+possible bashism in bashisms/traps.sh line 5 (trap with ERR|DEBUG|RETURN):
+trap foo DEBUG # BASHISM
+possible bashism in bashisms/traps.sh line 7 (trap with ERR|DEBUG|RETURN):
+trap "echo BASHISM" ERR
+possible bashism in bashisms/traps.sh line 8 (trap with ERR|DEBUG|RETURN):
+trap "echo BASHISM" RETURN
+possible bashism in bashisms/traps.sh line 9 (trap with ERR|DEBUG|RETURN):
+trap "echo BASHISM" DEBUG
+possible bashism in bashisms/traps.sh line 15 (trap with ERR|DEBUG|RETURN):
+trap $(foo BASHISM) ERR
+possible bashism in bashisms/traps.sh line 16 (trap with ERR|DEBUG|RETURN):
+trap "$(foo BASHISM)" RETURN
+possible bashism in bashisms/traps.sh line 17 (trap with ERR|DEBUG|RETURN):
+trap "echo $foo BASHISM" DEBUG
diff --git a/test/bashisms/underscore-var.sh b/test/bashisms/underscore-var.sh
new file mode 100644
index 0000000..a4f2ea4
--- /dev/null
+++ b/test/bashisms/underscore-var.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo BASHISM $_
diff --git a/test/bashisms/underscore-var.sh.out b/test/bashisms/underscore-var.sh.out
new file mode 100644
index 0000000..dbfe699
--- /dev/null
+++ b/test/bashisms/underscore-var.sh.out
@@ -0,0 +1,2 @@
+possible bashism in bashisms/underscore-var.sh line 3 ($_):
+echo BASHISM $_
diff --git a/test/bashisms/unknown-fns.sh b/test/bashisms/unknown-fns.sh
new file mode 100644
index 0000000..64d1b46
--- /dev/null
+++ b/test/bashisms/unknown-fns.sh
@@ -0,0 +1,297 @@
+#!/bin/sh
+
+################################################################################
+# #
+# Copyright (c) 2009 FUJITSU LIMITED #
+# #
+# This program is free software; you can redistribute it and#or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation; either version 2 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, but #
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License #
+# for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program; if not, write to the Free Software #
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
+# #
+# Author: Miao Xie <miaox@cn.fujitsu.com> #
+# #
+################################################################################
+
+cd $LTPROOT/testcases/bin
+
+. ./cpuset_funcs.sh
+
+export TCID="cpuset01"
+export TST_TOTAL=97
+export TST_COUNT=1
+
+nr_cpus=$NR_CPUS
+nr_mems=$N_NODES
+
+cpus_all="$(seq -s, 0 $((nr_cpus-1)))"
+mems_all="$(seq -s, 0 $((nr_mems-1)))"
+
+exit_status=0
+
+cfile_name=
+
+# base_op_write_and_test <write_file_name> <write_string> <expect_string>
+base_op_write_and_test()
+{
+ local write_file="$1"
+ local write_string="$2"
+ local expect_string="$3"
+ local write_result=
+ local ret=0
+
+ mkdir -p "$(dirname $write_file)" || {
+ tst_brkm TFAIL "Failed to mkdir -p $(basename $write_file)"
+ return 1
+ }
+ [ "$write_string" = NULL ] && write_string=" "
+
+ /bin/echo "$write_string" > "$write_file" 2> $CPUSET_TMP/stderr
+ ret=$?
+ write_result="$(cat "$write_file")"
+
+ case "$expect_string" in
+ EMPTY)
+ test -z "$write_result" -a $ret = 0
+ ret=$?
+ ;;
+ WRITE_ERROR)
+ ret=$((!$ret))
+ ;;
+ *)
+ test "$expect_string" = "$write_result" -a $ret = 0
+ ret=$?
+ ;;
+ esac
+
+ if [ $ret -eq 0 ]; then
+ tst_resm TPASS "$cfile_name: Get the expected string"
+ else
+ tst_resm TFAIL "$cfile_name: Test result - $write_result Expected string - \"$expect_string\""
+ fi
+ return $ret
+}
+
+base_op_test()
+{
+ setup
+ if [ $? -ne 0 ]; then
+ exit_status=1
+ else
+ base_op_write_and_test "$@"
+ if [ $? -ne 0 ]; then
+ exit_status=1
+ fi
+
+ cleanup
+ if [ $? -ne 0 ]; then
+ exit_status=1
+ fi
+ fi
+ : $((TST_COUNT++)) #BASHISM
+}
+
+test_cpus()
+{
+ cfile_name="cpus"
+ while read cpus result
+ do
+ base_op_test "$CPUSET/1/cpus" "$cpus" "$result"
+ done <<- EOF
+ NULL EMPTY
+ 0 0
+ $nr_cpus WRITE_ERROR
+ $cpus_all 0-$((nr_cpus-1))
+ ${cpus_all}$nr_cpus WRITE_ERROR
+ 0,0 0
+ 0-0 0
+ 0-$((nr_cpus-1)) 0-$((nr_cpus-1))
+ -1 WRITE_ERROR
+ 0-$nr_cpus WRITE_ERROR
+ 0- WRITE_ERROR
+ 0--$((nr_cpus-1)) WRITE_ERROR
+ 0,1-$((nr_cpus-2)),$((nr_cpus-1)) 0-$((nr_cpus-1))
+ 0,1-$((nr_cpus-2)), 0-$((nr_cpus-2))
+ 0AAA WRITE_ERROR
+ AAA WRITE_ERROR
+ EOF
+ # while read cpus result
+}
+
+test_mems()
+{
+ cfile_name="mems"
+ while read mems result
+ do
+ base_op_test "$CPUSET/1/mems" "$mems" "$result"
+ done <<- EOF
+ NULL EMPTY
+ 0 0
+ $nr_mems WRITE_ERROR
+ $mems_all 0-$((nr_mems-1))
+ ${mems_all}$nr_mems WRITE_ERROR
+ 0,0 0
+ 0-0 0
+ 0-$((nr_mems-1)) 0-$((nr_mems-1))
+ -1 WRITE_ERROR
+ 0-$nr_mems WRITE_ERROR
+ 0- WRITE_ERROR
+ 0--$((nr_mems-1)) WRITE_ERROR
+ 0,1-$((nr_mems-2)),$((nr_mems-1)) 0-$((nr_mems-1))
+ 0,1-$((nr_mems-2)), 0-$((nr_mems-2))
+ 0AAA WRITE_ERROR
+ AAA WRITE_ERROR
+ EOF
+ # while read mems result
+}
+
+test_flags()
+{
+ for filename in cpu_exclusive mem_exclusive mem_hardwall \
+ memory_migrate memory_spread_page memory_spread_slab \
+ sched_load_balance memory_pressure_enabled
+ do
+ cfile_name="$filename"
+ while read flags result
+ do
+ base_op_test "$CPUSET/$filename" "$flags" "$result"
+ done <<- EOF
+ NULL 0
+ 0 0
+ 1 1
+ -1 WRITE_ERROR
+ A WRITE_ERROR
+ 2 1
+ EOF
+ # while read flags, result
+ done # for filename in flagfiles
+}
+
+test_domain()
+{
+ cfile_name="sched_relax_domain_level"
+ while read domain_level result
+ do
+ base_op_test "$CPUSET/sched_relax_domain_level" "$domain_level" "$result"
+ done <<- EOF
+ NULL 0
+ 0 0
+ 1 1
+ 2 2
+ 3 3
+ 4 4
+ 5 5
+ 6 WRITE_ERROR
+ -1 -1
+ -2 WRITE_ERROR
+ A WRITE_ERROR
+ EOF
+ # while read domain_level result
+}
+
+# attach_task_test <cpus> <mems> <expect>
+attach_task_test()
+{
+ local cpus=$1
+ local mems=$2
+ local expect=$3
+
+ local pid=
+ local ret=
+
+ setup
+ if [ $? -ne 0 ]; then
+ exit_status=1
+ cleanup
+ ((TST_COUNT++)) #BASHISM
+ return
+ fi
+
+ # create sub cpuset
+ mkdir "$CPUSET/sub_cpuset" > /dev/null
+ if [ $? -ne 0 ]; then
+ exit_status=1
+ cleanup
+ ((TST_COUNT++)) # BASHISM
+ return
+ fi
+
+ if [ "$cpus" != "NULL" ]; then
+ echo $cpus > "$CPUSET/sub_cpuset/cpus"
+ fi
+ if [ "$mems" != "NULL" ]; then
+ echo $mems > "$CPUSET/sub_cpuset/mems"
+ fi
+
+ cat /dev/zero > /dev/null &
+ pid=$!
+
+ # attach task into the cpuset group
+ echo $pid > "$CPUSET/sub_cpuset/tasks" 2> /dev/null
+ if [ $? -eq $expect ]; then
+ tst_resm TPASS "Attaching Task Test successed!!"
+ else
+ tst_resm TFAIL "Attaching Task Test failed!! cpus - \"$cpus\", mems - \"$mems\", Expect - \"$expect\", Fact - \"$ret\". (0 - Attach Success, 1 - Attach Fail)"
+ exit_status=1
+ fi
+
+ /bin/kill $pid &> /dev/null # BASHISM
+ cleanup
+ if [ $? -ne 0 ]; then
+ exit_status=1
+ fi
+ ((TST_COUNT++)) # BASHISM
+}
+
+
+test_attach_task()
+{
+ cfile_name="tasks"
+ while read cpus mems expect
+ do
+ attach_task_test "$cpus" "$mems" "$expect"
+ done <<- EOF
+ 0 NULL 1
+ 0 0 0
+ NULL 0 1
+ EOF
+ # while read cpus mems expect
+}
+
+test_readonly_cfiles()
+{
+ for filename in cpus mems memory_pressure
+ do
+ cfile_name="$filename(READONLY)"
+ base_op_test "$CPUSET/$filename" "0" "WRITE_ERROR"
+ done # for filename in readonly cfiles
+}
+
+# Case 1-3
+test_readonly_cfiles
+
+# Case 4-19
+test_cpus
+
+# Case 20-35
+test_mems
+
+# Case 36-83
+test_flags
+
+# Case 84-94
+test_domain
+
+# Case 95-97
+test_attach_task
+
+exit $exit_status
diff --git a/test/bashisms/unknown-fns.sh.out b/test/bashisms/unknown-fns.sh.out
new file mode 100644
index 0000000..82f0896
--- /dev/null
+++ b/test/bashisms/unknown-fns.sh.out
@@ -0,0 +1,10 @@
+possible bashism in bashisms/unknown-fns.sh line 100 ('$((n++))' should be '$n; $((n=n+1))'):
+ : $((TST_COUNT++)) #BASHISM
+possible bashism in bashisms/unknown-fns.sh line 215 ('((' should be '$(('):
+ ((TST_COUNT++)) #BASHISM
+possible bashism in bashisms/unknown-fns.sh line 224 ('((' should be '$(('):
+ ((TST_COUNT++)) # BASHISM
+possible bashism in bashisms/unknown-fns.sh line 247 (should be >word 2>&1):
+ /bin/kill $pid &> /dev/null # BASHISM
+possible bashism in bashisms/unknown-fns.sh line 252 ('((' should be '$(('):
+ ((TST_COUNT++)) # BASHISM
diff --git a/test/bashisms/unterminated-string.sh b/test/bashisms/unterminated-string.sh
new file mode 100644
index 0000000..bde111e
--- /dev/null
+++ b/test/bashisms/unterminated-string.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+CLEAN="'("'"c"'")'"
+echo "foo
+bar"
diff --git a/test/bashisms/unterminated-string2.sh b/test/bashisms/unterminated-string2.sh
new file mode 100644
index 0000000..35d41d2
--- /dev/null
+++ b/test/bashisms/unterminated-string2.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+CLEAN="("'"c"'")"
+echo "foo
+bar"
diff --git a/test/dd-list/sources b/test/dd-list/sources
new file mode 100644
index 0000000..e314539
--- /dev/null
+++ b/test/dd-list/sources
@@ -0,0 +1,185 @@
+Package: vim
+Binary: vim-common, vim-gui-common, vim-runtime, vim-doc, vim-tiny, vim, vim-dbg, vim-gtk, vim-nox, vim-athena, vim-lesstif, vim-gnome
+Version: 2:7.3.429-2
+Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+Uploaders: James McCoy <jamessan@debian.org>
+Build-Depends: libacl1-dev, libgpmg1-dev [linux-any], debhelper (>= 7.2.3~), libtinfo-dev | libncurses5-dev, libselinux1-dev [linux-any], dpkg-dev (>= 1.15.1), libgtk2.0-dev, libxaw7-dev, libxt-dev, libxpm-dev, libgnomeui-dev [!m68k], libperl-dev, tcl-dev, python-dev, ruby1.8, ruby1.8-dev, lua5.1, liblua5.1-dev
+Build-Depends-Indep: docbook-xml, docbook-utils
+Architecture: any all
+Standards-Version: 3.9.2.0
+Format: 3.0 (quilt)
+Files:
+ c02fea331371614ac4ca4360e6fff789 1998 vim_7.3.429-2.dsc
+ 5e1b68e1d716e3e8a07775e7987b08c2 11009709 vim_7.3.429.orig.tar.gz
+ 6f58c13344d6cfbd3f62a2beb6c4147a 190039 vim_7.3.429-2.debian.tar.gz
+Vcs-Browser: http://hg.debian.org/hg/pkg-vim/vim
+Vcs-Hg: http://hg.debian.org/hg/pkg-vim/vim
+Checksums-Sha1:
+ a0dbb9cae1d926e6133c1293e8897570fa640eea 1998 vim_7.3.429-2.dsc
+ 984a42ad7f7e17c2e7543d1587e1f95500862587 11009709 vim_7.3.429.orig.tar.gz
+ bfe717bd260687098b230dcfa988d006662298a7 190039 vim_7.3.429-2.debian.tar.gz
+Checksums-Sha256:
+ dd4999aebb61e5c552b0495a155c25bc880da0bfd00a57db861890870dc1a693 1998 vim_7.3.429-2.dsc
+ 998bf2823a494d092b7c674d8499e2f94022fcac2ee7512a44a4d8b9409db077 11009709 vim_7.3.429.orig.tar.gz
+ ac3f78bfc56b8420de2d415c2288829abc5779305efd4a95079d4b5d2c960ae8 190039 vim_7.3.429-2.debian.tar.gz
+Homepage: http://www.vim.org/
+Directory: pool/main/v/vim
+Priority: source
+Section: editors
+
+Package: bzip2
+Binary: libbz2-1.0, libbz2-dev, bzip2, bzip2-doc
+Version: 1.0.6-7
+Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
+Uploaders: Santiago Ruano Rincón <santiago@debian.org>, Jorge Ernesto Guevara Cuenca <jguevara@debiancolombia.org>
+Build-Depends: gcc-multilib [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc] | gcc-4.1 (<< 4.1.2) [amd64 i386 kfreebsd-amd64 powerpc ppc64 s390 sparc], dpkg-dev (>= 1.16.0), debhelper (>= 9), dh-exec
+Build-Depends-Indep: texinfo
+Architecture: any all
+Standards-Version: 3.9.5
+Format: 3.0 (quilt)
+Files:
+ d4850752a3386592ae416b3fd6fc2c3a 2261 bzip2_1.0.6-7.dsc
+ 2a1df12bd405cc86790291797673753c 708737 bzip2_1.0.6.orig.tar.bz2
+ 3bc252d3eb0a16a4f5950fac8deb7bb1 59542 bzip2_1.0.6-7.debian.tar.bz2
+Vcs-Browser: http://git.debian.org/?p=collab-maint/bzip2.git
+Vcs-Git: git://git.debian.org/collab-maint/bzip2.git
+Checksums-Sha1:
+ f970fefd8f7cb4a02ec74d3ecc21c31068201b5c 2261 bzip2_1.0.6-7.dsc
+ 3725a0554fa6bb654ef2728fef36bc06aed4e388 708737 bzip2_1.0.6.orig.tar.bz2
+ e5169afbee8f9ee603c253e03421364819a14c12 59542 bzip2_1.0.6-7.debian.tar.bz2
+Checksums-Sha256:
+ 098b7e38d1d634fc361847602bf85753dadeca121b9531f6dba2614b16e0637c 2261 bzip2_1.0.6-7.dsc
+ d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7 708737 bzip2_1.0.6.orig.tar.bz2
+ 17e030ccb2908d15553c1510869e09d8ef41b5f8e72c7c65d1d5503396a5bd3a 59542 bzip2_1.0.6-7.debian.tar.bz2
+Homepage: http://www.bzip.org/
+Package-List:
+ bzip2 deb utils standard arch=any
+ bzip2-doc deb doc optional arch=all
+ libbz2-1.0 deb libs important arch=any
+ libbz2-dev deb libdevel optional arch=any
+Extra-Source-Only: yes
+Directory: pool/main/b/bzip2
+Priority: source
+Section: utils
+
+Package: bzip2
+Binary: libbz2-1.0, libbz2-dev, bzip2, bzip2-doc
+Version: 1.0.6-8
+Maintainer: Anibal Monsalve Salazar <anibal@debian.org>
+Uploaders: Santiago Ruano Rincón <santiago@debian.org>
+Build-Depends: dpkg-dev (>= 1.16.0), debhelper (>= 9), dh-exec
+Build-Depends-Indep: texinfo
+Architecture: any all
+Standards-Version: 3.9.6
+Format: 3.0 (quilt)
+Files:
+ 7709d3c0a7715bf4f61cc74adc10ee5a 2042 bzip2_1.0.6-8.dsc
+ 2a1df12bd405cc86790291797673753c 708737 bzip2_1.0.6.orig.tar.bz2
+ 72b1174a04f96b62c1f50391c8f41488 59494 bzip2_1.0.6-8.debian.tar.bz2
+Vcs-Browser: http://git.debian.org/?p=collab-maint/bzip2.git
+Vcs-Git: git://git.debian.org/collab-maint/bzip2.git
+Checksums-Sha1:
+ 8bb35859d49d012e1464db621e740e1702a5ad14 2042 bzip2_1.0.6-8.dsc
+ 3725a0554fa6bb654ef2728fef36bc06aed4e388 708737 bzip2_1.0.6.orig.tar.bz2
+ 78c527bdc6eb5727b79d401ebf3ddf2b175af91f 59494 bzip2_1.0.6-8.debian.tar.bz2
+Checksums-Sha256:
+ 46df0e8112487065532829f2340ffd6ca64d46b6ab01b0000694751d3e67fb11 2042 bzip2_1.0.6-8.dsc
+ d70a9ccd8bdf47e302d96c69fecd54925f45d9c7b966bb4ef5f56b770960afa7 708737 bzip2_1.0.6.orig.tar.bz2
+ 60fe87fd3942c385e5921786255a27daf9a962ebc7301a60dfd8d1e1a5c8ce78 59494 bzip2_1.0.6-8.debian.tar.bz2
+Homepage: http://www.bzip.org/
+Package-List:
+ bzip2 deb utils standard arch=any
+ bzip2-doc deb doc optional arch=all
+ libbz2-1.0 deb libs important arch=any
+ libbz2-dev deb libdevel optional arch=any
+Directory: pool/main/b/bzip2
+Priority: source
+Section: utils
+
+Package: subversion
+Binary: subversion, subversion-dbg, libsvn1, libsvn-dev, libsvn-doc, libapache2-mod-svn, libapache2-svn, python-subversion, subversion-tools, libsvn-java, libsvn-perl, ruby-svn, libsvn-ruby1.8
+Version: 1.8.13-1
+Maintainer: Peter Samuelson <peter@p12n.org>
+Uploaders: Troy Heber <troyh@debian.org>, James McCoy <jamessan@debian.org>
+Build-Depends: debhelper (>= 8), libserf-dev (>= 1.2), zlib1g-dev, libapr1-dev, libaprutil1-dev, libdb5.3-dev, libsasl2-dev, apache2-dev, dh-apache2, libsqlite3-dev (>= 3.7.12), libgnome-keyring-dev, libdbus-1-dev, kdelibs5-dev, quilt, doxygen, autotools-dev, autoconf, libtool-bin, swig, python-all-dev, perl, libperl-dev, ruby, ruby-dev, default-jdk, junit
+Build-Conflicts: libsvn-dev (<< 1.8~), ruby-test-unit
+Architecture: any all
+Standards-Version: 3.9.5
+Format: 1.0
+Files:
+ 4b08c636bc2c67f22cce2f27f04e4bba 3105 subversion_1.8.13-1.dsc
+ 8065b3698d799507fb72dd7926ed32b6 9326793 subversion_1.8.13.orig.tar.gz
+ 4e2ea3b225f551ec470796203bd14803 270351 subversion_1.8.13-1.diff.gz
+Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-subversion/src/1.8.x/
+Vcs-Svn: svn://anonscm.debian.org/pkg-subversion/src/1.8.x/
+Checksums-Sha1:
+ 80a8c73f36c57d476989d949f31cf1504631e5fb 3105 subversion_1.8.13-1.dsc
+ 437cf662b7ed27d2254aa7ca334fdd74b49262ef 9326793 subversion_1.8.13.orig.tar.gz
+ be7fdefbc914b305c38698897f2d061b93942b79 270351 subversion_1.8.13-1.diff.gz
+Checksums-Sha256:
+ 26fb93f8adf42cf1bc3afae7890a4bbfff32d860dcb805eb20d8013bffe3e063 3105 subversion_1.8.13-1.dsc
+ 17e8900a877ac9f0d5ef437c20df437fec4eb2c5cb9882609d2277e2312da52c 9326793 subversion_1.8.13.orig.tar.gz
+ 7cf687a60566f4f41ea70f6e028253880ea0d2b52d6dead5ba99c9e298a8245d 270351 subversion_1.8.13-1.diff.gz
+Homepage: http://subversion.apache.org/
+Package-List:
+ libapache2-mod-svn deb httpd optional arch=any
+ libapache2-svn deb oldlibs extra arch=all
+ libsvn-dev deb libdevel extra arch=any
+ libsvn-doc deb doc extra arch=all
+ libsvn-java deb java optional arch=any
+ libsvn-perl deb perl optional arch=any
+ libsvn-ruby1.8 deb oldlibs extra arch=all
+ libsvn1 deb libs optional arch=any
+ python-subversion deb python optional arch=any
+ ruby-svn deb ruby optional arch=any
+ subversion deb vcs optional arch=any
+ subversion-dbg deb debug extra arch=any
+ subversion-tools deb vcs extra arch=any
+Testsuite: autopkgtest
+Directory: pool/main/s/subversion
+Priority: source
+Section: vcs
+
+Package: subversion
+Binary: subversion, subversion-dbg, libsvn1, libsvn-dev, libsvn-doc, libapache2-mod-svn, libapache2-svn, python-subversion, subversion-tools, libsvn-java, libsvn-perl, ruby-svn, libsvn-ruby1.8
+Version: 1.9.2-1
+Maintainer: Peter Samuelson <peter@p12n.org>
+Uploaders: James McCoy <jamessan@debian.org>
+Build-Depends: apache2-dev (>= 2.4.16), autoconf, autotools-dev, bash-completion, debhelper (>= 8), default-jdk (>= 2:1.6) [!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386 !hppa !m68k !sparc !sparc64], dh-apache2, dh-python, doxygen, junit [!hurd-i386 !kfreebsd-amd64 !kfreebsd-i386 !hppa !m68k !sparc !sparc64], kdelibs5-dev, libapr1-dev, libaprutil1-dev, libdb5.3-dev, libdbus-1-dev, libgnome-keyring-dev, libperl-dev, libsasl2-dev, libserf-dev (>= 1.3.4), libsqlite3-dev (>= 3.7.12), libtool, perl, python-all-dev (>= 2.7), quilt, ruby, ruby-dev, swig, zlib1g-dev
+Build-Conflicts: libsvn-dev (<< 1.9~)
+Architecture: any all
+Standards-Version: 3.9.5
+Format: 1.0
+Files:
+ ead24ca2537b45470a38ff0c568f371b 3259 subversion_1.9.2-1.dsc
+ c3f4a2d2f21c565617e97f7640c3c81d 10625378 subversion_1.9.2.orig.tar.gz
+ 939a431c1f383a8b93a38c05982c32d8 2418695 subversion_1.9.2-1.diff.gz
+Vcs-Browser: http://anonscm.debian.org/viewvc/pkg-subversion/src/1.9.x/
+Vcs-Svn: svn://anonscm.debian.org/pkg-subversion/src/1.9.x/
+Checksums-Sha1:
+ 48a7fc952190b738f307e85fb87737f173d49dd4 3259 subversion_1.9.2-1.dsc
+ 4c57828c07d21b4777a058f0d3dc973652d18ce9 10625378 subversion_1.9.2.orig.tar.gz
+ aa869fff7dc7116fd4dafc344cd21ca52bbe00c5 2418695 subversion_1.9.2-1.diff.gz
+Checksums-Sha256:
+ 0020561afd37b3cf20661c7e5da23fde210a1cc70ddfd679604216bb0cb368e4 3259 subversion_1.9.2-1.dsc
+ 6fe6ef49114e9ca2942063e339ce886078612c4e6cc58f268a2ff4db4cf0cf19 10625378 subversion_1.9.2.orig.tar.gz
+ 8deef11131ab873821696e83a1bc2fd175773f52fb8619257073896fdb200187 2418695 subversion_1.9.2-1.diff.gz
+Homepage: http://subversion.apache.org/
+Package-List:
+ libapache2-mod-svn deb httpd optional arch=any
+ libapache2-svn deb oldlibs extra arch=all
+ libsvn-dev deb libdevel extra arch=any
+ libsvn-doc deb doc extra arch=all
+ libsvn-java deb java optional arch=any
+ libsvn-perl deb perl optional arch=any
+ libsvn-ruby1.8 deb oldlibs extra arch=all
+ libsvn1 deb libs optional arch=any
+ python-subversion deb python optional arch=any
+ ruby-svn deb ruby optional arch=any
+ subversion deb vcs optional arch=any
+ subversion-dbg deb debug extra arch=any
+ subversion-tools deb vcs extra arch=any
+Testsuite: autopkgtest
+Directory: pool/main/s/subversion
+Priority: source
+Section: vcs
diff --git a/test/debdiff/devscripts_2.13.0_any.deb b/test/debdiff/devscripts_2.13.0_any.deb
new file mode 100644
index 0000000..3ba462c
--- /dev/null
+++ b/test/debdiff/devscripts_2.13.0_any.deb
Binary files differ
diff --git a/test/debdiff/devscripts_2.13.1_any.deb b/test/debdiff/devscripts_2.13.1_any.deb
new file mode 100644
index 0000000..5a58db1
--- /dev/null
+++ b/test/debdiff/devscripts_2.13.1_any.deb
Binary files differ
diff --git a/test/debrepro/reproducible/debian/changelog b/test/debrepro/reproducible/debian/changelog
new file mode 100644
index 0000000..10e5d6b
--- /dev/null
+++ b/test/debrepro/reproducible/debian/changelog
@@ -0,0 +1,5 @@
+reproducible (0.1.0~FIXME-1) UNRELEASED; urgency=medium
+
+ * Initial release (Closes: #nnnn)
+
+ -- Antonio Terceiro <terceiro@debian.org> Thu, 19 Apr 2018 17:33:39 -0300
diff --git a/test/debrepro/reproducible/debian/compat b/test/debrepro/reproducible/debian/compat
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/test/debrepro/reproducible/debian/compat
@@ -0,0 +1 @@
+11
diff --git a/test/debrepro/reproducible/debian/control b/test/debrepro/reproducible/debian/control
new file mode 100644
index 0000000..af1b782
--- /dev/null
+++ b/test/debrepro/reproducible/debian/control
@@ -0,0 +1,15 @@
+Source: reproducible
+Section: FIXME
+Priority: optional
+Maintainer: Antonio Terceiro <terceiro@debian.org>
+Build-Depends: debhelper (>= 11~),
+Standards-Version: 4.1.3
+Rules-Requires-Root: no
+Homepage: FIXME
+
+Package: reproducible
+Architecture: all
+Depends: ${misc:Depends},
+ ${shlibs:Depends}
+Description: FIXME
+ <insert long description, indented with spaces>
diff --git a/test/debrepro/reproducible/debian/rules b/test/debrepro/reproducible/debian/rules
new file mode 100755
index 0000000..2d33f6a
--- /dev/null
+++ b/test/debrepro/reproducible/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
diff --git a/test/debrepro/reproducible/debian/source/format b/test/debrepro/reproducible/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/test/debrepro/reproducible/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/test/debrepro/unreproducible/debian/changelog b/test/debrepro/unreproducible/debian/changelog
new file mode 100644
index 0000000..30bc083
--- /dev/null
+++ b/test/debrepro/unreproducible/debian/changelog
@@ -0,0 +1,5 @@
+unreproducible (0.1.0~FIXME-1) UNRELEASED; urgency=medium
+
+ * Initial release (Closes: #nnnn)
+
+ -- Antonio Terceiro <terceiro@debian.org> Thu, 19 Apr 2018 17:33:39 -0300
diff --git a/test/debrepro/unreproducible/debian/compat b/test/debrepro/unreproducible/debian/compat
new file mode 100644
index 0000000..b4de394
--- /dev/null
+++ b/test/debrepro/unreproducible/debian/compat
@@ -0,0 +1 @@
+11
diff --git a/test/debrepro/unreproducible/debian/control b/test/debrepro/unreproducible/debian/control
new file mode 100644
index 0000000..2fa0c08
--- /dev/null
+++ b/test/debrepro/unreproducible/debian/control
@@ -0,0 +1,15 @@
+Source: unreproducible
+Section: FIXME
+Priority: optional
+Maintainer: Antonio Terceiro <terceiro@debian.org>
+Build-Depends: debhelper (>= 11~),
+Standards-Version: 4.1.3
+Rules-Requires-Root: no
+Homepage: FIXME
+
+Package: reproducible
+Architecture: all
+Depends: ${misc:Depends},
+ ${shlibs:Depends}
+Description: FIXME
+ <insert long description, indented with spaces>
diff --git a/test/debrepro/unreproducible/debian/rules b/test/debrepro/unreproducible/debian/rules
new file mode 100755
index 0000000..d9b84e0
--- /dev/null
+++ b/test/debrepro/unreproducible/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_auto_install:
+ dh_auto_install
+ date > foo
+ dh_install foo /usr/share/
diff --git a/test/debrepro/unreproducible/debian/source/format b/test/debrepro/unreproducible/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/test/debrepro/unreproducible/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/test/debsign/private_key.asc b/test/debsign/private_key.asc
new file mode 100644
index 0000000..01ca198
--- /dev/null
+++ b/test/debsign/private_key.asc
@@ -0,0 +1,106 @@
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1
+
+lQcYBFXnCocBEACkNFn2IKAMyk3zR8QMVmZuZOESBivnbVUHfXiVCVKBTzLGrIUQ
+WlMjw02CXJyekjHyB3Eqik4X7TEv5EqKME2oXj0WrMZLQQvu+8Mmx67kaYUoYIoH
+U0I/a0yyEkshfki5tsr9qPkgC6R5OSAuGVaL9SC1q+p3uMbHQGnLsBzY8I8S7Ac2
+gsPPQTtX1EK2ZQ1xPUD6NgmTQHlsyJLFhe5XUYxEJm/vn+dh+YAfloElQjdh/V03
+G/d5jte33TxbyNwjCzhlX4Fa+yh2RqsR5s4tHRsfIDte0MIE2vva8ctxeHMSSjRV
+mSufkwSe/3ScY2fHcGI9UzgR1bcdJon0yLfbdZrnBruFVKj8xEEmkrL/kXCRu/2c
+5d1vHwRtHSF7+sY+XubuOGDxkZYr8Kghv50YG8E8fPAhrPhult6fylKDDvFrc5Ai
+RBmfJTXWjcGNgMkFjkXtWzqdgg91Rgr1MRqL9Jxn/30K+EWFPAHjggLrtGjTjtML
+4K0hc0OcqMEzK5ERCuQaYaBcQnDseoBeKCMQMYSZQZij97r+GCPGOLsuPSYKHk2x
+KnUm12WYkkbi4R6Ab+La3PjWqhAtcS9AVzoF7h2n6pSM3V2ldrHcke9qKLdhDrsp
+BXTwZ9RsEBILoEpnjJ/zO75sdH2LLh3XlFfTzUU6yeUiPO2aKXHSbv2/MwARAQAB
+AA/9Gsu1koX9wu3l4o683gvgvfXAX3dFBYhrQ8RPP82RpSsOF4BiW9TMPx3JMZN4
+tiJtUW2yze+xPBOnidqF6h8PzStJFMDaaxVmTngkfy4+yroIJ2/5llBukyLTaou0
+WaGIr1BhDRvclkTQG5LIPuhA81NBJI8KvWwYeWjNhZZrtAstjeJDxbrOcVfXyJwJ
+dvJD9fgPo8UwXX3mqBXjEvtUIEkHzBHpr6o3JrSBxVCDgAJaP1IKkB+u4YCp5ds4
+f6c7eoyDhidxAy5739vltrokvb/uLm94Fh+YSb/ihvbGQvIWSnnJfd53ppwQjlG+
+7yEETSDN0ewZTkUYk1fiqLYd1R4Eenp1h6Yf5mbLJ3+7aqV3ni5Daz8+oVfhv4Pb
+mrYDCYHsY3xoKXxw7OgwHhLS9enojpYmJ22gbNzkweNC0xa6aHcKgiUWu/o84mNe
+5Jle12LFkf+rk7byA7eLgg6ROFk064zpnR+2qj1FiYxtuvzNch4MKUnVw1hdeFoU
+4BLp+9sO/MhPsMmGCfP/eAde1//EwC7qqJIp7AlZxw18fLm9k7zDTpvGhFWWvwXV
+ueHN9Kqmi7CcXajFINnKSOoSZMNEHzoCOmZyp+LvG0ljjZuVShlj5zfV4S1X10TP
+hNYIWHqtpGALC+Eq+s2PrCH+13AJHOgiL9UKnHjHc0imZCEIAMWaQJOxiNdtq1EF
+5wgTe1xdijpSTnnIXHS+jEQvl0DshAzd49C+JR3O6lUtY0yeilXv7IYLiLUWqmv3
+1X8tygUlRiEDA9+cxmPLhoWRIK1Cn1Mh+V1QV6+c9AYkvp6PPueiqOArnhBrYqJ3
+yPsuZbxiVA1IcJ+tZsZI4dXdA3j1icnIM6kwVUveRT0bQUDkgHR7doPLRWykSoH9
+NTSdGNXoVlnJaEpsBydNoAO/XoffysHP3b9+/SvdSo0G7B7V5lwP4bryX1AvglIK
+w0bZs5KrtB/qkcp7egWQ2wLW4850/A+GH4o+e/FnLeAmGbyW5ptifmk7xZF9F+LC
+yF9epnUIANS7WSRNLuzSVUeIZg8iH9+cwZjNUyVXy6/pdp+tJfS52uJIfP826I5W
+uCZCMrahyaByy+0TszVrfS+unWs77vivuk362aeWIXglnSrZ9vw7SElyrAXjbOxC
+DmCyHpXpo61S/4RuxYFXnWo2ixR92lOdU/wDZLF2ZbpE2p+CP2fPfEg42mK7Mg2M
+eVwAIRyy+ZsXPmu1osrch4cTHq2KMdnkjod737OEejMhuP9mK9suBa3u9o+C5DCL
+MQxMAqpxv14CWjHE3G+qE28rVp/Zo5WwYwO8X4r2T3b0BEkaXr4Eb6lBCu6RwCdj
+MACjqmXWVwYltJeURCUDgrzOuwi4KgcH/2Sa2LHjBG8ub9nBBYw3+AEzrP0sjrDJ
+acZZmCn9IaJCbmHPXtOZMCndGxp0NqavE6TpWi616/y9mXqHMYsYFSJeBzKDJBVy
+5uDP/Z9xCPZlzvlEr3SQq0MiLoyDvGWSdSB/qcCNPzOdIgRoXn/o4XvtVfzv2qw6
+HF+25hPrDhjWYNyNFB0cagCoD7Iwv/zBk7JLYJoKd2xNCEbGQ4u/fXfSLXublzFc
+Fgud8lLdq3KirT/NElvyLnbm3UEjeNfcMGGSaJiR7p7mgLXNr+SzAD/zX/NNgbS4
+Jx+zceIK0p/ndPvjdvju24x4Hi1UH+4qOcTUNUAdutDkWBqmKp3ipgOD77QsdXNj
+YW4gdGVzdCBrZXkgKG5vIHNlY3JldCkgPG5vbmVAZGViaWFuLm9yZz6JAjgEEwEC
+ACIFAlXnCocCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEMd+LWhyVD+v
+zLkP/ikDCjvi8/Fh2ePj22+t9H4P+ShMPkOzcbC++zhqNrxiwwmyr0s7vd1nAKJN
+IoGxS+WhDOxUGyfhd5Pr2fkJjyuDZ/Mwi5xwKNc2XRQmlRT6pKvtV3XZTvRbYKGs
+p/nmkjE9ip+R6k0KFy8XbS8iFb4OM8hUcNvQPZBMkg2XurDIILfNABqbCIuK1HJR
+ST53FLdwswuXGUVBUkwG2PjGLxzM7V/GIF7ON2GXtC6sty5Kk+q804YFCLjPsUR7
+9Goq8/scAhgBvnytfPeoOGrHOCVIPfBD7CJODbTBhyENQGyrBXuiHGRBIxHkrfG/
+DDsSH4GCimdDMVtpyGRWsWe94oMe0VOJJq5uganTDPqioll/PbyrTrKZwbtRgtZr
+eUG6mEOv+tQ26xL7++V3G0C5HIF6MUrisvMsJutEtWGQ93iAUR2RDasSn3LfFmqT
+uvPPM8Ogz3rUNp1dd5YpKzyZEBqNM5FlEO15gCK1LjM3F9KQhhQrMTeS85Ytn7F+
+/FXhEXg77JDbKaByRvQ4nfesWV72ZAO2ukfBWZ01yWma8vaw+XJlwYFoWtk2JV2e
+ZpZR5q1e7NUc1rdHo4/6cTc072bpOAatZ1STvfPnolvBPuUyhE8XC6qBBBK3ETbV
+XoXHNJ6KFHrBMGT7oS9aMVzHyWhZA5fGFgqbocI8Gx7lkJr/nQcYBFXnCocBEADI
+hu6xdCWopsyv9wrmpAareEC50o+cztqQh1oJn/ldJ+ECVb9YRcD2x/H1L3DQwGEl
+zKZ6D6up5bzOjyZpaMJn6aT/ONFPfQL6myA3Q/yZST3eirhQ4xfDAMJJKAxtqVW3
+1KYbxl877I0mR9WOxKenWeS4JI+zwWuuDZnDIAxU9vgYs1WHoekg1R1ydLk7r7DA
+qIGNfwY/V8HtZx4M7Frvtk6MNfBsGB54q7mxTCkUAD3LWxI7nDsx47GhwiRf5d5r
+P/lWOZEbgwQaM3n5JqUSNuGU/3arTRbzGhOjgvIq95tR4CQsL0cv9ajJ8o9o5kts
+zuR7URyHBB3SloCOVqAHdmH9Y28jzM2NRgcVgsCVgWB3AqTGbmiZ0gIkIWzeDrBZ
+tqb04GWo8sp6IhjsVtcPB/MwENsi5WoJ6rEDyS0sSH5HDsIbeElKbS3ZAB7vunVZ
+kYxCsD4N90Jey0qCamWtrhCdxoswKPf4sV5X5IEdVPSlV0T/JKzp39pqOdMA+BIx
+W8lKaDyOWBGB7m54wfiiJpeItB7ligM47ylk/L5YYDd4w8PiYYt+VPG7id/jkTVi
+p1V5U33KIIgL/Vc7LfEXoZ6HLUNQFq6VxPP7iNeiBuJMd2izElLuWDXkIlnoOEE+
+on8crCJlRtH3gWfcZSR6qaCgwHwk8w9ockpMsnJeRQARAQABAA/5Ab4WbelV+HC2
+n6LUb+ul+TB604KOZ+zuPkpG0IWY26Pgky4ekwxMIHjdU+WdI9tAHN155t6i/b92
+1A6vZUQZSGDh46vhOcEa2QWnEoPfOo/F31yyPFW026dyiMM11HAfxBCvftdK9ZDZ
+Kyd9phd0Y4Jm9+itbQD1yBXrK6RoJwbcYg6Q5DRWe8gOUPPNtkSREyODuLCNY9iF
+4WO/gZo+Mg4SAaroU3AkN6U6YF2Kj9dusgkxD96MLyNM5Fx1B3ZOZ/0u0/59EdGi
+I/4lhbI9xfo/HJXZuKRbWjJ0UDvvkcsECQKbHd0tT6/hTxvx/hXeOuxTVPT/+/Zf
+sfhH1rTPAC2pGPM0ZybxopGh3kAElcsQvS33NPHrSOIwZEmwARt65+YdFQrZgeYO
+s4kidFNawM+xjOXXQjSMsx2BznfepbSKUyK+HU8Bq/cpgAAALQcgwDUqp0Gm4qng
+DeuRc1fnQUXBadL69cwcLFUDUkxuPZxm06zpDLjeKi92dBWAU2WUb/pvde35aWPj
+HOvsN2B/FysTurgdIMRnLKGFKmxPFH3p5K4S5YoabKm9H8syq2u3yXZFc1z2UV76
+7BHMYX5moC82wq5WcaOnDzzhx54k+/qDFrwrLMjB+V8I/M8YwjYd+SYvvvXrJgbY
+YZif5YhsIc/0LnrsyFylrsWIN1MpTNMIANt5fBsGc/xYY/A5n+4BDFajPn74foLP
+UV4E5zNgGm10YtEJ07o3pBvw1Nqoj3jwdHFlXwjVVo90Uzuw6SvekANKQEEtdpGm
+c959mNk0mHzJjZ1FvC2/tttX7QvXKuF8jLWgkfC0Kby6Aa0DxAzwQQ1abo60UJi2
+OxPM1FI0IsjtRoKu4ryUvCgbMNY9bKhJokYz5BZqqs2lPu9B2EGXrqbC/rq6dgbh
+Y8Xwbu2wypi6G7JHSa8kpwcEacdherJYh17J2xkRHLf857icDNYJPB0GMfg+3evk
+qm3KAu6amB4q+QHf18Z0k6yWmagecdSxTY6LAjog+2Q8YO8N6eqpp08IAOnmNS26
+kDEzE6NfYWdrySfNhJ2SP8W8bx+UvFUVLCZJDgnO9K12R5A7JiO07pijxqorjlOy
+KtIRu/wgtH6wHzhg5i7J443dgz8jtCCLB8O6B8bvzZ75XbwSGAOcSapbAJm7FGyG
+b82TZjBWZE3++TWmUPk8kARCoJR5rGamVKyiTnkooB0638NnAb0aNkJhKLUOjRY+
+SOG0Czf19bRoKEQuwmwe8vwOrQcfLXLYSZGsax4AMM4SacO/2LpddYL1k0FIPs1X
+S9NBIAbw/j2pQfQrG4E6CVMKo6ihcTwIchiny7yKE2BZHAAWwd0cZM1JCnRQ/DOG
+3H9Lwt1enQxHfCsIANYc3aLnUeNls3ZpfmZBlW8fMkRvWz1Tf8vWc2rcHDBx4OeI
+Rn/trD8dN6eON3feKcYx3th+MIGTXzi8rPzOUVPai2iX4yuf2zGh3I3ItyxtgEXn
+gms0KqeQwwQ/jeEUkhuFkq9sT4UwTqBwgMYsWSLMg76/es/zLBpI4LxBaK+BV9ek
+KgD8RQl2IHI8F2XmJQSQex/nbdYVGHXDv1qJ+sMcdHvQ5VAZ1lPSqroM30YFSmzc
+zQq0qaK6mGKCm0RDE24DNa+T5KhdSCeDyIpewiB6ORScNO+WdNxqlfQTBTf5kzEQ
+eGI/TufRQ35CCvvHsFjZilJQa+qSdzzg5vQ+rlF26YkCHwQYAQIACQUCVecKhwIb
+DAAKCRDHfi1oclQ/r536EACBepjhwPL3qYfZNkJlSz34VYDngbzf4KLsYQIypEyU
+6GcBMX5kjKKFrh30+e6atQ40LxRW5QgzEQsuDSBrp/x/qRv6i87oqHC5dG7pEYuv
+E/Fpb3fSQPpbTY5SpKvqWTVYOpXy++QrtpWqOGsGbKUep1/QZzBQnh4HHNHSbKdv
+o73RSCg82A2YxuKiN226pqhI2MaC2+4MZgF6VkF2gmSr/Q84RdlyCcNN2l9uwQ0b
+hiYkB04m/uB1agIiz6OO4VXklUVrbXrvEJmr8At+he4bDL4+W3khKKhR8JzIcR15
+fj7ja+gBRx/hIanusYbjmA20JWdKNEL5IHJwIBsvfuA0kq+eqXDcgL/MndOFkpoG
+LslyJAhdhGMS57UZKq70SkyhMhFNtPv+JQ7qXwrXK7GzfFmymaQVvZ3Csf3YkTsb
+zGcO44Lin/0b4kRA4kVA6m2sVdW2unKVeQqXRAT9k4CRQe57YmwynTboD3/gClRJ
+8QWLCPTqUI9wqKrfb/RXDgzQ5UBKBY97FD+xL2jSSzJpq4ycVvrYVU9aJmFawlLV
+gfdfTLGy50iWTYVjjrYUfryPhW/BSc8/DlbiihPHUpZOPBeJ418upVVhLuyQPfev
+9N/hp5UpLqojA4Ti2ygzdnZQTFnYV5hS/m/OsYs5I3ZVBo1+NnEk2JVdV3hgeLAl
+2g==
+=nZ3G
+-----END PGP PRIVATE KEY BLOCK-----
diff --git a/test/debsign/public_key.asc b/test/debsign/public_key.asc
new file mode 100644
index 0000000..214a603
--- /dev/null
+++ b/test/debsign/public_key.asc
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQINBFXnCocBEACkNFn2IKAMyk3zR8QMVmZuZOESBivnbVUHfXiVCVKBTzLGrIUQ
+WlMjw02CXJyekjHyB3Eqik4X7TEv5EqKME2oXj0WrMZLQQvu+8Mmx67kaYUoYIoH
+U0I/a0yyEkshfki5tsr9qPkgC6R5OSAuGVaL9SC1q+p3uMbHQGnLsBzY8I8S7Ac2
+gsPPQTtX1EK2ZQ1xPUD6NgmTQHlsyJLFhe5XUYxEJm/vn+dh+YAfloElQjdh/V03
+G/d5jte33TxbyNwjCzhlX4Fa+yh2RqsR5s4tHRsfIDte0MIE2vva8ctxeHMSSjRV
+mSufkwSe/3ScY2fHcGI9UzgR1bcdJon0yLfbdZrnBruFVKj8xEEmkrL/kXCRu/2c
+5d1vHwRtHSF7+sY+XubuOGDxkZYr8Kghv50YG8E8fPAhrPhult6fylKDDvFrc5Ai
+RBmfJTXWjcGNgMkFjkXtWzqdgg91Rgr1MRqL9Jxn/30K+EWFPAHjggLrtGjTjtML
+4K0hc0OcqMEzK5ERCuQaYaBcQnDseoBeKCMQMYSZQZij97r+GCPGOLsuPSYKHk2x
+KnUm12WYkkbi4R6Ab+La3PjWqhAtcS9AVzoF7h2n6pSM3V2ldrHcke9qKLdhDrsp
+BXTwZ9RsEBILoEpnjJ/zO75sdH2LLh3XlFfTzUU6yeUiPO2aKXHSbv2/MwARAQAB
+tCx1c2NhbiB0ZXN0IGtleSAobm8gc2VjcmV0KSA8bm9uZUBkZWJpYW4ub3JnPokC
+OAQTAQIAIgUCVecKhwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQx34t
+aHJUP6/MuQ/+KQMKO+Lz8WHZ4+Pbb630fg/5KEw+Q7NxsL77OGo2vGLDCbKvSzu9
+3WcAok0igbFL5aEM7FQbJ+F3k+vZ+QmPK4Nn8zCLnHAo1zZdFCaVFPqkq+1XddlO
+9Ftgoayn+eaSMT2Kn5HqTQoXLxdtLyIVvg4zyFRw29A9kEySDZe6sMggt80AGpsI
+i4rUclFJPncUt3CzC5cZRUFSTAbY+MYvHMztX8YgXs43YZe0Lqy3LkqT6rzThgUI
+uM+xRHv0airz+xwCGAG+fK1896g4asc4JUg98EPsIk4NtMGHIQ1AbKsFe6IcZEEj
+EeSt8b8MOxIfgYKKZ0MxW2nIZFaxZ73igx7RU4kmrm6BqdMM+qKiWX89vKtOspnB
+u1GC1mt5QbqYQ6/61DbrEvv75XcbQLkcgXoxSuKy8ywm60S1YZD3eIBRHZENqxKf
+ct8WapO6888zw6DPetQ2nV13likrPJkQGo0zkWUQ7XmAIrUuMzcX0pCGFCsxN5Lz
+li2fsX78VeEReDvskNspoHJG9Did96xZXvZkA7a6R8FZnTXJaZry9rD5cmXBgWha
+2TYlXZ5mllHmrV7s1RzWt0ejj/pxNzTvZuk4Bq1nVJO98+eiW8E+5TKETxcLqoEE
+ErcRNtVehcc0nooUesEwZPuhL1oxXMfJaFkDl8YWCpuhwjwbHuWQmv+5Ag0EVecK
+hwEQAMiG7rF0JaimzK/3CuakBqt4QLnSj5zO2pCHWgmf+V0n4QJVv1hFwPbH8fUv
+cNDAYSXMpnoPq6nlvM6PJmlowmfppP840U99AvqbIDdD/JlJPd6KuFDjF8MAwkko
+DG2pVbfUphvGXzvsjSZH1Y7Ep6dZ5Lgkj7PBa64NmcMgDFT2+BizVYeh6SDVHXJ0
+uTuvsMCogY1/Bj9Xwe1nHgzsWu+2Tow18GwYHnirubFMKRQAPctbEjucOzHjsaHC
+JF/l3ms/+VY5kRuDBBozefkmpRI24ZT/dqtNFvMaE6OC8ir3m1HgJCwvRy/1qMny
+j2jmS2zO5HtRHIcEHdKWgI5WoAd2Yf1jbyPMzY1GBxWCwJWBYHcCpMZuaJnSAiQh
+bN4OsFm2pvTgZajyynoiGOxW1w8H8zAQ2yLlagnqsQPJLSxIfkcOwht4SUptLdkA
+Hu+6dVmRjEKwPg33Ql7LSoJqZa2uEJ3GizAo9/ixXlfkgR1U9KVXRP8krOnf2mo5
+0wD4EjFbyUpoPI5YEYHubnjB+KIml4i0HuWKAzjvKWT8vlhgN3jDw+Jhi35U8buJ
+3+ORNWKnVXlTfcogiAv9Vzst8RehnoctQ1AWrpXE8/uI16IG4kx3aLMSUu5YNeQi
+Weg4QT6ifxysImVG0feBZ9xlJHqpoKDAfCTzD2hySkyycl5FABEBAAGJAh8EGAEC
+AAkFAlXnCocCGwwACgkQx34taHJUP6+d+hAAgXqY4cDy96mH2TZCZUs9+FWA54G8
+3+Ci7GECMqRMlOhnATF+ZIyiha4d9PnumrUONC8UVuUIMxELLg0ga6f8f6kb+ovO
+6KhwuXRu6RGLrxPxaW930kD6W02OUqSr6lk1WDqV8vvkK7aVqjhrBmylHqdf0Gcw
+UJ4eBxzR0mynb6O90UgoPNgNmMbiojdtuqaoSNjGgtvuDGYBelZBdoJkq/0POEXZ
+cgnDTdpfbsENG4YmJAdOJv7gdWoCIs+jjuFV5JVFa2167xCZq/ALfoXuGwy+Plt5
+ISioUfCcyHEdeX4+42voAUcf4SGp7rGG45gNtCVnSjRC+SBycCAbL37gNJKvnqlw
+3IC/zJ3ThZKaBi7JciQIXYRjEue1GSqu9EpMoTIRTbT7/iUO6l8K1yuxs3xZspmk
+Fb2dwrH92JE7G8xnDuOC4p/9G+JEQOJFQOptrFXVtrpylXkKl0QE/ZOAkUHue2Js
+Mp026A9/4ApUSfEFiwj06lCPcKiq32/0Vw4M0OVASgWPexQ/sS9o0ksyaauMnFb6
+2FVPWiZhWsJS1YH3X0yxsudIlk2FY462FH68j4VvwUnPPw5W4ooTx1KWTjwXieNf
+LqVVYS7skD33r/Tf4aeVKS6qIwOE4tsoM3Z2UExZ2FeYUv5vzrGLOSN2VQaNfjZx
+JNiVXVd4YHiwJdo=
+=GzOB
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/test/debsign/sphinx_1.7.2-1.dsc b/test/debsign/sphinx_1.7.2-1.dsc
new file mode 100644
index 0000000..9498c58
--- /dev/null
+++ b/test/debsign/sphinx_1.7.2-1.dsc
@@ -0,0 +1,30 @@
+Format: 3.0 (quilt)
+Source: sphinx
+Binary: python-sphinx, python3-sphinx, sphinx-common, sphinx-doc, libjs-sphinxdoc
+Architecture: all
+Version: 1.7.2-1
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders: Dmitry Shachnev <mitya57@debian.org>, Chris Lamb <lamby@debian.org>
+Homepage: http://sphinx-doc.org/
+Standards-Version: 4.1.4
+Vcs-Browser: https://salsa.debian.org/python-team/modules/sphinx
+Vcs-Git: https://salsa.debian.org/python-team/modules/sphinx.git
+Testsuite: autopkgtest
+Testsuite-Triggers: dvipng, gir1.2-webkit2-4.0, graphviz, imagemagick-6.q16, librsvg2-bin, python-enum34, python-html5lib, python-mock, python-pygments, python-pytest, python-sphinxcontrib.websupport, python-sqlalchemy, python-whoosh, python-xapian, python3-gi, python3-html5lib, python3-mock, python3-pygments, python3-pytest, python3-sphinxcontrib.websupport, python3-sqlalchemy, python3-whoosh, python3-xapian, texinfo, texlive-fonts-recommended, texlive-latex-extra, texlive-luatex, texlive-xetex, xauth, xvfb
+Build-Depends: debhelper (>= 11)
+Build-Depends-Indep: dh-python, dh-strip-nondeterminism, dpkg-dev (>= 1.17.14), python-all (>= 2.6.6-4~), python3-all (>= 3.3.3-1~), python3-lib2to3, python-six (>= 1.5), python3-six (>= 1.5), python-setuptools (>= 0.6c5-1~), python3-setuptools, python-docutils (>= 0.11), python3-docutils (>= 0.11), python-pygments (>= 2.1.1), python3-pygments (>= 2.1.1), python-jinja2 (>= 2.3), python3-jinja2 (>= 2.3), python-pytest, python3-pytest, python-mock, python3-mock, python-babel (>= 1.3), python3-babel (>= 1.3), python-alabaster (>= 0.7), python3-alabaster (>= 0.7), python-imagesize, python3-imagesize, python-requests (>= 2.4.0), python3-requests (>= 2.4.0), python-html5lib, python3-html5lib, python-enum34, python-typing, python-packaging, python3-packaging, python3-sphinxcontrib.websupport <!nodoc>, libjs-jquery (>= 1.4), libjs-underscore, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-recommended, texinfo, texlive-luatex, texlive-xetex, dvipng, graphviz, imagemagick-6.q16, librsvg2-bin, perl
+Package-List:
+ libjs-sphinxdoc deb javascript optional arch=all
+ python-sphinx deb python optional arch=all
+ python3-sphinx deb python optional arch=all
+ sphinx-common deb python optional arch=all
+ sphinx-doc deb doc optional arch=all profile=!nodoc
+Checksums-Sha1:
+ 1d1fa6954ae216cd44ea52dfc67063f26939c8f5 4719536 sphinx_1.7.2.orig.tar.gz
+ facfa686a3a0bc98c269e16e66427f96e00889ad 34268 sphinx_1.7.2-1.debian.tar.xz
+Checksums-Sha256:
+ 5a1c9a0fec678c24b9a2f5afba240c04668edb7f45c67ce2ed008996b3f21ae2 4719536 sphinx_1.7.2.orig.tar.gz
+ a6a825914b19cfdbc22df858b0cecc497765dad2058deae20a88a6a2f9d57d24 34268 sphinx_1.7.2-1.debian.tar.xz
+Files:
+ 21a08e994e6a289ed14eecefde2b4f2f 4719536 sphinx_1.7.2.orig.tar.gz
+ e147e2afa47e7e58d1288ad8818c3de0 34268 sphinx_1.7.2-1.debian.tar.xz
diff --git a/test/debsign/sphinx_1.7.2-1_amd64.buildinfo b/test/debsign/sphinx_1.7.2-1_amd64.buildinfo
new file mode 100644
index 0000000..478187d
--- /dev/null
+++ b/test/debsign/sphinx_1.7.2-1_amd64.buildinfo
@@ -0,0 +1,472 @@
+Format: 1.0
+Source: sphinx
+Binary: python-sphinx python3-sphinx sphinx-common sphinx-doc libjs-sphinxdoc
+Architecture: all source
+Version: 1.7.2-1
+Checksums-Md5:
+ e6d086f0f2453055bab4ba6677f6af3f 2871 sphinx_1.7.2-1.dsc
+ 4a4df0c2ce6f087414a5dc5802885fd2 88720 libjs-sphinxdoc_1.7.2-1_all.deb
+ 15b065a197e938715bf501b33066adf2 443380 python-sphinx_1.7.2-1_all.deb
+ 942189b1dd93faa36faa3552a9d40042 441676 python3-sphinx_1.7.2-1_all.deb
+ f6a5889bd4e807800239721d365a5f62 432892 sphinx-common_1.7.2-1_all.deb
+ 86497c90b6cda029576933778357004e 1198352 sphinx-doc_1.7.2-1_all.deb
+Checksums-Sha1:
+ 8c7ad722576ad1a475691020ca2320b1040dc203 2871 sphinx_1.7.2-1.dsc
+ 36a42125afd83731e05596d7037314399622e400 88720 libjs-sphinxdoc_1.7.2-1_all.deb
+ 8c2ecdf4e4ffd1f4880b486e53c99207c4d69dbc 443380 python-sphinx_1.7.2-1_all.deb
+ e518d97dceb77d827734d48ac02313fc0ed4b08c 441676 python3-sphinx_1.7.2-1_all.deb
+ 01e65d2e2c45121e06aff6f46427d6a31251e67c 432892 sphinx-common_1.7.2-1_all.deb
+ 8bec16b4db2ddf6776f7cfdcf04cd07fe32269ed 1198352 sphinx-doc_1.7.2-1_all.deb
+Checksums-Sha256:
+ 52d1d62f68aa9bab1504a0491faf6f4de7658ccc3c65e40871b894ad1ce504ed 2871 sphinx_1.7.2-1.dsc
+ c6267177819e0a27b8f9296b1d5106e253e84cf0722fbdf8d2bff489befb81d8 88720 libjs-sphinxdoc_1.7.2-1_all.deb
+ c55dc8f59798a835e6f78adfd95d73f9cf3382e440cdf96b2edbdb1990280f23 443380 python-sphinx_1.7.2-1_all.deb
+ 3f2b279b572d2fc36d9cc84c9fcded242ed930d42350e1d980c4aed45ee4ae2a 441676 python3-sphinx_1.7.2-1_all.deb
+ ece661af9ca87723169f48e68a45af0b5157da4b724a185b99ef42ed22e5f378 432892 sphinx-common_1.7.2-1_all.deb
+ 67722aa0934b9ebce8a870a34542104017491766c2515665c07128ad46b4e6b7 1198352 sphinx-doc_1.7.2-1_all.deb
+Build-Origin: Debian
+Build-Architecture: amd64
+Build-Date: Sat, 14 Apr 2018 10:19:26 +0100
+Installed-Build-Depends:
+ adduser (= 3.117),
+ adwaita-icon-theme (= 3.28.0-1),
+ autoconf (= 2.69-11),
+ automake (= 1:1.15.1-3.1),
+ autopoint (= 0.19.8.1-6),
+ autotools-dev (= 20180224.1),
+ base-files (= 10.1),
+ base-passwd (= 3.5.44),
+ bash (= 4.4.18-2),
+ binutils (= 2.30-15),
+ binutils-common (= 2.30-15),
+ binutils-x86-64-linux-gnu (= 2.30-15),
+ bsdmainutils (= 11.1.2),
+ bsdutils (= 1:2.31.1-0.5),
+ build-essential (= 12.4),
+ bzip2 (= 1.0.6-8.1),
+ ca-certificates (= 20180409),
+ cgmanager (= 0.41-2),
+ coreutils (= 8.28-1),
+ cpp (= 4:7.3.0-3),
+ cpp-7 (= 7.3.0-16),
+ dash (= 0.5.8-2.10),
+ dbus (= 1.12.6-2),
+ dbus-user-session (= 1.12.6-2),
+ dconf-gsettings-backend (= 0.28.0-2),
+ dconf-service (= 0.28.0-2),
+ debconf (= 1.5.66),
+ debhelper (= 11.2.1),
+ debianutils (= 4.8.4),
+ dh-autoreconf (= 17),
+ dh-python (= 3.20180326),
+ dh-strip-nondeterminism (= 0.040-1),
+ diffutils (= 1:3.6-1),
+ dmsetup (= 2:1.02.145-4.1),
+ docutils-common (= 0.14+dfsg-3),
+ dpkg (= 1.19.0.5),
+ dpkg-dev (= 1.19.0.5),
+ dvipng (= 1.15-1),
+ e2fsprogs (= 1.44.1-2),
+ fdisk (= 2.31.1-0.5),
+ file (= 1:5.32-2),
+ findutils (= 4.6.0+git+20171230-2),
+ fontconfig (= 2.13.0-4),
+ fontconfig-config (= 2.13.0-4),
+ fonts-dejavu-core (= 2.37-1),
+ fonts-lmodern (= 2.004.5-3),
+ g++ (= 4:7.3.0-3),
+ g++-7 (= 7.3.0-16),
+ gcc (= 4:7.3.0-3),
+ gcc-7 (= 7.3.0-16),
+ gcc-7-base (= 7.3.0-16),
+ gcc-8-base (= 8-20180402-1),
+ gettext (= 0.19.8.1-6),
+ gettext-base (= 0.19.8.1-6),
+ ghostscript (= 9.22~dfsg-2),
+ glib-networking (= 2.56.0-1),
+ glib-networking-common (= 2.56.0-1),
+ glib-networking-services (= 2.56.0-1),
+ graphviz (= 2.40.1-3),
+ grep (= 3.1-2),
+ groff-base (= 1.22.3-10),
+ gsettings-desktop-schemas (= 3.28.0-1),
+ gtk-update-icon-cache (= 3.22.29-3),
+ gzip (= 1.6-5+b1),
+ hicolor-icon-theme (= 0.17-2),
+ hostname (= 3.20),
+ imagemagick-6-common (= 8:6.9.9.39+dfsg-1),
+ imagemagick-6.q16 (= 8:6.9.9.39+dfsg-1),
+ init-system-helpers (= 1.51),
+ intltool-debian (= 0.35.0+20060710.4),
+ libacl1 (= 2.2.52-3+b1),
+ libann0 (= 1.1.2+doc-7),
+ libapparmor1 (= 2.12-4),
+ libarchive-zip-perl (= 1.60-1),
+ libargon2-0 (= 0~20161029-1.1),
+ libasan4 (= 7.3.0-16),
+ libatk-bridge2.0-0 (= 2.26.2-1),
+ libatk1.0-0 (= 2.28.1-1),
+ libatk1.0-data (= 2.28.1-1),
+ libatomic1 (= 8-20180402-1),
+ libatspi2.0-0 (= 2.28.0-1),
+ libattr1 (= 1:2.4.47-2+b2),
+ libaudit-common (= 1:2.8.2-1),
+ libaudit1 (= 1:2.8.2-1),
+ libavahi-client3 (= 0.7-3.1),
+ libavahi-common-data (= 0.7-3.1),
+ libavahi-common3 (= 0.7-3.1),
+ libbinutils (= 2.30-15),
+ libblkid1 (= 2.31.1-0.5),
+ libbsd0 (= 0.8.7-1),
+ libbz2-1.0 (= 1.0.6-8.1),
+ libc-bin (= 2.27-3),
+ libc-dev-bin (= 2.27-3),
+ libc6 (= 2.27-3),
+ libc6-dev (= 2.27-3),
+ libcairo-gobject2 (= 1.15.10-2),
+ libcairo2 (= 1.15.10-2),
+ libcap-ng0 (= 0.7.7-3.1+b1),
+ libcap2 (= 1:2.25-1.2),
+ libcc1-0 (= 8-20180402-1),
+ libcdt5 (= 2.40.1-3),
+ libcgmanager0 (= 0.41-2),
+ libcgraph6 (= 2.40.1-3),
+ libcilkrts5 (= 7.3.0-16),
+ libcolord2 (= 1.3.3-2),
+ libcom-err2 (= 1.44.1-2),
+ libcomerr2 (= 1.44.1-2),
+ libcroco3 (= 0.6.12-2),
+ libcryptsetup12 (= 2:2.0.2-1),
+ libcups2 (= 2.2.7-3),
+ libcupsimage2 (= 2.2.7-3),
+ libdatrie1 (= 0.2.10-7),
+ libdb5.3 (= 5.3.28-13.1+b1),
+ libdbus-1-3 (= 1.12.6-2),
+ libdconf1 (= 0.28.0-2),
+ libdebconfclient0 (= 0.243),
+ libdevmapper1.02.1 (= 2:1.02.145-4.1),
+ libdpkg-perl (= 1.19.0.5),
+ libdrm-common (= 2.4.91-2),
+ libdrm2 (= 2.4.91-2),
+ libegl-mesa0 (= 17.3.8-1),
+ libegl1 (= 1.0.0+git20180308-1),
+ libepoxy0 (= 1.4.3-1),
+ libexpat1 (= 2.2.5-3),
+ libext2fs2 (= 1.44.1-2),
+ libfdisk1 (= 2.31.1-0.5),
+ libffi6 (= 3.2.1-8),
+ libfftw3-double3 (= 3.3.7-1),
+ libfile-stripnondeterminism-perl (= 0.040-1),
+ libfontconfig1 (= 2.13.0-4),
+ libfreetype6 (= 2.8.1-2),
+ libfribidi0 (= 0.19.7-2),
+ libgbm1 (= 17.3.8-1),
+ libgcc-7-dev (= 7.3.0-16),
+ libgcc1 (= 1:8-20180402-1),
+ libgcrypt20 (= 1.8.2-2),
+ libgd3 (= 2.2.5-4),
+ libgdbm-compat4 (= 1.14.1-6),
+ libgdbm5 (= 1.14.1-6),
+ libgdk-pixbuf2.0-0 (= 2.36.11-2),
+ libgdk-pixbuf2.0-common (= 2.36.11-2),
+ libglapi-mesa (= 17.3.8-1),
+ libglib2.0-0 (= 2.56.1-2),
+ libglvnd0 (= 1.0.0+git20180308-1),
+ libgmp10 (= 2:6.1.2+dfsg-3),
+ libgnutls30 (= 3.5.18-1),
+ libgomp1 (= 8-20180402-1),
+ libgpg-error0 (= 1.29-2),
+ libgraphite2-3 (= 1.3.11-2),
+ libgs9 (= 9.22~dfsg-2),
+ libgs9-common (= 9.22~dfsg-2),
+ libgssapi-krb5-2 (= 1.16-2),
+ libgtk-3-0 (= 3.22.29-3),
+ libgtk-3-common (= 3.22.29-3),
+ libgts-0.7-5 (= 0.7.6+darcs121130-4),
+ libgvc6 (= 2.40.1-3),
+ libgvpr2 (= 2.40.1-3),
+ libharfbuzz-icu0 (= 1.7.6-1),
+ libharfbuzz0b (= 1.7.6-1),
+ libhogweed4 (= 3.4-1),
+ libice6 (= 2:1.0.9-2),
+ libicu57 (= 57.1-9),
+ libidn11 (= 1.33-2.2),
+ libidn2-0 (= 2.0.4-1.1),
+ libijs-0.35 (= 0.35-13),
+ libip4tc0 (= 1.6.2-1),
+ libisl19 (= 0.19-1),
+ libitm1 (= 8-20180402-1),
+ libjbig0 (= 2.1-3.1+b2),
+ libjbig2dec0 (= 0.13-6),
+ libjpeg62-turbo (= 1:1.5.2-2+b1),
+ libjs-jquery (= 3.2.1-1),
+ libjs-sphinxdoc (= 1.6.7-2),
+ libjs-underscore (= 1.8.3~dfsg-1),
+ libjson-c3 (= 0.12.1-1.3),
+ libjson-glib-1.0-0 (= 1.4.2-3),
+ libjson-glib-1.0-common (= 1.4.2-3),
+ libk5crypto3 (= 1.16-2),
+ libkeyutils1 (= 1.5.9-9.2),
+ libkmod2 (= 25-1),
+ libkpathsea6 (= 2017.20170613.44572-8+b2),
+ libkrb5-3 (= 1.16-2),
+ libkrb5support0 (= 1.16-2),
+ liblab-gamut1 (= 2.40.1-3),
+ liblcms2-2 (= 2.9-1),
+ liblqr-1-0 (= 0.4.2-2.1),
+ liblsan0 (= 8-20180402-1),
+ libltdl7 (= 2.4.6-2),
+ liblz4-1 (= 1.8.1.2-1),
+ liblzma5 (= 5.2.2-1.3),
+ libmagic-mgc (= 1:5.32-2),
+ libmagic1 (= 1:5.32-2),
+ libmagickcore-6.q16-5 (= 8:6.9.9.39+dfsg-1),
+ libmagickwand-6.q16-5 (= 8:6.9.9.39+dfsg-1),
+ libmount1 (= 2.31.1-0.5),
+ libmpc3 (= 1.1.0-1),
+ libmpdec2 (= 2.4.2-1),
+ libmpfr6 (= 4.0.1-1),
+ libmpx2 (= 8-20180402-1),
+ libncurses5 (= 6.1-1),
+ libncursesw5 (= 6.1-1),
+ libnettle6 (= 3.4-1),
+ libnih-dbus1 (= 1.0.3-10+b1),
+ libnih1 (= 1.0.3-10+b1),
+ libnspr4 (= 2:4.19-1),
+ libnss3 (= 2:3.36.1-1),
+ libopenjp2-7 (= 2.3.0-1),
+ libp11-kit0 (= 0.23.10-2),
+ libpam-modules (= 1.1.8-3.7),
+ libpam-modules-bin (= 1.1.8-3.7),
+ libpam-runtime (= 1.1.8-3.7),
+ libpam-systemd (= 238-4),
+ libpam0g (= 1.1.8-3.7),
+ libpango-1.0-0 (= 1.42.1-1),
+ libpangocairo-1.0-0 (= 1.42.1-1),
+ libpangoft2-1.0-0 (= 1.42.1-1),
+ libpaper-utils (= 1.1.24+nmu5),
+ libpaper1 (= 1.1.24+nmu5),
+ libpathplan4 (= 2.40.1-3),
+ libpcre3 (= 2:8.39-9),
+ libperl5.26 (= 5.26.1-5),
+ libpipeline1 (= 1.5.0-1),
+ libpixman-1-0 (= 0.34.0-2),
+ libpng16-16 (= 1.6.34-1),
+ libpoppler73 (= 0.62.0-2),
+ libpotrace0 (= 1.14-2),
+ libprocps6 (= 2:3.3.14-1),
+ libproxy1v5 (= 0.4.15-1),
+ libptexenc1 (= 2017.20170613.44572-8+b2),
+ libpython-stdlib (= 2.7.14-4),
+ libpython2.7-minimal (= 2.7.14-8),
+ libpython2.7-stdlib (= 2.7.14-8),
+ libpython3-stdlib (= 3.6.5-3),
+ libpython3.6-minimal (= 3.6.5-3),
+ libpython3.6-stdlib (= 3.6.5-3),
+ libquadmath0 (= 8-20180402-1),
+ libreadline7 (= 7.0-3),
+ librest-0.7-0 (= 0.8.0-2),
+ librsvg2-2 (= 2.40.20-2),
+ librsvg2-bin (= 2.40.20-2),
+ librsvg2-common (= 2.40.20-2),
+ libseccomp2 (= 2.3.1-2.1),
+ libselinux1 (= 2.7-2+b2),
+ libsemanage-common (= 2.7-2),
+ libsemanage1 (= 2.7-2+b2),
+ libsepol1 (= 2.7-1),
+ libsigsegv2 (= 2.12-2),
+ libsm6 (= 2:1.2.2-1+b3),
+ libsmartcols1 (= 2.31.1-0.5),
+ libsoup-gnome2.4-1 (= 2.62.1-1),
+ libsoup2.4-1 (= 2.62.1-1),
+ libsqlite3-0 (= 3.23.1-1),
+ libss2 (= 1.44.1-2),
+ libssl1.1 (= 1.1.0h-2),
+ libstdc++-7-dev (= 7.3.0-16),
+ libstdc++6 (= 8-20180402-1),
+ libsynctex1 (= 2017.20170613.44572-8+b2),
+ libsystemd0 (= 238-4),
+ libtasn1-6 (= 4.13-2),
+ libtexlua52 (= 2017.20170613.44572-8+b2),
+ libtexluajit2 (= 2017.20170613.44572-8+b2),
+ libtext-unidecode-perl (= 1.30-1),
+ libthai-data (= 0.1.27-2),
+ libthai0 (= 0.1.27-2),
+ libtiff5 (= 4.0.9-4),
+ libtimedate-perl (= 2.3000-2),
+ libtinfo5 (= 6.1-1),
+ libtool (= 2.4.6-2),
+ libtsan0 (= 8-20180402-1),
+ libubsan0 (= 7.3.0-16),
+ libudev1 (= 238-4),
+ libunistring2 (= 0.9.8-1),
+ libuuid1 (= 2.31.1-0.5),
+ libwayland-client0 (= 1.14.0-2),
+ libwayland-cursor0 (= 1.14.0-2),
+ libwayland-egl1-mesa (= 17.3.8-1),
+ libwayland-server0 (= 1.14.0-2),
+ libwebp6 (= 0.6.1-2),
+ libx11-6 (= 2:1.6.5-1),
+ libx11-data (= 2:1.6.5-1),
+ libx11-xcb1 (= 2:1.6.5-1),
+ libxau6 (= 1:1.0.8-1+b2),
+ libxaw7 (= 2:1.0.13-1+b2),
+ libxcb-dri2-0 (= 1.13-1),
+ libxcb-dri3-0 (= 1.13-1),
+ libxcb-present0 (= 1.13-1),
+ libxcb-render0 (= 1.13-1),
+ libxcb-shm0 (= 1.13-1),
+ libxcb-sync1 (= 1.13-1),
+ libxcb-xfixes0 (= 1.13-1),
+ libxcb1 (= 1.13-1),
+ libxcomposite1 (= 1:0.4.4-2),
+ libxcursor1 (= 1:1.1.15-1),
+ libxdamage1 (= 1:1.1.4-3),
+ libxdmcp6 (= 1:1.1.2-3),
+ libxdot4 (= 2.40.1-3),
+ libxext6 (= 2:1.3.3-1+b2),
+ libxfixes3 (= 1:5.0.3-1),
+ libxi6 (= 2:1.7.9-1),
+ libxinerama1 (= 2:1.1.3-1+b3),
+ libxkbcommon0 (= 0.8.0-1),
+ libxml-libxml-perl (= 2.0128+dfsg-5),
+ libxml-namespacesupport-perl (= 1.12-1),
+ libxml-sax-base-perl (= 1.09-1),
+ libxml-sax-perl (= 1.00+dfsg-1),
+ libxml2 (= 2.9.4+dfsg1-6.1),
+ libxmu6 (= 2:1.1.2-2),
+ libxpm4 (= 1:3.5.12-1),
+ libxrandr2 (= 2:1.5.1-1),
+ libxrender1 (= 1:0.9.10-1),
+ libxshmfence1 (= 1.3-1),
+ libxt6 (= 1:1.1.5-1),
+ libzzip-0-13 (= 0.13.62-3.1),
+ linux-libc-dev (= 4.15.11-1),
+ login (= 1:4.5-1),
+ lsb-base (= 9.20170808),
+ m4 (= 1.4.18-1),
+ make (= 4.2.1-1),
+ man-db (= 2.8.3-2),
+ mawk (= 1.3.3-17+b3),
+ mime-support (= 3.60),
+ mount (= 2.31.1-0.5),
+ ncurses-base (= 6.1-1),
+ ncurses-bin (= 6.1-1),
+ openssl (= 1.1.0h-2),
+ passwd (= 1:4.5-1),
+ patch (= 2.7.6-2),
+ perl (= 5.26.1-5),
+ perl-base (= 5.26.1-5),
+ perl-modules-5.26 (= 5.26.1-5),
+ po-debconf (= 1.0.20),
+ poppler-data (= 0.4.8-2),
+ preview-latex-style (= 11.91-1),
+ procps (= 2:3.3.14-1),
+ python (= 2.7.14-4),
+ python-alabaster (= 0.7.8-1),
+ python-all (= 2.7.14-4),
+ python-attr (= 17.4.0-2),
+ python-babel (= 2.4.0+dfsg.1-2),
+ python-babel-localedata (= 2.4.0+dfsg.1-2),
+ python-certifi (= 2018.1.18-3),
+ python-chardet (= 3.0.4-1),
+ python-docutils (= 0.14+dfsg-3),
+ python-enum34 (= 1.1.6-2),
+ python-funcsigs (= 1.0.2-4),
+ python-html5lib (= 0.999999999-1),
+ python-idna (= 2.6-1),
+ python-imagesize (= 0.7.1-1),
+ python-jinja2 (= 2.10-1),
+ python-markupsafe (= 1.0-1+b1),
+ python-minimal (= 2.7.14-4),
+ python-mock (= 2.0.0-3),
+ python-packaging (= 17.1-1),
+ python-pbr (= 3.1.1-4),
+ python-pkg-resources (= 39.0.1-2),
+ python-pluggy (= 0.6.0-1),
+ python-py (= 1.5.3-1),
+ python-pygments (= 2.2.0+dfsg-1),
+ python-pyparsing (= 2.2.0+dfsg1-2),
+ python-pytest (= 3.3.2-2),
+ python-requests (= 2.18.4-2),
+ python-roman (= 2.0.0-3),
+ python-setuptools (= 39.0.1-2),
+ python-six (= 1.11.0-2),
+ python-typing (= 3.6.4-1),
+ python-tz (= 2018.4-1),
+ python-urllib3 (= 1.22-1),
+ python-webencodings (= 0.5-2),
+ python2.7 (= 2.7.14-8),
+ python2.7-minimal (= 2.7.14-8),
+ python3 (= 3.6.5-3),
+ python3-alabaster (= 0.7.8-1),
+ python3-all (= 3.6.5-3),
+ python3-attr (= 17.4.0-2),
+ python3-babel (= 2.4.0+dfsg.1-2),
+ python3-certifi (= 2018.1.18-3),
+ python3-chardet (= 3.0.4-1),
+ python3-distutils (= 3.6.5-3),
+ python3-docutils (= 0.14+dfsg-3),
+ python3-html5lib (= 0.999999999-1),
+ python3-idna (= 2.6-1),
+ python3-imagesize (= 0.7.1-1),
+ python3-jinja2 (= 2.10-1),
+ python3-lib2to3 (= 3.6.5-3),
+ python3-markupsafe (= 1.0-1+b1),
+ python3-minimal (= 3.6.5-3),
+ python3-mock (= 2.0.0-3),
+ python3-packaging (= 17.1-1),
+ python3-pbr (= 3.1.1-4),
+ python3-pkg-resources (= 39.0.1-2),
+ python3-pluggy (= 0.6.0-1),
+ python3-py (= 1.5.3-1),
+ python3-pygments (= 2.2.0+dfsg-1),
+ python3-pyparsing (= 2.2.0+dfsg1-2),
+ python3-pytest (= 3.3.2-2),
+ python3-requests (= 2.18.4-2),
+ python3-roman (= 2.0.0-3),
+ python3-setuptools (= 39.0.1-2),
+ python3-six (= 1.11.0-2),
+ python3-sphinx (= 1.6.7-2),
+ python3-sphinxcontrib.websupport (= 1.0.1-2),
+ python3-tz (= 2018.4-1),
+ python3-urllib3 (= 1.22-1),
+ python3-webencodings (= 0.5-2),
+ python3.6 (= 3.6.5-3),
+ python3.6-minimal (= 3.6.5-3),
+ readline-common (= 7.0-3),
+ sed (= 4.4-2),
+ sensible-utils (= 0.0.12),
+ sgml-base (= 1.29),
+ shared-mime-info (= 1.9-2),
+ sphinx-common (= 1.6.7-2),
+ systemd (= 238-4),
+ systemd-shim (= 10-3),
+ sysvinit-utils (= 2.88dsf-59.10),
+ t1utils (= 1.41-2),
+ tar (= 1.29b-2),
+ tex-common (= 6.09),
+ texinfo (= 6.5.0.dfsg.1-2),
+ texlive-base (= 2017.20180305-1),
+ texlive-binaries (= 2017.20170613.44572-8+b2),
+ texlive-fonts-recommended (= 2017.20180305-1),
+ texlive-latex-base (= 2017.20180305-1),
+ texlive-latex-extra (= 2017.20180305-2),
+ texlive-latex-recommended (= 2017.20180305-1),
+ texlive-luatex (= 2017.20180305-1),
+ texlive-pictures (= 2017.20180305-1),
+ texlive-xetex (= 2017.20180305-1),
+ tipa (= 2:1.3-20),
+ tzdata (= 2018d-1),
+ ucf (= 3.0038),
+ util-linux (= 2.31.1-0.5),
+ x11-common (= 1:7.7+19),
+ xdg-utils (= 1.1.2-2),
+ xkb-data (= 2.23.1-1),
+ xml-core (= 0.18),
+ xz-utils (= 5.2.2-1.3),
+ zlib1g (= 1:1.2.8.dfsg-5)
+Environment:
+ DEB_BUILD_OPTIONS="parallel=9"
+ DEB_BUILD_PROFILES=""
+ SOURCE_DATE_EPOCH="1523656345"
diff --git a/test/debsign/sphinx_1.7.2-1_amd64.changes b/test/debsign/sphinx_1.7.2-1_amd64.changes
new file mode 100644
index 0000000..e3dcdc4
--- /dev/null
+++ b/test/debsign/sphinx_1.7.2-1_amd64.changes
@@ -0,0 +1,54 @@
+Format: 1.8
+Date: Fri, 13 Apr 2018 22:52:25 +0100
+Source: sphinx
+Binary: python-sphinx python3-sphinx sphinx-common sphinx-doc libjs-sphinxdoc
+Architecture: source all
+Version: 1.7.2-1
+Distribution: UNRELEASED
+Urgency: medium
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Changed-By: Chris Lamb <lamby@debian.org>
+Description:
+ libjs-sphinxdoc - JavaScript support for Sphinx documentation
+ python-sphinx - documentation generator for Python projects (implemented in Pytho
+ python3-sphinx - documentation generator for Python projects (implemented in Pytho
+ sphinx-common - documentation generator for Python projects - common data
+ sphinx-doc - documentation generator for Python projects - documentation
+Changes:
+ sphinx (1.7.2-1) UNRELEASED; urgency=medium
+ .
+ [ Chris Lamb ]
+ * New upstream release.
+ .
+ [ Dmitry Shachnev ]
+ * Merge 1.6.7-2 upload from unstable.
+Checksums-Sha1:
+ 8c7ad722576ad1a475691020ca2320b1040dc203 2871 sphinx_1.7.2-1.dsc
+ 1d1fa6954ae216cd44ea52dfc67063f26939c8f5 4719536 sphinx_1.7.2.orig.tar.gz
+ facfa686a3a0bc98c269e16e66427f96e00889ad 34268 sphinx_1.7.2-1.debian.tar.xz
+ 36a42125afd83731e05596d7037314399622e400 88720 libjs-sphinxdoc_1.7.2-1_all.deb
+ 8c2ecdf4e4ffd1f4880b486e53c99207c4d69dbc 443380 python-sphinx_1.7.2-1_all.deb
+ e518d97dceb77d827734d48ac02313fc0ed4b08c 441676 python3-sphinx_1.7.2-1_all.deb
+ 01e65d2e2c45121e06aff6f46427d6a31251e67c 432892 sphinx-common_1.7.2-1_all.deb
+ 8bec16b4db2ddf6776f7cfdcf04cd07fe32269ed 1198352 sphinx-doc_1.7.2-1_all.deb
+ 9dd0efdf2ff555e9c8122012ad44bc6c5db53596 14355 sphinx_1.7.2-1_amd64.buildinfo
+Checksums-Sha256:
+ 52d1d62f68aa9bab1504a0491faf6f4de7658ccc3c65e40871b894ad1ce504ed 2871 sphinx_1.7.2-1.dsc
+ 5a1c9a0fec678c24b9a2f5afba240c04668edb7f45c67ce2ed008996b3f21ae2 4719536 sphinx_1.7.2.orig.tar.gz
+ a6a825914b19cfdbc22df858b0cecc497765dad2058deae20a88a6a2f9d57d24 34268 sphinx_1.7.2-1.debian.tar.xz
+ c6267177819e0a27b8f9296b1d5106e253e84cf0722fbdf8d2bff489befb81d8 88720 libjs-sphinxdoc_1.7.2-1_all.deb
+ c55dc8f59798a835e6f78adfd95d73f9cf3382e440cdf96b2edbdb1990280f23 443380 python-sphinx_1.7.2-1_all.deb
+ 3f2b279b572d2fc36d9cc84c9fcded242ed930d42350e1d980c4aed45ee4ae2a 441676 python3-sphinx_1.7.2-1_all.deb
+ ece661af9ca87723169f48e68a45af0b5157da4b724a185b99ef42ed22e5f378 432892 sphinx-common_1.7.2-1_all.deb
+ 67722aa0934b9ebce8a870a34542104017491766c2515665c07128ad46b4e6b7 1198352 sphinx-doc_1.7.2-1_all.deb
+ 2b70197cc0cc88a48776fd266c501546819055f4c5c85d845bcb0f621b4789fe 14355 sphinx_1.7.2-1_amd64.buildinfo
+Files:
+ e6d086f0f2453055bab4ba6677f6af3f 2871 python optional sphinx_1.7.2-1.dsc
+ 21a08e994e6a289ed14eecefde2b4f2f 4719536 python optional sphinx_1.7.2.orig.tar.gz
+ e147e2afa47e7e58d1288ad8818c3de0 34268 python optional sphinx_1.7.2-1.debian.tar.xz
+ 4a4df0c2ce6f087414a5dc5802885fd2 88720 javascript optional libjs-sphinxdoc_1.7.2-1_all.deb
+ 15b065a197e938715bf501b33066adf2 443380 python optional python-sphinx_1.7.2-1_all.deb
+ 942189b1dd93faa36faa3552a9d40042 441676 python optional python3-sphinx_1.7.2-1_all.deb
+ f6a5889bd4e807800239721d365a5f62 432892 python optional sphinx-common_1.7.2-1_all.deb
+ 86497c90b6cda029576933778357004e 1198352 doc optional sphinx-doc_1.7.2-1_all.deb
+ a7a033cc426d486daf5bea22dab538cb 14355 python optional sphinx_1.7.2-1_amd64.buildinfo
diff --git a/test/lib_test_uscan b/test/lib_test_uscan
new file mode 100644
index 0000000..f0a1067
--- /dev/null
+++ b/test/lib_test_uscan
@@ -0,0 +1,130 @@
+#!/bin/bash
+
+# Copyright (C) 2018, Xavier <yadd@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+echo '======================================================================='
+echo "*** uscan $TESTTYPE test ***"
+echo '======================================================================='
+
+test_dir=$(readlink -f "${0%/*}")
+
+# Operation mode
+if test "${1:-}" = --installed; then
+ shift
+else
+ top_srcdir=$(readlink -f "${0%/*}/..")
+ make -C "$top_srcdir/scripts" uscan mk-origtargz uupdate debchange
+ PATH="$top_srcdir/scripts:$PATH"
+ export PATH
+ PERL5LIB="$top_srcdir/lib"
+ export PERL5LIB
+fi
+
+GPGHOME=$(mktemp -d -t gpg.XXXXX)
+
+GPG=gpg
+if ! command -v $GPG >/dev/null 2>&1; then
+ echo "$GPG missing"
+ GPG=gpg2
+ if ! command -v $GPG >/dev/null 2>&1; then
+ echo "$GPG missing"
+ exit 1
+ fi
+fi
+
+PRIVATE_KEY=$test_dir/uscan/PRIVATE_KEY.asc
+PUBLIC_KEY=$test_dir/uscan/PUBLIC_KEY.asc
+PRIVATE_KEYRING=$GPGHOME/secring.gpg
+PUBLIC_KEYRING=$GPGHOME/pubring.gpg
+
+# magic function that pipes stdout and stderr into a pipe, and prints it only
+# on command failure.
+# This uses a pipe, so it has limited capacity. Do not use it with stuff
+# outputting too much data.
+chronic_sh (){
+ local pipe pipe_q
+ pipe=$(mktemp -p "$SHUNIT_TMPDIR" devscripts_chronic_sh.XXXXXXXXXX)
+ printf -v pipe_q '%q' "$pipe"
+ trap 'rm -fv '"$pipe_q" RETURN
+ # one can't open a reading fd and a writing fd without blocking, because
+ # they want to already have something on the other side of the pipe.
+ # the temporary fd 5 will be that something.
+ exec 5<>"$pipe" # hack
+ exec 3>"$pipe" # writing fd
+ exec 4<"$pipe" # reading fd
+ exec 5>&- # end hack
+ rm "$pipe"
+
+ local ret=0
+ "$@" >&3 2>&3 || ret=$?
+ if [ "$ret" -ne 0 ] ; then
+ exec 3>&-
+ cat <&4-
+ return $ret
+ fi
+}
+
+oneTimeSetUp () {
+ chronic_sh $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --output "$PRIVATE_KEYRING" --dearmor "$PRIVATE_KEY"
+
+ chronic_sh $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --output "$PUBLIC_KEYRING" --dearmor "$PUBLIC_KEY"
+
+ echo "Using test gpg key:"
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring "$PRIVATE_KEYRING" --default-key \
+ CF218F0E7EABF584B7E20402C77E2D6872543FAF \
+ --list-keys --verbose
+
+ export GNUPGHOME=$GPGHOME
+}
+
+oneTimeTearDown () {
+ gpgconf --homedir "$GPGHOME" --verbose --kill gpg-agent
+ rm -rf "$GPGHOME"
+}
+
+spawnHttpServer () {
+ unset http_proxy
+ local pid
+ [ -n "$TEMP_PKG_DIR" ] || fail "unexpected testsuite error"
+ (
+ mkdir -p "$TEMP_PKG_DIR"/repo
+ cd "$TEMP_PKG_DIR"/repo || exit 1
+ python3 "$test_dir/uscan/httpserver.py" 2>log &
+ pid=$!
+ echo "$pid" > pid
+ while ! [ -s port ]; do
+ sleep 2s
+ if ! kill -0 "$pid" 2> /dev/null ; then
+ echo "The HTTP server returned an error:"
+ cat log
+ exit 1
+ fi
+ done
+ )
+}
+
+killHttpServer () {
+ if [ -n "${TEMP_PKG_DIR:-}" ] && [ -f "$TEMP_PKG_DIR/repo/pid" ]; then
+ local pid
+ pid=$(< "$TEMP_PKG_DIR/repo/pid")
+ kill -9 "$pid"
+ rm -rf "$TEMP_PKG_DIR"
+ unset TEMP_PKG_DIR
+ fi
+}
diff --git a/test/mass-bug/one-package b/test/mass-bug/one-package
new file mode 100644
index 0000000..d160fd7
--- /dev/null
+++ b/test/mass-bug/one-package
@@ -0,0 +1 @@
+test-package_1.2-3
diff --git a/test/mass-bug/packages b/test/mass-bug/packages
new file mode 100644
index 0000000..476d758
--- /dev/null
+++ b/test/mass-bug/packages
@@ -0,0 +1,4 @@
+native-package_1.0
+upstream-package_1.2-3
+epoch-native-package_1:2.3
+epoch-package_1:2.3-4.5
diff --git a/test/mass-bug/template b/test/mass-bug/template
new file mode 100644
index 0000000..5955bf2
--- /dev/null
+++ b/test/mass-bug/template
@@ -0,0 +1,20 @@
+#PACKAGE# has a bug. Please fix.
+
+This long line gets word-wrapped because text/plain; format=flowed never really took off.
+
+These short lines
+also get
+wrapped.
+
+#PACKAGE# version=#VERSION#
+
+#PACKAGE# epoch=#EPOCH#
+
+#PACKAGE# upstream=#UPSTREAM_VERSION#
+
+#PACKAGE# revision=#REVISION#
+
+#PACKAGE# reassembled=#EPOCH##UPSTREAM_VERSION##REVISION#
+
+--
+This signature does not get word-wrapped because it is a signature, even though it is longer than a line ought to be.
diff --git a/test/mergechanges/different-description.changes b/test/mergechanges/different-description.changes
new file mode 100644
index 0000000..92e8261
--- /dev/null
+++ b/test/mergechanges/different-description.changes
@@ -0,0 +1,41 @@
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - this Description is different
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/different-source.changes b/test/mergechanges/different-source.changes
new file mode 100644
index 0000000..f82e7cc
--- /dev/null
+++ b/test/mergechanges/different-source.changes
@@ -0,0 +1,41 @@
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: this-source-is-different
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - desktop integration portal - development files
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/different-version.changes b/test/mergechanges/different-version.changes
new file mode 100644
index 0000000..c0a6aab
--- /dev/null
+++ b/test/mergechanges/different-version.changes
@@ -0,0 +1,41 @@
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1~different
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - desktop integration portal - development files
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/format-1.7.changes b/test/mergechanges/format-1.7.changes
new file mode 100644
index 0000000..81d563c
--- /dev/null
+++ b/test/mergechanges/format-1.7.changes
@@ -0,0 +1,41 @@
+Format: 1.7
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - desktop integration portal - development files
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/linux_4.9.161-1_amd64.changes b/test/mergechanges/linux_4.9.161-1_amd64.changes
new file mode 100644
index 0000000..1ff9a65
--- /dev/null
+++ b/test/mergechanges/linux_4.9.161-1_amd64.changes
@@ -0,0 +1,2016 @@
+Format: 1.8
+Date: Wed, 27 Feb 2019 22:21:01 +0100
+Source: linux
+Binary: linux-source-4.9 linux-support-4.9.0-9 linux-doc-4.9 linux-manual-4.9 linux-kbuild-4.9 linux-cpupower libcpupower1 libcpupower-dev linux-perf-4.9 libusbip-dev usbip hyperv-daemons linux-headers-4.9.0-9-common linux-headers-4.9.0-9-common-rt linux-libc-dev linux-headers-4.9.0-9-all linux-headers-4.9.0-9-all-alpha kernel-image-4.9.0-9-alpha-generic-di nic-modules-4.9.0-9-alpha-generic-di nic-wireless-modules-4.9.0-9-alpha-generic-di nic-shared-modules-4.9.0-9-alpha-generic-di serial-modules-4.9.0-9-alpha-generic-di usb-serial-modules-4.9.0-9-alpha-generic-di ppp-modules-4.9.0-9-alpha-generic-di pata-modules-4.9.0-9-alpha-generic-di cdrom-core-modules-4.9.0-9-alpha-generic-di scsi-core-modules-4.9.0-9-alpha-generic-di scsi-modules-4.9.0-9-alpha-generic-di loop-modules-4.9.0-9-alpha-generic-di btrfs-modules-4.9.0-9-alpha-generic-di ext4-modules-4.9.0-9-alpha-generic-di isofs-modules-4.9.0-9-alpha-generic-di jfs-modules-4.9.0-9-alpha-generic-di
+ xfs-modules-4.9.0-9-alpha-generic-di fat-modules-4.9.0-9-alpha-generic-di md-modules-4.9.0-9-alpha-generic-di multipath-modules-4.9.0-9-alpha-generic-di usb-modules-4.9.0-9-alpha-generic-di usb-storage-modules-4.9.0-9-alpha-generic-di fb-modules-4.9.0-9-alpha-generic-di input-modules-4.9.0-9-alpha-generic-di event-modules-4.9.0-9-alpha-generic-di mouse-modules-4.9.0-9-alpha-generic-di nic-pcmcia-modules-4.9.0-9-alpha-generic-di pcmcia-modules-4.9.0-9-alpha-generic-di nic-usb-modules-4.9.0-9-alpha-generic-di sata-modules-4.9.0-9-alpha-generic-di crc-modules-4.9.0-9-alpha-generic-di crypto-modules-4.9.0-9-alpha-generic-di crypto-dm-modules-4.9.0-9-alpha-generic-di ata-modules-4.9.0-9-alpha-generic-di nbd-modules-4.9.0-9-alpha-generic-di squashfs-modules-4.9.0-9-alpha-generic-di virtio-modules-4.9.0-9-alpha-generic-di zlib-modules-4.9.0-9-alpha-generic-di fuse-modules-4.9.0-9-alpha-generic-di srm-modules-4.9.0-9-alpha-generic-di linux-image-4.9.0-9-alpha-generic
+ linux-headers-4.9.0-9-alpha-generic linux-image-4.9.0-9-alpha-generic-dbg linux-image-4.9.0-9-alpha-smp linux-headers-4.9.0-9-alpha-smp linux-image-4.9.0-9-alpha-smp-dbg linux-headers-4.9.0-9-all-amd64 kernel-image-4.9.0-9-amd64-di nic-modules-4.9.0-9-amd64-di nic-wireless-modules-4.9.0-9-amd64-di nic-shared-modules-4.9.0-9-amd64-di serial-modules-4.9.0-9-amd64-di usb-serial-modules-4.9.0-9-amd64-di ppp-modules-4.9.0-9-amd64-di pata-modules-4.9.0-9-amd64-di cdrom-core-modules-4.9.0-9-amd64-di firewire-core-modules-4.9.0-9-amd64-di scsi-core-modules-4.9.0-9-amd64-di scsi-modules-4.9.0-9-amd64-di loop-modules-4.9.0-9-amd64-di btrfs-modules-4.9.0-9-amd64-di ext4-modules-4.9.0-9-amd64-di isofs-modules-4.9.0-9-amd64-di jfs-modules-4.9.0-9-amd64-di ntfs-modules-4.9.0-9-amd64-di xfs-modules-4.9.0-9-amd64-di fat-modules-4.9.0-9-amd64-di md-modules-4.9.0-9-amd64-di multipath-modules-4.9.0-9-amd64-di usb-modules-4.9.0-9-amd64-di usb-storage-modules-4.9.0-9-amd64-di
+ pcmcia-storage-modules-4.9.0-9-amd64-di fb-modules-4.9.0-9-amd64-di input-modules-4.9.0-9-amd64-di event-modules-4.9.0-9-amd64-di mouse-modules-4.9.0-9-amd64-di nic-pcmcia-modules-4.9.0-9-amd64-di pcmcia-modules-4.9.0-9-amd64-di nic-usb-modules-4.9.0-9-amd64-di sata-modules-4.9.0-9-amd64-di acpi-modules-4.9.0-9-amd64-di i2c-modules-4.9.0-9-amd64-di crc-modules-4.9.0-9-amd64-di crypto-modules-4.9.0-9-amd64-di crypto-dm-modules-4.9.0-9-amd64-di efi-modules-4.9.0-9-amd64-di ata-modules-4.9.0-9-amd64-di mmc-core-modules-4.9.0-9-amd64-di mmc-modules-4.9.0-9-amd64-di nbd-modules-4.9.0-9-amd64-di squashfs-modules-4.9.0-9-amd64-di speakup-modules-4.9.0-9-amd64-di virtio-modules-4.9.0-9-amd64-di uinput-modules-4.9.0-9-amd64-di sound-modules-4.9.0-9-amd64-di hyperv-modules-4.9.0-9-amd64-di udf-modules-4.9.0-9-amd64-di fuse-modules-4.9.0-9-amd64-di linux-image-4.9.0-9-amd64 linux-headers-4.9.0-9-amd64 linux-image-4.9.0-9-amd64-dbg linux-image-4.9.0-9-rt-amd64
+ linux-headers-4.9.0-9-rt-amd64 linux-image-4.9.0-9-rt-amd64-dbg linux-headers-4.9.0-9-all-arm64 kernel-image-4.9.0-9-arm64-di nic-modules-4.9.0-9-arm64-di nic-wireless-modules-4.9.0-9-arm64-di nic-shared-modules-4.9.0-9-arm64-di ppp-modules-4.9.0-9-arm64-di cdrom-core-modules-4.9.0-9-arm64-di scsi-core-modules-4.9.0-9-arm64-di scsi-modules-4.9.0-9-arm64-di loop-modules-4.9.0-9-arm64-di btrfs-modules-4.9.0-9-arm64-di ext4-modules-4.9.0-9-arm64-di isofs-modules-4.9.0-9-arm64-di jfs-modules-4.9.0-9-arm64-di xfs-modules-4.9.0-9-arm64-di fat-modules-4.9.0-9-arm64-di md-modules-4.9.0-9-arm64-di multipath-modules-4.9.0-9-arm64-di usb-modules-4.9.0-9-arm64-di usb-storage-modules-4.9.0-9-arm64-di fb-modules-4.9.0-9-arm64-di input-modules-4.9.0-9-arm64-di event-modules-4.9.0-9-arm64-di nic-usb-modules-4.9.0-9-arm64-di sata-modules-4.9.0-9-arm64-di i2c-modules-4.9.0-9-arm64-di crc-modules-4.9.0-9-arm64-di crypto-modules-4.9.0-9-arm64-di crypto-dm-modules-4.9.0-9-arm64-di
+ efi-modules-4.9.0-9-arm64-di ata-modules-4.9.0-9-arm64-di mmc-modules-4.9.0-9-arm64-di nbd-modules-4.9.0-9-arm64-di squashfs-modules-4.9.0-9-arm64-di virtio-modules-4.9.0-9-arm64-di uinput-modules-4.9.0-9-arm64-di leds-modules-4.9.0-9-arm64-di udf-modules-4.9.0-9-arm64-di fuse-modules-4.9.0-9-arm64-di linux-image-4.9.0-9-arm64 linux-headers-4.9.0-9-arm64 linux-image-4.9.0-9-arm64-dbg linux-headers-4.9.0-9-all-armel kernel-image-4.9.0-9-marvell-di nic-modules-4.9.0-9-marvell-di nic-shared-modules-4.9.0-9-marvell-di usb-serial-modules-4.9.0-9-marvell-di ppp-modules-4.9.0-9-marvell-di cdrom-core-modules-4.9.0-9-marvell-di scsi-core-modules-4.9.0-9-marvell-di loop-modules-4.9.0-9-marvell-di ipv6-modules-4.9.0-9-marvell-di btrfs-modules-4.9.0-9-marvell-di ext4-modules-4.9.0-9-marvell-di isofs-modules-4.9.0-9-marvell-di jffs2-modules-4.9.0-9-marvell-di jfs-modules-4.9.0-9-marvell-di fat-modules-4.9.0-9-marvell-di minix-modules-4.9.0-9-marvell-di
+ md-modules-4.9.0-9-marvell-di multipath-modules-4.9.0-9-marvell-di usb-modules-4.9.0-9-marvell-di usb-storage-modules-4.9.0-9-marvell-di fb-modules-4.9.0-9-marvell-di input-modules-4.9.0-9-marvell-di event-modules-4.9.0-9-marvell-di mouse-modules-4.9.0-9-marvell-di nic-usb-modules-4.9.0-9-marvell-di sata-modules-4.9.0-9-marvell-di crc-modules-4.9.0-9-marvell-di crypto-modules-4.9.0-9-marvell-di crypto-dm-modules-4.9.0-9-marvell-di mmc-modules-4.9.0-9-marvell-di nbd-modules-4.9.0-9-marvell-di squashfs-modules-4.9.0-9-marvell-di uinput-modules-4.9.0-9-marvell-di zlib-modules-4.9.0-9-marvell-di leds-modules-4.9.0-9-marvell-di udf-modules-4.9.0-9-marvell-di fuse-modules-4.9.0-9-marvell-di mtd-modules-4.9.0-9-marvell-di linux-image-4.9.0-9-marvell linux-headers-4.9.0-9-marvell linux-image-4.9.0-9-marvell-dbg linux-headers-4.9.0-9-all-armhf kernel-image-4.9.0-9-armmp-di nic-modules-4.9.0-9-armmp-di nic-wireless-modules-4.9.0-9-armmp-di nic-shared-modules-4.9.0-9-armmp-di
+ ppp-modules-4.9.0-9-armmp-di pata-modules-4.9.0-9-armmp-di scsi-core-modules-4.9.0-9-armmp-di scsi-modules-4.9.0-9-armmp-di loop-modules-4.9.0-9-armmp-di btrfs-modules-4.9.0-9-armmp-di ext4-modules-4.9.0-9-armmp-di isofs-modules-4.9.0-9-armmp-di jfs-modules-4.9.0-9-armmp-di fat-modules-4.9.0-9-armmp-di md-modules-4.9.0-9-armmp-di multipath-modules-4.9.0-9-armmp-di usb-modules-4.9.0-9-armmp-di usb-storage-modules-4.9.0-9-armmp-di fb-modules-4.9.0-9-armmp-di input-modules-4.9.0-9-armmp-di event-modules-4.9.0-9-armmp-di nic-usb-modules-4.9.0-9-armmp-di sata-modules-4.9.0-9-armmp-di i2c-modules-4.9.0-9-armmp-di crc-modules-4.9.0-9-armmp-di crypto-modules-4.9.0-9-armmp-di crypto-dm-modules-4.9.0-9-armmp-di efi-modules-4.9.0-9-armmp-di ata-modules-4.9.0-9-armmp-di mmc-modules-4.9.0-9-armmp-di nbd-modules-4.9.0-9-armmp-di squashfs-modules-4.9.0-9-armmp-di virtio-modules-4.9.0-9-armmp-di uinput-modules-4.9.0-9-armmp-di zlib-modules-4.9.0-9-armmp-di
+ leds-modules-4.9.0-9-armmp-di udf-modules-4.9.0-9-armmp-di fuse-modules-4.9.0-9-armmp-di mtd-modules-4.9.0-9-armmp-di linux-image-4.9.0-9-armmp linux-headers-4.9.0-9-armmp linux-image-4.9.0-9-armmp-dbg linux-image-4.9.0-9-armmp-lpae linux-headers-4.9.0-9-armmp-lpae linux-image-4.9.0-9-armmp-lpae-dbg linux-headers-4.9.0-9-all-hppa kernel-image-4.9.0-9-parisc-di nic-modules-4.9.0-9-parisc-di nic-shared-modules-4.9.0-9-parisc-di serial-modules-4.9.0-9-parisc-di usb-serial-modules-4.9.0-9-parisc-di ppp-modules-4.9.0-9-parisc-di pata-modules-4.9.0-9-parisc-di cdrom-core-modules-4.9.0-9-parisc-di scsi-core-modules-4.9.0-9-parisc-di scsi-modules-4.9.0-9-parisc-di loop-modules-4.9.0-9-parisc-di btrfs-modules-4.9.0-9-parisc-di ext4-modules-4.9.0-9-parisc-di isofs-modules-4.9.0-9-parisc-di jfs-modules-4.9.0-9-parisc-di xfs-modules-4.9.0-9-parisc-di fat-modules-4.9.0-9-parisc-di md-modules-4.9.0-9-parisc-di multipath-modules-4.9.0-9-parisc-di usb-modules-4.9.0-9-parisc-di
+ usb-storage-modules-4.9.0-9-parisc-di input-modules-4.9.0-9-parisc-di event-modules-4.9.0-9-parisc-di mouse-modules-4.9.0-9-parisc-di nic-usb-modules-4.9.0-9-parisc-di sata-modules-4.9.0-9-parisc-di crc-modules-4.9.0-9-parisc-di crypto-modules-4.9.0-9-parisc-di crypto-dm-modules-4.9.0-9-parisc-di ata-modules-4.9.0-9-parisc-di nbd-modules-4.9.0-9-parisc-di squashfs-modules-4.9.0-9-parisc-di virtio-modules-4.9.0-9-parisc-di zlib-modules-4.9.0-9-parisc-di fuse-modules-4.9.0-9-parisc-di kernel-image-4.9.0-9-parisc64-smp-di nic-modules-4.9.0-9-parisc64-smp-di nic-shared-modules-4.9.0-9-parisc64-smp-di serial-modules-4.9.0-9-parisc64-smp-di usb-serial-modules-4.9.0-9-parisc64-smp-di ppp-modules-4.9.0-9-parisc64-smp-di pata-modules-4.9.0-9-parisc64-smp-di cdrom-core-modules-4.9.0-9-parisc64-smp-di scsi-core-modules-4.9.0-9-parisc64-smp-di scsi-modules-4.9.0-9-parisc64-smp-di loop-modules-4.9.0-9-parisc64-smp-di btrfs-modules-4.9.0-9-parisc64-smp-di
+ ext4-modules-4.9.0-9-parisc64-smp-di isofs-modules-4.9.0-9-parisc64-smp-di jfs-modules-4.9.0-9-parisc64-smp-di xfs-modules-4.9.0-9-parisc64-smp-di fat-modules-4.9.0-9-parisc64-smp-di md-modules-4.9.0-9-parisc64-smp-di multipath-modules-4.9.0-9-parisc64-smp-di usb-modules-4.9.0-9-parisc64-smp-di usb-storage-modules-4.9.0-9-parisc64-smp-di fb-modules-4.9.0-9-parisc64-smp-di input-modules-4.9.0-9-parisc64-smp-di event-modules-4.9.0-9-parisc64-smp-di mouse-modules-4.9.0-9-parisc64-smp-di nic-usb-modules-4.9.0-9-parisc64-smp-di sata-modules-4.9.0-9-parisc64-smp-di crc-modules-4.9.0-9-parisc64-smp-di crypto-modules-4.9.0-9-parisc64-smp-di crypto-dm-modules-4.9.0-9-parisc64-smp-di ata-modules-4.9.0-9-parisc64-smp-di nbd-modules-4.9.0-9-parisc64-smp-di squashfs-modules-4.9.0-9-parisc64-smp-di virtio-modules-4.9.0-9-parisc64-smp-di zlib-modules-4.9.0-9-parisc64-smp-di fuse-modules-4.9.0-9-parisc64-smp-di linux-image-4.9.0-9-parisc linux-headers-4.9.0-9-parisc
+ linux-image-4.9.0-9-parisc-dbg linux-image-4.9.0-9-parisc64-smp linux-headers-4.9.0-9-parisc64-smp linux-image-4.9.0-9-parisc64-smp-dbg linux-headers-4.9.0-9-all-i386 kernel-image-4.9.0-9-686-di nic-modules-4.9.0-9-686-di nic-wireless-modules-4.9.0-9-686-di nic-shared-modules-4.9.0-9-686-di serial-modules-4.9.0-9-686-di usb-serial-modules-4.9.0-9-686-di ppp-modules-4.9.0-9-686-di pata-modules-4.9.0-9-686-di cdrom-core-modules-4.9.0-9-686-di firewire-core-modules-4.9.0-9-686-di scsi-core-modules-4.9.0-9-686-di scsi-modules-4.9.0-9-686-di loop-modules-4.9.0-9-686-di btrfs-modules-4.9.0-9-686-di ext4-modules-4.9.0-9-686-di isofs-modules-4.9.0-9-686-di jfs-modules-4.9.0-9-686-di ntfs-modules-4.9.0-9-686-di xfs-modules-4.9.0-9-686-di fat-modules-4.9.0-9-686-di md-modules-4.9.0-9-686-di multipath-modules-4.9.0-9-686-di usb-modules-4.9.0-9-686-di usb-storage-modules-4.9.0-9-686-di pcmcia-storage-modules-4.9.0-9-686-di fb-modules-4.9.0-9-686-di input-modules-4.9.0-9-686-di
+ event-modules-4.9.0-9-686-di mouse-modules-4.9.0-9-686-di nic-pcmcia-modules-4.9.0-9-686-di pcmcia-modules-4.9.0-9-686-di nic-usb-modules-4.9.0-9-686-di sata-modules-4.9.0-9-686-di acpi-modules-4.9.0-9-686-di i2c-modules-4.9.0-9-686-di crc-modules-4.9.0-9-686-di crypto-modules-4.9.0-9-686-di crypto-dm-modules-4.9.0-9-686-di efi-modules-4.9.0-9-686-di ata-modules-4.9.0-9-686-di mmc-core-modules-4.9.0-9-686-di mmc-modules-4.9.0-9-686-di nbd-modules-4.9.0-9-686-di squashfs-modules-4.9.0-9-686-di speakup-modules-4.9.0-9-686-di virtio-modules-4.9.0-9-686-di uinput-modules-4.9.0-9-686-di sound-modules-4.9.0-9-686-di hyperv-modules-4.9.0-9-686-di udf-modules-4.9.0-9-686-di fuse-modules-4.9.0-9-686-di kernel-image-4.9.0-9-686-pae-di nic-modules-4.9.0-9-686-pae-di nic-wireless-modules-4.9.0-9-686-pae-di nic-shared-modules-4.9.0-9-686-pae-di serial-modules-4.9.0-9-686-pae-di usb-serial-modules-4.9.0-9-686-pae-di ppp-modules-4.9.0-9-686-pae-di pata-modules-4.9.0-9-686-pae-di
+ cdrom-core-modules-4.9.0-9-686-pae-di firewire-core-modules-4.9.0-9-686-pae-di scsi-core-modules-4.9.0-9-686-pae-di scsi-modules-4.9.0-9-686-pae-di loop-modules-4.9.0-9-686-pae-di btrfs-modules-4.9.0-9-686-pae-di ext4-modules-4.9.0-9-686-pae-di isofs-modules-4.9.0-9-686-pae-di jfs-modules-4.9.0-9-686-pae-di ntfs-modules-4.9.0-9-686-pae-di xfs-modules-4.9.0-9-686-pae-di fat-modules-4.9.0-9-686-pae-di md-modules-4.9.0-9-686-pae-di multipath-modules-4.9.0-9-686-pae-di usb-modules-4.9.0-9-686-pae-di usb-storage-modules-4.9.0-9-686-pae-di pcmcia-storage-modules-4.9.0-9-686-pae-di fb-modules-4.9.0-9-686-pae-di input-modules-4.9.0-9-686-pae-di event-modules-4.9.0-9-686-pae-di mouse-modules-4.9.0-9-686-pae-di nic-pcmcia-modules-4.9.0-9-686-pae-di pcmcia-modules-4.9.0-9-686-pae-di nic-usb-modules-4.9.0-9-686-pae-di sata-modules-4.9.0-9-686-pae-di acpi-modules-4.9.0-9-686-pae-di i2c-modules-4.9.0-9-686-pae-di crc-modules-4.9.0-9-686-pae-di crypto-modules-4.9.0-9-686-pae-di
+ crypto-dm-modules-4.9.0-9-686-pae-di efi-modules-4.9.0-9-686-pae-di ata-modules-4.9.0-9-686-pae-di mmc-core-modules-4.9.0-9-686-pae-di mmc-modules-4.9.0-9-686-pae-di nbd-modules-4.9.0-9-686-pae-di squashfs-modules-4.9.0-9-686-pae-di speakup-modules-4.9.0-9-686-pae-di virtio-modules-4.9.0-9-686-pae-di uinput-modules-4.9.0-9-686-pae-di sound-modules-4.9.0-9-686-pae-di hyperv-modules-4.9.0-9-686-pae-di udf-modules-4.9.0-9-686-pae-di fuse-modules-4.9.0-9-686-pae-di linux-image-4.9.0-9-686 linux-headers-4.9.0-9-686 linux-image-4.9.0-9-686-dbg linux-image-4.9.0-9-686-pae linux-headers-4.9.0-9-686-pae linux-image-4.9.0-9-686-pae-dbg linux-image-4.9.0-9-rt-686-pae linux-headers-4.9.0-9-rt-686-pae linux-image-4.9.0-9-rt-686-pae-dbg linux-headers-4.9.0-9-all-m68k kernel-image-4.9.0-9-m68k-di nic-shared-modules-4.9.0-9-m68k-di ppp-modules-4.9.0-9-m68k-di cdrom-core-modules-4.9.0-9-m68k-di scsi-modules-4.9.0-9-m68k-di loop-modules-4.9.0-9-m68k-di btrfs-modules-4.9.0-9-m68k-di
+ ext4-modules-4.9.0-9-m68k-di isofs-modules-4.9.0-9-m68k-di fat-modules-4.9.0-9-m68k-di md-modules-4.9.0-9-m68k-di crc-modules-4.9.0-9-m68k-di crypto-modules-4.9.0-9-m68k-di nbd-modules-4.9.0-9-m68k-di squashfs-modules-4.9.0-9-m68k-di zlib-modules-4.9.0-9-m68k-di udf-modules-4.9.0-9-m68k-di fuse-modules-4.9.0-9-m68k-di linux-image-4.9.0-9-m68k linux-headers-4.9.0-9-m68k linux-image-4.9.0-9-m68k-dbg linux-headers-4.9.0-9-all-mips kernel-image-4.9.0-9-4kc-malta-di nic-modules-4.9.0-9-4kc-malta-di nic-wireless-modules-4.9.0-9-4kc-malta-di nic-shared-modules-4.9.0-9-4kc-malta-di usb-serial-modules-4.9.0-9-4kc-malta-di ppp-modules-4.9.0-9-4kc-malta-di pata-modules-4.9.0-9-4kc-malta-di cdrom-core-modules-4.9.0-9-4kc-malta-di scsi-core-modules-4.9.0-9-4kc-malta-di scsi-modules-4.9.0-9-4kc-malta-di loop-modules-4.9.0-9-4kc-malta-di btrfs-modules-4.9.0-9-4kc-malta-di ext4-modules-4.9.0-9-4kc-malta-di isofs-modules-4.9.0-9-4kc-malta-di jfs-modules-4.9.0-9-4kc-malta-di
+ ntfs-modules-4.9.0-9-4kc-malta-di xfs-modules-4.9.0-9-4kc-malta-di fat-modules-4.9.0-9-4kc-malta-di hfs-modules-4.9.0-9-4kc-malta-di affs-modules-4.9.0-9-4kc-malta-di minix-modules-4.9.0-9-4kc-malta-di md-modules-4.9.0-9-4kc-malta-di multipath-modules-4.9.0-9-4kc-malta-di usb-modules-4.9.0-9-4kc-malta-di usb-storage-modules-4.9.0-9-4kc-malta-di input-modules-4.9.0-9-4kc-malta-di event-modules-4.9.0-9-4kc-malta-di mouse-modules-4.9.0-9-4kc-malta-di nic-usb-modules-4.9.0-9-4kc-malta-di sata-modules-4.9.0-9-4kc-malta-di i2c-modules-4.9.0-9-4kc-malta-di crc-modules-4.9.0-9-4kc-malta-di crypto-modules-4.9.0-9-4kc-malta-di crypto-dm-modules-4.9.0-9-4kc-malta-di ata-modules-4.9.0-9-4kc-malta-di mmc-core-modules-4.9.0-9-4kc-malta-di mmc-modules-4.9.0-9-4kc-malta-di nbd-modules-4.9.0-9-4kc-malta-di squashfs-modules-4.9.0-9-4kc-malta-di virtio-modules-4.9.0-9-4kc-malta-di sound-modules-4.9.0-9-4kc-malta-di zlib-modules-4.9.0-9-4kc-malta-di udf-modules-4.9.0-9-4kc-malta-di
+ fuse-modules-4.9.0-9-4kc-malta-di kernel-image-4.9.0-9-octeon-di nic-modules-4.9.0-9-octeon-di nic-wireless-modules-4.9.0-9-octeon-di nic-shared-modules-4.9.0-9-octeon-di usb-serial-modules-4.9.0-9-octeon-di ppp-modules-4.9.0-9-octeon-di pata-modules-4.9.0-9-octeon-di cdrom-core-modules-4.9.0-9-octeon-di scsi-core-modules-4.9.0-9-octeon-di scsi-modules-4.9.0-9-octeon-di loop-modules-4.9.0-9-octeon-di btrfs-modules-4.9.0-9-octeon-di ext4-modules-4.9.0-9-octeon-di isofs-modules-4.9.0-9-octeon-di jfs-modules-4.9.0-9-octeon-di ntfs-modules-4.9.0-9-octeon-di xfs-modules-4.9.0-9-octeon-di fat-modules-4.9.0-9-octeon-di hfs-modules-4.9.0-9-octeon-di affs-modules-4.9.0-9-octeon-di minix-modules-4.9.0-9-octeon-di md-modules-4.9.0-9-octeon-di multipath-modules-4.9.0-9-octeon-di usb-modules-4.9.0-9-octeon-di usb-storage-modules-4.9.0-9-octeon-di input-modules-4.9.0-9-octeon-di event-modules-4.9.0-9-octeon-di nic-usb-modules-4.9.0-9-octeon-di sata-modules-4.9.0-9-octeon-di
+ crc-modules-4.9.0-9-octeon-di crypto-modules-4.9.0-9-octeon-di crypto-dm-modules-4.9.0-9-octeon-di nbd-modules-4.9.0-9-octeon-di squashfs-modules-4.9.0-9-octeon-di rtc-modules-4.9.0-9-octeon-di virtio-modules-4.9.0-9-octeon-di sound-modules-4.9.0-9-octeon-di zlib-modules-4.9.0-9-octeon-di udf-modules-4.9.0-9-octeon-di fuse-modules-4.9.0-9-octeon-di linux-image-4.9.0-9-4kc-malta linux-headers-4.9.0-9-4kc-malta linux-image-4.9.0-9-4kc-malta-dbg linux-image-4.9.0-9-5kc-malta linux-headers-4.9.0-9-5kc-malta linux-image-4.9.0-9-5kc-malta-dbg linux-image-4.9.0-9-octeon linux-headers-4.9.0-9-octeon linux-image-4.9.0-9-octeon-dbg linux-headers-4.9.0-9-all-mipsel kernel-image-4.9.0-9-loongson-3-di nic-modules-4.9.0-9-loongson-3-di nic-wireless-modules-4.9.0-9-loongson-3-di nic-shared-modules-4.9.0-9-loongson-3-di usb-serial-modules-4.9.0-9-loongson-3-di ppp-modules-4.9.0-9-loongson-3-di pata-modules-4.9.0-9-loongson-3-di cdrom-core-modules-4.9.0-9-loongson-3-di
+ firewire-core-modules-4.9.0-9-loongson-3-di scsi-core-modules-4.9.0-9-loongson-3-di scsi-modules-4.9.0-9-loongson-3-di loop-modules-4.9.0-9-loongson-3-di btrfs-modules-4.9.0-9-loongson-3-di ext4-modules-4.9.0-9-loongson-3-di isofs-modules-4.9.0-9-loongson-3-di jfs-modules-4.9.0-9-loongson-3-di ntfs-modules-4.9.0-9-loongson-3-di xfs-modules-4.9.0-9-loongson-3-di fat-modules-4.9.0-9-loongson-3-di hfs-modules-4.9.0-9-loongson-3-di affs-modules-4.9.0-9-loongson-3-di minix-modules-4.9.0-9-loongson-3-di nfs-modules-4.9.0-9-loongson-3-di md-modules-4.9.0-9-loongson-3-di multipath-modules-4.9.0-9-loongson-3-di usb-modules-4.9.0-9-loongson-3-di usb-storage-modules-4.9.0-9-loongson-3-di fb-modules-4.9.0-9-loongson-3-di input-modules-4.9.0-9-loongson-3-di event-modules-4.9.0-9-loongson-3-di nic-usb-modules-4.9.0-9-loongson-3-di sata-modules-4.9.0-9-loongson-3-di crc-modules-4.9.0-9-loongson-3-di crypto-modules-4.9.0-9-loongson-3-di crypto-dm-modules-4.9.0-9-loongson-3-di
+ ata-modules-4.9.0-9-loongson-3-di nbd-modules-4.9.0-9-loongson-3-di squashfs-modules-4.9.0-9-loongson-3-di speakup-modules-4.9.0-9-loongson-3-di virtio-modules-4.9.0-9-loongson-3-di sound-modules-4.9.0-9-loongson-3-di zlib-modules-4.9.0-9-loongson-3-di udf-modules-4.9.0-9-loongson-3-di fuse-modules-4.9.0-9-loongson-3-di linux-image-4.9.0-9-loongson-3 linux-headers-4.9.0-9-loongson-3 linux-image-4.9.0-9-loongson-3-dbg linux-headers-4.9.0-9-all-mips64 kernel-image-4.9.0-9-5kc-malta-di nic-modules-4.9.0-9-5kc-malta-di nic-wireless-modules-4.9.0-9-5kc-malta-di nic-shared-modules-4.9.0-9-5kc-malta-di usb-serial-modules-4.9.0-9-5kc-malta-di ppp-modules-4.9.0-9-5kc-malta-di pata-modules-4.9.0-9-5kc-malta-di cdrom-core-modules-4.9.0-9-5kc-malta-di scsi-core-modules-4.9.0-9-5kc-malta-di scsi-modules-4.9.0-9-5kc-malta-di loop-modules-4.9.0-9-5kc-malta-di btrfs-modules-4.9.0-9-5kc-malta-di ext4-modules-4.9.0-9-5kc-malta-di isofs-modules-4.9.0-9-5kc-malta-di
+ jfs-modules-4.9.0-9-5kc-malta-di ntfs-modules-4.9.0-9-5kc-malta-di xfs-modules-4.9.0-9-5kc-malta-di fat-modules-4.9.0-9-5kc-malta-di hfs-modules-4.9.0-9-5kc-malta-di affs-modules-4.9.0-9-5kc-malta-di minix-modules-4.9.0-9-5kc-malta-di md-modules-4.9.0-9-5kc-malta-di multipath-modules-4.9.0-9-5kc-malta-di usb-modules-4.9.0-9-5kc-malta-di usb-storage-modules-4.9.0-9-5kc-malta-di input-modules-4.9.0-9-5kc-malta-di event-modules-4.9.0-9-5kc-malta-di mouse-modules-4.9.0-9-5kc-malta-di nic-usb-modules-4.9.0-9-5kc-malta-di sata-modules-4.9.0-9-5kc-malta-di i2c-modules-4.9.0-9-5kc-malta-di crc-modules-4.9.0-9-5kc-malta-di crypto-modules-4.9.0-9-5kc-malta-di crypto-dm-modules-4.9.0-9-5kc-malta-di ata-modules-4.9.0-9-5kc-malta-di mmc-core-modules-4.9.0-9-5kc-malta-di mmc-modules-4.9.0-9-5kc-malta-di nbd-modules-4.9.0-9-5kc-malta-di squashfs-modules-4.9.0-9-5kc-malta-di virtio-modules-4.9.0-9-5kc-malta-di sound-modules-4.9.0-9-5kc-malta-di zlib-modules-4.9.0-9-5kc-malta-di
+ udf-modules-4.9.0-9-5kc-malta-di fuse-modules-4.9.0-9-5kc-malta-di linux-headers-4.9.0-9-all-mips64el linux-headers-4.9.0-9-all-powerpc kernel-image-4.9.0-9-powerpc-di nic-modules-4.9.0-9-powerpc-di nic-shared-modules-4.9.0-9-powerpc-di serial-modules-4.9.0-9-powerpc-di usb-serial-modules-4.9.0-9-powerpc-di ppp-modules-4.9.0-9-powerpc-di pata-modules-4.9.0-9-powerpc-di cdrom-core-modules-4.9.0-9-powerpc-di firewire-core-modules-4.9.0-9-powerpc-di scsi-core-modules-4.9.0-9-powerpc-di scsi-modules-4.9.0-9-powerpc-di loop-modules-4.9.0-9-powerpc-di btrfs-modules-4.9.0-9-powerpc-di ext4-modules-4.9.0-9-powerpc-di isofs-modules-4.9.0-9-powerpc-di jfs-modules-4.9.0-9-powerpc-di xfs-modules-4.9.0-9-powerpc-di fat-modules-4.9.0-9-powerpc-di hfs-modules-4.9.0-9-powerpc-di affs-modules-4.9.0-9-powerpc-di md-modules-4.9.0-9-powerpc-di multipath-modules-4.9.0-9-powerpc-di usb-modules-4.9.0-9-powerpc-di usb-storage-modules-4.9.0-9-powerpc-di
+ pcmcia-storage-modules-4.9.0-9-powerpc-di fb-modules-4.9.0-9-powerpc-di input-modules-4.9.0-9-powerpc-di event-modules-4.9.0-9-powerpc-di mouse-modules-4.9.0-9-powerpc-di nic-pcmcia-modules-4.9.0-9-powerpc-di pcmcia-modules-4.9.0-9-powerpc-di sata-modules-4.9.0-9-powerpc-di crc-modules-4.9.0-9-powerpc-di crypto-modules-4.9.0-9-powerpc-di crypto-dm-modules-4.9.0-9-powerpc-di ata-modules-4.9.0-9-powerpc-di nbd-modules-4.9.0-9-powerpc-di squashfs-modules-4.9.0-9-powerpc-di virtio-modules-4.9.0-9-powerpc-di uinput-modules-4.9.0-9-powerpc-di zlib-modules-4.9.0-9-powerpc-di udf-modules-4.9.0-9-powerpc-di fuse-modules-4.9.0-9-powerpc-di kernel-image-4.9.0-9-powerpc64-di nic-modules-4.9.0-9-powerpc64-di nic-shared-modules-4.9.0-9-powerpc64-di serial-modules-4.9.0-9-powerpc64-di usb-serial-modules-4.9.0-9-powerpc64-di ppp-modules-4.9.0-9-powerpc64-di pata-modules-4.9.0-9-powerpc64-di cdrom-core-modules-4.9.0-9-powerpc64-di firewire-core-modules-4.9.0-9-powerpc64-di
+ scsi-core-modules-4.9.0-9-powerpc64-di scsi-modules-4.9.0-9-powerpc64-di loop-modules-4.9.0-9-powerpc64-di btrfs-modules-4.9.0-9-powerpc64-di ext4-modules-4.9.0-9-powerpc64-di isofs-modules-4.9.0-9-powerpc64-di jfs-modules-4.9.0-9-powerpc64-di xfs-modules-4.9.0-9-powerpc64-di fat-modules-4.9.0-9-powerpc64-di hfs-modules-4.9.0-9-powerpc64-di affs-modules-4.9.0-9-powerpc64-di md-modules-4.9.0-9-powerpc64-di multipath-modules-4.9.0-9-powerpc64-di usb-modules-4.9.0-9-powerpc64-di usb-storage-modules-4.9.0-9-powerpc64-di pcmcia-storage-modules-4.9.0-9-powerpc64-di input-modules-4.9.0-9-powerpc64-di event-modules-4.9.0-9-powerpc64-di mouse-modules-4.9.0-9-powerpc64-di nic-pcmcia-modules-4.9.0-9-powerpc64-di pcmcia-modules-4.9.0-9-powerpc64-di sata-modules-4.9.0-9-powerpc64-di crc-modules-4.9.0-9-powerpc64-di crypto-modules-4.9.0-9-powerpc64-di crypto-dm-modules-4.9.0-9-powerpc64-di ata-modules-4.9.0-9-powerpc64-di nbd-modules-4.9.0-9-powerpc64-di
+ squashfs-modules-4.9.0-9-powerpc64-di virtio-modules-4.9.0-9-powerpc64-di uinput-modules-4.9.0-9-powerpc64-di udf-modules-4.9.0-9-powerpc64-di fuse-modules-4.9.0-9-powerpc64-di hypervisor-modules-4.9.0-9-powerpc64-di fancontrol-modules-4.9.0-9-powerpc64-di linux-image-4.9.0-9-powerpc linux-headers-4.9.0-9-powerpc linux-image-4.9.0-9-powerpc-dbg linux-image-4.9.0-9-powerpc-smp linux-headers-4.9.0-9-powerpc-smp linux-image-4.9.0-9-powerpc-smp-dbg linux-image-4.9.0-9-powerpc64 linux-headers-4.9.0-9-powerpc64 linux-image-4.9.0-9-powerpc64-dbg linux-headers-4.9.0-9-all-powerpcspe linux-image-4.9.0-9-powerpcspe linux-headers-4.9.0-9-powerpcspe linux-image-4.9.0-9-powerpcspe-dbg linux-headers-4.9.0-9-all-ppc64 linux-headers-4.9.0-9-all-ppc64el kernel-image-4.9.0-9-powerpc64le-di nic-modules-4.9.0-9-powerpc64le-di nic-shared-modules-4.9.0-9-powerpc64le-di serial-modules-4.9.0-9-powerpc64le-di usb-serial-modules-4.9.0-9-powerpc64le-di ppp-modules-4.9.0-9-powerpc64le-di
+ cdrom-core-modules-4.9.0-9-powerpc64le-di firewire-core-modules-4.9.0-9-powerpc64le-di scsi-core-modules-4.9.0-9-powerpc64le-di scsi-modules-4.9.0-9-powerpc64le-di loop-modules-4.9.0-9-powerpc64le-di btrfs-modules-4.9.0-9-powerpc64le-di ext4-modules-4.9.0-9-powerpc64le-di isofs-modules-4.9.0-9-powerpc64le-di jfs-modules-4.9.0-9-powerpc64le-di xfs-modules-4.9.0-9-powerpc64le-di fat-modules-4.9.0-9-powerpc64le-di md-modules-4.9.0-9-powerpc64le-di multipath-modules-4.9.0-9-powerpc64le-di usb-modules-4.9.0-9-powerpc64le-di usb-storage-modules-4.9.0-9-powerpc64le-di input-modules-4.9.0-9-powerpc64le-di event-modules-4.9.0-9-powerpc64le-di mouse-modules-4.9.0-9-powerpc64le-di sata-modules-4.9.0-9-powerpc64le-di crc-modules-4.9.0-9-powerpc64le-di crypto-modules-4.9.0-9-powerpc64le-di crypto-dm-modules-4.9.0-9-powerpc64le-di ata-modules-4.9.0-9-powerpc64le-di nbd-modules-4.9.0-9-powerpc64le-di squashfs-modules-4.9.0-9-powerpc64le-di virtio-modules-4.9.0-9-powerpc64le-di
+ uinput-modules-4.9.0-9-powerpc64le-di udf-modules-4.9.0-9-powerpc64le-di fuse-modules-4.9.0-9-powerpc64le-di hypervisor-modules-4.9.0-9-powerpc64le-di fancontrol-modules-4.9.0-9-powerpc64le-di linux-image-4.9.0-9-powerpc64le linux-headers-4.9.0-9-powerpc64le linux-image-4.9.0-9-powerpc64le-dbg linux-headers-4.9.0-9-all-s390x kernel-image-4.9.0-9-s390x-di nic-modules-4.9.0-9-s390x-di scsi-core-modules-4.9.0-9-s390x-di scsi-modules-4.9.0-9-s390x-di loop-modules-4.9.0-9-s390x-di btrfs-modules-4.9.0-9-s390x-di ext4-modules-4.9.0-9-s390x-di isofs-modules-4.9.0-9-s390x-di xfs-modules-4.9.0-9-s390x-di fat-modules-4.9.0-9-s390x-di md-modules-4.9.0-9-s390x-di multipath-modules-4.9.0-9-s390x-di crc-modules-4.9.0-9-s390x-di crypto-modules-4.9.0-9-s390x-di crypto-dm-modules-4.9.0-9-s390x-di nbd-modules-4.9.0-9-s390x-di virtio-modules-4.9.0-9-s390x-di zlib-modules-4.9.0-9-s390x-di udf-modules-4.9.0-9-s390x-di fuse-modules-4.9.0-9-s390x-di dasd-modules-4.9.0-9-s390x-di
+ dasd-extra-modules-4.9.0-9-s390x-di linux-image-4.9.0-9-s390x linux-headers-4.9.0-9-s390x linux-image-4.9.0-9-s390x-dbg linux-headers-4.9.0-9-all-sh4 kernel-image-4.9.0-9-sh7751r-di nic-modules-4.9.0-9-sh7751r-di usb-serial-modules-4.9.0-9-sh7751r-di ppp-modules-4.9.0-9-sh7751r-di pata-modules-4.9.0-9-sh7751r-di cdrom-core-modules-4.9.0-9-sh7751r-di firewire-core-modules-4.9.0-9-sh7751r-di loop-modules-4.9.0-9-sh7751r-di btrfs-modules-4.9.0-9-sh7751r-di ext4-modules-4.9.0-9-sh7751r-di isofs-modules-4.9.0-9-sh7751r-di jfs-modules-4.9.0-9-sh7751r-di xfs-modules-4.9.0-9-sh7751r-di fat-modules-4.9.0-9-sh7751r-di minix-modules-4.9.0-9-sh7751r-di md-modules-4.9.0-9-sh7751r-di multipath-modules-4.9.0-9-sh7751r-di usb-storage-modules-4.9.0-9-sh7751r-di nic-usb-modules-4.9.0-9-sh7751r-di sata-modules-4.9.0-9-sh7751r-di i2c-modules-4.9.0-9-sh7751r-di crc-modules-4.9.0-9-sh7751r-di crypto-modules-4.9.0-9-sh7751r-di crypto-dm-modules-4.9.0-9-sh7751r-di
+ nbd-modules-4.9.0-9-sh7751r-di squashfs-modules-4.9.0-9-sh7751r-di speakup-modules-4.9.0-9-sh7751r-di virtio-modules-4.9.0-9-sh7751r-di sound-modules-4.9.0-9-sh7751r-di zlib-modules-4.9.0-9-sh7751r-di udf-modules-4.9.0-9-sh7751r-di fuse-modules-4.9.0-9-sh7751r-di kernel-image-4.9.0-9-sh7785lcr-di nic-modules-4.9.0-9-sh7785lcr-di usb-serial-modules-4.9.0-9-sh7785lcr-di ppp-modules-4.9.0-9-sh7785lcr-di pata-modules-4.9.0-9-sh7785lcr-di cdrom-core-modules-4.9.0-9-sh7785lcr-di firewire-core-modules-4.9.0-9-sh7785lcr-di loop-modules-4.9.0-9-sh7785lcr-di btrfs-modules-4.9.0-9-sh7785lcr-di ext4-modules-4.9.0-9-sh7785lcr-di isofs-modules-4.9.0-9-sh7785lcr-di jfs-modules-4.9.0-9-sh7785lcr-di xfs-modules-4.9.0-9-sh7785lcr-di fat-modules-4.9.0-9-sh7785lcr-di minix-modules-4.9.0-9-sh7785lcr-di md-modules-4.9.0-9-sh7785lcr-di multipath-modules-4.9.0-9-sh7785lcr-di nic-usb-modules-4.9.0-9-sh7785lcr-di sata-modules-4.9.0-9-sh7785lcr-di crc-modules-4.9.0-9-sh7785lcr-di
+ crypto-modules-4.9.0-9-sh7785lcr-di crypto-dm-modules-4.9.0-9-sh7785lcr-di nbd-modules-4.9.0-9-sh7785lcr-di squashfs-modules-4.9.0-9-sh7785lcr-di speakup-modules-4.9.0-9-sh7785lcr-di sound-modules-4.9.0-9-sh7785lcr-di zlib-modules-4.9.0-9-sh7785lcr-di udf-modules-4.9.0-9-sh7785lcr-di fuse-modules-4.9.0-9-sh7785lcr-di linux-image-4.9.0-9-sh7751r linux-headers-4.9.0-9-sh7751r linux-image-4.9.0-9-sh7751r-dbg linux-image-4.9.0-9-sh7785lcr linux-headers-4.9.0-9-sh7785lcr linux-image-4.9.0-9-sh7785lcr-dbg linux-headers-4.9.0-9-all-sparc64 kernel-image-4.9.0-9-sparc64-di nic-modules-4.9.0-9-sparc64-di ppp-modules-4.9.0-9-sparc64-di pata-modules-4.9.0-9-sparc64-di cdrom-core-modules-4.9.0-9-sparc64-di scsi-core-modules-4.9.0-9-sparc64-di scsi-modules-4.9.0-9-sparc64-di btrfs-modules-4.9.0-9-sparc64-di ext4-modules-4.9.0-9-sparc64-di isofs-modules-4.9.0-9-sparc64-di jfs-modules-4.9.0-9-sparc64-di ufs-modules-4.9.0-9-sparc64-di xfs-modules-4.9.0-9-sparc64-di
+ fat-modules-4.9.0-9-sparc64-di md-modules-4.9.0-9-sparc64-di multipath-modules-4.9.0-9-sparc64-di usb-modules-4.9.0-9-sparc64-di usb-storage-modules-4.9.0-9-sparc64-di input-modules-4.9.0-9-sparc64-di sata-modules-4.9.0-9-sparc64-di crc-modules-4.9.0-9-sparc64-di crypto-modules-4.9.0-9-sparc64-di crypto-dm-modules-4.9.0-9-sparc64-di ata-modules-4.9.0-9-sparc64-di nbd-modules-4.9.0-9-sparc64-di squashfs-modules-4.9.0-9-sparc64-di virtio-modules-4.9.0-9-sparc64-di zlib-modules-4.9.0-9-sparc64-di udf-modules-4.9.0-9-sparc64-di fuse-modules-4.9.0-9-sparc64-di linux-image-4.9.0-9-sparc64 linux-headers-4.9.0-9-sparc64 linux-image-4.9.0-9-sparc64-dbg linux-image-4.9.0-9-sparc64-smp linux-headers-4.9.0-9-sparc64-smp linux-image-4.9.0-9-sparc64-smp-dbg linux-compiler-gcc-6-arm linux-compiler-gcc-6-s390
+ linux-compiler-gcc-6-x86
+Architecture: source amd64 all
+Version: 4.9.161-1
+Distribution: stretch
+Urgency: medium
+Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
+Changed-By: Salvatore Bonaccorso <carnil@debian.org>
+Description:
+ acpi-modules-4.9.0-9-686-di - ACPI support modules (udeb)
+ acpi-modules-4.9.0-9-686-pae-di - ACPI support modules (udeb)
+ acpi-modules-4.9.0-9-amd64-di - ACPI support modules (udeb)
+ affs-modules-4.9.0-9-4kc-malta-di - Amiga filesystem support (udeb)
+ affs-modules-4.9.0-9-5kc-malta-di - Amiga filesystem support (udeb)
+ affs-modules-4.9.0-9-loongson-3-di - Amiga filesystem support (udeb)
+ affs-modules-4.9.0-9-octeon-di - Amiga filesystem support (udeb)
+ affs-modules-4.9.0-9-powerpc-di - Amiga filesystem support (udeb)
+ affs-modules-4.9.0-9-powerpc64-di - Amiga filesystem support (udeb)
+ ata-modules-4.9.0-9-4kc-malta-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-5kc-malta-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-686-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-686-pae-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-alpha-generic-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-amd64-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-arm64-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-armmp-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-loongson-3-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-parisc-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-parisc64-smp-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-powerpc-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-powerpc64-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-powerpc64le-di - ATA disk modules (udeb)
+ ata-modules-4.9.0-9-sparc64-di - ATA disk modules (udeb)
+ btrfs-modules-4.9.0-9-4kc-malta-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-5kc-malta-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-686-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-686-pae-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-alpha-generic-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-amd64-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-arm64-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-armmp-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-loongson-3-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-m68k-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-marvell-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-octeon-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-parisc-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-parisc64-smp-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-powerpc-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-powerpc64-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-powerpc64le-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-s390x-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-sh7751r-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-sh7785lcr-di - BTRFS filesystem support (udeb)
+ btrfs-modules-4.9.0-9-sparc64-di - BTRFS filesystem support (udeb)
+ cdrom-core-modules-4.9.0-9-4kc-malta-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-5kc-malta-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-686-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-686-pae-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-alpha-generic-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-amd64-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-arm64-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-loongson-3-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-m68k-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-marvell-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-octeon-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-parisc-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-parisc64-smp-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-powerpc-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-powerpc64-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-powerpc64le-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-sh7751r-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-sh7785lcr-di - CDROM support (udeb)
+ cdrom-core-modules-4.9.0-9-sparc64-di - CDROM support (udeb)
+ crc-modules-4.9.0-9-4kc-malta-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-5kc-malta-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-686-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-686-pae-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-alpha-generic-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-amd64-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-arm64-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-armmp-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-loongson-3-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-m68k-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-marvell-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-octeon-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-parisc-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-parisc64-smp-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-powerpc-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-powerpc64-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-powerpc64le-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-s390x-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-sh7751r-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-sh7785lcr-di - CRC modules (udeb)
+ crc-modules-4.9.0-9-sparc64-di - CRC modules (udeb)
+ crypto-dm-modules-4.9.0-9-4kc-malta-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-5kc-malta-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-686-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-686-pae-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-alpha-generic-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-amd64-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-arm64-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-armmp-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-loongson-3-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-marvell-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-octeon-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-parisc-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-parisc64-smp-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-powerpc-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-powerpc64-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-powerpc64le-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-s390x-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-sh7751r-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-sh7785lcr-di - devicemapper crypto module (udeb)
+ crypto-dm-modules-4.9.0-9-sparc64-di - devicemapper crypto module (udeb)
+ crypto-modules-4.9.0-9-4kc-malta-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-5kc-malta-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-686-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-686-pae-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-alpha-generic-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-amd64-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-arm64-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-armmp-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-loongson-3-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-m68k-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-marvell-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-octeon-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-parisc-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-parisc64-smp-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-powerpc-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-powerpc64-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-powerpc64le-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-s390x-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-sh7751r-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-sh7785lcr-di - crypto modules (udeb)
+ crypto-modules-4.9.0-9-sparc64-di - crypto modules (udeb)
+ dasd-extra-modules-4.9.0-9-s390x-di - optional dasd DIAG support (udeb)
+ dasd-modules-4.9.0-9-s390x-di - dasd modules (udeb)
+ efi-modules-4.9.0-9-686-di - EFI modules (udeb)
+ efi-modules-4.9.0-9-686-pae-di - EFI modules (udeb)
+ efi-modules-4.9.0-9-amd64-di - EFI modules (udeb)
+ efi-modules-4.9.0-9-arm64-di - EFI modules (udeb)
+ efi-modules-4.9.0-9-armmp-di - EFI modules (udeb)
+ event-modules-4.9.0-9-4kc-malta-di - Event support (udeb)
+ event-modules-4.9.0-9-5kc-malta-di - Event support (udeb)
+ event-modules-4.9.0-9-686-di - Event support (udeb)
+ event-modules-4.9.0-9-686-pae-di - Event support (udeb)
+ event-modules-4.9.0-9-alpha-generic-di - Event support (udeb)
+ event-modules-4.9.0-9-amd64-di - Event support (udeb)
+ event-modules-4.9.0-9-arm64-di - Event support (udeb)
+ event-modules-4.9.0-9-armmp-di - Event support (udeb)
+ event-modules-4.9.0-9-loongson-3-di - Event support (udeb)
+ event-modules-4.9.0-9-marvell-di - Event support (udeb)
+ event-modules-4.9.0-9-octeon-di - Event support (udeb)
+ event-modules-4.9.0-9-parisc-di - Event support (udeb)
+ event-modules-4.9.0-9-parisc64-smp-di - Event support (udeb)
+ event-modules-4.9.0-9-powerpc-di - Event support (udeb)
+ event-modules-4.9.0-9-powerpc64-di - Event support (udeb)
+ event-modules-4.9.0-9-powerpc64le-di - Event support (udeb)
+ ext4-modules-4.9.0-9-4kc-malta-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-5kc-malta-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-686-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-686-pae-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-alpha-generic-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-amd64-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-arm64-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-armmp-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-loongson-3-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-m68k-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-marvell-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-octeon-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-parisc-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-parisc64-smp-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-powerpc-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-powerpc64-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-powerpc64le-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-s390x-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-sh7751r-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-sh7785lcr-di - ext2/ext3/ext4 filesystem support (udeb)
+ ext4-modules-4.9.0-9-sparc64-di - ext2/ext3/ext4 filesystem support (udeb)
+ fancontrol-modules-4.9.0-9-powerpc64-di - Apple powermac fancontrol modules (udeb)
+ fancontrol-modules-4.9.0-9-powerpc64le-di - Apple powermac fancontrol modules (udeb)
+ fat-modules-4.9.0-9-4kc-malta-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-5kc-malta-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-686-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-686-pae-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-alpha-generic-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-amd64-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-arm64-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-armmp-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-loongson-3-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-m68k-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-marvell-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-octeon-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-parisc-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-parisc64-smp-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-powerpc-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-powerpc64-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-powerpc64le-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-s390x-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-sh7751r-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-sh7785lcr-di - FAT filesystem support (udeb)
+ fat-modules-4.9.0-9-sparc64-di - FAT filesystem support (udeb)
+ fb-modules-4.9.0-9-686-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-686-pae-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-alpha-generic-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-amd64-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-arm64-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-armmp-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-loongson-3-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-marvell-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-parisc64-smp-di - Frame buffer support (udeb)
+ fb-modules-4.9.0-9-powerpc-di - Frame buffer support (udeb)
+ firewire-core-modules-4.9.0-9-686-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-686-pae-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-amd64-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-loongson-3-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-powerpc-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-powerpc64-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-powerpc64le-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-sh7751r-di - Core FireWire drivers (udeb)
+ firewire-core-modules-4.9.0-9-sh7785lcr-di - Core FireWire drivers (udeb)
+ fuse-modules-4.9.0-9-4kc-malta-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-5kc-malta-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-686-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-686-pae-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-alpha-generic-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-amd64-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-arm64-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-armmp-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-loongson-3-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-m68k-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-marvell-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-octeon-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-parisc-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-parisc64-smp-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-powerpc-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-powerpc64-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-powerpc64le-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-s390x-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-sh7751r-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-sh7785lcr-di - FUSE modules (udeb)
+ fuse-modules-4.9.0-9-sparc64-di - FUSE modules (udeb)
+ hfs-modules-4.9.0-9-4kc-malta-di - HFS filesystem support (udeb)
+ hfs-modules-4.9.0-9-5kc-malta-di - HFS filesystem support (udeb)
+ hfs-modules-4.9.0-9-loongson-3-di - HFS filesystem support (udeb)
+ hfs-modules-4.9.0-9-octeon-di - HFS filesystem support (udeb)
+ hfs-modules-4.9.0-9-powerpc-di - HFS filesystem support (udeb)
+ hfs-modules-4.9.0-9-powerpc64-di - HFS filesystem support (udeb)
+ hyperv-daemons - Support daemons for Linux running on Hyper-V
+ hyperv-modules-4.9.0-9-686-di - Hyper-V modules (udeb)
+ hyperv-modules-4.9.0-9-686-pae-di - Hyper-V modules (udeb)
+ hyperv-modules-4.9.0-9-amd64-di - Hyper-V modules (udeb)
+ hypervisor-modules-4.9.0-9-powerpc64-di - IBM 64bit hypervisor console modules (udeb)
+ hypervisor-modules-4.9.0-9-powerpc64le-di - IBM 64bit hypervisor console modules (udeb)
+ i2c-modules-4.9.0-9-4kc-malta-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-5kc-malta-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-686-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-686-pae-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-amd64-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-arm64-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-armmp-di - i2c support modules (udeb)
+ i2c-modules-4.9.0-9-sh7751r-di - i2c support modules (udeb)
+ input-modules-4.9.0-9-4kc-malta-di - Input devices support (udeb)
+ input-modules-4.9.0-9-5kc-malta-di - Input devices support (udeb)
+ input-modules-4.9.0-9-686-di - Input devices support (udeb)
+ input-modules-4.9.0-9-686-pae-di - Input devices support (udeb)
+ input-modules-4.9.0-9-alpha-generic-di - Input devices support (udeb)
+ input-modules-4.9.0-9-amd64-di - Input devices support (udeb)
+ input-modules-4.9.0-9-arm64-di - Input devices support (udeb)
+ input-modules-4.9.0-9-armmp-di - Input devices support (udeb)
+ input-modules-4.9.0-9-loongson-3-di - Input devices support (udeb)
+ input-modules-4.9.0-9-marvell-di - Input devices support (udeb)
+ input-modules-4.9.0-9-octeon-di - Input devices support (udeb)
+ input-modules-4.9.0-9-parisc-di - Input devices support (udeb)
+ input-modules-4.9.0-9-parisc64-smp-di - Input devices support (udeb)
+ input-modules-4.9.0-9-powerpc-di - Input devices support (udeb)
+ input-modules-4.9.0-9-powerpc64-di - Input devices support (udeb)
+ input-modules-4.9.0-9-powerpc64le-di - Input devices support (udeb)
+ input-modules-4.9.0-9-sparc64-di - Input devices support (udeb)
+ ipv6-modules-4.9.0-9-marvell-di - IPv6 driver (udeb)
+ isofs-modules-4.9.0-9-4kc-malta-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-5kc-malta-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-686-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-686-pae-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-alpha-generic-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-amd64-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-arm64-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-armmp-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-loongson-3-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-m68k-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-marvell-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-octeon-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-parisc-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-parisc64-smp-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-powerpc-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-powerpc64-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-powerpc64le-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-s390x-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-sh7751r-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-sh7785lcr-di - ISOFS filesystem support (udeb)
+ isofs-modules-4.9.0-9-sparc64-di - ISOFS filesystem support (udeb)
+ jffs2-modules-4.9.0-9-marvell-di - JFFS2 filesystem support (udeb)
+ jfs-modules-4.9.0-9-4kc-malta-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-5kc-malta-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-686-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-686-pae-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-alpha-generic-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-amd64-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-arm64-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-armmp-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-loongson-3-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-marvell-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-octeon-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-parisc-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-parisc64-smp-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-powerpc-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-powerpc64-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-powerpc64le-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-sh7751r-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-sh7785lcr-di - JFS filesystem support (udeb)
+ jfs-modules-4.9.0-9-sparc64-di - JFS filesystem support (udeb)
+ kernel-image-4.9.0-9-4kc-malta-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-5kc-malta-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-686-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-686-pae-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-alpha-generic-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-amd64-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-arm64-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-armmp-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-loongson-3-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-m68k-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-marvell-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-octeon-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-parisc-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-parisc64-smp-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-powerpc-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-powerpc64-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-powerpc64le-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-s390x-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-sh7751r-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-sh7785lcr-di - Linux kernel image and core modules for the Debian installer (udeb)
+ kernel-image-4.9.0-9-sparc64-di - Linux kernel image and core modules for the Debian installer (udeb)
+ leds-modules-4.9.0-9-arm64-di - LED modules (udeb)
+ leds-modules-4.9.0-9-armmp-di - LED modules (udeb)
+ leds-modules-4.9.0-9-marvell-di - LED modules (udeb)
+ libcpupower-dev - CPU frequency and voltage scaling tools for Linux (development fi
+ libcpupower1 - CPU frequency and voltage scaling tools for Linux (libraries)
+ libusbip-dev - USB device sharing system over IP network (development files)
+ linux-compiler-gcc-6-arm - Compiler for Linux on ARM (meta-package)
+ linux-compiler-gcc-6-s390 - Compiler for Linux on IBM zSeries (meta-package)
+ linux-compiler-gcc-6-x86 - Compiler for Linux on x86 (meta-package)
+ linux-cpupower - CPU power management tools for Linux
+ linux-doc-4.9 - Linux kernel specific documentation for version 4.9
+ linux-headers-4.9.0-9-4kc-malta - Header files for Linux 4.9.0-9-4kc-malta
+ linux-headers-4.9.0-9-5kc-malta - Header files for Linux 4.9.0-9-5kc-malta
+ linux-headers-4.9.0-9-686 - Header files for Linux 4.9.0-9-686
+ linux-headers-4.9.0-9-686-pae - Header files for Linux 4.9.0-9-686-pae
+ linux-headers-4.9.0-9-all - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-alpha - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-amd64 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-arm64 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-armel - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-armhf - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-hppa - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-i386 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-m68k - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-mips - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-mips64 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-mips64el - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-mipsel - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-powerpc - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-powerpcspe - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-ppc64 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-ppc64el - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-s390x - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-sh4 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-all-sparc64 - All header files for Linux 4.9 (meta-package)
+ linux-headers-4.9.0-9-alpha-generic - Header files for Linux 4.9.0-9-alpha-generic
+ linux-headers-4.9.0-9-alpha-smp - Header files for Linux 4.9.0-9-alpha-smp
+ linux-headers-4.9.0-9-amd64 - Header files for Linux 4.9.0-9-amd64
+ linux-headers-4.9.0-9-arm64 - Header files for Linux 4.9.0-9-arm64
+ linux-headers-4.9.0-9-armmp - Header files for Linux 4.9.0-9-armmp
+ linux-headers-4.9.0-9-armmp-lpae - Header files for Linux 4.9.0-9-armmp-lpae
+ linux-headers-4.9.0-9-common - Common header files for Linux 4.9.0-9
+ linux-headers-4.9.0-9-common-rt - Common header files for Linux 4.9.0-9-rt
+ linux-headers-4.9.0-9-loongson-3 - Header files for Linux 4.9.0-9-loongson-3
+ linux-headers-4.9.0-9-m68k - Header files for Linux 4.9.0-9-m68k
+ linux-headers-4.9.0-9-marvell - Header files for Linux 4.9.0-9-marvell
+ linux-headers-4.9.0-9-octeon - Header files for Linux 4.9.0-9-octeon
+ linux-headers-4.9.0-9-parisc - Header files for Linux 4.9.0-9-parisc
+ linux-headers-4.9.0-9-parisc64-smp - Header files for Linux 4.9.0-9-parisc64-smp
+ linux-headers-4.9.0-9-powerpc - Header files for Linux 4.9.0-9-powerpc
+ linux-headers-4.9.0-9-powerpc-smp - Header files for Linux 4.9.0-9-powerpc-smp
+ linux-headers-4.9.0-9-powerpc64 - Header files for Linux 4.9.0-9-powerpc64
+ linux-headers-4.9.0-9-powerpc64le - Header files for Linux 4.9.0-9-powerpc64le
+ linux-headers-4.9.0-9-powerpcspe - Header files for Linux 4.9.0-9-powerpcspe
+ linux-headers-4.9.0-9-rt-686-pae - Header files for Linux 4.9.0-9-rt-686-pae
+ linux-headers-4.9.0-9-rt-amd64 - Header files for Linux 4.9.0-9-rt-amd64
+ linux-headers-4.9.0-9-s390x - Header files for Linux 4.9.0-9-s390x
+ linux-headers-4.9.0-9-sh7751r - Header files for Linux 4.9.0-9-sh7751r
+ linux-headers-4.9.0-9-sh7785lcr - Header files for Linux 4.9.0-9-sh7785lcr
+ linux-headers-4.9.0-9-sparc64 - Header files for Linux 4.9.0-9-sparc64
+ linux-headers-4.9.0-9-sparc64-smp - Header files for Linux 4.9.0-9-sparc64-smp
+ linux-image-4.9.0-9-4kc-malta - Linux 4.9 for MIPS Malta
+ linux-image-4.9.0-9-4kc-malta-dbg - Debug symbols for linux-image-4.9.0-9-4kc-malta
+ linux-image-4.9.0-9-5kc-malta - Linux 4.9 for MIPS Malta (64-bit)
+ linux-image-4.9.0-9-5kc-malta-dbg - Debug symbols for linux-image-4.9.0-9-5kc-malta
+ linux-image-4.9.0-9-686 - Linux 4.9 for older PCs
+ linux-image-4.9.0-9-686-dbg - Debug symbols for linux-image-4.9.0-9-686
+ linux-image-4.9.0-9-686-pae - Linux 4.9 for modern PCs
+ linux-image-4.9.0-9-686-pae-dbg - Debug symbols for linux-image-4.9.0-9-686-pae
+ linux-image-4.9.0-9-alpha-generic - Linux 4.9 for Alpha
+ linux-image-4.9.0-9-alpha-generic-dbg - Debug symbols for linux-image-4.9.0-9-alpha-generic
+ linux-image-4.9.0-9-alpha-smp - Linux 4.9 for Alpha SMP
+ linux-image-4.9.0-9-alpha-smp-dbg - Debug symbols for linux-image-4.9.0-9-alpha-smp
+ linux-image-4.9.0-9-amd64 - Linux 4.9 for 64-bit PCs
+ linux-image-4.9.0-9-amd64-dbg - Debug symbols for linux-image-4.9.0-9-amd64
+ linux-image-4.9.0-9-arm64 - Linux 4.9 for 64-bit ARMv8 machines
+ linux-image-4.9.0-9-arm64-dbg - Debug symbols for linux-image-4.9.0-9-arm64
+ linux-image-4.9.0-9-armmp - Linux 4.9 for ARMv7 multiplatform compatible SoCs
+ linux-image-4.9.0-9-armmp-dbg - Debug symbols for linux-image-4.9.0-9-armmp
+ linux-image-4.9.0-9-armmp-lpae - Linux 4.9 for ARMv7 multiplatform compatible SoCs supporting LPAE
+ linux-image-4.9.0-9-armmp-lpae-dbg - Debug symbols for linux-image-4.9.0-9-armmp-lpae
+ linux-image-4.9.0-9-loongson-3 - Linux 4.9 for Loongson 3A/3B
+ linux-image-4.9.0-9-loongson-3-dbg - Debug symbols for linux-image-4.9.0-9-loongson-3
+ linux-image-4.9.0-9-m68k - Linux 4.9 for Motorola MC68020+ family
+ linux-image-4.9.0-9-m68k-dbg - Debug symbols for linux-image-4.9.0-9-m68k
+ linux-image-4.9.0-9-marvell - Linux 4.9 for Marvell Kirkwood/Orion
+ linux-image-4.9.0-9-marvell-dbg - Debug symbols for linux-image-4.9.0-9-marvell
+ linux-image-4.9.0-9-octeon - Linux 4.9 for Octeon
+ linux-image-4.9.0-9-octeon-dbg - Debug symbols for linux-image-4.9.0-9-octeon
+ linux-image-4.9.0-9-parisc - Linux 4.9 for 32-bit PA-RISC
+ linux-image-4.9.0-9-parisc-dbg - Debug symbols for linux-image-4.9.0-9-parisc
+ linux-image-4.9.0-9-parisc64-smp - Linux 4.9 for multiprocessor 64-bit PA-RISC
+ linux-image-4.9.0-9-parisc64-smp-dbg - Debug symbols for linux-image-4.9.0-9-parisc64-smp
+ linux-image-4.9.0-9-powerpc - Linux 4.9 for uniprocessor 32-bit PowerPC
+ linux-image-4.9.0-9-powerpc-dbg - Debug symbols for linux-image-4.9.0-9-powerpc
+ linux-image-4.9.0-9-powerpc-smp - Linux 4.9 for multiprocessor 32-bit PowerPC
+ linux-image-4.9.0-9-powerpc-smp-dbg - Debug symbols for linux-image-4.9.0-9-powerpc-smp
+ linux-image-4.9.0-9-powerpc64 - Linux 4.9 for 64-bit PowerPC
+ linux-image-4.9.0-9-powerpc64-dbg - Debug symbols for linux-image-4.9.0-9-powerpc64
+ linux-image-4.9.0-9-powerpc64le - Linux 4.9 for Little-endian 64-bit PowerPC
+ linux-image-4.9.0-9-powerpc64le-dbg - Debug symbols for linux-image-4.9.0-9-powerpc64le
+ linux-image-4.9.0-9-powerpcspe - Linux 4.9 for 32-bit PowerPC with SPE (instead of AltiVec) with S
+ linux-image-4.9.0-9-powerpcspe-dbg - Debug symbols for linux-image-4.9.0-9-powerpcspe
+ linux-image-4.9.0-9-rt-686-pae - Linux 4.9 for modern PCs, PREEMPT_RT
+ linux-image-4.9.0-9-rt-686-pae-dbg - Debug symbols for linux-image-4.9.0-9-rt-686-pae
+ linux-image-4.9.0-9-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
+ linux-image-4.9.0-9-rt-amd64-dbg - Debug symbols for linux-image-4.9.0-9-rt-amd64
+ linux-image-4.9.0-9-s390x - Linux 4.9 for IBM zSeries
+ linux-image-4.9.0-9-s390x-dbg - Debug symbols for linux-image-4.9.0-9-s390x
+ linux-image-4.9.0-9-sh7751r - Linux 4.9 for sh7751r
+ linux-image-4.9.0-9-sh7751r-dbg - Debug symbols for linux-image-4.9.0-9-sh7751r
+ linux-image-4.9.0-9-sh7785lcr - Linux 4.9 for sh7785lcr
+ linux-image-4.9.0-9-sh7785lcr-dbg - Debug symbols for linux-image-4.9.0-9-sh7785lcr
+ linux-image-4.9.0-9-sparc64 - Linux 4.9 for uniprocessor 64-bit UltraSPARC
+ linux-image-4.9.0-9-sparc64-dbg - Debug symbols for linux-image-4.9.0-9-sparc64
+ linux-image-4.9.0-9-sparc64-smp - Linux 4.9 for multiprocessor 64-bit UltraSPARC
+ linux-image-4.9.0-9-sparc64-smp-dbg - Debug symbols for linux-image-4.9.0-9-sparc64-smp
+ linux-kbuild-4.9 - Kbuild infrastructure for Linux 4.9
+ linux-libc-dev - Linux support headers for userspace development
+ linux-manual-4.9 - Linux kernel API manual pages for version 4.9
+ linux-perf-4.9 - Performance analysis tools for Linux 4.9
+ linux-source-4.9 - Linux kernel source for version 4.9 with Debian patches
+ linux-support-4.9.0-9 - Support files for Linux 4.9
+ loop-modules-4.9.0-9-4kc-malta-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-5kc-malta-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-686-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-686-pae-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-alpha-generic-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-amd64-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-arm64-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-armmp-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-loongson-3-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-m68k-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-marvell-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-octeon-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-parisc-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-parisc64-smp-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-powerpc-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-powerpc64-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-powerpc64le-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-s390x-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-sh7751r-di - Loopback filesystem support (udeb)
+ loop-modules-4.9.0-9-sh7785lcr-di - Loopback filesystem support (udeb)
+ md-modules-4.9.0-9-4kc-malta-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-5kc-malta-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-686-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-686-pae-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-alpha-generic-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-amd64-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-arm64-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-armmp-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-loongson-3-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-m68k-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-marvell-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-octeon-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-parisc-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-parisc64-smp-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-powerpc-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-powerpc64-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-powerpc64le-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-s390x-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-sh7751r-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-sh7785lcr-di - RAID and LVM support (udeb)
+ md-modules-4.9.0-9-sparc64-di - RAID and LVM support (udeb)
+ minix-modules-4.9.0-9-4kc-malta-di - Minix filesystem support (udeb)
+ minix-modules-4.9.0-9-5kc-malta-di - Minix filesystem support (udeb)
+ minix-modules-4.9.0-9-loongson-3-di - Minix filesystem support (udeb)
+ minix-modules-4.9.0-9-marvell-di - Minix filesystem support (udeb)
+ minix-modules-4.9.0-9-octeon-di - Minix filesystem support (udeb)
+ minix-modules-4.9.0-9-sh7751r-di - Minix filesystem support (udeb)
+ minix-modules-4.9.0-9-sh7785lcr-di - Minix filesystem support (udeb)
+ mmc-core-modules-4.9.0-9-4kc-malta-di - MMC/SD/SDIO core modules (udeb)
+ mmc-core-modules-4.9.0-9-5kc-malta-di - MMC/SD/SDIO core modules (udeb)
+ mmc-core-modules-4.9.0-9-686-di - MMC/SD/SDIO core modules (udeb)
+ mmc-core-modules-4.9.0-9-686-pae-di - MMC/SD/SDIO core modules (udeb)
+ mmc-core-modules-4.9.0-9-amd64-di - MMC/SD/SDIO core modules (udeb)
+ mmc-modules-4.9.0-9-4kc-malta-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-5kc-malta-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-686-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-686-pae-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-amd64-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-arm64-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-armmp-di - MMC/SD card modules (udeb)
+ mmc-modules-4.9.0-9-marvell-di - MMC/SD card modules (udeb)
+ mouse-modules-4.9.0-9-4kc-malta-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-5kc-malta-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-686-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-686-pae-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-alpha-generic-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-amd64-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-marvell-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-parisc-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-parisc64-smp-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-powerpc-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-powerpc64-di - Mouse support (udeb)
+ mouse-modules-4.9.0-9-powerpc64le-di - Mouse support (udeb)
+ mtd-modules-4.9.0-9-armmp-di - MTD modules (udeb)
+ mtd-modules-4.9.0-9-marvell-di - MTD modules (udeb)
+ multipath-modules-4.9.0-9-4kc-malta-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-5kc-malta-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-686-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-686-pae-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-alpha-generic-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-amd64-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-arm64-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-armmp-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-loongson-3-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-marvell-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-octeon-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-parisc-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-parisc64-smp-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-powerpc-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-powerpc64-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-powerpc64le-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-s390x-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-sh7751r-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-sh7785lcr-di - Multipath support (udeb)
+ multipath-modules-4.9.0-9-sparc64-di - Multipath support (udeb)
+ nbd-modules-4.9.0-9-4kc-malta-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-5kc-malta-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-686-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-686-pae-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-alpha-generic-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-amd64-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-arm64-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-armmp-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-loongson-3-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-m68k-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-marvell-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-octeon-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-parisc-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-parisc64-smp-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-powerpc-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-powerpc64-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-powerpc64le-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-s390x-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-sh7751r-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-sh7785lcr-di - Network Block Device modules (udeb)
+ nbd-modules-4.9.0-9-sparc64-di - Network Block Device modules (udeb)
+ nfs-modules-4.9.0-9-loongson-3-di - NFS filesystem support (udeb)
+ nic-modules-4.9.0-9-4kc-malta-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-5kc-malta-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-686-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-686-pae-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-alpha-generic-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-amd64-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-arm64-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-armmp-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-loongson-3-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-marvell-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-octeon-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-parisc-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-parisc64-smp-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-powerpc-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-powerpc64-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-powerpc64le-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-s390x-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-sh7751r-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-sh7785lcr-di - NIC drivers (udeb)
+ nic-modules-4.9.0-9-sparc64-di - Network card modules for Sparc kernels (udeb)
+ nic-pcmcia-modules-4.9.0-9-686-di - Common PCMCIA NIC drivers (udeb)
+ nic-pcmcia-modules-4.9.0-9-686-pae-di - Common PCMCIA NIC drivers (udeb)
+ nic-pcmcia-modules-4.9.0-9-alpha-generic-di - Common PCMCIA NIC drivers (udeb)
+ nic-pcmcia-modules-4.9.0-9-amd64-di - Common PCMCIA NIC drivers (udeb)
+ nic-pcmcia-modules-4.9.0-9-powerpc-di - Common PCMCIA NIC drivers (udeb)
+ nic-pcmcia-modules-4.9.0-9-powerpc64-di - Common PCMCIA NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-4kc-malta-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-5kc-malta-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-686-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-686-pae-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-alpha-generic-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-amd64-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-arm64-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-armmp-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-loongson-3-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-m68k-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-marvell-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-octeon-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-parisc-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-parisc64-smp-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-powerpc-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-powerpc64-di - Shared NIC drivers (udeb)
+ nic-shared-modules-4.9.0-9-powerpc64le-di - Shared NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-4kc-malta-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-5kc-malta-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-686-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-686-pae-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-alpha-generic-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-amd64-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-arm64-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-armmp-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-loongson-3-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-marvell-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-octeon-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-parisc-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-parisc64-smp-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-sh7751r-di - USB NIC drivers (udeb)
+ nic-usb-modules-4.9.0-9-sh7785lcr-di - USB NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-4kc-malta-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-5kc-malta-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-686-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-686-pae-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-alpha-generic-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-amd64-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-arm64-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-armmp-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-loongson-3-di - Wireless NIC drivers (udeb)
+ nic-wireless-modules-4.9.0-9-octeon-di - Wireless NIC drivers (udeb)
+ ntfs-modules-4.9.0-9-4kc-malta-di - NTFS filesystem support (udeb)
+ ntfs-modules-4.9.0-9-5kc-malta-di - NTFS filesystem support (udeb)
+ ntfs-modules-4.9.0-9-686-di - NTFS filesystem support (udeb)
+ ntfs-modules-4.9.0-9-686-pae-di - NTFS filesystem support (udeb)
+ ntfs-modules-4.9.0-9-amd64-di - NTFS filesystem support (udeb)
+ ntfs-modules-4.9.0-9-loongson-3-di - NTFS filesystem support (udeb)
+ ntfs-modules-4.9.0-9-octeon-di - NTFS filesystem support (udeb)
+ pata-modules-4.9.0-9-4kc-malta-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-5kc-malta-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-686-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-686-pae-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-alpha-generic-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-amd64-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-armmp-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-loongson-3-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-octeon-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-parisc-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-parisc64-smp-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-powerpc-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-powerpc64-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-sh7751r-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-sh7785lcr-di - PATA drivers (udeb)
+ pata-modules-4.9.0-9-sparc64-di - PATA drivers (udeb)
+ pcmcia-modules-4.9.0-9-686-di - Common PCMCIA drivers (udeb)
+ pcmcia-modules-4.9.0-9-686-pae-di - Common PCMCIA drivers (udeb)
+ pcmcia-modules-4.9.0-9-alpha-generic-di - Common PCMCIA drivers (udeb)
+ pcmcia-modules-4.9.0-9-amd64-di - Common PCMCIA drivers (udeb)
+ pcmcia-modules-4.9.0-9-powerpc-di - Common PCMCIA drivers (udeb)
+ pcmcia-modules-4.9.0-9-powerpc64-di - Common PCMCIA drivers (udeb)
+ pcmcia-storage-modules-4.9.0-9-686-di - PCMCIA storage drivers (udeb)
+ pcmcia-storage-modules-4.9.0-9-686-pae-di - PCMCIA storage drivers (udeb)
+ pcmcia-storage-modules-4.9.0-9-amd64-di - PCMCIA storage drivers (udeb)
+ pcmcia-storage-modules-4.9.0-9-powerpc-di - PCMCIA storage drivers (udeb)
+ pcmcia-storage-modules-4.9.0-9-powerpc64-di - PCMCIA storage drivers (udeb)
+ ppp-modules-4.9.0-9-4kc-malta-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-5kc-malta-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-686-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-686-pae-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-alpha-generic-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-amd64-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-arm64-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-armmp-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-loongson-3-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-m68k-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-marvell-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-octeon-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-parisc-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-parisc64-smp-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-powerpc-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-powerpc64-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-powerpc64le-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-sh7751r-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-sh7785lcr-di - PPP drivers (udeb)
+ ppp-modules-4.9.0-9-sparc64-di - PPP drivers (udeb)
+ rtc-modules-4.9.0-9-octeon-di - RTC modules (udeb)
+ sata-modules-4.9.0-9-4kc-malta-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-5kc-malta-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-686-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-686-pae-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-alpha-generic-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-amd64-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-arm64-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-armmp-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-loongson-3-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-marvell-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-octeon-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-parisc-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-parisc64-smp-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-powerpc-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-powerpc64-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-powerpc64le-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-sh7751r-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-sh7785lcr-di - SATA drivers (udeb)
+ sata-modules-4.9.0-9-sparc64-di - SATA drivers (udeb)
+ scsi-core-modules-4.9.0-9-4kc-malta-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-5kc-malta-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-686-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-686-pae-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-alpha-generic-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-amd64-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-arm64-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-armmp-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-loongson-3-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-marvell-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-octeon-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-parisc-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-parisc64-smp-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-powerpc-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-powerpc64-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-powerpc64le-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-s390x-di - Core SCSI subsystem (udeb)
+ scsi-core-modules-4.9.0-9-sparc64-di - Core SCSI subsystem (udeb)
+ scsi-modules-4.9.0-9-4kc-malta-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-5kc-malta-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-686-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-686-pae-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-alpha-generic-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-amd64-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-arm64-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-armmp-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-loongson-3-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-m68k-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-octeon-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-parisc-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-parisc64-smp-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-powerpc-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-powerpc64-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-powerpc64le-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-s390x-di - SCSI drivers (udeb)
+ scsi-modules-4.9.0-9-sparc64-di - SCSI drivers (udeb)
+ serial-modules-4.9.0-9-686-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-686-pae-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-alpha-generic-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-amd64-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-parisc-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-parisc64-smp-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-powerpc-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-powerpc64-di - Serial drivers (udeb)
+ serial-modules-4.9.0-9-powerpc64le-di - Serial drivers (udeb)
+ sound-modules-4.9.0-9-4kc-malta-di - sound support (udeb)
+ sound-modules-4.9.0-9-5kc-malta-di - sound support (udeb)
+ sound-modules-4.9.0-9-686-di - sound support (udeb)
+ sound-modules-4.9.0-9-686-pae-di - sound support (udeb)
+ sound-modules-4.9.0-9-amd64-di - sound support (udeb)
+ sound-modules-4.9.0-9-loongson-3-di - sound support (udeb)
+ sound-modules-4.9.0-9-octeon-di - sound support (udeb)
+ sound-modules-4.9.0-9-sh7751r-di - sound support (udeb)
+ sound-modules-4.9.0-9-sh7785lcr-di - sound support (udeb)
+ speakup-modules-4.9.0-9-686-di - speakup modules (udeb)
+ speakup-modules-4.9.0-9-686-pae-di - speakup modules (udeb)
+ speakup-modules-4.9.0-9-amd64-di - speakup modules (udeb)
+ speakup-modules-4.9.0-9-loongson-3-di - speakup modules (udeb)
+ speakup-modules-4.9.0-9-sh7751r-di - speakup modules (udeb)
+ speakup-modules-4.9.0-9-sh7785lcr-di - speakup modules (udeb)
+ squashfs-modules-4.9.0-9-4kc-malta-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-5kc-malta-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-686-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-686-pae-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-alpha-generic-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-amd64-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-arm64-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-armmp-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-loongson-3-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-m68k-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-marvell-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-octeon-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-parisc-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-parisc64-smp-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-powerpc-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-powerpc64-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-powerpc64le-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-sh7751r-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-sh7785lcr-di - squashfs modules (udeb)
+ squashfs-modules-4.9.0-9-sparc64-di - squashfs modules (udeb)
+ srm-modules-4.9.0-9-alpha-generic-di - SRM modules (udeb)
+ udf-modules-4.9.0-9-4kc-malta-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-5kc-malta-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-686-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-686-pae-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-amd64-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-arm64-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-armmp-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-loongson-3-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-m68k-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-marvell-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-octeon-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-powerpc-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-powerpc64-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-powerpc64le-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-s390x-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-sh7751r-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-sh7785lcr-di - UDF modules (udeb)
+ udf-modules-4.9.0-9-sparc64-di - UDF modules (udeb)
+ ufs-modules-4.9.0-9-sparc64-di - UFS filesystem support (udeb)
+ uinput-modules-4.9.0-9-686-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-686-pae-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-amd64-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-arm64-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-armmp-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-marvell-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-powerpc-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-powerpc64-di - uinput support (udeb)
+ uinput-modules-4.9.0-9-powerpc64le-di - uinput support (udeb)
+ usb-modules-4.9.0-9-4kc-malta-di - USB support (udeb)
+ usb-modules-4.9.0-9-5kc-malta-di - USB support (udeb)
+ usb-modules-4.9.0-9-686-di - USB support (udeb)
+ usb-modules-4.9.0-9-686-pae-di - USB support (udeb)
+ usb-modules-4.9.0-9-alpha-generic-di - USB support (udeb)
+ usb-modules-4.9.0-9-amd64-di - USB support (udeb)
+ usb-modules-4.9.0-9-arm64-di - USB support (udeb)
+ usb-modules-4.9.0-9-armmp-di - USB support (udeb)
+ usb-modules-4.9.0-9-loongson-3-di - USB support (udeb)
+ usb-modules-4.9.0-9-marvell-di - USB support (udeb)
+ usb-modules-4.9.0-9-octeon-di - USB support (udeb)
+ usb-modules-4.9.0-9-parisc-di - USB support (udeb)
+ usb-modules-4.9.0-9-parisc64-smp-di - USB support (udeb)
+ usb-modules-4.9.0-9-powerpc-di - USB support (udeb)
+ usb-modules-4.9.0-9-powerpc64-di - USB support (udeb)
+ usb-modules-4.9.0-9-powerpc64le-di - USB support (udeb)
+ usb-modules-4.9.0-9-sparc64-di - USB support (udeb)
+ usb-serial-modules-4.9.0-9-4kc-malta-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-5kc-malta-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-686-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-686-pae-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-alpha-generic-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-amd64-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-loongson-3-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-marvell-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-octeon-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-parisc-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-parisc64-smp-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-powerpc-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-powerpc64-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-powerpc64le-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-sh7751r-di - USB serial drivers (udeb)
+ usb-serial-modules-4.9.0-9-sh7785lcr-di - USB serial drivers (udeb)
+ usb-storage-modules-4.9.0-9-4kc-malta-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-5kc-malta-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-686-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-686-pae-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-alpha-generic-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-amd64-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-arm64-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-armmp-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-loongson-3-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-marvell-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-octeon-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-parisc-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-parisc64-smp-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-powerpc-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-powerpc64-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-powerpc64le-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-sh7751r-di - USB storage support (udeb)
+ usb-storage-modules-4.9.0-9-sparc64-di - USB storage support (udeb)
+ usbip - USB device sharing system over IP network
+ virtio-modules-4.9.0-9-4kc-malta-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-5kc-malta-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-686-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-686-pae-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-alpha-generic-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-amd64-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-arm64-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-armmp-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-loongson-3-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-octeon-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-parisc-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-parisc64-smp-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-powerpc-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-powerpc64-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-powerpc64le-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-s390x-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-sh7751r-di - virtio modules (udeb)
+ virtio-modules-4.9.0-9-sparc64-di - virtio modules (udeb)
+ xfs-modules-4.9.0-9-4kc-malta-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-5kc-malta-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-686-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-686-pae-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-alpha-generic-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-amd64-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-arm64-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-loongson-3-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-octeon-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-parisc-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-parisc64-smp-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-powerpc-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-powerpc64-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-powerpc64le-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-s390x-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-sh7751r-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-sh7785lcr-di - XFS filesystem support (udeb)
+ xfs-modules-4.9.0-9-sparc64-di - XFS filesystem support (udeb)
+ zlib-modules-4.9.0-9-4kc-malta-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-5kc-malta-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-alpha-generic-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-armmp-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-loongson-3-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-m68k-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-marvell-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-octeon-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-parisc-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-parisc64-smp-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-powerpc-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-s390x-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-sh7751r-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-sh7785lcr-di - zlib modules (udeb)
+ zlib-modules-4.9.0-9-sparc64-di - zlib modules (udeb)
+Closes: 904385 918103 922306
+Changes:
+ linux (4.9.161-1) stretch; urgency=medium
+ .
+ * New upstream stable update:
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.145
+ - [armhf] media: omap3isp: Unregister media device as first
+ - [amd64] iommu/vt-d: Fix NULL pointer dereference in prq_event_thread()
+ - brcmutil: really fix decoding channel info for 160 MHz bandwidth
+ - HID: input: Ignore battery reported by Symbol DS4308
+ - batman-adv: Expand merged fragment buffer for full packet
+ - bnx2x: Assign unique DMAE channel number for FW DMAE transactions.
+ - qed: Fix PTT leak in qed_drain()
+ - qed: Fix reading wrong value in loop condition
+ - net/mlx4_core: Zero out lkey field in SW2HW_MPT fw command
+ - net/mlx4_core: Fix uninitialized variable compilation warning
+ - net/mlx4: Fix UBSAN warning of signed integer overflow
+ - [amd64] iommu/vt-d: Use memunmap to free memremap
+ - team: no need to do team_notify_peers or team_mcast_rejoin when
+ disabling port
+ - mm: don't warn about allocations which stall for too long
+ - usb: quirk: add no-LPM quirk on SanDisk Ultra Flair device
+ - usb: appledisplay: Add 27" Apple Cinema Display
+ - USB: check usb_get_extra_descriptor for proper size (CVE-2018-20169)
+ - ALSA: usb-audio: Fix UAF decrement if card has no live interfaces in
+ card.c (CVE-2018-19824)
+ - [x86] ALSA: hda: Add support for AMD Stoney Ridge
+ - ALSA: pcm: Fix starvation on down_write_nonblock()
+ - ALSA: pcm: Call snd_pcm_unlink() conditionally at closing
+ - ALSA: pcm: Fix interval evaluation with openmin/max
+ - [x86] ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570
+ - [s390x] virtio: avoid race on vcdev->config
+ - [s390x] virtio: fix race in ccw_io_helper()
+ - SUNRPC: Fix leak of krb5p encode pages
+ - [armhf] dmaengine: cppi41: delete channel from pending list when stop
+ channel
+ - xhci: Prevent U1/U2 link pm states if exit latency is too long
+ - swiotlb: clean up reporting
+ - vsock: lookup and setup guest_cid inside vhost_vsock_lock
+ - vhost/vsock: fix use-after-free in network stack callers
+ (CVE-2018-14625)
+ - cifs: Fix separator when building path from dentry
+ - staging: rtl8712: Fix possible buffer overrun
+ - tty: do not set TTY_IO_ERROR flag if console port
+ - mac80211_hwsim: Timer should be initialized before device registered
+ - mac80211: Clear beacon_int in ieee80211_do_stop
+ - mac80211: ignore tx status for PS stations in ieee80211_tx_status_ext
+ - mac80211: fix reordering of buffered broadcast packets
+ - mac80211: ignore NullFunc frames in the duplicate detection
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.146
+ - ipv6: Check available headroom in ip6_xmit() even without options
+ - net: 8139cp: fix a BUG triggered by changing mtu with network traffic
+ - net/mlx4_core: Correctly set PFC param if global pause is turned off.
+ - net: phy: don't allow __set_phy_supported to add unsupported modes
+ - net: Prevent invalid access to skb->prev in __qdisc_drop_all
+ - rtnetlink: ndo_dflt_fdb_dump() only work for ARPHRD_ETHER devices
+ - tcp: fix NULL ref in tail loss probe
+ - tun: forbid iface creation with rtnl ops
+ - neighbour: Avoid writing before skb->head in neigh_hh_output()
+ - [armhf] OMAP2+: prm44xx: Fix section annotation on
+ omap44xx_prm_enable_io_wakeup
+ - sysv: return 'err' instead of 0 in __sysv_write_inode
+ - [s390x] cpum_cf: Reject request for sampling in event initialization
+ - [armhf] ASoC: omap-abe-twl6040: Fix missing audio card caused by
+ deferred probing
+ - ASoC: dapm: Recalculate audio map forcely when card instantiated
+ - hwmon: (w83795) temp4_type has writable permission
+ - objtool: Fix double-free in .cold detection error path
+ - objtool: Fix segfault in .cold detection with -ffunction-sections
+ - Btrfs: send, fix infinite loop due to directory rename dependencies
+ - RDMA/mlx5: Fix fence type for IB_WR_LOCAL_INV WR
+ - [armhf] ASoC: omap-mcpdm: Add pm_qos handling to avoid under/overruns
+ with CPU_IDLE
+ - [armhf] ASoC: omap-dmic: Add pm_qos handling to avoid overruns with
+ CPU_IDLE
+ - exportfs: do not read dentry after free
+ - bpf: fix check of allowed specifiers in bpf_trace_printk
+ - ipvs: call ip_vs_dst_notifier earlier than ipv6_dev_notf
+ - [arm64] net: thunderx: fix NULL pointer dereference in nic_remove
+ - cachefiles: Fix page leak in cachefiles_read_backing_file while vmscan
+ is active
+ - igb: fix uninitialized variables
+ - ixgbe: recognize 1000BaseLX SFP modules as 1Gbps
+ - [arm64] net: hisilicon: remove unexpected free_netdev
+ - drm/ast: fixed reading monitor EDID not stable issue
+ - fscache: fix race between enablement and dropping of object
+ - ocfs2: fix deadlock caused by ocfs2_defrag_extent()
+ - hfs: do not free node before using
+ - hfsplus: do not free node before using
+ - ocfs2: fix potential use after free
+ - pstore: Convert console write to use ->write_buf
+ - staging: speakup: Replace strncpy with memcpy
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.147
+ - signal: Introduce COMPAT_SIGMINSTKSZ for use in compat_sys_sigaltstack
+ (Closes: #904385)
+ - timer/debug: Change /proc/timer_list from 0444 to 0400
+ - [armhf] pinctrl: sunxi: a83t: Fix IRQ offset typo for PH11
+ - aio: fix spectre gadget in lookup_ioctx
+ - [armhf] MMC: OMAP: fix broken MMC on OMAP15XX/OMAP5910/OMAP310
+ - [arm*] ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt
+ - tracing: Fix memory leak in set_trigger_filter()
+ - tracing: Fix memory leak of instance function hash filters
+ - [powerpc*] msi: Fix NULL pointer access in teardown code
+ - Revert "drm/rockchip: Allow driver to be shutdown on reboot/kexec"
+ - [x86] drm/i915/execlists: Apply a full mb before execution for Braswell
+ - mac80211: don't WARN on bad WMM parameters from buggy APs
+ - mac80211: Fix condition validating WMM IE
+ - [amd64] IB/hfi1: Remove race conditions in user_sdma send path
+ - [x86] locking: Remove smp_read_barrier_depends() from
+ queued_spin_lock_slowpath()
+ - [x86] locking/qspinlock: Ensure node is initialised before updating
+ prev->next
+ - [x86] locking/qspinlock: Bound spinning on pending->locked transition in
+ slowpath
+ - [x86] locking/qspinlock: Merge 'struct __qspinlock' into 'struct
+ qspinlock'
+ - [x86] locking/qspinlock: Remove unbounded cmpxchg() loop from locking
+ slowpath
+ - [x86] locking/qspinlock: Remove duplicate clear_pending() function from
+ PV code
+ - [x86] locking/qspinlock: Kill cmpxchg() loop when claiming lock from
+ head of queue
+ - [x86] locking/qspinlock: Re-order code
+ - [x86] locking/qspinlock/x86: Increase _Q_PENDING_LOOPS upper bound
+ - [x86] locking/qspinlock, x86: Provide liveness guarantee
+ - [x86] locking/qspinlock: Fix build for anonymous union in older GCC
+ compilers
+ - mac80211_hwsim: fix module init error paths for netlink
+ - scsi: libiscsi: Fix NULL pointer dereference in iscsi_eh_session_reset
+ - [x86] scsi: vmw_pscsi: Rearrange code to avoid multiple calls to
+ free_irq during unload
+ - [x86] earlyprintk/efi: Fix infinite loop on some screen widths
+ - [arm64] drm/msm: Grab a vblank reference when waiting for commit_done
+ - bonding: fix 802.3ad state sent to partner when unbinding slave
+ - nfs: don't dirty kernel pages read by direct-io
+ - SUNRPC: Fix a potential race in xprt_connect()
+ - [arm64] clk: mvebu: Off by one bugs in cp110_of_clk_get()
+ - [armhf] Input: omap-keypad - fix keyboard debounce configuration
+ - libata: whitelist all SAMSUNG MZ7KM* solid-state disks
+ - [armhf] mv88e6060: disable hardware level MAC learning
+ - net/mlx4_en: Fix build break when CONFIG_INET is off
+ - bpf: check pending signals while verifying programs
+ - [arm*] 8814/1: mm: improve/fix ARM v7_dma_inv_range() unaligned address
+ handling
+ - [arm*] 8815/1: V7M: align v7m_dma_inv_range() with v7 counterpart
+ - drm/ast: Fix connector leak during driver unload
+ - cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy (insecure
+ cifs)
+ - vhost/vsock: fix reset orphans race with close timeout
+ - [x86] i2c: scmi: Fix probe error on devices with an empty SMB0001 ACPI
+ device node
+ - nvmet-rdma: fix response use after free
+ - [armhf] rtc: snvs: add a missing write sync
+ - [armhf] rtc: snvs: Add timeouts to avoid kernel lockups
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.148
+ - block: break discard submissions into the user defined size
+ - block: fix infinite loop if the device loses discard capability
+ - ib_srpt: Fix a use-after-free in __srpt_close_all_ch()
+ - USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
+ (CVE-2018-19985)
+ - xhci: Don't prevent USB2 bus suspend in state check intended for USB3
+ only
+ - USB: serial: option: add GosunCn ZTE WeLink ME3630
+ - USB: serial: option: add HP lt4132
+ - USB: serial: option: add Simcom SIM7500/SIM7600 (MBIM mode)
+ - USB: serial: option: add Fibocom NL668 series
+ - USB: serial: option: add Telit LN940 series
+ - mmc: core: Reset HPI enabled state during re-init and in case of errors
+ - mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support
+ - mmc: core: Use a minimum 1600ms timeout when enabling CACHE ctrl
+ - [armhf] mmc: omap_hsmmc: fix DMA API warning
+ - [x86] Drivers: hv: vmbus: Return -EINVAL for the sys files for unopened
+ channels
+ - [x86] mtrr: Don't copy uninitialized gentry fields back to userspace
+ - [x86] fpu: Disable bottom halves while loading FPU registers
+ - ubifs: Handle re-linking of inodes correctly while recovery
+ - panic: avoid deadlocks in re-entrant console drivers
+ - proc/sysctl: don't return ENOMEM on lookup when a table is unregistering
+ - drm/ioctl: Fix Spectre v1 vulnerabilities
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.149
+ - ip6mr: Fix potential Spectre v1 vulnerability
+ - ipv4: Fix potential Spectre v1 vulnerability
+ - ax25: fix a use-after-free in ax25_fillin_cb()
+ - [ppc64el] ibmveth: fix DMA unmap error in ibmveth_xmit_start error path
+ - ieee802154: lowpan_header_create check must check daddr
+ - ipv6: explicitly initialize udp6_addr in udp_sock_create6()
+ - ipv6: tunnels: fix two use-after-free
+ - isdn: fix kernel-infoleak in capi_unlocked_ioctl
+ - net: ipv4: do not handle duplicate fragments as overlapping
+ - net: phy: Fix the issue that netif always links up after resuming
+ - netrom: fix locking in nr_find_socket()
+ - packet: validate address length
+ - packet: validate address length if non-zero
+ - sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event
+ - tipc: fix a double kfree_skb()
+ - vhost: make sure used idx is seen before log in vhost_add_used_n()
+ - [x86] VSOCK: Send reset control packet when socket is partially bound
+ - xen/netfront: tolerate frags with no data
+ - tipc: use lock_sock() in tipc_sk_reinit()
+ - tipc: compare remote and local protocols in tipc_udp_enable()
+ - gro_cell: add napi_disable in gro_cells_destroy
+ - net/mlx5e: Remove the false indication of software timestamping support
+ - net/mlx5: Typo fix in del_sw_hw_rule
+ - sock: Make sock->sk_stamp thread-safe
+ - ptr_ring: wrap back ->producer in __ptr_ring_swap_queue()
+ - ALSA: rme9652: Fix potential Spectre v1 vulnerability
+ - ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities
+ - ALSA: pcm: Fix potential Spectre v1 vulnerability
+ - ALSA: emux: Fix potential Spectre v1 vulnerabilities
+ - ALSA: hda: add mute LED support for HP EliteBook 840 G4
+ - [arm64,armhf] ALSA: hda/tegra: clear pending irq handlers
+ - USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays
+ - USB: serial: option: add Fibocom NL678 series
+ - qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID
+ - Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G
+ - [x86] KVM: Use jmp to invoke kvm_spurious_fault() from .fixup
+ - platform-msi: Free descriptors in platform_msi_domain_free()
+ - perf pmu: Suppress potential format-truncation warning
+ - ext4: fix possible use after free in ext4_quota_enable
+ - ext4: missing unlock/put_page() in ext4_try_to_write_inline_data()
+ - ext4: fix EXT4_IOC_GROUP_ADD ioctl
+ - ext4: include terminating u32 in size of xattr entries when expanding
+ inodes
+ - ext4: force inode writes when nfsd calls commit_metadata()
+ - [arm64,armhf] spi: bcm2835: Fix race on DMA termination
+ - [arm64,armhf] spi: bcm2835: Fix book-keeping of DMA termination
+ - [arm64,armhf] spi: bcm2835: Avoid finishing transfer prematurely in IRQ
+ mode
+ - [armhf] clk: rockchip: fix typo in rk3188 spdif_frac parent
+ - cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader.
+ - f2fs: fix validation of the block count in sanity_check_raw_super
+ - media: vivid: free bitmap_cap when updating std/timings/etc.
+ - media: v4l2-tpg: array index could become negative
+ - [mips*] Ensure pmd_present() returns false after pmd_mknotpresent()
+ - [mips*] OCTEON: mark RGMII interface disabled on OCTEON III
+ - CIFS: Fix error mapping for SMB2_LOCK command which caused OFD lock problem
+ - [x86] kvm/vmx: do not use vm-exit instruction length for fast MMIO when
+ running nested
+ - [arm64] KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1
+ - [armhf] rtc: m41t80: Correct alarm month range with RTC reads
+ - [x86] tpm: tpm_i2c_nuvoton: use correct command duration for TPM 2.x
+ - [arm64,armhf] spi: bcm2835: Unbreak the build of esoteric configs
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.150
+ - [arm64] pinctrl: meson: fix pull enable register calculation
+ - Input: restore EV_ABS ABS_RESERVED
+ - xfrm: Fix bucket count reported to userspace
+ - netfilter: seqadj: re-load tcp header pointer after possible head
+ reallocation
+ - scsi: bnx2fc: Fix NULL dereference in error handling
+ - [armhf] Input: omap-keypad - fix idle configuration to not block SoC
+ idle states
+ - netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel
+ - bnx2x: Clear fip MAC when fcoe offload support is disabled
+ - bnx2x: Remove configured vlans as part of unload sequence.
+ - bnx2x: Send update-svid ramrod with retry/poll flags enabled
+ - scsi: target: iscsi: cxgbit: fix csk leak
+ - scsi: target: iscsi: cxgbit: add missing spin_lock_init()
+ - [arm64] net: hns: Incorrect offset address used for some registers.
+ - [arm64] net: hns: All ports can not work when insmod hns ko after rmmod.
+ - [arm64] net: hns: Some registers use wrong address according to the
+ datasheet.
+ - [arm64] net: hns: Fixed bug that netdev was opened twice
+ - [arm64] net: hns: Clean rx fbd when ae stopped.
+ - [arm64] net: hns: Free irq when exit from abnormal branch
+ - [arm64] net: hns: Avoid net reset caused by pause frames storm
+ - [arm64] net: hns: Fix ntuple-filters status error.
+ - net: hns: Add mac pcs config when enable|disable mac
+ - SUNRPC: Fix a race with XPRT_CONNECTING
+ - lan78xx: Resolve issue with changing MAC address
+ - vxge: ensure data0 is initialized in when fetching firmware version
+ information
+ - net: netxen: fix a missing check and an uninitialized use
+ - [s390x] scsi: zfcp: fix posting too many status read buffers leading to
+ adapter shutdown
+ - libceph: fix CEPH_FEATURE_CEPHX_V2 check in calc_signature()
+ - fork: record start_time late
+ - hwpoison, memory_hotplug: allow hwpoisoned pages to be offlined
+ - mm, devm_memremap_pages: mark devm_memremap_pages() EXPORT_SYMBOL_GPL
+ - mm, devm_memremap_pages: kill mapping "System RAM" support
+ - sunrpc: fix cache_head leak due to queued request
+ - sunrpc: use SVC_NET() in svcauth_gss_* functions
+ - [mips*] math-emu: Write-protect delay slot emulation pages
+ - [amd64] crypto: x86/chacha20 - avoid sleeping with preemption disabled
+ - vhost/vsock: fix uninitialized vhost_vsock->guest_cid
+ - [amd64] IB/hfi1: Incorrect sizing of sge for PIO will OOPs
+ - ALSA: cs46xx: Potential NULL dereference in probe
+ - ALSA: usb-audio: Avoid access before bLength check in
+ build_audio_procunit()
+ - ALSA: usb-audio: Fix an out-of-bound read in create_composite_quirks
+ - dlm: fixed memory leaks after failed ls_remove_names allocation
+ - dlm: possible memory leak on error path in create_lkb()
+ - dlm: lost put_lkb on error path in receive_convert() and
+ receive_unlock()
+ - dlm: memory leaks on error path in dlm_user_request()
+ - gfs2: Get rid of potential double-freeing in gfs2_create_inode
+ - gfs2: Fix loop in gfs2_rbm_find
+ - b43: Fix error in cordic routine
+ - [powerpc*] tm: Set MSR[TS] just prior to recheckpoint
+ - 9p/net: put a lower bound on msize
+ - rxe: fix error completion wr_id and qp_num
+ - [amd64] iommu/vt-d: Handle domain agaw being less than iommu agaw
+ - ceph: don't update importing cap's mseq when handing cap export
+ - [ppc64el] genwqe: Fix size check
+ - [x86] intel_th: msu: Fix an off-by-one in attribute store
+ - [i386] power: supply: olpc_battery: correct the temperature units
+ - [arm64,armhf] drm/vc4: Set ->is_yuv to false when num_planes == 1
+ - bnx2x: Fix NULL pointer dereference in bnx2x_del_all_vlans() on some hw
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.151
+ - ALSA: hda/realtek - Disable headset Mic VREF for headset mode of ALC225
+ - CIFS: Do not hide EINTR after sending network packets
+ - cifs: Fix potential OOB access of lock element array
+ - usb: cdc-acm: send ZLP for Telit 3G Intel based modems
+ - USB: storage: don't insert sane sense for SPC3+ when bad sense specified
+ - USB: storage: add quirk for SMI SM3350
+ - USB: Add USB_QUIRK_DELAY_CTRL_MSG quirk for Corsair K70 RGB
+ - slab: alien caches must not be initialized if the allocation of the
+ alien cache failed
+ - mm: page_mapped: don't assume compound page is huge or THP
+ - ACPI: power: Skip duplicate power resource references in _PRx
+ - i2c: dev: prevent adapter retries and timeout being set as minus value
+ - rbd: don't return 0 on unmap if RBD_DEV_FLAG_REMOVING is set
+ - ext4: make sure enough credits are reserved for dioread_nolock writes
+ - ext4: fix a potential fiemap/page fault deadlock w/ inline_data
+ - ext4: avoid kernel warning when writing the superblock to a dead device
+ - sunrpc: use-after-free in svc_process_common() (CVE-2018-16884)
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.152
+ - tty/ldsem: Wake up readers after timed out down_write()
+ - tty: Hold tty_ldisc_lock() during tty_reopen()
+ - tty: Simplify tty->count math in tty_reopen()
+ - tty: Don't hold ldisc lock in tty_reopen() if ldisc present
+ - can: gw: ensure DLC boundaries after CAN frame modification
+ (CVE-2019-3701)
+ - Revert "f2fs: do not recover from previous remained wrong dnodes"
+ - media: em28xx: Fix misplaced reset of dev->v4l::field_count
+ - proc: Remove empty line in /proc/self/status
+ - [arm64] kvm: consistently handle host HCR_EL2 flags
+ - [arm64] Don't trap host pointer auth use to EL2
+ - ipv6: fix kernel-infoleak in ipv6_local_error()
+ - net: bridge: fix a bug on using a neighbour cache entry without checking
+ its state
+ - packet: Do not leak dev refcounts on error exit
+ - bonding: update nest level on unlink
+ - ip: on queued skb use skb_header_pointer instead of pskb_may_pull
+ - crypto: authencesn - Avoid twice completion call in decrypt path
+ - crypto: authenc - fix parsing key with misaligned rta_len
+ - btrfs: wait on ordered extents on abort cleanup
+ - Yama: Check for pid death before checking ancestry
+ - scsi: core: Synchronize request queue PM status only on successful
+ resume
+ - scsi: sd: Fix cache_type_store()
+ - [arm64] kaslr: ensure randomized quantities are clean to the PoC
+ - [mips*] Disable MSI also when pcie-octeon.pcie_disable on
+ - media: vivid: fix error handling of kthread_run
+ - media: vivid: set min width/height to a value > 0
+ - LSM: Check for NULL cred-security on free
+ - media: vb2: vb2_mmap: move lock up
+ - sunrpc: handle ENOMEM in rpcb_getport_async
+ - netfilter: ebtables: account ebt_table_info to kmemcg
+ - selinux: fix GPF on invalid policy
+ - blockdev: Fix livelocks on loop device
+ - sctp: allocate sctp_sockaddr_entry with kzalloc
+ - tipc: fix uninit-value in tipc_nl_compat_link_reset_stats
+ - tipc: fix uninit-value in tipc_nl_compat_bearer_enable
+ - tipc: fix uninit-value in tipc_nl_compat_link_set
+ - tipc: fix uninit-value in tipc_nl_compat_name_table_dump
+ - tipc: fix uninit-value in tipc_nl_compat_doit
+ - block/loop: Use global lock for ioctl() operation.
+ - loop: Fold __loop_release into loop_release
+ - loop: Get rid of loop_index_mutex
+ - loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()
+ - drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock
+ - mm, memcg: fix reclaim deadlock with writeback
+ - media: vb2: be sure to unlock mutex on errors
+ - nbd: set the logical and physical blocksize properly
+ - nbd: Use set_blocksize() to set device blocksize
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.153
+ - r8169: Add support for new Realtek Ethernet
+ - ipv6: Consider sk_bound_dev_if when binding a socket to a v4 mapped
+ address
+ - ipv6: Take rcu_read_lock in __inet6_bind for mapped addresses
+ - [x86] platform: asus-wmi: Tell the EC the OS will handle the display off
+ hotkey
+ - e1000e: allow non-monotonic SYSTIM readings
+ - writeback: don't decrement wb->refcnt if !wb->bdi
+ - [arm64,armhf] serial: set suppress_bind_attrs flag only if builtin
+ - ALSA: oxfw: add support for APOGEE duet FireWire
+ - [arm64] perf: set suppress_bind_attrs flag to true
+ - selinux: always allow mounting submounts
+ - rxe: IB_WR_REG_MR does not capture MR's iova field
+ - jffs2: Fix use of uninitialized delayed_work, lockdep breakage
+ - pstore/ram: Do not treat empty buffers as valid
+ - [ppc64el] powerpc/xmon: Fix invocation inside lock region
+ - [powerpc*] powerpc/pseries/cpuidle: Fix preempt warning
+ - media: firewire: Fix app_info parameter type in avc_ca{,_app}_info
+ - net: call sk_dst_reset when set SO_DONTROUTE
+ - scsi: target: use consistent left-aligned ASCII INQUIRY data
+ - [armhf] clk: imx6q: reset exclusive gates on init
+ - tty/serial: do not free trasnmit buffer page under port lock
+ - [x86] perf intel-pt: Fix error with config term "pt=0"
+ - perf svghelper: Fix unchecked usage of strncpy()
+ - perf parse-events: Fix unchecked usage of strncpy()
+ - dm kcopyd: Fix bug causing workqueue stalls
+ - dm snapshot: Fix excessive memory usage and workqueue stalls
+ - ALSA: bebob: fix model-id of unit for Apogee Ensemble
+ - sysfs: Disable lockdep for driver bind/unbind files
+ - scsi: smartpqi: correct lun reset issues
+ - scsi: megaraid: fix out-of-bound array accesses
+ - ocfs2: fix panic due to unrecovered local alloc
+ - mm/page-writeback.c: don't break integrity writeback on ->writepage()
+ error
+ - mm, proc: be more verbose about unstable VMA flags in /proc/<pid>/smaps
+ - [arm64] ipmi:ssif: Fix handling of multi-part return messages
+ - locking/qspinlock: Pull in asm/byteorder.h to ensure correct endianness
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.154
+ - net: bridge: Fix ethernet header pointer before check skb forwardable
+ - net: Fix usage of pskb_trim_rcsum
+ - openvswitch: Avoid OOB read when parsing flow nlattrs
+ - vhost: log dirty page correctly
+ - net: ipv4: Fix memory leak in network namespace dismantle
+ - net_sched: refetch skb protocol for each filter
+ - ipfrag: really prevent allocation on netns exit
+ - USB: serial: simple: add Motorola Tetra TPG2200 device id
+ - USB: serial: pl2303: add new PID to support PL2303TB
+ - [x86] ASoC: atom: fix a missing check of snd_pcm_lib_malloc_pages
+ - [s390x] early: improve machine detection
+ - [s390x] smp: fix CPU hotplug deadlock with CPU rescan
+ - [x86] char/mwave: fix potential Spectre v1 vulnerability
+ - staging: rtl8188eu: Add device code for D-Link DWA-121 rev B1
+ - tty: Handle problem if line discipline does not have receive_buf
+ - uart: Fix crash in uart_write and uart_put_char
+ - [x86] tty/n_hdlc: fix __might_sleep warning
+ - CIFS: Fix possible hang during async MTU reads and writes
+ - Input: xpad - add support for SteelSeries Stratus Duo
+ - compiler.h: enable builtin overflow checkers and add fallback code
+ - Input: uinput - fix undefined behavior in uinput_validate_absinfo()
+ - [x86] acpi/nfit: Block function zero DSMs
+ - [x86] acpi/nfit: Fix command-supported detection
+ - dm thin: fix passdown_double_checking_shared_status()
+ - [x86] KVM: Fix single-step debugging
+ - [x86] kaslr: Fix incorrect i8254 outb() parameters
+ - can: dev: __can_get_echo_skb(): fix bogous check for non-existing skb by
+ removing it
+ - can: bcm: check timer values before ktime conversion
+ - vt: invoke notifier on screen size change
+ - perf unwind: Unwind with libdw doesn't take symfs into account
+ - perf unwind: Take pgoff into account when reporting elf to libdwfl
+ - [arm64] irqchip/gic-v3-its: Align PCI Multi-MSI allocation on their size
+ - [s390x] smp: Fix calling smp_call_ipl_cpu() from ipl CPU
+ - nvmet-rdma: Add unlikely for response allocated check
+ - nvmet-rdma: fix null dereference under heavy load
+ - f2fs: read page index before freeing
+ - btrfs: fix error handling in btrfs_dev_replace_start
+ - btrfs: dev-replace: go back to suspended state if target device is
+ missing
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.155
+ - Fix "net: ipv4: do not handle duplicate fragments as overlapping"
+ - fs: add the fsnotify call to vfs_iter_write
+ - ipv6: Consider sk_bound_dev_if when binding a socket to an address
+ (Closes: #918103)
+ - l2tp: copy 4 more bytes to linear part if necessary
+ - net/mlx4_core: Add masking for a few queries on HCA caps
+ - netrom: switch to sock timer API
+ - net/rose: fix NULL ax25_cb kernel panic
+ - net/mlx5e: Allow MAC invalidation while spoofchk is ON
+ - l2tp: remove l2specific_len dependency in l2tp_core
+ - l2tp: fix reading optional fields of L2TPv3
+ - ipvlan, l3mdev: fix broken l3s mode wrt local routes
+ - CIFS: Do not count -ENODATA as failure for query directory
+ - fs/dcache: Fix incorrect nr_dentry_unused accounting in
+ shrink_dcache_sb()
+ - [arm64] kaslr: ensure randomized quantities are clean also when kaslr is
+ off
+ - [arm64] hyp-stub: Forbid kprobing of the hyp-stub
+ - [arm64] hibernate: Clean the __hyp_text to PoC after resume
+ - gfs2: Revert "Fix loop in gfs2_rbm_find"
+ - [x86] platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK
+ - [x86] platform/x86: asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan
+ codes
+ - [arm64,armhf] mmc: sdhci-iproc: handle mmc_of_parse() errors during
+ probe
+ - kernel/exit.c: release ptraced tasks before zap_pid_ns_processes
+ - mm, oom: fix use-after-free in oom_kill_process
+ - mm: hwpoison: use do_send_sig_info() instead of force_sig()
+ - mm: migrate: don't rely on __PageMovable() of newpage after unlocking it
+ - cifs: Always resolve hostname before reconnecting
+ - drivers: core: Remove glue dirs from sysfs earlier
+ - fs: don't scan the inode cache before SB_BORN is set
+ - fanotify: fix handling of events on child sub-directory
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.156
+ - drm/bufs: Fix Spectre v1 vulnerability
+ - [x86] ASoC: Intel: mrfld: fix uninitialized variable access
+ - [armhf] gpu: ipu-v3: image-convert: Prevent race between run and
+ unprepare
+ - scsi: lpfc: Correct LCB RJT handling
+ - [armhf] 8808/1: kexec:offline panic_smp_self_stop CPU
+ - dlm: Don't swamp the CPU with callbacks queued during recovery
+ - [x86] PCI: Fix Broadcom CNB20LE unintended sign extension (redux)
+ - [ppc64el] powerpc/pseries: add of_node_put() in dlpar_detach_node()
+ - [arm64,armhf] drm/vc4: ->x_scaling[1] should never be set to
+ VC4_SCALING_NONE
+ - ptp: check gettime64 return code in PTP_SYS_OFFSET ioctl
+ - [arm64,armhf] soc/tegra: Don't leak device tree node reference
+ - [x86] iio: accel: kxcjk1013: Add KIOX010A ACPI Hardware-ID
+ - media: adv*/tc358743/ths8200: fill in min width/height/pixelclock
+ - f2fs: move dir data flush to write checkpoint process
+ - f2fs: fix wrong return value of f2fs_acl_create
+ - nfsd4: fix crash on writing v4_end_grace before nfsd startup
+ - Thermal: do not clear passive state during system sleep
+ - firmware/efi: Add NULL pointer checks in efivars API functions
+ - [arm64] ftrace: don't adjust the LR value
+ - [x86] fpu: Add might_fault() to user_insn()
+ - smack: fix access permissions for keyring
+ - usb: hub: delay hub autosuspend if USB3 port is still link training
+ - timekeeping: Use proper seqcount initializer
+ - [armhf] clk: sunxi-ng: a33: Set CLK_SET_RATE_PARENT for all audio module
+ clocks
+ - [amd64] iommu/amd: Fix amd_iommu=force_isolation
+ - [armhf] dts: Fix OMAP4430 SDP Ethernet startup
+ - [mips*] bpf: fix encoding bug for mm_srlv32_op
+ - [arm64,armhf] iommu/arm-smmu: Add support for qcom,smmu-v2 variant
+ - [arm64] iommu/arm-smmu-v3: Use explicit mb() when moving cons pointer
+ - udf: Fix BUG on corrupted inode
+ - memstick: Prevent memstick host from getting runtime suspended during
+ card detection
+ - [armhf] tty: serial: samsung: Properly set flags in autoCTS mode
+ - perf header: Fix unchecked usage of strncpy()
+ - perf probe: Fix unchecked usage of strncpy()
+ - [arm64] KVM: Skip MMIO insn after emulation
+ - mac80211: fix radiotap vendor presence bitmap handling
+ - xfrm6_tunnel: Fix spi check in __xfrm6_tunnel_alloc_spi
+ - Bluetooth: Fix unnecessary error message for HCI request completion
+ - scsi: smartpqi: correct host serial num for ssa
+ - scsi: smartpqi: correct volume status
+ - drbd: narrow rcu_read_lock in drbd_sync_handshake
+ - drbd: disconnect, if the wrong UUIDs are attached on a connected peer
+ - drbd: skip spurious timeout (ping-timeo) when failing promote
+ - fbdev: fbmem: behave better with small rotated displays and many CPUs
+ - i40e: define proper net_device::neigh_priv_len
+ - igb: Fix an issue that PME is not enabled during runtime suspend
+ - fbdev: fbcon: Fix unregister crash when more than one framebuffer
+ - [arm64] pinctrl: meson: meson8: fix the GPIO function for the GPIOAO
+ pins
+ - [arm64] pinctrl: meson: meson8b: fix the GPIO function for the GPIOAO
+ pins
+ - [x86] KVM: svm: report MSR_IA32_MCG_EXT_CTL as unsupported
+ - NFS: nfs_compare_mount_options always compare auth flavors.
+ - hwmon: (lm80) fix a missing check of the status of SMBus read
+ - hwmon: (lm80) fix a missing check of bus read in lm80 probe
+ - seq_buf: Make seq_buf_puts() null-terminate the buffer
+ - cifs: check ntwrk_buf_start for NULL before dereferencing it
+ - um: Avoid marking pages with "changed protection"
+ - niu: fix missing checks of niu_pci_eeprom_read
+ - f2fs: fix sbi->extent_list corruption issue
+ - ocfs2: don't clear bh uptodate for block read
+ - HID: lenovo: Add checks to fix of_led_classdev_register
+ - kernel/hung_task.c: break RCU locks based on jiffies
+ - proc/sysctl: fix return error for proc_doulongvec_minmax()
+ - fs/epoll: drop ovflist branch prediction
+ - exec: load_script: don't blindly truncate shebang string
+ - dccp: fool proof ccid_hc_[rt]x_parse_options()
+ - rxrpc: bad unlock balance in rxrpc_recvmsg
+ - skge: potential memory corruption in skge_get_regs()
+ - rds: fix refcount bug in rds_sock_addref
+ - net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames
+ - [armhf] net: dsa: slave: Don't propagate flag changes on down slave
+ interfaces
+ - enic: fix checksum validation for IPv6
+ - ALSA: compress: Fix stop handling on compressed capture streams
+ - ALSA: hda - Serialize codec registrations
+ - fuse: call pipe_buf_release() under pipe lock
+ - fuse: decrement NR_WRITEBACK_TEMP on the right page
+ - fuse: handle zero sized retrieve correctly
+ - [arm64,armhf] dmaengine: bcm2835: Fix interrupt race on RT
+ - [arm64,armhf] dmaengine: bcm2835: Fix abort of transactions
+ - [armhf] dmaengine: imx-dma: fix wrong callback invoke
+ - [armhf] usb: phy: am335x: fix race condition in _probe
+ - [armhf] usb: gadget: musb: fix short isoc packets with inventra dma
+ - scsi: aic94xx: fix module loading
+ - [x86] KVM: work around leak of uninitialized stack contents
+ (CVE-2019-7222)
+ - kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
+ - [x86] KVM: nVMX: unconditionally cancel preemption timer in free_nested
+ (CVE-2019-7221)
+ - [x86] perf/x86/intel/uncore: Add Node ID mask
+ - [x86] MCE: Initialize mce.bank in the case of a fatal error in
+ mce_no_way_out()
+ - perf/core: Don't WARN() for impossible ring-buffer sizes
+ - perf tests evsel-tp-sched: Fix bitwise operator
+ - serial: fix race between flush_to_ldisc and tty_open
+ - oom, oom_reaper: do not enqueue same task twice
+ - [amd64] PCI: vmd: Free up IRQs on suspend path
+ - [amd64] IB/hfi1: Add limit test for RC/UC send via loopback
+ - [x86] perf/x86/intel: Delay memory deallocation until x86_pmu_dead_cpu()
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.157
+ - [armhf] mtd: rawnand: gpmi: fix MX28 bus master lockup problem
+ - signal: Always notice exiting tasks
+ - signal: Better detection of synchronous signals
+ - [arm64,armhf] misc: vexpress: Off by one in vexpress_syscfg_exec()
+ - debugfs: fix debugfs_rename parameter checking
+ - [mips*] cm: reprime error cause
+ - [mips*] OCTEON: don't set octeon_dma_bar_type if PCI is disabled
+ - mac80211: ensure that mgmt tx skbs have tailroom for encryption
+ - drm/modes: Prevent division by zero htotal
+ - [x86] drm/vmwgfx: Fix setting of dma masks
+ - [x86] drm/vmwgfx: Return error code from vmw_execbuf_copy_fence_user
+ - nfsd4: fix cached replies to solo SEQUENCE compounds
+ - nfsd4: catch some false session retries
+ - HID: debug: fix the ring buffer implementation (CVE-2019-3819)
+ - Revert "cifs: In Kconfig CONFIG_CIFS_POSIX needs depends on legacy
+ (insecure cifs)"
+ - libceph: avoid KEEPALIVE_PENDING races in ceph_con_keepalive()
+ - xfrm: refine validation of template and selector families
+ - batman-adv: Avoid WARN on net_device without parent in netns
+ - batman-adv: Force mac header to start of data on xmit
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.158
+ - Revert "exec: load_script: don't blindly truncate shebang string"
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.159
+ - dt-bindings: eeprom: at24: add "atmel,24c2048" compatible string
+ - eeprom: at24: add support for 24c2048
+ - uapi/if_ether.h: prevent redefinition of struct ethhdr
+ - [armel,armhf] 8789/1: signal: copy registers using __copy_to_user()
+ - [armel,armhf] 8791/1: vfp: use __copy_to_user() when saving VFP state
+ - [armel,armhf] 8793/1: signal: replace __put_user_error with __put_user
+ - [armel,armhf] 8794/1: uaccess: Prevent speculative use of the current
+ addr_limit
+ - [armel,armhf] 8795/1: spectre-v1.1: use put_user() for __put_user()
+ - [armel,armhf] 8796/1: spectre-v1,v1.1: provide helpers for address
+ sanitization
+ - [armel,armhf] 8797/1: spectre-v1.1: harden __copy_to_user
+ - [armel,armhf] 8810/1: vfp: Fix wrong assignement to ufp_exc
+ - [armel,armhf] make lookup_processor_type() non-__init
+ - [armel,armhf] split out processor lookup
+ - [armel,armhf] clean up per-processor check_bugs method call
+ - [armel,armhf] add PROC_VTABLE and PROC_TABLE macros
+ - [armel,armhf] spectre-v2: per-CPU vtables to work around big.Little
+ systems
+ - [armel,armhf] ensure that processor vtables is not lost after boot
+ - [armel,armhf] fix the cockup in the previous patch
+ - net: create skb_gso_validate_mac_len() (CVE-2018-1000026)
+ - bnx2x: disable GSO where gso_size is too big for hardware
+ (CVE-2018-1000026)
+ - [i386] ACPI: NUMA: Use correct type for printing addresses on i386-PAE
+ - cpufreq: check if policy is inactive early in __cpufreq_get()
+ - [armel] dts: kirkwood: Fix polarity of GPIO fan lines
+ - cifs: Limit memory used by lock request calls to a page
+ - perf report: Include partial stacks unwound with libdw
+ - Revert "Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire
+ F5-573G"
+ - Input: elan_i2c - add ACPI ID for touchpad in Lenovo V330-15ISK
+ - perf/core: Fix impossible ring-buffer sizes warning
+ - [x86] perf: Add check_period PMU callback
+ - ALSA: hda - Add quirk for HP EliteBook 840 G5
+ - ALSA: usb-audio: Fix implicit fb endpoint setup by quirk
+ - [x86] kvm: vmx: Fix entry number check for add_atomic_switch_msr()
+ - Input: elantech - enable 3rd button support on Fujitsu CELSIUS H780
+ - [alpha] fix page fault handling for r16-r18 targets
+ - [alpha] Fix Eiger NR_IRQS to 128
+ - tracing/uprobes: Fix output for multiple string arguments
+ - signal: Restore the stop PTRACE_EVENT_EXIT
+ - [amd64] x86/a.out: Clear the dump structure initially
+ - dm thin: fix bug where bio that overwrites thin block ignores FUA
+ - [x86] drm/i915: Prevent a race during I915_GEM_MMAP ioctl with WC set
+ - smsc95xx: Use skb_cow_head to deal with cloned skbs
+ - ch9200: use skb_cow_head() to deal with cloned skbs
+ - kaweth: use skb_cow_head() to deal with cloned skbs
+ - [arm64,armhf] usb: dwc2: Remove unnecessary kfree
+ - netfilter: nf_tables: fix mismatch in big-endian system
+ - [arm64] pinctrl: msm: fix gpio-hog related boot issues
+ - mm: stop leaking PageTables
+ - uapi/if_ether.h: move __UAPI_DEF_ETHHDR libc define
+ - Revert "scsi: aic94xx: fix module loading"
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.160
+ - net: fix IPv6 prefix route residue
+ - [x86] vsock: cope with memory allocation failure at socket creation time
+ - hwmon: (lm80) Fix missing unlock on error in set_fan_div()
+ - net: Fix for_each_netdev_feature on Big endian
+ - [arm64,armhf] net: stmmac: handle endianness in dwmac4_get_timestamp
+ - sky2: Increase D3 delay again
+ - vhost: correctly check the return value of translate_desc() in
+ log_used()
+ - net: Add header for usage of fls64()
+ - tcp: tcp_v4_err() should be more careful
+ - net: Do not allocate page fragments that are not skb aligned
+ - tcp: clear icsk_backoff in tcp_write_queue_purge()
+ - vxlan: test dev->flags & IFF_UP before calling netif_rx()
+ - [arm64,armhf] net: stmmac: Fix a race in EEE enable callback
+ - net: ipv4: use a dedicated counter for icmp_v4 redirect packets
+ - btrfs: Remove false alert when fiemap range is smaller than on-disk
+ extent
+ - mISDN: fix a race in dev_expire_timer()
+ - ax25: fix possible use-after-free
+ https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.161
+ - mac80211: Free mpath object when rhashtable insertion fails
+ - libceph: handle an empty authorize reply
+ - ceph: avoid repeatedly adding inode to mdsc->snap_flush_list
+ - numa: change get_mempolicy() to use nr_node_ids instead of MAX_NUMNODES
+ - proc, oom: do not report alien mms when setting oom_score_adj
+ - KEYS: allow reaching the keys quotas exactly
+ - [armhf] mfd: ti_am335x_tscadc: Use PLATFORM_DEVID_AUTO while registering
+ mfd cells
+ - [armhf] mfd: twl-core: Fix section annotations on {,un}protect_pm_master
+ - [arm64] mfd: qcom_rpm: write fw_version to CTRL_REG
+ - [armhf] mfd: mc13xxx: Fix a missing check of a register-read failure
+ - qed: Fix qed_ll2_post_rx_buffer_notify_fw() by adding a write memory
+ barrier
+ - [arm64] net: hns: Fix use after free identified by SLUB debug
+ - scsi: qla4xxx: check return code of qla4xxx_copy_from_fwddb_param
+ - [x86] scsi: isci: initialize shost fully before calling scsi_add_host()
+ - atm: he: fix sign-extension overflow on large shift
+ - [armhf] leds: lp5523: fix a missing check of return value of lp55xx_read
+ - net/mlx5e: Fix wrong (zero) TX drop counter indication for representor
+ - RDMA/srp: Rework SCSI device reset handling
+ - KEYS: user: Align the payload buffer
+ - KEYS: always initialize keyring_index_key::desc_len
+ - batman-adv: fix uninit-value in batadv_interface_tx()
+ - net/packet: fix 4gb buffer limit due to overflow check
+ - team: avoid complex list operations in team_nl_cmd_options_set()
+ - sit: check if IPv6 enabled before calling ip6_err_gen_icmpv6_unreach()
+ - sctp: call gso_reset_checksum when computing checksum in
+ sctp_gso_segment
+ - net/mlx4_en: Force CHECKSUM_NONE for short ethernet frames
+ - [hppa/parisc] Fix ptrace syscall number modification
+ - [x86] hpet: Make cmd parameter of hpet_ioctl_common() unsigned
+ - clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
+ - netpoll: Fix device name check in netpoll_setup()
+ - tracing: Use cpumask_available() to check if cpumask variable may be
+ used
+ - [x86] boot: Disable the address-of-packed-member compiler warning
+ - [x86] drm/i915: Consistently use enum pipe for PCH transcoders
+ - [x86] drm/i915: Fix enum pipe vs. enum transcoder for the PCH transcoder
+ - [arm64] irqchip/gic-v3: Convert arm64 GIC accessors to
+ {read,write}_sysreg_s
+ - mm/zsmalloc.c: change stat type parameter to int
+ - mm/zsmalloc.c: fix -Wunneeded-internal-declaration warning
+ - Revert "bridge: do not add port to router list when receives query with
+ source 0.0.0.0"
+ - netfilter: nf_tables: fix flush after rule deletion in the same batch
+ - [arm64] pinctrl: max77620: Use define directive for
+ max77620_pinconf_param values
+ - [arm64,armhf] phy: tegra: remove redundant self assignment of 'map'
+ - sched/sysctl: Fix attributes of some extern declarations
+ .
+ [ Salvatore Bonaccorso ]
+ * Refresh kbuild-use-nostdinc-in-compile-tests.patch for context changes in
+ 4.9.145
+ * [rt] Update to 4.9.146-rt125
+ - seqlock: provide the same ordering semantics as mainline
+ - squashfs: make use of local lock in multi_cpu decompressor
+ - locallock: provide {get,put}_locked_ptr() variants
+ - posix-timers: move the rcu head out of the union
+ - alarmtimer: Prevent live lock in alarm_cancel()
+ - block: blk-mq: move blk_queue_usage_counter_release() into process
+ context
+ - Revert "block: blk-mq: Use swait"
+ - Revert "rt,ntp: Move call to schedule_delayed_work() to helper thread"
+ - net: use task_struct instead of CPU number as the queue owner on -RT
+ - locking: add types.h
+ - mm/slub: close possible memory-leak in kmem_cache_alloc_bulk()
+ - crypto: limit more FPU-enabled sections
+ - sched, tracing: Fix trace_sched_pi_setprio() for deboosting
+ - rcu: Suppress lockdep false-positive ->boost_mtx complaints
+ - rcu: Do not include rtmutex_common.h unconditionally
+ - rtmutex: Make rt_mutex_futex_unlock() safe for irq-off callsites
+ - futex: Fix OWNER_DEAD fixup
+ - futex: Avoid violating the 10th rule of futex
+ - futex: Fix more put_pi_state() vs. exit_pi_state_list() races
+ - futex: Fix pi_state->owner serialization
+ * [rt] Refresh 0366-posix-timers-move-the-rcu-head-out-of-the-union.patch.
+ Refresh for context changes caused by a Debian specific patch to avoid
+ ABI change in 4.9.136: "posix-timers: Avoid ABI change in 4.9.136"
+ * [rt] Refresh 0280-random-Make-it-work-on-rt.patch
+ * [rt] Refresh 0198-fs-aio-simple-simple-work.patch for context changes in
+ 4.9.147
+ * Btrfs: fix corruption reading shared and compressed extents after hole
+ punching (Closes: #922306)
+ .
+ [ Ben Hutchings ]
+ * Bump ABI to 9 and apply deferred changes:
+ - netfilter: ipv6: nf_defrag: reduce struct net memory waste
+ - proc/sysctl: prune stale dentries during unregistering
+ - proc/sysctl: Don't grab i_lock under sysctl_lock.
+ - proc: Fix proc_sys_prune_dcache to hold a sb reference
+ - [mips*] Correct the 64-bit DSP accumulator register size
+ - inet: frags: fix ip6frag_low_thresh boundary
+ - inet: frags: reorganize struct netns_frags
+ - rhashtable: reorganize struct rhashtable layout
+ - inet: frags: break the 2GB limit for frags storage
+ - elevator: fix truncation of icq_cache_name
+Checksums-Sha1:
+ 2159f52e577288782c17b2eaab82fa9aff3b7b62 122317 linux_4.9.161-1.dsc
+ 6318b7cfd88679a2757fa97cec262e34129cb0c9 94764896 linux_4.9.161.orig.tar.xz
+ a7ecf3b8390750e99f194dc55f382bd234381a61 1222860 linux_4.9.161-1.debian.tar.xz
+ f038292aa30a37e74c42b4aecaa94791d87bbcda 10304 acpi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 07eb1d037c8cdad0593a0a115a728bcdb40c6b38 99414 ata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ a120c3c90b6a6ccafac4f4aa13bd85e5fd331247 434422 btrfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 2c8e49da1ee0c7b95c50577c3b8542bca6ee9a8f 30840 cdrom-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 43aecfbbc1037b5699d179132db2fe629c9e48aa 5260 crc-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ fa186af511960c9e0c8c63fd953c86f27c145583 12714 crypto-dm-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ e476f9a708e59e9c4e4c75bd647e7a4d4c614252 40052 crypto-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 68ce89a8145375950124aa0aabdc30cc4ec780e0 10422 efi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3b4b6af275448ebc2486d93fad1b486bccd150a6 9096 event-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ eeb95e155ae2596ff5f237c71fed586681451cf6 268722 ext4-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b70a75603691e04c34dc32516df821c3d52ae2cf 39750 fat-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 304e9b4a9d1ad6f844f886fd3138215dd18b052d 12686 fb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ e7fe15b030a8388e2cb2a21736ae9868422ab945 56084 firewire-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 2e8472b4f90cc7ca7b491beb6bfaf64982c9b12c 48266 fuse-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ e4a253ed71582126695b0aab808cbde142d2f4d6 41354 hyperv-daemons-dbgsym_4.9.161-1_amd64.deb
+ 13b82fa2c641aaade2955fee9f4d3646840dcf90 635828 hyperv-daemons_4.9.161-1_amd64.deb
+ 8e6ecf620441aec42122c75e0a81437989141c23 58258 hyperv-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3d0cb543d431d7d0f1f06199ff7006fdcd151172 13344 i2c-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1f021d8f2d28fd51d43254dcc2710b2ece317ae2 215604 input-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ e9d5a88afb90f4a9ea48f24feb61bed2285a93a9 17666 isofs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 228ce023319d40c9cb7b56543eefd039733896c1 88578 jfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 322ee29402a0520e7deaa6d13b4fe82b0d2c582d 4531352 kernel-image-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 5f5ec851a996588f37c3d1aa8f4fd3cde9808dce 620858 libcpupower-dev_4.9.161-1_amd64.deb
+ 046f87140ae2c9ae11c82405029b346d84a29960 20096 libcpupower1-dbgsym_4.9.161-1_amd64.deb
+ 2f7f209778f0b61f45323281c2282c8b72d89d3a 626150 libcpupower1_4.9.161-1_amd64.deb
+ f1a0f89ee892b13cc0c7a1e7d44c9a4ed26f3d60 640132 libusbip-dev_2.0+4.9.161-1_amd64.deb
+ e0b11342feb426c25875152bc2130b1fcd43954c 618992 linux-compiler-gcc-6-x86_4.9.161-1_amd64.deb
+ 50485b925a035ea5a510cce2d989321a89b4af3f 54550 linux-cpupower-dbgsym_4.9.161-1_amd64.deb
+ 1d70b1e1b8069bfb5a4ba804678b71724a605220 691616 linux-cpupower_4.9.161-1_amd64.deb
+ f0e4f5eee459c6eabe50fb4ec25bfe7fde0a4583 12474614 linux-doc-4.9_4.9.161-1_all.deb
+ 50cad1aa6d1a5299521d5f9e33a70c925ee6949f 619020 linux-headers-4.9.0-9-all-amd64_4.9.161-1_amd64.deb
+ 34c7ea2f41807e088fd19e291281b1931051a61c 619006 linux-headers-4.9.0-9-all_4.9.161-1_amd64.deb
+ c22808ed50235f9b5e77e8fffacb90ed23c5cd04 449444 linux-headers-4.9.0-9-amd64_4.9.161-1_amd64.deb
+ 2d722f37388ee490860d24743c28606f121d6f6f 5728596 linux-headers-4.9.0-9-common-rt_4.9.161-1_all.deb
+ 8ec96e08628528aac47eda9309bef7876ca7a9e7 7661992 linux-headers-4.9.0-9-common_4.9.161-1_all.deb
+ 9cb3f018900890d415ba659edb42ce17dcd99533 448198 linux-headers-4.9.0-9-rt-amd64_4.9.161-1_amd64.deb
+ fd11152baf713505e1f85c5a9e2ff9f02cc9b85f 573468732 linux-image-4.9.0-9-amd64-dbg_4.9.161-1_amd64.deb
+ bf51c27ec4dd53e8d63c205085896b9e404601a1 39143948 linux-image-4.9.0-9-amd64_4.9.161-1_amd64.deb
+ 9277c11024b8edfb83ba15716ea97b888d9df8d2 572285620 linux-image-4.9.0-9-rt-amd64-dbg_4.9.161-1_amd64.deb
+ 496b52eaa73e0a7ee5270f0c0f4b233242b18127 39132836 linux-image-4.9.0-9-rt-amd64_4.9.161-1_amd64.deb
+ 40a637dc1d447b0d54ed9efbe696fd778ce944b2 488164 linux-kbuild-4.9-dbgsym_4.9.161-1_amd64.deb
+ 1fd9b79e94ebb2deb2293055839a2f18d7ca3ae2 826264 linux-kbuild-4.9_4.9.161-1_amd64.deb
+ cef58714148ef74ee693955a472da55048d5997b 1410994 linux-libc-dev_4.9.161-1_amd64.deb
+ 7bdffb7623e69bf63a890a414e46aa8963376701 3188096 linux-manual-4.9_4.9.161-1_all.deb
+ c346733448291b2d30e4b84fd57957561528e80b 4484002 linux-perf-4.9-dbgsym_4.9.161-1_amd64.deb
+ cd36b701e297c17bbfdc33ec9ac8d87ae5dd2698 1558344 linux-perf-4.9_4.9.161-1_amd64.deb
+ ecc06b10c6005d121999ccf903527bcf8f5b9f52 96804320 linux-source-4.9_4.9.161-1_all.deb
+ 969ba075e28590a9fe95ffb7a21d69274e62678d 667220 linux-support-4.9.0-9_4.9.161-1_all.deb
+ 3dbda969e5f9c7d6442a729b92798b389d16b063 64773 linux_4.9.161-1_amd64.buildinfo
+ 58651cc256c3775433829da6723537f8ae5d6638 13622 loop-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f86cceb0f6b7a402d3c896498b912d217b59eb2f 424586 md-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f3a482f0a5af6b8b246bc3e26e79f0f450d8e262 56132 mmc-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 57b906405d9344fb859466e7ae7f76eddd13812b 132738 mmc-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 4635b11b2827f1be297adc45f70c3bcaad6d154b 52390 mouse-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 23805788d4ea763160717955d9cbbf89c435b4cd 15642 multipath-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 6519cceb02dc7cd45310d0b4464d93512ac81bd8 8882 nbd-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ cdea5168c5ad837038112c0d6416840355a24755 3117816 nic-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3f3219761b9275df559ea9018241632b9c1e9768 183890 nic-pcmcia-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 754448fd108d4020bb71c4ff71ad402f5c40247f 38568 nic-shared-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ e66c679f39405c3abd67f1d4169d10022ff220ef 186466 nic-usb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f4bd9944e04ab488b395248ee500b0f7cbcfa164 3399472 nic-wireless-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f444224e5a4e6032291e8d24b879517a94aee441 45824 ntfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ a327353dcca16505ebf0cba789e31382dde5983b 53368 pata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 11f1b42b433872642a15a678166043cebacb507b 61954 pcmcia-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f7941ae1557f48f6060555c90c7d5bb8cf17a039 7534 pcmcia-storage-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b5637eb91fec665cbfbe27a8898236aa7c7b227d 36736 ppp-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 5bfdfd013f1080258c6567da3db01ccd7f6b940f 145926 sata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ c09b0344e0f1d84bfc491ea6a17704ef9ccc940e 139828 scsi-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 0ebb42d528b781331d92209218997b79ddae5d00 2405060 scsi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 494426ba251f42360beedc972a1326c9c96e8cd2 34758 serial-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ afd71674b8690360b99a7bda3dc4c13ad744b575 1822320 sound-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 4eea8a3dc6e8599699338f227dad0baf6d5f9e9c 47916 speakup-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1092c655e2027ef6c2a62527de1198b9405410b2 20598 squashfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ e5a12c96390b198906dc7e1d29487eed903832b9 45774 udf-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ c6a0c91b8bd5c3c4237a31c765656b9de2f675e4 7276 uinput-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 57b0c9334cf40070d87c484f94100f5f0b0e169d 255282 usb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 7870bd1ac4a628b72226eaa219e13f2d100ab971 191488 usb-serial-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 87ddc1e622836a2905550c3a8241a1eea950f2f8 75118 usb-storage-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 86f344c0f3acd89b66dee623d3eea650671ccf30 92978 usbip-dbgsym_2.0+4.9.161-1_amd64.deb
+ 5e4dcff68b9191364584b91816c77443f5ec7d9d 658410 usbip_2.0+4.9.161-1_amd64.deb
+ d999c625cf230bd16c3f49fc10802a0d4a5ac7ca 62430 virtio-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ a82b2c98c7e56485b495fa517ee8c9881e750e14 390812 xfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+Checksums-Sha256:
+ 774205fe7e64fc3edbde20a2471d264fad0d33a104dde3bf9634f7dee481252b 122317 linux_4.9.161-1.dsc
+ 4f39a9fcec9ac1cfb1fa9f5026c0064991e2df6b0cc239aefe1a6ffb4d7e438f 94764896 linux_4.9.161.orig.tar.xz
+ 180554d978d286515a215f5d99e1eba2c81ebe011682c892d7fcbabb153d470a 1222860 linux_4.9.161-1.debian.tar.xz
+ dde5d28bef6350f91a9e01b6b096d1cf379ee42ccc8b1603b201607abef2165a 10304 acpi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 22d69d2b68b06bcde88c0f61bfc4918c983b1c08dcc79577cf53d46f751253c5 99414 ata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1bc56352909b5a8fb1c3f677d9fa27685e6d67b59448195203dde95b965389f9 434422 btrfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ edb5c0928991992d70a13b8328f463438ecfd40c7825d41f1597c97225e28067 30840 cdrom-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 12a3bec0f2d00cdb3e86571fe02d2e16699766d1f0fb437877fdf4c5ac47aa5f 5260 crc-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d14bfa0fbaf2302916a1d9a89806277acc26942b183da46a517c5e8a813d30be 12714 crypto-dm-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 890b9a74d17e3a2177398481c7c571088c5a2e506ddb92add3a0c276166ddbc6 40052 crypto-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 27050a8239e6575083098f4ced7110929bfd8371b1f7caf8592b59f1eab7f36e 10422 efi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 169be9843f76cdc3bdcd401e50ea4130df03facbd8ba42343e284446bed35ff4 9096 event-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 0c5c3864d905b34a08a2d977935bbe7333227fcb64defc576e40a6176a59afa1 268722 ext4-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 79d1ff8cdcbf24e363c74f97ac7079486b5bd3b08857b2f294a7172c7182860a 39750 fat-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 32589d3327b6487acf646098e5463316af5c5f9cf7100bc21da5d563798a947e 12686 fb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 89a2f5606e0c885df3d4d78ae46b524b8709f61e2de0817cad98457cf27d3585 56084 firewire-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d00c7ca252015991f9b8fb7179f2c1f6578c670b108ea0a9c0cdd821d8005f4b 48266 fuse-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3b38e2c467becebf03e9312adb143f7511d73377ef2ffbb52841ccf1d97005f1 41354 hyperv-daemons-dbgsym_4.9.161-1_amd64.deb
+ cbf6ab3115940f39cefafbdf2a38dbeddd8e4b95c5f7620c5fe6d9650a95a323 635828 hyperv-daemons_4.9.161-1_amd64.deb
+ d23b4be9a49a34b32f5ce14718b39c274d397308c3387e17411dbadb53aa40bf 58258 hyperv-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ fa03db1ae091888586c23eceb6aac439a9d5834ba177338a71c5373f005bfa34 13344 i2c-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 74fa05f9914f34e99e2eb1540ba32174de9d358a029d16faf9167141bb7f5fe5 215604 input-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 70944f778d07ce7285835578d0404945d423ae2da837dce85bbf42da060f49eb 17666 isofs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 9485bfd3b728560edd527fed1490a7126979e0f2217c47e600c027bb11de87de 88578 jfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ff1523b47ba9a085ec742b53dff5918b1a165cc19a41316fd7b23043fb86328e 4531352 kernel-image-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 62567248f859a37723f19a505c5275e98ac91005c927b264420e7d1c3ad3ecf8 620858 libcpupower-dev_4.9.161-1_amd64.deb
+ 5b5ab4c0912e4ad9764af585aacb292c4add2d3efef926823f456068d89decb3 20096 libcpupower1-dbgsym_4.9.161-1_amd64.deb
+ dcdd721a97613744822e6e96b9a5d976b65cd59d7b87798f8f473156af18231f 626150 libcpupower1_4.9.161-1_amd64.deb
+ e418680d66688f815cf1bc2330f970e2d6ec82a8b9c1fe80e0924f06de9ab1bb 640132 libusbip-dev_2.0+4.9.161-1_amd64.deb
+ 2a6c436c105dfccfa22b714fd198fab26a0b44b395e538d35b4ad290b5c6b56e 618992 linux-compiler-gcc-6-x86_4.9.161-1_amd64.deb
+ d448dc9c2dba36b8956f8be80e14ace04660c7e7dc4cc56625f3f81fd24ec4f8 54550 linux-cpupower-dbgsym_4.9.161-1_amd64.deb
+ 1dad32f6a2ea81e69861883f55589719d93fb608176fc43c48f0ec71d9e3c6fa 691616 linux-cpupower_4.9.161-1_amd64.deb
+ 61860f803c6ec08b114c9664cd034122a037d8ae11421e9baea743bfe2750f04 12474614 linux-doc-4.9_4.9.161-1_all.deb
+ 91e2387ca6aa55d1976778d77ac74f08a0490762436855e9bbccd0ecee5da033 619020 linux-headers-4.9.0-9-all-amd64_4.9.161-1_amd64.deb
+ 07f8eefb82fc5b14d21f0e9808ed126ce0f42829b56bd38f2d3ce4f8ab5d8769 619006 linux-headers-4.9.0-9-all_4.9.161-1_amd64.deb
+ 5380c9fd6110ed03c62ced348927ff07ec385fdeba6dc4d3dfdaf22e2a1127ce 449444 linux-headers-4.9.0-9-amd64_4.9.161-1_amd64.deb
+ 5b7bab304818e746d7cffd46dd73472206b8a5fcc90387ae03fb246cfae082f5 5728596 linux-headers-4.9.0-9-common-rt_4.9.161-1_all.deb
+ a072a28a1ed21ca3388f5da268468873e2a67c63ce507ffa46686997fcb8b13f 7661992 linux-headers-4.9.0-9-common_4.9.161-1_all.deb
+ 248c065dc94171e1a924410199f8c208bf04b9a6b6977d7919a387bb04c6cb2c 448198 linux-headers-4.9.0-9-rt-amd64_4.9.161-1_amd64.deb
+ 079efccb96a5186869c62663771111bd47f0ce0b12330a43cb0126c251b7ec06 573468732 linux-image-4.9.0-9-amd64-dbg_4.9.161-1_amd64.deb
+ 4b7ef40fc70bee4aa579a3e1d63a93a3d7e6b158843a4ed68d4dab346bbad09b 39143948 linux-image-4.9.0-9-amd64_4.9.161-1_amd64.deb
+ 65d25ceffbc17fade55342a4f517b77f1694300cbf2c6544d3f5ea4de00d4001 572285620 linux-image-4.9.0-9-rt-amd64-dbg_4.9.161-1_amd64.deb
+ 1ace3cd666b8ab3be3ecfe30d3a1ee9ad6685ca65210ab07a920cd8e94722589 39132836 linux-image-4.9.0-9-rt-amd64_4.9.161-1_amd64.deb
+ d57cd26640844e091d11311a2034686f8ff860d9dcfbeb8999b6f2e0b4374ea1 488164 linux-kbuild-4.9-dbgsym_4.9.161-1_amd64.deb
+ 9e0e8a1a1395bc39918e15134b7dd52c4985891ecbb489ebca7259c0b00c9837 826264 linux-kbuild-4.9_4.9.161-1_amd64.deb
+ 310cee15760bbfa31cf61471280e7ff9ad6bd568dc6b2f3fe9a0052dba2399d2 1410994 linux-libc-dev_4.9.161-1_amd64.deb
+ d38b399a02609877783a0be1437a321294feab0cd578da0ed5be0a2e615248d5 3188096 linux-manual-4.9_4.9.161-1_all.deb
+ ba4f44c814d710d1c9741d535b229f82b97147fa0359e46e1c7bd4d5543554a5 4484002 linux-perf-4.9-dbgsym_4.9.161-1_amd64.deb
+ efcb039fc809646032142f894361ab8459577aa64830e0aa5cf0fb709f7f2fad 1558344 linux-perf-4.9_4.9.161-1_amd64.deb
+ 3255f8ad6979969b3d0ca58398ecb703ccb934733210d60490e2c82276d595a6 96804320 linux-source-4.9_4.9.161-1_all.deb
+ 0b3e8ad112613ca7fb9553ea85e6cba50939a77506fa7f60cbbca01c22f74920 667220 linux-support-4.9.0-9_4.9.161-1_all.deb
+ fdd181976a5b4c4f2021cc899bcf250f8df9658cd8f4bcec5846bc034889d379 64773 linux_4.9.161-1_amd64.buildinfo
+ 24312a130c4540aaab1580d37679b3d8f8884cc8ce9a7d718b4f4bdbbaf8a32a 13622 loop-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ad0ab94fd28c7c88800b27621aa87ecfe0b91ffec9d1b25e6e41b7b326ad551f 424586 md-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3791590cc62baf306a6a688c742d9953cda0de6b192960f382fba5bca52f1fc7 56132 mmc-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b72e9276e50a2bc7dc976c44ec8ce4cc82a07f0d5b14368413a65458575ac02e 132738 mmc-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1de60d7242e4362873a2d4b37347dfaa5db45d67176a46cb8a16ff17099b16a9 52390 mouse-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 96aa7c5b831fbd3b18a4127ca761a3593d37457f4530c8ae0566d0f3842ce3b7 15642 multipath-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 2668c185d324050b018da3d2f82e37506c676d5c95eca11d6b67bbd7daa6be4c 8882 nbd-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d0d081ddaee986b12baba94f2b74351bfa966e41132780e03261876c1c3d70ae 3117816 nic-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b290e45bb16aa621e8aa2449f667eb66774486b5fdf9fc8ec524ac02f0aacbf2 183890 nic-pcmcia-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ fc7a98ead389e10a86fc96741aba9d682d14e9c2d01920976975f23914c9b804 38568 nic-shared-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 9d00bdc5e0d05cb003daec59913285a5e14f4c96d9ed12be65dd0b9256bbf831 186466 nic-usb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ca8437271c706e8996cee964bb8daf52d2576e0a7cec246a781fe0795daa77fa 3399472 nic-wireless-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b472a7a38a772911d5245d9dbd51febdee07795e8d1beb2479a42c52cbe54257 45824 ntfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1a95d6626f48b4dd874ec8aeaac74d07fdd80393e70e59a17c242a41826a11a8 53368 pata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 77737b80cb525877c86d679e74d8ff04271cb5ee7653f213b50a0d3c64b69c4b 61954 pcmcia-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d43bcd0626e07a7c6ce6fbb91ac06ff0a2124da894424c3b0958893869315e8a 7534 pcmcia-storage-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 773d48cdc32d8a86eb7c10b3eb4655a9a267db9f14372ef322820ca43b242477 36736 ppp-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 6398b7c8df8db54d43ccdea3a7bc0e3e654a5d8138d649863dab5c36ab8660b4 145926 sata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1bde2b0989cda3125c0d2c599bc177f5cf18da1a2a423f3ec07408252d53711b 139828 scsi-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 4c6395dda8a05e7daffd7d3f6622e3371febc54ef87009e68470111205419bcf 2405060 scsi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 6fb6cc3481f9ed7419e7f58cd3c9bf612ae006517ab9114430019c0a239877af 34758 serial-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 6ede64ef7302a86636f5df618f95e4668dcb893c0775d6a0c9d1ff8d2b2286fe 1822320 sound-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ caa21037ef18559b20401d028c70bad5e71bec6b509e283e80fd2797f55e5aa0 47916 speakup-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ feb058e248b849bfe56287706aa03aed7d3a1e0c80437a07758490687a767948 20598 squashfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 71431dcbe2c3aa0b82d1bb4e971f155e3298a338c914b09ba194c32c13f8168c 45774 udf-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b7578205a696f61d0896c6f8a8ef8871180966fa92c845e7d05ed5162c1aaffb 7276 uinput-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d399e6be182fc3974e30456b41788dbf72c0ee109ffa287ccad96538aa738795 255282 usb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 7c8f6470020d61f1c30802982c39cf1f7acf5067c6a422ad71e549f8a84a6e94 191488 usb-serial-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ cfddfd91bef897e279c09bc837803102f2e1e49da7fe8f9974885296212d35fc 75118 usb-storage-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 7047845bfbd4fbd30d7acb88319296eb38a55fd380059d13cf159eca44a60430 92978 usbip-dbgsym_2.0+4.9.161-1_amd64.deb
+ 5972d1a7df1a954f19831f34832f59a742e4141a09ff97412fb42e72533cf981 658410 usbip_2.0+4.9.161-1_amd64.deb
+ 9bb537df45f30ba39408e39e9965b7298bcfe210bcb224793df5622de910bf3c 62430 virtio-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 8a8b22b3a250cc1b996969c0270024f682730cf2130f073dd36d188cba63b171 390812 xfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+Files:
+ 0c7a72fc5a714427fa68ccd2dd4482ee 122317 kernel optional linux_4.9.161-1.dsc
+ 93b594e8fdc0a8703e4d4b873759380d 94764896 kernel optional linux_4.9.161.orig.tar.xz
+ 940d74f7da2c0e798616d8b7b715a673 1222860 kernel optional linux_4.9.161-1.debian.tar.xz
+ b4ae0b22174cb1c7bf009bfcf0deaee8 10304 debian-installer extra acpi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ef0f4d551eafac3122880f2b611540b2 99414 debian-installer extra ata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 965d8b291e2b7e38cba1cf15e3086a39 434422 debian-installer extra btrfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 152cd388652e8c4b3463528f2f45d5c3 30840 debian-installer standard cdrom-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 75fd55934fe0a12f80c780dffebb0e1b 5260 debian-installer extra crc-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3819d41ce9f1a02cd8a36a71e6515df5 12714 debian-installer extra crypto-dm-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d970d5cbdf614c48adf4cd3f5b0b6740 40052 debian-installer extra crypto-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 63989558af590e331a98b0ebd3c70083 10422 debian-installer extra efi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 0ae878a8ff24b451c8ee374b4f8a79fb 9096 debian-installer extra event-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ac6a13fffcf553b84a3042ddf0f01b6f 268722 debian-installer standard ext4-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ eda55a3159a324022967b37145f14bea 39750 debian-installer standard fat-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 0c989f4c7842d03eee5000f62bb65c2b 12686 debian-installer extra fb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ea34452732c791a011306beea9f070ff 56084 debian-installer standard firewire-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 2d42e93fe753adb136ebc8bb0c6d0f62 48266 debian-installer extra fuse-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 599992a99bb89b091d9f88008b9b78bb 41354 debug extra hyperv-daemons-dbgsym_4.9.161-1_amd64.deb
+ ecd706e005c02afdbd2523dffebf2ee5 635828 admin optional hyperv-daemons_4.9.161-1_amd64.deb
+ 7eb762b48b0a3bc64230d37ec527a997 58258 debian-installer extra hyperv-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ ac402d2db3f7b78c38869d1f9d90651f 13344 debian-installer extra i2c-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 68934052cfce62583e5103996521e0c9 215604 debian-installer extra input-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 933d5ab6f8a5bbaebf9323d6edb10a5f 17666 debian-installer standard isofs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3c8aa32a09b6281c4e0db058ab0c1af3 88578 debian-installer standard jfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ c2f388324142b97fd6038c1592e2888c 4531352 debian-installer standard kernel-image-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d605ea4e6a96c40b1071504b12870f40 620858 libdevel optional libcpupower-dev_4.9.161-1_amd64.deb
+ dcf307126f4a0eebe135f8f20aea9d94 20096 debug extra libcpupower1-dbgsym_4.9.161-1_amd64.deb
+ 1f6954e1b3b65eae3cc88cf953a74c8b 626150 libs optional libcpupower1_4.9.161-1_amd64.deb
+ aca034c5c658ae4acd4a7043c2404218 640132 libdevel optional libusbip-dev_2.0+4.9.161-1_amd64.deb
+ 45fb67c8b238eee7c4f9ea27e7024972 618992 kernel optional linux-compiler-gcc-6-x86_4.9.161-1_amd64.deb
+ 28344bc7bcfa99bb67112ad8eab7d7b5 54550 debug extra linux-cpupower-dbgsym_4.9.161-1_amd64.deb
+ 09edd5b4eefe46bb13b34acbf8dbb9df 691616 admin optional linux-cpupower_4.9.161-1_amd64.deb
+ eec8ba030b5964c9c74124cf9183d0a1 12474614 doc optional linux-doc-4.9_4.9.161-1_all.deb
+ df29579871536b54dc78f75e647eb343 619020 kernel optional linux-headers-4.9.0-9-all-amd64_4.9.161-1_amd64.deb
+ 45fd70d2aa4953b52fa4f14856964f69 619006 kernel optional linux-headers-4.9.0-9-all_4.9.161-1_amd64.deb
+ 60452ad1c0f17cf1b9f2c822e7ecb7e1 449444 kernel optional linux-headers-4.9.0-9-amd64_4.9.161-1_amd64.deb
+ 86a625a57db9b4f9a02f0da851b4b250 5728596 kernel optional linux-headers-4.9.0-9-common-rt_4.9.161-1_all.deb
+ d09ba4cbadac4bec916b0dfe0b55a94a 7661992 kernel optional linux-headers-4.9.0-9-common_4.9.161-1_all.deb
+ 02d8d51a9fd014665633a2a2d126a395 448198 kernel optional linux-headers-4.9.0-9-rt-amd64_4.9.161-1_amd64.deb
+ da90d2452aa270f5b972eced1fe7def0 573468732 debug extra linux-image-4.9.0-9-amd64-dbg_4.9.161-1_amd64.deb
+ 15105b2bd94303dfb102d5b25bcedcf8 39143948 kernel optional linux-image-4.9.0-9-amd64_4.9.161-1_amd64.deb
+ 9a7887530da8c56dfd659c757d28431d 572285620 debug extra linux-image-4.9.0-9-rt-amd64-dbg_4.9.161-1_amd64.deb
+ 93b81602952bda419e8a7190d1879852 39132836 kernel optional linux-image-4.9.0-9-rt-amd64_4.9.161-1_amd64.deb
+ ad6e009533db6131f7861b5eb881254e 488164 debug extra linux-kbuild-4.9-dbgsym_4.9.161-1_amd64.deb
+ 88999d7b79d2b7a31a836834a46a6a3a 826264 kernel optional linux-kbuild-4.9_4.9.161-1_amd64.deb
+ ebd3cfb17dff3c866eb583632af6ca15 1410994 devel optional linux-libc-dev_4.9.161-1_amd64.deb
+ f2b70d7600a63bbe303f8b507a6055c1 3188096 doc optional linux-manual-4.9_4.9.161-1_all.deb
+ 93c6711fb982bad7df8a62ab1292ea87 4484002 debug extra linux-perf-4.9-dbgsym_4.9.161-1_amd64.deb
+ 83e6f4cc61fcf2e0de2c2b8091206451 1558344 devel optional linux-perf-4.9_4.9.161-1_amd64.deb
+ 61796b532c32134e7a83f4de50f868b0 96804320 kernel optional linux-source-4.9_4.9.161-1_all.deb
+ 36e82b67e48d2217376bd6276448b327 667220 devel optional linux-support-4.9.0-9_4.9.161-1_all.deb
+ 74a8dfa8e6117a79e5239f70d6281def 64773 kernel optional linux_4.9.161-1_amd64.buildinfo
+ bda9fca8bb6458cf1392a6af1ca8c985 13622 debian-installer standard loop-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ db02d7664ce66d49048f764e78d4d06e 424586 debian-installer extra md-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 7d7d70f354e93ce298be591851e0c2e3 56132 debian-installer extra mmc-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ adbc791756319dfecc44d52324b25280 132738 debian-installer extra mmc-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 60b3522f260dbda410ca8dd8e6dcc551 52390 debian-installer extra mouse-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 325f3f7d918cad43dc30f3788313cfa2 15642 debian-installer extra multipath-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 22eb020068b1bbc4aef9015756de8a29 8882 debian-installer extra nbd-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 47e71ea102492adb49f129291e87aa65 3117816 debian-installer standard nic-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d262620965206685de3e049052800e3a 183890 debian-installer standard nic-pcmcia-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 3e8889457d177cd0ab93301fd3535933 38568 debian-installer standard nic-shared-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f095cb07887024168ff5e652fa34a9bc 186466 debian-installer standard nic-usb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 6a5952ef152d204a82bccde710c94553 3399472 debian-installer standard nic-wireless-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ c972fbe086c7e26a4006213550265979 45824 debian-installer extra ntfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 484da2a628fff2c2b7567ca55da0593c 53368 debian-installer standard pata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 231cf8131e8aa64a8274b6635822eda1 61954 debian-installer standard pcmcia-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ a8349ffaba112ee6171c3700859b28ea 7534 debian-installer standard pcmcia-storage-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 8f094836b6da3d681186bd1424ac5da5 36736 debian-installer optional ppp-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 6e3fd0848862c048a46848070286afc2 145926 debian-installer standard sata-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 669371a33b2c98e328fa6799a67daa2d 139828 debian-installer standard scsi-core-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ f221844bf1b829ea371acd67b2675bfe 2405060 debian-installer standard scsi-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 47412bd0bef366c3cc6220c450d930b6 34758 debian-installer optional serial-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 04177cede8105b80eee81b8190941906 1822320 debian-installer extra sound-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ b780404cf86fdb8240550bc5538009cb 47916 debian-installer extra speakup-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 44d7f357ec879226abc96476aa3bc94e 20598 debian-installer extra squashfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 5c75a4818f842c33cd55f7777a525f70 45774 debian-installer extra udf-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 290ea49d6b27173a02c65d531c54ee35 7276 debian-installer extra uinput-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 44623a81a3aca0b334004c2b207de7d1 255282 debian-installer extra usb-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ be7d7fd55217ad9b7a01359bd198863f 191488 debian-installer optional usb-serial-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d306513fcdb64363646fd8dd2ca068a6 75118 debian-installer standard usb-storage-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ 1b59f042a4a6780b0e76319950737bfe 92978 debug extra usbip-dbgsym_2.0+4.9.161-1_amd64.deb
+ a2f89b627cc05916b21ae74b54571bdf 658410 admin optional usbip_2.0+4.9.161-1_amd64.deb
+ 4306e7905210ebff911e6e47a004c1ef 62430 debian-installer extra virtio-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
+ d186dcd31c9beeb86a804079ae9d6547 390812 debian-installer standard xfs-modules-4.9.0-9-amd64-di_4.9.161-1_amd64.udeb
diff --git a/test/mergechanges/unsupported-checksum.changes b/test/mergechanges/unsupported-checksum.changes
new file mode 100644
index 0000000..15a3284
--- /dev/null
+++ b/test/mergechanges/unsupported-checksum.changes
@@ -0,0 +1,44 @@
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - desktop integration portal - development files
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Ffff:
+ ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/unsupported-format.changes b/test/mergechanges/unsupported-format.changes
new file mode 100644
index 0000000..09828b0
--- /dev/null
+++ b/test/mergechanges/unsupported-format.changes
@@ -0,0 +1,41 @@
+Format: 1.6
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - desktop integration portal - development files
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/xdg-desktop-portal_1.2.0-1_all.changes b/test/mergechanges/xdg-desktop-portal_1.2.0-1_all.changes
new file mode 100644
index 0000000..32b4e8d
--- /dev/null
+++ b/test/mergechanges/xdg-desktop-portal_1.2.0-1_all.changes
@@ -0,0 +1,41 @@
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal-dev
+Architecture: all
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal-dev - desktop integration portal - development files
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 3c23c6796524c189e84e0196eb044f52f8fe917d 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 62d26daeb56e96ff6639ff2ef0af18340ae7a605 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Checksums-Sha256:
+ f98a6c57e6b932d7c6bf8e38949f57206f4c6ded0156b0afaaebfc89d7d5b443 38992 xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 3552acdfb12d65e325bd161bad6446185851defe83ecfa1562294cbf48615e59 9179 xdg-desktop-portal_1.2.0-1_all.buildinfo
+Files:
+ 16c46d8c8dc3f185d9aaaf4c43bcb97d 38992 admin optional xdg-desktop-portal-dev_1.2.0-1_all.deb
+ 5996887565ed2ec3a64280fbf1a29e13 9179 admin optional xdg-desktop-portal_1.2.0-1_all.buildinfo
diff --git a/test/mergechanges/xdg-desktop-portal_1.2.0-1_amd64.changes b/test/mergechanges/xdg-desktop-portal_1.2.0-1_amd64.changes
new file mode 100644
index 0000000..ddb22c8
--- /dev/null
+++ b/test/mergechanges/xdg-desktop-portal_1.2.0-1_amd64.changes
@@ -0,0 +1,51 @@
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Binary: xdg-desktop-portal xdg-desktop-portal-dbgsym xdg-desktop-portal-tests xdg-desktop-portal-tests-dbgsym
+Architecture: amd64
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Description:
+ xdg-desktop-portal - desktop integration portal for Flatpak and Snap
+ xdg-desktop-portal-tests - desktop integration portal - automated tests
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ da1f789d7921b4e44c0e843595d6c0766a22e52f 1153180 xdg-desktop-portal-dbgsym_1.2.0-1_amd64.deb
+ a1113c0c9de12b0b4dbf0a904d754be61bb54924 206988 xdg-desktop-portal-tests-dbgsym_1.2.0-1_amd64.deb
+ 0f9964de82fbf493d4d4a9d0bb8da8106e4f90f6 55556 xdg-desktop-portal-tests_1.2.0-1_amd64.deb
+ 07cf52da2e5cf3d76776a08e693362beccee6811 10078 xdg-desktop-portal_1.2.0-1_amd64.buildinfo
+ c1e43ea09f94d6fe3eb83d0410e3e80a9c63cf82 212204 xdg-desktop-portal_1.2.0-1_amd64.deb
+Checksums-Sha256:
+ e1997883023ce824c1e63320b6e2935986b70b4b363e826ee3f6018629a13086 1153180 xdg-desktop-portal-dbgsym_1.2.0-1_amd64.deb
+ bfadd137cf31bfa1b5b87af87bfdd861ad52c3a70dc135e50ceaa6986a2be844 206988 xdg-desktop-portal-tests-dbgsym_1.2.0-1_amd64.deb
+ 585e29127a00dc7feabdff72c2004b3c67c3fb528afd11e748e04ee7bf170ddb 55556 xdg-desktop-portal-tests_1.2.0-1_amd64.deb
+ 442ba784f7498395ec38e023194e2374e1607cefc5433f896c8cb5cf19f8a669 10078 xdg-desktop-portal_1.2.0-1_amd64.buildinfo
+ 6f2d1c73be324bfcdb3eea6bf1f3d2b78358989250c8334fca2fb2862c5986de 212204 xdg-desktop-portal_1.2.0-1_amd64.deb
+Files:
+ b4a88209842aa2ea031c2b41a9ba82c1 1153180 debug optional xdg-desktop-portal-dbgsym_1.2.0-1_amd64.deb
+ ca48de7155966c0b0cea5e30226506be 206988 debug optional xdg-desktop-portal-tests-dbgsym_1.2.0-1_amd64.deb
+ 9a497abe1208ed1504f057874b8c91da 55556 admin optional xdg-desktop-portal-tests_1.2.0-1_amd64.deb
+ cd99c019000a63b5cef9c2fc4213e89c 10078 admin optional xdg-desktop-portal_1.2.0-1_amd64.buildinfo
+ a4ed57a911718668b62a472db60729a9 212204 admin optional xdg-desktop-portal_1.2.0-1_amd64.deb
diff --git a/test/mergechanges/xdg-desktop-portal_1.2.0-1_source.changes b/test/mergechanges/xdg-desktop-portal_1.2.0-1_source.changes
new file mode 100644
index 0000000..f90507a
--- /dev/null
+++ b/test/mergechanges/xdg-desktop-portal_1.2.0-1_source.changes
@@ -0,0 +1,64 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+Format: 1.8
+Date: Sat, 26 Jan 2019 18:31:50 +0000
+Source: xdg-desktop-portal
+Architecture: source
+Version: 1.2.0-1
+Distribution: unstable
+Urgency: medium
+Maintainer: Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>
+Changed-By: Simon McVittie <smcv@debian.org>
+Changes:
+ xdg-desktop-portal (1.2.0-1) unstable; urgency=medium
+ .
+ [ Simon McVittie ]
+ * New upstream stable release
+ * d/watch: Only watch for stable releases
+ * d/p/Revert-Stop-building-the-icon-validator.patch,
+ d/p/validate-icon-Add-a-define-for-bwrap.patch,
+ d/p/Replace-the-icon-validator-with-the-one-from-Flatpak-git-.patch:
+ Build a copy of the icon validator from Flatpak git master.
+ We don't want to rely on a version of Flatpak that isn't
+ stable yet.
+ - d/p/notification-Handle-non-existing-directories.patch,
+ d/p/notification-bind-mount-etc-ld.so.cache-to-the-sandbox.patch:
+ Remove, no longer necessary
+ * d/upstream/metadata: Add DEP-12 metadata
+ * Release to unstable
+ .
+ [ Jeremy Bicha ]
+ * Don't enable remote desktop support on Ubuntu. See LP bug 1802533
+Checksums-Sha1:
+ 356dc96c9d57de0a4f36cd16c4015b1aee1931fd 2431 xdg-desktop-portal_1.2.0-1.dsc
+ 925661053e97c9aa849f8e8a5e7f2caf46e314f4 405856 xdg-desktop-portal_1.2.0.orig.tar.xz
+ 68f06ca08739e30ed8fc957e9fad318cdd73a3e4 8532 xdg-desktop-portal_1.2.0-1.debian.tar.xz
+ d724848c560528a0e1d7c5f575b3d1e490d189b7 10038 xdg-desktop-portal_1.2.0-1_source.buildinfo
+Checksums-Sha256:
+ b8c53f9d574d9eff13d331ca3f2975f52ac52eb78bd10ff8f15b756abd397b09 2431 xdg-desktop-portal_1.2.0-1.dsc
+ c9a4d6c415417aed3231ebc6c9a4091b90199bea4295aab311ce3dab4032e194 405856 xdg-desktop-portal_1.2.0.orig.tar.xz
+ c838e919bec5039a74ca7d247954394be8db9f9a8945a0efe4b95a5ae16117ba 8532 xdg-desktop-portal_1.2.0-1.debian.tar.xz
+ f221172b9b2eeaaf7c1b26cb3a434dc15c11acfd61c63bb4e2572982cd58d4bd 10038 xdg-desktop-portal_1.2.0-1_source.buildinfo
+Files:
+ 6f812573ffabcba64622290d8fac6705 2431 admin optional xdg-desktop-portal_1.2.0-1.dsc
+ 8e85078478065f9592b0606bc32c5675 405856 admin optional xdg-desktop-portal_1.2.0.orig.tar.xz
+ 74f3ddd00060d2b7992a41592728bf95 8532 admin optional xdg-desktop-portal_1.2.0-1.debian.tar.xz
+ 0a70ad5592ac53bb4648261766a47c4b 10038 admin optional xdg-desktop-portal_1.2.0-1_source.buildinfo
+
+-----BEGIN PGP SIGNATURE-----
+
+iQIzBAEBCAAdFiEENuxaZEik9e95vv6Y4FrhR4+BTE8FAlxMydIACgkQ4FrhR4+B
+TE8NWA/6AsokGe0NZqhoY91+MtFHmaN/M4iyL9shyHBZxMUJRyeDNmo2jJkIMDSX
+OSHdptyybVfk31O3L58Ev9jXNG5lw2J31IXMrt4UYiGjJXdyq7IQyqHIrzrjBBCk
+fcghcT8PFMHBtTaOHyj4sKo9jAK9tH53ZRK242PebZt3Fdn1FUneVpn7GSI3d78M
++kzx0I7Z334rAAvAe8IkSDyYHfi+bJ9gchJaWt2LD2sulh77W4HqaxtSE+4H+7UR
+2eAP8FuI3Q6gg90VTDR0y4mOvvNfzZ1jN6R8J9mR8qwTIbpbZCju1oO1jOOuGQSL
+05aeWGqNsdl2vjDr4TsraDv4dkdCQhF6EdWWIreKCQQL5Zh5p9t+z2LOITcRbd2Q
+1PcR1vJJLzkpT9M7DSWDRbJ+iWsDjuUIsr1d6dMs+AGVWaPnFytIUxExreEdn7Ul
+GJXLWsYg4AmePNoXWJch24G3S/pn5L9Am0Ikuwze9LFR+GJTtYyPytBjtXE/jysx
+F2tdJUl/h29xLzw0kIMm0+vj0/ln2RUP3KIBNcXS+ekP2Grte6LKgfq9kNRTfePx
+gfGmz+6stAcnTnoJBX/hkBAujQL6nkU+ZPakakn10GJabTwhEtMH0OQksKUKDMKB
+1plr19l5RNZTGwmJ5KTK2CBVs3Ctzgz66l1YgexZWhr3PWv/bhE=
+=hcT2
+-----END PGP SIGNATURE-----
diff --git a/test/sadt/README b/test/sadt/README
new file mode 100644
index 0000000..7110a55
--- /dev/null
+++ b/test/sadt/README
@@ -0,0 +1,5 @@
+Each directory here is a fake Debian package with autopkgtests
+
+To create the basic structure for a new test case, run the "new" script, e.g.
+
+$ ./new my-test-case
diff --git a/test/sadt/comma-separated-restrictions/debian/control b/test/sadt/comma-separated-restrictions/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/comma-separated-restrictions/debian/control
diff --git a/test/sadt/comma-separated-restrictions/debian/tests/control b/test/sadt/comma-separated-restrictions/debian/tests/control
new file mode 100644
index 0000000..90f300c
--- /dev/null
+++ b/test/sadt/comma-separated-restrictions/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: needs-recommends, allow-stderr
diff --git a/test/sadt/comma-separated-restrictions/debian/tests/test b/test/sadt/comma-separated-restrictions/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/comma-separated-restrictions/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/comma-separated-tests/debian/control b/test/sadt/comma-separated-tests/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/control
diff --git a/test/sadt/comma-separated-tests/debian/tests/control b/test/sadt/comma-separated-tests/debian/tests/control
new file mode 100644
index 0000000..3566d3e
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/tests/control
@@ -0,0 +1 @@
+Tests: test1, test2
diff --git a/test/sadt/comma-separated-tests/debian/tests/test1 b/test/sadt/comma-separated-tests/debian/tests/test1
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/tests/test1
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/comma-separated-tests/debian/tests/test2 b/test/sadt/comma-separated-tests/debian/tests/test2
new file mode 100755
index 0000000..003e8fc
--- /dev/null
+++ b/test/sadt/comma-separated-tests/debian/tests/test2
@@ -0,0 +1,2 @@
+#!/bin/true
+
diff --git a/test/sadt/fails/debian/control b/test/sadt/fails/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/fails/debian/control
diff --git a/test/sadt/fails/debian/tests/control b/test/sadt/fails/debian/tests/control
new file mode 100644
index 0000000..317cd51
--- /dev/null
+++ b/test/sadt/fails/debian/tests/control
@@ -0,0 +1 @@
+Tests: fails
diff --git a/test/sadt/fails/debian/tests/fails b/test/sadt/fails/debian/tests/fails
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/fails/debian/tests/fails
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/sadt/flaky/debian/control b/test/sadt/flaky/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/flaky/debian/control
diff --git a/test/sadt/flaky/debian/tests/control b/test/sadt/flaky/debian/tests/control
new file mode 100644
index 0000000..22feebd
--- /dev/null
+++ b/test/sadt/flaky/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: flaky-succeeds flaky-fails
+Restrictions: flaky
diff --git a/test/sadt/flaky/debian/tests/flaky-fails b/test/sadt/flaky/debian/tests/flaky-fails
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/flaky/debian/tests/flaky-fails
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/sadt/flaky/debian/tests/flaky-succeeds b/test/sadt/flaky/debian/tests/flaky-succeeds
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/flaky/debian/tests/flaky-succeeds
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/ignore-udebs/debian/control b/test/sadt/ignore-udebs/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/ignore-udebs/debian/control
diff --git a/test/sadt/ignore-udebs/debian/tests/control b/test/sadt/ignore-udebs/debian/tests/control
new file mode 100644
index 0000000..79c6de9
--- /dev/null
+++ b/test/sadt/ignore-udebs/debian/tests/control
@@ -0,0 +1 @@
+Tests: ignore-udebs
diff --git a/test/sadt/new b/test/sadt/new
new file mode 100755
index 0000000..20fc7c3
--- /dev/null
+++ b/test/sadt/new
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+for sample in $@; do
+ mkdir -p "$sample"/debian/tests
+ touch "$sample/debian/control"
+ echo "Tests: $sample" > "$sample"/debian/tests/control
+done
diff --git a/test/sadt/passes/debian/control b/test/sadt/passes/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/passes/debian/control
diff --git a/test/sadt/passes/debian/tests/control b/test/sadt/passes/debian/tests/control
new file mode 100644
index 0000000..db2fda9
--- /dev/null
+++ b/test/sadt/passes/debian/tests/control
@@ -0,0 +1 @@
+Tests: test
diff --git a/test/sadt/passes/debian/tests/test b/test/sadt/passes/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/passes/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/skippable/debian/control b/test/sadt/skippable/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/skippable/debian/control
diff --git a/test/sadt/skippable/debian/tests/control b/test/sadt/skippable/debian/tests/control
new file mode 100644
index 0000000..491208f
--- /dev/null
+++ b/test/sadt/skippable/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: skipped
+Restrictions: skippable
diff --git a/test/sadt/skippable/debian/tests/skipped b/test/sadt/skippable/debian/tests/skipped
new file mode 100755
index 0000000..e1bcf85
--- /dev/null
+++ b/test/sadt/skippable/debian/tests/skipped
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 77
diff --git a/test/sadt/space-separated-restrictions/debian/control b/test/sadt/space-separated-restrictions/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/space-separated-restrictions/debian/control
diff --git a/test/sadt/space-separated-restrictions/debian/tests/control b/test/sadt/space-separated-restrictions/debian/tests/control
new file mode 100644
index 0000000..51483d4
--- /dev/null
+++ b/test/sadt/space-separated-restrictions/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: needs-recommends allow-stderr
diff --git a/test/sadt/space-separated-restrictions/debian/tests/test b/test/sadt/space-separated-restrictions/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/space-separated-restrictions/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/space-separated-tests/debian/control b/test/sadt/space-separated-tests/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/control
diff --git a/test/sadt/space-separated-tests/debian/tests/control b/test/sadt/space-separated-tests/debian/tests/control
new file mode 100644
index 0000000..c901e5a
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/tests/control
@@ -0,0 +1 @@
+Tests: test1 test2
diff --git a/test/sadt/space-separated-tests/debian/tests/test1 b/test/sadt/space-separated-tests/debian/tests/test1
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/tests/test1
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/space-separated-tests/debian/tests/test2 b/test/sadt/space-separated-tests/debian/tests/test2
new file mode 100755
index 0000000..003e8fc
--- /dev/null
+++ b/test/sadt/space-separated-tests/debian/tests/test2
@@ -0,0 +1,2 @@
+#!/bin/true
+
diff --git a/test/sadt/superficial-fails/debian/control b/test/sadt/superficial-fails/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/superficial-fails/debian/control
diff --git a/test/sadt/superficial-fails/debian/tests/control b/test/sadt/superficial-fails/debian/tests/control
new file mode 100644
index 0000000..02ed109
--- /dev/null
+++ b/test/sadt/superficial-fails/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: superficial
diff --git a/test/sadt/superficial-fails/debian/tests/test b/test/sadt/superficial-fails/debian/tests/test
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/superficial-fails/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/sadt/superficial/debian/control b/test/sadt/superficial/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/superficial/debian/control
diff --git a/test/sadt/superficial/debian/tests/control b/test/sadt/superficial/debian/tests/control
new file mode 100644
index 0000000..02ed109
--- /dev/null
+++ b/test/sadt/superficial/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Restrictions: superficial
diff --git a/test/sadt/superficial/debian/tests/test b/test/sadt/superficial/debian/tests/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/superficial/debian/tests/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/test-command/debian/control b/test/sadt/test-command/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/test-command/debian/control
diff --git a/test/sadt/test-command/debian/tests/control b/test/sadt/test-command/debian/tests/control
new file mode 100644
index 0000000..d52194b
--- /dev/null
+++ b/test/sadt/test-command/debian/tests/control
@@ -0,0 +1 @@
+Test-Command: echo 'Test-Command is supported'
diff --git a/test/sadt/tests-directory/debian/control b/test/sadt/tests-directory/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/tests-directory/debian/control
diff --git a/test/sadt/tests-directory/debian/tests/control b/test/sadt/tests-directory/debian/tests/control
new file mode 100644
index 0000000..145b7b5
--- /dev/null
+++ b/test/sadt/tests-directory/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: test
+Tests-Directory: foo
diff --git a/test/sadt/tests-directory/foo/test b/test/sadt/tests-directory/foo/test
new file mode 100755
index 0000000..b23e556
--- /dev/null
+++ b/test/sadt/tests-directory/foo/test
@@ -0,0 +1 @@
+#!/bin/true
diff --git a/test/sadt/unskippable/debian/control b/test/sadt/unskippable/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/unskippable/debian/control
diff --git a/test/sadt/unskippable/debian/tests/control b/test/sadt/unskippable/debian/tests/control
new file mode 100644
index 0000000..c077ac5
--- /dev/null
+++ b/test/sadt/unskippable/debian/tests/control
@@ -0,0 +1 @@
+Tests: unskippable
diff --git a/test/sadt/unskippable/debian/tests/unskippable b/test/sadt/unskippable/debian/tests/unskippable
new file mode 100755
index 0000000..e1bcf85
--- /dev/null
+++ b/test/sadt/unskippable/debian/tests/unskippable
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 77
diff --git a/test/sadt/unskipped/debian/control b/test/sadt/unskipped/debian/control
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/sadt/unskipped/debian/control
diff --git a/test/sadt/unskipped/debian/tests/control b/test/sadt/unskipped/debian/tests/control
new file mode 100644
index 0000000..d3ce911
--- /dev/null
+++ b/test/sadt/unskipped/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: fails
+Restrictions: skippable
diff --git a/test/sadt/unskipped/debian/tests/fails b/test/sadt/unskipped/debian/tests/fails
new file mode 100755
index 0000000..98975b2
--- /dev/null
+++ b/test/sadt/unskipped/debian/tests/fails
@@ -0,0 +1 @@
+#!/bin/false
diff --git a/test/shunit2-helper-functions.sh b/test/shunit2-helper-functions.sh
new file mode 100644
index 0000000..402a7ce
--- /dev/null
+++ b/test/shunit2-helper-functions.sh
@@ -0,0 +1,27 @@
+# Copyright (C) 2012, Benjamin Drung <bdrung@debian.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+runCommand() {
+ local param="$1"
+ local exp_stdout="$2"
+ local exp_stderr="$3"
+ local exp_retval=$4
+ local stdoutF="${SHUNIT_TMPDIR}/stdout"
+ local stderrF="${SHUNIT_TMPDIR}/stderr"
+ eval "${COMMAND} $param" > ${stdoutF} 2> ${stderrF}
+ retval=$?
+ assertEquals "standard output of ${COMMAND} $param\n" "$exp_stdout" "$(cat ${stdoutF})"
+ assertEquals "error output of ${COMMAND} $param\n" "$exp_stderr" "$(cat ${stderrF})"
+ assertEquals "return value of ${COMMAND} $param\n" $exp_retval $retval
+}
diff --git a/test/t/common.t b/test/t/common.t
new file mode 100755
index 0000000..82e9b53
--- /dev/null
+++ b/test/t/common.t
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+package Config::Test;
+
+use Moo;
+
+extends 'Devscripts::Config';
+
+use constant keys => [
+ ['test!', 'TEST', 'bool', 1],
+ ['str=s', 'STR', qr/^a/, 'ab'],
+ ['str2=s', 'STR2', qr/^a/, 'bb'],
+ ['array=s', 'ARRAY', undef, sub { [] }],
+];
+
+package main;
+
+use Test::More tests => 39;
+
+BEGIN {
+ use_ok('Devscripts::Config');
+}
+
+my $conf;
+$Devscripts::Output::die_on_error = 0;
+
+@Devscripts::Config::config_files = ();
+
+ok($conf = Config::Test->new->parse, 'No conf files, no args');
+ok($conf->{test} == 1, ' test=1');
+ok($conf->{str} eq 'ab', ' str=ab');
+ok($conf->{str2} eq 'bb', ' str2=bb');
+
+@Devscripts::Config::config_files = ('t/config1');
+
+ok($conf = Config::Test->new->parse, 'Conf files, no args');
+ok($conf->{test} == 0, ' test=0');
+ok($conf->{str} eq 'az', ' str=az');
+ok($conf->{str2} eq 'a1', ' str2=a1');
+if (ok(ref $conf->{array}, ' array')) {
+ ok($conf->{array}->[0] eq "b c", ' "b c" found');
+ ok($conf->{array}->[1] eq "a", ' "a" found');
+ ok($conf->{array}->[2] eq "d", ' "d" found');
+ ok(scalar @{ $conf->{array} } == 3, ' 3 elements');
+}
+
+@ARGV = ('--noconf');
+
+ok($conf = Config::Test->new->parse, '--noconf');
+ok($conf->{test} == 1, ' test=1');
+ok($conf->{str} eq 'ab', ' str=ab');
+ok($conf->{str2} eq 'bb', ' str2=bb');
+
+@ARGV = ('--conffile', 't/config2');
+
+ok($conf = Config::Test->new->parse, '--conffile t/config2');
+ok($conf->{test} == 1, ' test=1');
+ok($conf->{str} eq 'ab', ' str=ab');
+ok($conf->{str2} eq 'axzx', ' str2=axzx');
+
+@ARGV = ('--conffile', '+t/config2');
+
+ok($conf = Config::Test->new->parse, '--conffile +t/config2');
+ok($conf->{test} == 0, ' test=0');
+ok($conf->{str} eq 'az', ' str=az');
+ok($conf->{str2} eq 'axzx', ' str2=axzx');
+
+@ARGV = ('--test', '--str2=ac');
+
+ok($conf = Config::Test->new->parse, '--test --str2=ac');
+ok($conf->{test} == 1, ' test=1');
+ok($conf->{str} eq 'az', ' str=az');
+ok($conf->{str2} eq 'ac', ' str2=ac');
+
+@ARGV = ('--noconf', '--str2', 'ac', '--notest');
+
+ok($conf = Config::Test->new->parse, '--noconf --no-test --str2=ac');
+ok($conf->{test} == 0, ' test=0');
+ok($conf->{str} eq 'ab', ' str=ab');
+ok($conf->{str2} eq 'ac', ' str2=ac');
+
+@ARGV = ('--noconf', '--array', 'a', '--array=b');
+ok($conf = Config::Test->new->parse, '--noconf --array a --array=b');
+ok(ref $conf->{array}, 'Multiple options are allowed');
+ok($conf->{array}->[0] eq 'a', ' first value is a');
+ok($conf->{array}->[1] eq 'b', ' second value is b');
+
+# Redirect STDERR to $out;
+my $out;
+{
+ no warnings;
+ open F, ">&STDERR";
+}
+close STDERR;
+open STDERR, '>', \$out;
+eval {
+ @ARGV = ('--noconf', '--str2', 'bc');
+ $conf = Config::Test->new->parse;
+};
+
+# Restore STDERR
+close STDERR;
+open STDERR, ">&F";
+fail($@) if ($@);
+ok($out =~ /Bad str2 value/, '--str2=bc is rejected');
+
diff --git a/test/t/config1 b/test/t/config1
new file mode 100644
index 0000000..829becc
--- /dev/null
+++ b/test/t/config1
@@ -0,0 +1,12 @@
+TEST=no
+STR=az
+STR2=a1
+ARRAY='a "b c" d'
+USCAN_SYMLINK=rename
+USCAN_VERBOSE=yes
+SALSA_TOKEN=xx
+SALSA_KGB=yes
+SALSA_ENABLE_ISSUES=no
+SALSA_EMAIL=ignore
+SALSA_ENABLE_MR=yes
+SALSA_IRKER=no
diff --git a/test/t/config2 b/test/t/config2
new file mode 100644
index 0000000..32d1629
--- /dev/null
+++ b/test/t/config2
@@ -0,0 +1 @@
+STR2=axzx
diff --git a/test/t/json-cache.t b/test/t/json-cache.t
new file mode 100644
index 0000000..a9d8918
--- /dev/null
+++ b/test/t/json-cache.t
@@ -0,0 +1,25 @@
+use Test::More;
+
+use strict;
+
+SKIP: {
+ eval "use JSON";
+ skip "JSON isn't available" if ($@);
+ use_ok('Devscripts::JSONCache');
+
+ my %c;
+
+ ok(tie(%c, 'Devscripts::JSONCache', 'test.json'), 'No file');
+ $c{a} = 1;
+ untie %c;
+ ok(-r 'test.json', 'Cache created');
+ ok(tie(%c, 'Devscripts::JSONCache', 'test.json'), 'Reuse file');
+ ok($c{a} == 1, 'Value saved');
+ untie %c;
+ unlink 'test.json';
+
+ my %c2;
+ eval { tie(%c2, 'Devscripts::JSONCache', 'zzz/test.json') };
+ ok($@, "Build refused if write isn't possible");
+}
+done_testing();
diff --git a/test/t/salsa-config.t b/test/t/salsa-config.t
new file mode 100644
index 0000000..1ee644a
--- /dev/null
+++ b/test/t/salsa-config.t
@@ -0,0 +1,18 @@
+use Test::More tests => 8;
+
+BEGIN {
+ use_ok('Devscripts::Salsa::Config');
+}
+
+@Devscripts::Config::config_files = ('t/config1');
+@ARGV = ('push_repo', '--disable-kgb', '--tagpending', '--irker');
+
+ok($conf = Devscripts::Salsa::Config->new->parse, 'Parse');
+
+ok(($conf->kgb == 0 and $conf->disable_kgb), 'KGB disabled');
+ok(($conf->tagpending and $conf->disable_tagpending == 0),
+ 'Tagpending enabled');
+ok(($conf->issues == 'disabled'), 'Enable-issues disabled');
+ok(($conf->email == 0 and $conf->disable_email == 0), 'Email ignored');
+ok(($conf->mr == 'enabled'), 'MR enabled');
+ok(($conf->irker == 1 and $conf->disable_irker == 0), 'Irker enabled');
diff --git a/test/t/salsa.conf b/test/t/salsa.conf
new file mode 100644
index 0000000..d14fa84
--- /dev/null
+++ b/test/t/salsa.conf
@@ -0,0 +1,4 @@
+SALSA_TOKEN=abc
+SALSA_API_URL=http://no-exist.xxx/api/v4
+SALSA_KGB_SERVER_URL=http://no-exist.xxx:9418/webhook/?channel=
+SALSA_TAGPENDING_SERVER_URL=http://no-exist.xxx:9418/tagpending/
diff --git a/test/t/salsa.pm b/test/t/salsa.pm
new file mode 100644
index 0000000..ba81309
--- /dev/null
+++ b/test/t/salsa.pm
@@ -0,0 +1,228 @@
+{
+
+ package MockRESTClient;
+ use JSON;
+ use URI;
+ use Moo;
+ use JSON;
+ extends 'GitLab::API::v4::RESTClient';
+
+ has _mocks => (
+ is => 'ro',
+ default => sub { [] },
+ init_arg => undef,
+ );
+
+ sub mock_endpoints {
+ my $self = shift;
+
+ while (@_) {
+ my $method = shift;
+ my $path_re = shift;
+ my $sub = shift;
+
+ push @{ $self->_mocks() }, [$method, $path_re, $sub];
+ }
+
+ return;
+ }
+
+ sub _http_tiny_request {
+ my ($self, $req_method, $req) = @_;
+
+ die "req_method may only be 'request' at this time"
+ if $req_method ne 'request';
+
+ my ($method, $url, $options) = @$req;
+
+ my $path = URI->new($url)->path();
+ $path =~ s{^.*api/v4/}{};
+
+ foreach my $mock (@{ $self->_mocks() }) {
+ my ($handler_method, $path_re, $sub) = @$mock;
+
+ next if $method ne $handler_method;
+
+ my @captures = ($path =~ $path_re);
+ next if !@captures; # No captures still returns a 1.
+
+ my ($status, $content)
+ = $sub->([$method, $url, $options], @captures);
+ $content = JSON::to_json($content) if ref $content;
+
+ return {
+ status => $status,
+ success => ($status =~ m{^2\d\d$}) ? 1 : 0,
+ defined($content) ? (content => $content) : (),
+ };
+ }
+
+ die "No mock endpoint matched the $method '$path' endpoint";
+ }
+}
+
+sub api {
+ my ($gitdir) = @_;
+ my @users = ({
+ id => 11,
+ username => 'me',
+ name => 'Me',
+ email => 'me@debian.org',
+ state => 'active'
+ });
+ my @teams = ({
+ id => 2099,
+ name => 'Debian JavaScript Maintainers',
+ full_name => 'Debian JavaScript Maintainers',
+ full_path => 'js-team',
+ });
+ my @projects;
+ my $next_id = 1;
+
+ my $api = GitLab::API::v4->new(
+ url => 'https://example.com/api/v4',
+ rest_client_class => 'MockRESTClient',
+ );
+
+ $api->rest_client->mock_endpoints(
+ GET => qr{^user$} => sub { 200, $users[0] },
+ GET => qr{^users$} => sub { 200, \@users },
+ POST => qr{^users$} => sub {
+ my ($req) = @_;
+ my $user = decode_json($req->[2]->{content});
+ $user->{id} = $next_id;
+ $next_id++;
+ push @users, $user;
+ return 204;
+ },
+ GET => qr{^users?/(\d+)$} => sub {
+ my ($req, $id) = @_;
+ foreach my $user (@users) {
+ next if $user->{id} != $id;
+ return 200, $user;
+ }
+ return 404;
+ },
+ GET => qr{^users/(\D+)$} => sub {
+ my ($req, $id) = @_;
+ foreach my $user (@users) {
+ next if $user->{username} != $id;
+ return 200, $user;
+ }
+ return 404;
+ },
+ GET => qr{^groups$} => sub {
+ 200, \@teams;
+ },
+ GET => qr{^groups/([^/]+)$} => sub {
+ my ($req, $name) = @_;
+ foreach my $team (@teams) {
+ next if $team->{full_path} ne $name;
+ return 200, $team;
+ }
+ return 404;
+ },
+ PUT => qr{^users/(\d+)$} => sub {
+ my ($req, $id) = @_;
+ my $data = decode_json($req->[2]->{content});
+ foreach my $user (@users) {
+ next if $user->{id} != $id;
+ %$user = (%$user, %$data,);
+ return 204;
+ }
+ return 404;
+ },
+ DELETE => qr{^users/(\d+)$} => sub {
+ my ($req, $id) = @_;
+ my @new;
+ foreach my $user (@users) {
+ next if $user->{id} == $id;
+ push @new, $user;
+ }
+ return 404 if @new == @users;
+ @users = @new;
+ return 204;
+ },
+ # Projects
+ POST => qr{^projects$} => sub {
+ my $content = JSON::from_json($_[0]->[2]->{content});
+ mkdir "$gitdir/me/$content->{path}";
+ $ENV{"GIT_CONFIG_NOGLOBAL"} = 1;
+ print
+`cd $gitdir/me/$content->{path};git init;git config receive.denyCurrentBranch ignore;cd -`;
+ $content->{id} = scalar @projects + 1;
+ $content->{hooks} = [];
+ $content->{namespace} = {
+ kind => 'user',
+ id => 11,
+ name => 'me',
+ };
+ $content->{path_with_namespace} = 'me/' . $content->{path};
+ $content->{web_url} = 'http://no.org/me/' . $content->{path};
+ push @projects, $content;
+ return 200, $content;
+ },
+ GET => qr{^projects/(\d+)/hooks} => sub {
+ my ($req, $id) = @_;
+ my $res = eval { $projects[$id - 1]->{hooks} };
+ return ($res ? (200, $res) : (404));
+ },
+ GET => qr{^projects/(\d+)/services/(\w+)} => sub {
+ my ($req, $id, $service) = @_;
+ return 404;
+ },
+ GET => qr{^projects$} => sub {
+ my ($req) = @_;
+ return (200, \@projects) unless ($req->[1] =~ /search=([^&]+)/);
+ my $str = $1;
+ my @res;
+ foreach (@projects) {
+ if ($_->{name} =~ /\Q$str\E/) {
+ push @res, $_;
+ }
+ }
+ return 200, \@res;
+ },
+ GET => qr{^projects/([a-z]+)(?:%2F(\w+))*$} => sub {
+ my ($req, @path) = @_;
+ my $repo = pop @path;
+ my $path = join '/', @path;
+ foreach (@projects) {
+ if ($_->{namespace}->{name} eq $path and $_->{path} eq $repo) {
+ return 200, $_;
+ }
+ }
+ return 404;
+ },
+ GET => qr{^projects/(\d+)$} => sub {
+ my ($req, $id) = @_;
+ return 404 unless ($_ = $projects[$id - 1]);
+ return 200, $_;
+ },
+ PUT => qr{^projects/(\d+)} => sub {
+ my ($req, $id) = @_;
+ return 404 unless ($_ = $projects[$id - 1]);
+ my $content = JSON::from_json($req->[2]->{content});
+ foreach my $k (keys %$content) {
+ $_->{$k} = $content->{$k};
+ }
+ return 200, {};
+ },
+ POST => qr{^projects/(\d+)/hooks} => sub {
+ my ($req, $id) = @_;
+ return 404 unless ($_ = $projects[$id - 1]);
+ my $content = JSON::from_json($req->[2]->{content});
+ push @{ $_->{hooks} }, $content;
+ return 200, {};
+ },
+ POST => qr{^projects/(\d+)/repository/branches} => sub {
+ return 200, {};
+ },
+ DELETE => qr{^projects/(\d+)/repository/branches/([\w\-\.]+)$} => sub {
+ return 200, {};
+ },
+ );
+ return $api;
+}
+
+1;
diff --git a/test/t/salsa.t b/test/t/salsa.t
new file mode 100644
index 0000000..d80978a
--- /dev/null
+++ b/test/t/salsa.t
@@ -0,0 +1,108 @@
+#!/usr/bin/env perl
+
+my $skip;
+use File::Temp 'tempdir';
+use Test::More;
+use strict;
+
+BEGIN {
+ eval "use Test::Output;use GitLab::API::v4;";
+ $skip = $@ ? 1 : 0;
+}
+
+my $pwd = `pwd`;
+chomp $pwd;
+my ($api, $gitdir);
+
+sub mkDebianDir {
+ my $tmpdir = tempdir(CLEANUP => 1);
+ chdir $tmpdir;
+ $ENV{"GIT_CONFIG_NOGLOBAL"} = 1;
+ $ENV{"HOME"} = "";
+ system "git init";
+ system "git config user.name 'Joe Developer'";
+ system 'git config user.email "jd@debian.org"';
+ mkdir 'debian';
+ open F, ">debian/changelog";
+ print F <<EOF;
+foobar (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd\@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+EOF
+ close F;
+ open F, ">README.md";
+ print F <<EOF;
+# Salsa test
+EOF
+ system "git add *";
+ system "git commit -a -m 'Salsa test'";
+ system "git checkout -q -b dev";
+ chdir $pwd;
+ return $tmpdir;
+}
+
+sub run {
+ my ($result, $out, @list) = @_;
+ @ARGV = ('--no-cache', @list);
+ my ($res, $salsa);
+ combined_like(
+ sub {
+ $salsa = Devscripts::Salsa->new({ api => $api });
+ $salsa->config->git_server_url($gitdir . '/');
+ $res = $salsa->run;
+ },
+ $out,
+ "command: " . join(' ', @list));
+ ok($res =~ /^$result$/i, " result is $result");
+}
+
+sub run_debug {
+ my ($result, $out, @list) = @_;
+ @ARGV = ('--no-cache', @list);
+ my ($res, $salsa);
+ $salsa = Devscripts::Salsa->new({ api => $api });
+ $salsa->config->git_server_url($gitdir . '/');
+ $res = $salsa->run;
+}
+
+SKIP: {
+ skip "Missing dependencies" if ($skip);
+ require './t/salsa.pm';
+ $gitdir = tempdir(CLEANUP => 1);
+ sleep 1;
+ mkdir "$gitdir/me" or die "$gitdir/me: $!";
+
+ $api = api($gitdir);
+
+ use_ok 'Devscripts::Salsa';
+ $Devscripts::Output::die_on_error = 0;
+ @Devscripts::Config::config_files = ('t/salsa.conf');
+
+ # Search methods
+ run(0, qr/Id\s*:\s*11\nUsername\s*:\s*me/s, 'whoami');
+ run(0, qr/Id\s*:\s*2099\nName/s, 'search_group', 'js-team');
+ run(0, qr/Id\s*:\s*2099\nName/s, 'search_group', 2099);
+ run(0, qr/Id.*\nUsername\s*: me/s, 'search_user', 'me');
+ run(0, qr/Id.*\nUsername\s*: me/s, 'search_user', 'm');
+ run(0, qr/Id.*\nUsername\s*: me/s, 'search_user', 11);
+
+ # Project methods
+ my $repo = mkDebianDir;
+ run(0, qr/Project .*created/s, '-C', $repo, '--verbose', 'push_repo', '.');
+ chdir $pwd;
+ $repo = tempdir(CLEANUP => 1);
+ run(0, qr/KGB hook added.*Tagpending hook added/s,
+ 'update_repo', '--kgb', '--irc=debian', '--tagpending', 'foobar');
+ run(0, qr/foobar\s*:\s*OK/s,
+ 'update_safe', '--kgb', '--irc=debian', '--tagpending', 'foobar');
+ run(0, qr{Full path\s*:\s*me/foobar}, 'search', 'foobar');
+ run(0, qr{Configuring foobar},
+ 'rename_branch', 'foobar', '--source-branch=dev',
+ '--dest-branch=dev2');
+}
+
+done_testing;
+
+1;
diff --git a/test/t/uscan-config.t b/test/t/uscan-config.t
new file mode 100644
index 0000000..5209924
--- /dev/null
+++ b/test/t/uscan-config.t
@@ -0,0 +1,20 @@
+use Test::More tests => 8;
+
+BEGIN {
+ use_ok('Devscripts::Uscan::Config');
+ use_ok('Devscripts::Uscan::Output');
+}
+
+@Devscripts::Config::config_files = ('t/config1');
+@ARGV = ( '--download-version', '1.0', '-dd', '--no-verbose' );
+
+ok(
+ $conf = Devscripts::Uscan::Config->new->parse,
+ 'USCAN_SYMLINK=rename + --download-version'
+);
+
+ok($conf->symlink eq 'rename', ' symlink=rename');
+ok($conf->download_version eq '1.0',' download_version=1.0');
+ok($conf->user_agent =~ /^Debian uscan/, qq' user agent starts with "Debian uscan" ($conf->{user_agent})');
+ok($conf->download == 2, 'Force download');
+ok($verbose == 0, 'Verbose is disabled');
diff --git a/test/test_annotate-output b/test/test_annotate-output
new file mode 100755
index 0000000..6512b99
--- /dev/null
+++ b/test/test_annotate-output
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+# Copyright (C) 2012, James McCoy <jamessan@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+if test "${1:-}" = --installed; then
+ COMMAND=annotate-output
+ shift
+else
+ COMMAND="../scripts/annotate-output.sh"
+fi
+
+WORKDIR="$(readlink -f "${0%/*}")"
+
+testExitCode() {
+ $COMMAND +%% sh -c 'exit 42'>/dev/null 2>&1
+ assertEquals 'unexpected exit code' "42" "$?"
+}
+
+testStdErr() {
+ expected='% E: stderr'
+ actual="$($COMMAND +%% sh -c 'echo stderr >&2' | grep E:)"
+ assertEquals 'captured stderr' "${expected}" "${actual}"
+}
+
+testSwallowedNewline() {
+ expected="% O: foo% I: Finished with exitcode 0"
+ actual="$($COMMAND +%% echo -n foo | grep O:)"
+ assertEquals 'incomplete line found' "${expected}" "${actual}"
+}
+
+testBackslashes() {
+ expected='% O: \f\o\o'
+ actual="$($COMMAND +%% printf '%s\n' '\f\o\o' | grep O:)"
+ assertEquals 'backslashes echoed' "${expected}" "${actual}"
+}
+
+testLeadingWhitespace() {
+ expected='% O: foo'
+ actual="$($COMMAND +%% printf '%s\n' ' foo' | grep O:)"
+ assertEquals 'leading whitespace preserved' "${expected}" "${actual}"
+}
+
+. shunit2
diff --git a/test/test_checkbashisms b/test/test_checkbashisms
new file mode 100755
index 0000000..38d4c4a
--- /dev/null
+++ b/test/test_checkbashisms
@@ -0,0 +1,221 @@
+#!/bin/sh
+
+# Copyright (C) 2012, Benjamin Drung <bdrung@debian.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+set -u
+
+if test "${1:-}" = --installed; then
+ COMMAND=checkbashisms
+ shift
+else
+ # shellcheck disable=SC2034
+ COMMAND="../scripts/checkbashisms.pl"
+fi
+
+WORKDIR="$(readlink -f "${0%/*}")"
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+clean() {
+ cd "$WORKDIR"
+ runCommand "$1" "" "" 0
+}
+
+found() {
+ cd "$WORKDIR"
+ runCommand "$1" "" "$2" 1
+}
+
+test_531327() {
+ clean "bashisms/531327.sh"
+}
+
+test_535368() {
+ clean "-f bashisms/535368.mk"
+}
+
+test_808271() {
+ found "bashisms/808271.sh" "$(cat bashisms/808271.sh.out)"
+}
+
+test_arith() {
+ found "bashisms/arith.sh" "$(cat bashisms/arith.sh.out)"
+}
+
+test_array_expansion() {
+ found "bashisms/array-expansion.sh" "$(cat bashisms/array-expansion.sh.out)"
+}
+
+test_ash_setvar() {
+ found "bashisms/ash-setvar.sh" "$(cat bashisms/ash-setvar.sh.out)"
+}
+
+test_basic() {
+ found "-f bashisms/basic.mk" "$(cat bashisms/basic.mk.out)"
+}
+
+test_basic_bash() {
+ clean "-f bashisms/basic-bash.mk"
+}
+
+test_brace_expansion() {
+ found "-f bashisms/brace-expansion.sh" "$(cat bashisms/brace-expansion.sh.out)"
+}
+
+test_basic_bash_override() {
+ clean "-f bashisms/basic-bash-override.mk"
+}
+
+test_case_modification() {
+ found "-f bashisms/case-modification.sh" "$(cat bashisms/case-modification.sh.out)"
+}
+
+test_comments_in_quoted_strings1() {
+ clean "bashisms/comments-in-quoted-strings1.sh"
+}
+
+test_comments_in_quoted_strings2() {
+ clean "bashisms/comments-in-quoted-strings2.sh"
+}
+
+test_command() {
+ found "bashisms/command.sh" "$(cat bashisms/command.sh.out)"
+}
+
+test_comments_parsing_fns() {
+ found "bashisms/comments-parsing-fns.sh" "$(cat bashisms/comments-parsing-fns.sh.out)"
+}
+
+test_coproc() {
+ found "bashisms/coproc.sh" "$(cat bashisms/coproc.sh.out)"
+}
+
+test_dynamic_length() {
+ found "bashisms/dynamic-length.sh" "$(cat bashisms/dynamic-length.sh.out)"
+}
+
+test_exit_code() {
+ found "bashisms/exit-code.sh" "$(cat bashisms/exit-code.sh.out)"
+}
+
+test_fail2ban() {
+ clean "bashisms/fail2ban.sh"
+}
+
+test_fps() {
+ found "bashisms/fps.sh" "$(cat bashisms/fps.sh.out)"
+}
+
+test_functions() {
+ found "bashisms/functions.sh" "$(cat bashisms/functions.sh.out)"
+}
+
+test_gettext() {
+ found "bashisms/gettext.sh" "$(cat bashisms/gettext.sh.out)"
+}
+
+test_glob_ignore() {
+ found "bashisms/glob-ignore.sh" "$(cat bashisms/glob-ignore.sh.out)"
+}
+
+test_hash() {
+ found "bashisms/hash.sh" "$(cat bashisms/hash.sh.out)"
+}
+
+test_heredocs() {
+ found "bashisms/heredocs.sh" "$(cat bashisms/heredocs.sh.out)"
+}
+
+test_heredoc_with_dash() {
+ clean "bashisms/heredoc-with-dash.sh"
+}
+
+test_heredoc_with_others() {
+ clean "bashisms/heredoc-with-others.sh"
+}
+
+test_jobs() {
+ found "bashisms/jobs.sh" "$(cat bashisms/jobs.sh.out)"
+}
+
+test_line_continuation() {
+ found "bashisms/line-continuation.sh" "$(cat bashisms/line-continuation.sh.out)"
+}
+
+test_negations() {
+ found "bashisms/negations.sh" "$(cat bashisms/negations.sh.out)"
+}
+
+test_other_vars() {
+ found "bashisms/other-vars.sh" "$(cat bashisms/other-vars.sh.out)"
+}
+
+test_printf() {
+ found "bashisms/printf.sh" "$(cat bashisms/printf.sh.out)"
+}
+
+test_quoted_strings() {
+ found "bashisms/quoted-strings.sh" "$(cat bashisms/quoted-strings.sh.out)"
+}
+
+test_return() {
+ found "bashisms/return.sh" "$(cat bashisms/return.sh.out)"
+}
+
+test_shell_vars() {
+ clean "-f bashisms/shell-vars.mk"
+}
+
+test_source() {
+ found "bashisms/source" "$(cat bashisms/source.out)"
+}
+
+test_special_case() {
+ found "bashisms/special-case.sh" "$(cat bashisms/special-case.sh.out)"
+}
+
+test_special_expansions() {
+ found "bashisms/special-expansions.sh" "$(cat bashisms/special-expansions.sh.out)"
+}
+
+test_subshell_no_arith() {
+ clean "bashisms/subshell-no-arith.sh"
+}
+
+test_tilde_expansion() {
+ found "bashisms/tilde-expansion.sh" "$(cat bashisms/tilde-expansion.sh.out)"
+}
+
+test_traps() {
+ found "bashisms/traps.sh" "$(cat bashisms/traps.sh.out)"
+}
+
+test_underscore_var() {
+ found "bashisms/underscore-var.sh" "$(cat bashisms/underscore-var.sh.out)"
+}
+
+test_unknown_fns() {
+ found "bashisms/unknown-fns.sh" "$(cat bashisms/unknown-fns.sh.out)"
+}
+
+test_unterminated_string() {
+ clean "bashisms/unterminated-string.sh"
+}
+
+test_unterminated_string2() {
+ clean "bashisms/unterminated-string2.sh"
+}
+
+. shunit2
diff --git a/test/test_dd-list b/test/test_dd-list
new file mode 100755
index 0000000..5d741d2
--- /dev/null
+++ b/test/test_dd-list
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# Copyright (C) 2012, James McCoy <jamessan@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+WORKDIR="$(readlink -f "${0%/*}")"
+
+if test "${1:-}" = --installed; then
+ COMMAND=dd-list
+ shift
+else
+ COMMAND="$WORKDIR/../scripts/dd-list.pl"
+fi
+
+testBinariesFromSameSource() {
+ $COMMAND -s ${WORKDIR}/dd-list/sources vim-gtk vim-nox 2>&1 >/dev/null
+ rc=$?
+ assertEquals 'packages found' 0 $rc
+}
+
+testExtraSourceOnlyIgnored() {
+ $COMMAND -s ${WORKDIR}/dd-list/sources bzip2 >$SHUNIT_TMPDIR/extra-source.out
+
+ assertFalse 'Jorge listed as uploader' "grep -q Jorge $SHUNIT_TMPDIR/extra-source.out"
+}
+
+testUseOnlyLatestVersion() {
+ $COMMAND -s ${WORKDIR}/dd-list/sources subversion >$SHUNIT_TMPDIR/latest-version.out
+
+ assertFalse 'Troy Heber listed as uploader' "grep -q Troy $SHUNIT_TMPDIR/latest-version.out"
+}
+
+. shunit2
diff --git a/test/test_debchange b/test/test_debchange
new file mode 100755
index 0000000..5242037
--- /dev/null
+++ b/test/test_debchange
@@ -0,0 +1,252 @@
+#!/bin/bash
+
+# Copyright (C) 2012, Benjamin Drung <bdrung@debian.org>
+# © 2017 Mattia Rizzolo <mattia@debian.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+set -u
+
+if test "${1:-}" = --installed; then
+ COMMAND="dch --no-conf"
+ shift
+else
+ COMMAND="perl -I ${0%/*}/../lib ${0%/*}/../scripts/debchange.pl --no-conf"
+fi
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+setUp() {
+ CHANGELOG="${SHUNIT_TMPDIR}/changelog"
+ DEBFULLNAME="Raphaël Hertzog"
+ DEBEMAIL="hertzog@debian.org"
+ unset UBUMAIL
+ export DEBFULLNAME DEBEMAIL
+}
+
+tearDown() {
+ unset CHANGELOG DEBFULLNAME DEBEMAIL
+}
+
+runCommand2() {
+ local param="$1"
+ local exp_stdout="$2"
+ local exp_stderr="$3"
+ local exp_retval=$4
+ local stdoutF="${SHUNIT_TMPDIR}/stdout"
+ local stderrF="${SHUNIT_TMPDIR}/stderr"
+ eval "${COMMAND} $param" > ${stdoutF} 2> ${stderrF}
+ # Strip distribution data outdated warnings (caused by outdate distro-info-data).
+ cat $stderrF | \
+ grep -v "^Distribution data outdated. Please check for an update for distro-info-data. See /usr/share/doc/distro-info-data/README.Debian for details." | \
+ grep -v '^debchange[^ ]* warning: Unable to determine the current Ubuntu development release. Using UNRELEASED instead.$' > ${stderrF}.tmp
+ mv ${stderrF}.tmp ${stderrF}
+ retval=$?
+ assertEquals "standard output of ${COMMAND} $param\n" "$exp_stdout" "$(cat ${stdoutF})"
+ assertEquals "error output of ${COMMAND} $param\n" "$exp_stderr" "$(cat ${stderrF})"
+ assertEquals "return value of ${COMMAND} $param\n" $exp_retval $retval
+}
+
+success() {
+ runCommand2 "-c \"$CHANGELOG\" $1" "" "" 0
+}
+
+checkUbuntuDevelAvailable() {
+ if ubuntu-distro-info --devel 2>/dev/null >&2; then
+ # distro-info-data knows of the current devel release
+ true
+ else
+ # distro-info-data doesn't know of the current devel release
+ false
+ fi
+}
+
+checkVersion() {
+ local start_param="$1"
+ local param="$2"
+ local start_version="$3"
+ local expected_version="$4"
+ rm -f "$CHANGELOG"
+ success "--create $start_param --package test-package -v $start_version \"Devscripts Test Suite.\""
+ success "$param \"Version test.\""
+ local version=$(dpkg-parsechangelog -l"$CHANGELOG" -SVersion)
+ assertEquals "\"dch $param\" from version $start_version" "$expected_version" "$version"
+}
+
+checkDebianDistribution() {
+ checkVersion "--vendor Debian -D unstable" "--vendor Debian -i -D $1" "1.0-1" "1.0-2"
+}
+
+checkDebianVersion() {
+ checkVersion "--vendor Debian -D unstable" "--vendor Debian $1" "$2" "$3"
+}
+
+checkUbuntuVersion() {
+ checkVersion "--vendor Debian -D unstable" "--vendor Ubuntu $1" "$2" "$3"
+}
+
+testDebianDistributions() {
+ checkDebianDistribution "trixie"
+ checkDebianDistribution "trixie-security"
+ checkDebianDistribution "bookworm"
+ checkDebianDistribution "bookworm-proposed-updates"
+ checkDebianDistribution "bookworm-security"
+ checkDebianDistribution "bullseye"
+ checkDebianDistribution "bullseye-security"
+ checkDebianDistribution "buster"
+ checkDebianDistribution "buster-security"
+ checkDebianDistribution "experimental"
+ checkDebianDistribution "oldstable"
+ checkDebianDistribution "oldstable-proposed-updates"
+ checkDebianDistribution "oldoldstable"
+ checkDebianDistribution "oldoldstable-proposed-updates"
+ checkDebianDistribution "proposed-updates"
+ checkDebianDistribution "stable"
+ checkDebianDistribution "stable-proposed-updates"
+ checkDebianDistribution "testing"
+ checkDebianDistribution "testing-proposed-updates"
+ checkDebianDistribution "UNRELEASED"
+}
+
+testDebianIncrement() {
+ checkDebianVersion "-i" "1.0-1" "1.0-2"
+ checkDebianVersion "-i" "12" "13"
+}
+
+testUbuntuIncrement() {
+ if ! checkUbuntuDevelAvailable; then
+ echo "No known Ubuntu devel release known, skipping related tests"
+ startSkipping
+ fi
+ checkUbuntuVersion "-i" "12" "12ubuntu1"
+ checkUbuntuVersion "-i" "3.4" "3.4ubuntu1"
+ checkUbuntuVersion "-i" "3.4.5" "3.4.5ubuntu1"
+ checkUbuntuVersion "-i" "5.6-7" "5.6-7ubuntu1"
+ checkUbuntuVersion "-i" "5.6-7.1" "5.6-7.1ubuntu1"
+ checkUbuntuVersion "-i" "5.6-7.1.8" "5.6-7.1.8ubuntu1"
+ checkUbuntuVersion "-i" "2.13-14build5" "2.13-14ubuntu1"
+ checkUbuntuVersion "-i" "0.45-2ubuntu3" "0.45-2ubuntu4"
+ checkUbuntuVersion "-i" "0.45-2ubuntu3.1" "0.45-2ubuntu3.2"
+ checkUbuntuVersion "-i" "0.45-2ubuntu3.1.0" "0.45-2ubuntu3.1.1"
+}
+
+testUbuntuRebuild() {
+ if ! checkUbuntuDevelAvailable; then
+ echo "No known Ubuntu devel release known, skipping related tests"
+ startSkipping
+ fi
+ checkUbuntuVersion "-R" "3.4" "3.4build1"
+ checkUbuntuVersion "-R" "2.0-4" "2.0-4build1"
+ checkUbuntuVersion "-R" "1.42-4ubuntu5" "1.42-4ubuntu6"
+ checkUbuntuVersion "-R" "0.1-2build3" "0.1-2build4"
+}
+
+verifyMaintainer() {
+ local maintainer="$(dpkg-parsechangelog -l"$CHANGELOG" -SMaintainer)"
+ assertEquals "\"$1\"" "$DEBFULLNAME <$DEBEMAIL>" "$maintainer"
+}
+
+testEncoding() {
+ rm -f "$CHANGELOG"
+ success "--create -D unstable --package test-package -v 1.0-1 \"First upload\""
+ verifyMaintainer "dch --create"
+
+ success "-a \"Some change\""
+ verifyMaintainer "dch -a"
+
+ success "-i \"Second upload\""
+ verifyMaintainer "dch -i"
+
+ success "-e \"Another change\""
+ verifyMaintainer "dch -e"
+
+ success "-n NMU"
+ verifyMaintainer "dch -n"
+
+ success "-v 1.1-1 \"New upstream\""
+ verifyMaintainer "dch -v"
+
+ success "--bin-nmu \"Rebuild against libfoo\""
+ verifyMaintainer "dch --bin-nmu"
+
+ success "-q \"QA upload\""
+ verifyMaintainer "dch -q"
+
+ success "-s \"Security upload\""
+ verifyMaintainer "dch -s"
+
+ success "-s \"LTS Security upload\""
+ verifyMaintainer "dch --lts"
+
+ success "--bpo \"Backports upload\""
+ verifyMaintainer "dch --bpo"
+
+ success "--stable \"Stable upload\""
+ verifyMaintainer "dch --stable"
+}
+
+verifyEntryLines() {
+ success "--vendor Debian $1"
+ local changes="$(dpkg-parsechangelog -l"$CHANGELOG" -SChanges | grep -F '*')"
+ assertEquals "\"$changes\"" 1 "$(echo "$changes" | wc -l)"
+}
+
+# Any options which automatically add their own entry to the changelog should
+# elide an empty entry if the user passes an empty string as the entry.
+testEmptyMessage() {
+ rm -f "$CHANGELOG"
+ success "--create -D unstable --package test-package -v 1.0-1 'First upload'"
+
+ verifyEntryLines "--nmu ''"
+
+ verifyEntryLines "--bin-nmu ''"
+
+ verifyEntryLines "--qa ''"
+
+ verifyEntryLines "--security ''"
+
+ verifyEntryLines "--bpo ''"
+
+ verifyEntryLines "--team ''"
+}
+
+verifyGuessedDistribution() {
+ # $1 → initial suite
+ # $2 → action
+ # $3 → expected suite after the action
+ rm -f "$CHANGELOG"
+ vdeb="--vendor Debian"
+ success "$vdeb --create -D $1 --package test-package -v 1.0-1 'First upload'"
+ success "$vdeb $2 'Second Upload'"
+ success "$vdeb -r ''"
+ local dist="$(dpkg-parsechangelog -l"$CHANGELOG" -SDistribution)"
+ assertEquals "$3" "$dist"
+}
+
+testGuessedDistribution() {
+ verifyGuessedDistribution unstable -i unstable
+ verifyGuessedDistribution experimental -i experimental
+ verifyGuessedDistribution bookworm-backports -i bookworm-backports
+ verifyGuessedDistribution trixie -i trixie
+ verifyGuessedDistribution unstable --bpo bookworm-backports
+ verifyGuessedDistribution unstable --stable bookworm
+}
+
+testSpecialCharacterMaintainer() {
+ rm -f "$CHANGELOG"
+ export DEBFULLNAME='\k'
+ success "--create -D unstable --package test-package -v 1.0-1 \"First upload\""
+ success "-a \"Some change\""
+}
+
+. shunit2
diff --git a/test/test_debdiff b/test/test_debdiff
new file mode 100755
index 0000000..8043574
--- /dev/null
+++ b/test/test_debdiff
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Copyright (C) 2013, James McCoy <jamessan@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+if test "${1:-}" = --installed; then
+ COMMAND="debdiff --no-conf"
+ shift
+else
+ COMMAND="perl -I ${0%/*}/../lib ${0%/*}/../scripts/debdiff.pl --no-conf"
+fi
+
+WORKDIR="$(readlink -f "${0%/*}")"
+
+test() {
+ $COMMAND ${WORKDIR}/debdiff/devscripts_2.13.0_any.deb ${WORKDIR}/debdiff/devscripts_2.13.1_any.deb >/dev/null 2>/dev/null
+ rc=$?
+ assertEquals 'difference found, no errors' 1 $rc
+}
+
+. shunit2
diff --git a/test/test_debi b/test/test_debi
new file mode 100755
index 0000000..f3206f5
--- /dev/null
+++ b/test/test_debi
@@ -0,0 +1,285 @@
+#!/usr/bin/perl
+
+# Copyright 2019 Simon McVittie
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+=head1 NAME
+
+test_debi - unit test for debi
+
+=head1 WARNING
+
+This test requires root privileges, and installs and removes packages.
+Please run it in an expendable environment, such as via
+one of the B<autopkgtest-virt-*> autopkgtest backends.
+
+=head1 DESCRIPTION
+
+This test verifies that debi's B<--with-depends> and B<--upgrade> interact
+as expected.
+
+=cut
+
+use autodie;
+use strict;
+use warnings;
+
+use Cwd qw(getcwd);
+use Digest::MD5;
+use Digest::SHA;
+use File::Temp qw(tempdir);
+use IPC::Run qw(run);
+use Test::More;
+
+use Dpkg::Control;
+
+my $srcdir = getcwd;
+my $top_srcdir = getcwd . '/..';
+my @debi = ("$top_srcdir/scripts/debi.pl", '--no-conf');
+my $tmp;
+
+if (defined $ARGV[0] && $ARGV[0] eq '--installed') {
+ $debi[0] = 'debi';
+}
+else {
+ $ENV{PATH} = "$top_srcdir/scripts:$ENV{PATH}";
+}
+
+sub verbose_run {
+ my $argv = shift;
+ diag("Running: @{$argv}");
+ my $ret = run($argv, @_);
+ if ($ret) {
+ diag("=> success");
+ } else {
+ diag("=> exit status $?");
+ }
+ return $ret;
+}
+
+sub capture {
+ my $output;
+ my $argv = shift;
+ ok(verbose_run($argv, '>', \$output), "@{$argv}");
+ chomp $output;
+ return $output;
+}
+
+sub make_deb {
+ my ($name, $version, $depends) = @_;
+ mkdir "$tmp/deb" unless -d "$tmp/deb";
+ mkdir "$tmp/deb/DEBIAN" unless -d "$tmp/deb/DEBIAN";
+ open my $fh, '>', "$tmp/deb/DEBIAN/control";
+ print {$fh} "Package: devscripts-test-$name\n";
+ print {$fh} "Section: misc\n";
+ print {$fh} "Priority: optional\n";
+ print {$fh} "Maintainer: nobody\n";
+ print {$fh} "Version: $version\n";
+ print {$fh} "Architecture: all\n";
+ print {$fh} "Depends: $depends\n";
+ print {$fh} "Description: a package\n";
+ close $fh;
+
+ my $deb = "$tmp/devscripts-test-${name}_${version}_all.deb";
+ if (!run(['dpkg-deb', '-b', "$tmp/deb", $deb])) {
+ BAIL_OUT("Failed to build $name package from $tmp/deb");
+ }
+}
+
+sub make_changes {
+ my @packages = @_;
+ my $changes = "$tmp/foo.changes";
+ my $ctrl = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+ $ctrl->{Format} = '1.8';
+ $ctrl->{Source} = 'devscripts-test';
+ $ctrl->{Files} = "\n";
+ $ctrl->{'Checksums-Sha256'} = "\n";
+
+ foreach my $name (@packages) {
+ my $md5 = Digest::MD5->new;
+ my $sha256 = Digest::SHA->new(256);
+ open my $fh, '<', "$tmp/devscripts-test-${name}_1_all.deb";
+ binmode $fh;
+ $md5->addfile($fh);
+ seek $fh, 0, 0;
+ $sha256->addfile(*$fh);
+ close $fh;
+ my $hash = $md5->hexdigest;
+ my @stat = stat "$tmp/devscripts-test-${name}_1_all.deb";
+ my $size = $stat[7];
+
+ $ctrl->{Files}
+ .= "$hash $size misc optional devscripts-test-${name}_1_all.deb\n";
+ $hash = $sha256->hexdigest;
+ $ctrl->{'Checksums-Sha256'}
+ .= "$hash $size devscripts-test-${name}_1_all.deb\n";
+ }
+ diag $ctrl;
+ $ctrl->save($changes);
+}
+
+sub purge_packages {
+ ok(
+ verbose_run([
+ 'dpkg',
+ '--purge',
+ 'devscripts-test-already-installed',
+ 'devscripts-test-dependency',
+ 'devscripts-test-gains-dependency',
+ 'devscripts-test-gains-local-dependency',
+ 'devscripts-test-not-installed',
+ 'hello',
+ ]));
+}
+
+sub version_of {
+ my $output;
+ my $ignored;
+ run(['dpkg-query', '-W', '-f', '${Version}', shift],
+ '>', \$output, '2>', \$ignored);
+ chomp $output;
+ return $output;
+}
+
+sub status_of {
+ my $output;
+ my $ignored;
+ run(['dpkg-query', '-W', '-f', '${Status}', shift],
+ '>', \$output, '2>', \$ignored);
+ chomp $output;
+ return $output;
+}
+
+plan skip_all => 'not root' unless $< == 0 && $> == 0;
+
+$tmp = tempdir(CLEANUP => 1);
+open my $fh, '>', "$tmp/yes.conf";
+print {$fh} qq{Apt::Get::Assume-Yes "true";\n};
+print {$fh} qq{Apt::Get::allow-downgrades "true";\n};
+close $fh;
+$ENV{APT_CONFIG} = "$tmp/yes.conf";
+
+make_deb('already-installed', '0', 'base-files');
+make_deb('already-installed', '1', 'base-files');
+make_deb('already-installed', '2', 'base-files');
+make_deb('not-installed', '1', 'base-files');
+make_deb('gains-local-dependency', '0', 'base-files');
+make_deb('gains-local-dependency', '1', 'devscripts-test-dependency');
+make_deb('dependency', '1', 'base-files');
+make_deb('gains-dependency', '0', 'base-files');
+make_deb('gains-dependency', '1', 'hello');
+
+diag('debi foo.changes will upgrade existing packages and install new ones');
+purge_packages();
+ok(
+ verbose_run(
+ ['dpkg', '-i', "$tmp/devscripts-test-already-installed_0_all.deb",]));
+make_changes(qw(already-installed not-installed));
+ok(verbose_run([@debi, "$tmp/foo.changes",]), 'plain debi succeeds');
+is(version_of('devscripts-test-already-installed'),
+ '1', 'already installed package was upgraded');
+is(version_of('devscripts-test-not-installed'),
+ '1', 'not-installed package was installed (regressed in #932640)');
+
+diag('debi foo.changes will also downgrade existing packages');
+purge_packages();
+ok(
+ verbose_run(
+ ['dpkg', '-i', "$tmp/devscripts-test-already-installed_2_all.deb",]));
+make_changes(qw(already-installed));
+ok(verbose_run([@debi, "$tmp/foo.changes",]), 'plain debi succeeds');
+is(version_of('devscripts-test-already-installed'),
+ '1', 'already installed package was downgraded');
+
+diag('debi --upgrade will upgrade/downgrade existing packages, only');
+purge_packages();
+ok(
+ verbose_run(
+ ['dpkg', '-i', "$tmp/devscripts-test-already-installed_2_all.deb",]));
+make_changes(qw(already-installed not-installed));
+ok(verbose_run([@debi, '--upgrade', "$tmp/foo.changes",]),
+ 'debi --upgrade succeeds');
+is(version_of('devscripts-test-already-installed'),
+ '1', 'already installed package was downgraded');
+is(version_of('devscripts-test-not-installed'),
+ '', 'not-installed package was not installed');
+
+diag('it is OK if debi --upgrade does nothing');
+purge_packages();
+make_changes(qw(not-installed));
+ok(verbose_run([@debi, '--upgrade', "$tmp/foo.changes",]),
+ 'debi --upgrade succeeds');
+is(version_of('devscripts-test-not-installed'),
+ '', 'not-installed package was not installed');
+
+diag('debi without --with-depends does not try to satisfy dependencies');
+purge_packages();
+ok(
+ verbose_run(
+ ['dpkg', '-i', "$tmp/devscripts-test-gains-dependency_0_all.deb",]));
+make_changes(qw(gains-dependency));
+ok(!verbose_run([@debi, "$tmp/foo.changes",]),
+ 'debi without --with-depends does not install dependency');
+# It's OK for it to either be unpacked but fail to configure, or be
+# left at version 0.
+isnt(
+ version_of('devscripts-test-gains-dependency') . "::"
+ . status_of('devscripts-test-gains-dependency'),
+ '1::install ok installed',
+ 'package with a dependency was not installed'
+);
+is(version_of('hello'), '', 'third party dependency was not installed');
+
+diag('debi --with-depends does satisfy dependencies');
+purge_packages();
+make_changes(qw(gains-dependency));
+ok(verbose_run([@debi, '--with-depends', "$tmp/foo.changes",]),
+ 'debi --with-depends succeeds');
+is(version_of('devscripts-test-gains-dependency'),
+ '1', 'package with a dependency was installed');
+isnt(version_of('hello'), '', 'third party dependency was installed');
+
+diag('debi --upgrade --with-depends does satisfy new dependencies');
+purge_packages();
+ok(
+ verbose_run(
+ ['dpkg', '-i', "$tmp/devscripts-test-gains-dependency_0_all.deb",]));
+make_changes(qw(gains-dependency not-installed));
+ok(verbose_run([@debi, '--with-depends', '--upgrade', "$tmp/foo.changes",]),
+ 'debi --with-depends --upgrade succeeds');
+is(version_of('devscripts-test-gains-dependency'),
+ '1', 'package with a dependency was installed');
+isnt(version_of('hello'), '', 'third party dependency was installed');
+is(version_of('devscripts-test-not-installed'),
+ '', 'not-installed package was not installed (#932963)');
+
+purge_packages();
+verbose_run(
+ ['dpkg', '-i', "$tmp/devscripts-test-gains-local-dependency_0_all.deb",]);
+make_changes(qw(dependency gains-local-dependency));
+ok(
+ verbose_run([@debi, '--upgrade', '--with-depends', "$tmp/foo.changes",]),
+ 'corner case from #932963: debi --upgrade --with-depends can cope with '
+ . 'a new dependency on a binary from the same source'
+);
+is(version_of('devscripts-test-gains-local-dependency'),
+ '1', 'the package we wanted to upgrade is upgraded');
+is(version_of('devscripts-test-dependency'),
+ '1',
+ 'the new dependency of the package we wanted to upgrade is installed');
+
+purge_packages();
+done_testing;
diff --git a/test/test_debrepro b/test/test_debrepro
new file mode 100755
index 0000000..077be1e
--- /dev/null
+++ b/test/test_debrepro
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Copyright (C) 2018, Antonio Terceiro <terceiro@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+DEB_HOST_OS="$(dpkg-architecture -qDEB_HOST_ARCH_OS)"
+if [ "$DEB_HOST_OS" = "kfreebsd" ]; then
+ # kbsd has a non-working semaphore, that is needed here.
+ echo "This test is not supported on $(dpkg-architecture -qDEB_HOST_ARCH), skipping"
+ exit 0
+fi
+
+if test "${1:-}" = --installed; then
+ debrepro="debrepro --skip filesystem-ordering"
+ shift
+else
+ debrepro="${0%/*}/../scripts/debrepro.sh --skip filesystem-ordering"
+fi
+
+samples="${0%/*}/debrepro"
+
+. "${0%/*}/test_helper.sh"
+
+test_reproducible() {
+ assertPasses $debrepro $samples/reproducible
+}
+
+test_unreproducible() {
+ assertFails $debrepro $samples/unreproducible
+}
+
+. shunit2
diff --git a/test/test_debsign b/test/test_debsign
new file mode 100755
index 0000000..9c7ccf5
--- /dev/null
+++ b/test/test_debsign
@@ -0,0 +1,114 @@
+#!/bin/sh
+
+# Copyright (C) 2018, Chris Lamb <lamby@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+WORKDIR="$(readlink -f "${0%/*}")"
+
+if test "${1:-}" = --installed; then
+ COMMAND="debsign --no-conf"
+ shift
+else
+ COMMAND="$WORKDIR/../scripts/debsign.sh --no-conf"
+fi
+
+GPG=gpg
+GPGHOME=$(mktemp -d -p /tmp gpg.XXXXX)
+if ! command -v $GPG >/dev/null 2>&1; then
+ echo "$GPG missing"
+ GPG=gpg2
+ if ! command -v $GPG >/dev/null 2>&1; then
+ echo "$GPG missing"
+ exit 1
+ fi
+fi
+
+oneTimeSetUp () {
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --output $GPGHOME/secring.gpg --dearmor $WORKDIR/debsign/private_key.asc
+
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --output $GPGHOME/pubring.gpg --dearmor $WORKDIR/debsign/public_key.asc
+
+ export GNUPGHOME=$GPGHOME
+}
+
+oneTimeTearDown () {
+ gpgconf --homedir "$GPGHOME" --verbose --kill gpg-agent
+ rm -rf "$GPGHOME"
+}
+
+setUp() {
+ TEMPDIR=$(mktemp -d -p /tmp debsign.XXXXX)
+ cp $WORKDIR/debsign/* $TEMPDIR
+ CHANGES=$(echo $TEMPDIR/*changes)
+}
+
+tearDown() {
+ rm -rf $TEMPDIR
+}
+
+assertSigned() {
+ expected=$1
+ shift
+ $COMMAND "$@" $CHANGES >$TEMPDIR/stdout 2>$TEMPDIR/stderr
+ rc=$?
+ assertEquals 'error code' $expected $rc
+}
+
+testEmailKeyID () {
+ assertSigned 0 -k none@debian.org
+}
+
+testShortKeyID () {
+ assertSigned 1 -k 72543FAF
+ assertTrue 'error not seen' "grep -q 'short key ID' $TEMPDIR/stderr"
+}
+
+testPrefixedShortKeyID () {
+ assertSigned 1 -k 0x72543FAF
+ assertTrue 'error not seen' "grep -q 'short key ID' $TEMPDIR/stderr"
+}
+
+testLongKeyID() {
+ assertSigned 0 -k C77E2D6872543FAF
+ assertTrue 'not signed' "grep -q 'BEGIN PGP SIGNATURE' $CHANGES"
+}
+
+testPrefixedLongKeyID() {
+ assertSigned 0 -k 0xC77E2D6872543FAF
+ assertTrue 'not signed' "grep -q 'BEGIN PGP SIGNATURE' $CHANGES"
+}
+
+testFingerprintKeyID () {
+ assertSigned 0 -k CF218F0E7EABF584B7E20402C77E2D6872543FAF
+}
+
+testUnknownKeyID () {
+ assertSigned 2 -k AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+ assertTrue 'warning not seen' "grep -q 'No secret key' $TEMPDIR/stderr"
+}
+
+testNameKeyID () {
+ assertSigned 0 -k 'uscan test key (no secret)'
+}
+
+testFullNameAsKeyID () {
+ assertSigned 0 -k 'uscan test key (no secret) <none@debian.org>'
+}
+
+. shunit2
diff --git a/test/test_helper.sh b/test/test_helper.sh
new file mode 100644
index 0000000..579780c
--- /dev/null
+++ b/test/test_helper.sh
@@ -0,0 +1,26 @@
+setUp() {
+ tmpdir=$(mktemp -d)
+ log="$tmpdir/log"
+}
+
+tearDown() {
+ rm -rf "$tmpdir"
+}
+
+assertPasses() {
+ local rc=0
+ "$@" > "$log" 2>&1 || rc=$?
+ if [ "$rc" -ne 0 ]; then
+ cat "$log"
+ fail "command failed: «$*» (expected pass)"
+ fi
+}
+
+assertFails() {
+ local rc=0
+ "$@" > "$log" 2>&1 || rc=$?
+ if [ "$rc" -eq 0 ]; then
+ cat "$log"
+ fail "command passed: «$*» (expected fail)"
+ fi
+}
diff --git a/test/test_mass_bug b/test/test_mass_bug
new file mode 100755
index 0000000..b75386c
--- /dev/null
+++ b/test/test_mass_bug
@@ -0,0 +1,161 @@
+#!/usr/bin/perl
+
+# Copyright 2020 Simon McVittie
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+
+use Cwd qw(getcwd);
+use File::Temp qw(tempdir);
+use IPC::Run qw(run);
+use Test::More;
+
+# Disable l10n: we look for specific messages
+$ENV{LC_ALL} = 'C.UTF-8';
+
+my $srcdir = getcwd;
+my $top_srcdir = getcwd . '/..';
+my $mass_bug = "$top_srcdir/scripts/mass-bug.pl";
+
+if (defined $ARGV[0] && $ARGV[0] eq '--installed') {
+ $mass_bug = 'mass-bug';
+}
+
+my $tmp = tempdir(CLEANUP => 1);
+
+sub verbose_run {
+ my $argv = shift;
+ diag("Running: @{$argv}");
+ return run($argv, @_);
+}
+
+sub capture {
+ my $output;
+ my $argv = shift;
+ ok(verbose_run($argv, '>', \$output), "@{$argv}");
+ chomp $output;
+ return $output;
+}
+
+my $stdout;
+my $stderr;
+
+diag('Help');
+$stdout = capture([
+ $mass_bug,
+ '--help',
+]);
+like($stdout, qr{Usage:});
+
+diag('Version');
+$stdout = capture([
+ $mass_bug,
+ '--version',
+]);
+like($stdout, qr{devscripts package});
+
+diag('Basic use');
+$stdout = capture([
+ $mass_bug,
+ '--no-conf',
+ '--subject=Is broken',
+ "$srcdir/mass-bug/template",
+ "$srcdir/mass-bug/one-package",
+]);
+like($stdout, qr{^Subject: test-package: Is broken$}m);
+like($stdout, qr{^Package: test-package$}m);
+like($stdout, qr{^Version: 1\.2-3$}m);
+like($stdout, qr{^test-package has a bug\. Please fix\.$}m);
+like($stdout, qr{^This long line gets word-wrapped because}m);
+unlike($stdout, qr{text/plain; format=flowed never really took off\.$}m);
+like($stdout, qr{^These short lines also get wrapped\.$}m);
+like($stdout, qr{^test-package version=1\.2-3$}m);
+like($stdout, qr{^test-package epoch=$}m);
+like($stdout, qr{^test-package upstream=1\.2$}m);
+like($stdout, qr{^test-package revision=-3$}m);
+like($stdout, qr{^test-package reassembled=1\.2-3$}m);
+like($stdout, qr{^-- $}m);
+like($stdout, qr{^This signature does not get word-wrapped because it is a signature, even though it is longer than a line ought to be\.$}m);
+
+diag('Subject is mandatory');
+ok(! verbose_run([
+ $mass_bug,
+ '--no-conf',
+ "$srcdir/mass-bug/template",
+ "$srcdir/mass-bug/one-package",
+], '>', \$stdout, '2>', \$stderr));
+isnt($?, 0);
+like($stderr, qr{You must specify a subject}m);
+is($stdout, '');
+
+diag('Various options');
+$stdout = capture([
+ $mass_bug,
+ '--no-conf',
+ '--subject=Is broken',
+ '--source',
+ '--tags=ftbfs sid',
+ '--user=me@example.com',
+ '--usertags=bad wrong',
+ '--control=block 123456 by -1',
+ '--control=block -1 by 789012',
+ '--no-wrap',
+ "$srcdir/mass-bug/template",
+ "$srcdir/mass-bug/one-package",
+]);
+like($stdout, qr{^Subject: test-package: Is broken$}m);
+like($stdout, qr{^Source: test-package$}m);
+unlike($stdout, qr{^Package: test-package$}m);
+like($stdout, qr{^test-package has a bug\. Please fix\.$}m);
+like($stdout, qr{^Tags: ftbfs sid$}m);
+like($stdout, qr{^User: me\@example\.com$}m);
+like($stdout, qr{^Usertags: bad wrong$}m);
+like($stdout, qr{^Control: block 123456 by -1$}m);
+like($stdout, qr{^Control: block -1 by 789012$}m);
+like($stdout, qr{^This long line gets word-wrapped because text/plain; format=flowed never really took off\.$}m);
+unlike($stdout, qr{^These short lines also get wrapped\.$}m);
+
+diag('Version numbers');
+$stdout = capture([
+ $mass_bug,
+ '--no-conf',
+ '--subject=Is broken',
+ "$srcdir/mass-bug/template",
+ "$srcdir/mass-bug/packages",
+]);
+like($stdout, qr{^native-package version=1\.0$}m);
+like($stdout, qr{^native-package epoch=$}m);
+like($stdout, qr{^native-package upstream=1\.0$}m);
+like($stdout, qr{^native-package revision=$}m);
+like($stdout, qr{^native-package reassembled=1\.0$}m);
+like($stdout, qr{^upstream-package version=1\.2-3$}m);
+like($stdout, qr{^upstream-package epoch=$}m);
+like($stdout, qr{^upstream-package upstream=1\.2$}m);
+like($stdout, qr{^upstream-package revision=-3$}m);
+like($stdout, qr{^upstream-package reassembled=1\.2-3$}m);
+like($stdout, qr{^epoch-native-package version=1:2\.3$}m);
+like($stdout, qr{^epoch-native-package epoch=1:$}m);
+like($stdout, qr{^epoch-native-package upstream=2\.3$}m);
+like($stdout, qr{^epoch-native-package revision=$}m);
+like($stdout, qr{^epoch-native-package reassembled=1:2\.3$}m);
+like($stdout, qr{^epoch-package version=1:2\.3-4\.5$}m);
+like($stdout, qr{^epoch-package epoch=1:$}m);
+like($stdout, qr{^epoch-package upstream=2\.3$}m);
+like($stdout, qr{^epoch-package revision=-4\.5$}m);
+like($stdout, qr{^epoch-package reassembled=1:2\.3-4\.5$}m);
+
+done_testing;
diff --git a/test/test_mergechanges b/test/test_mergechanges
new file mode 100755
index 0000000..e689cd7
--- /dev/null
+++ b/test/test_mergechanges
@@ -0,0 +1,551 @@
+#!/usr/bin/perl
+
+# Copyright 2019 Simon McVittie
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+use strict;
+use warnings;
+
+use Cwd qw(getcwd);
+use Data::Dumper;
+use File::Temp qw(tempdir);
+use IPC::Run qw(run);
+use Test::More;
+
+use Dpkg::Control;
+
+my $srcdir = getcwd;
+my $top_srcdir = getcwd . '/..';
+my $mergechanges = "$top_srcdir/scripts/mergechanges.sh";
+
+if (defined $ARGV[0] && $ARGV[0] eq '--installed') {
+ $mergechanges = 'mergechanges';
+}
+
+my $tmp = tempdir(CLEANUP => 1);
+my $stdout;
+my $stderr;
+my $fh;
+my $merged;
+my $all = 'xdg-desktop-portal_1.2.0-1_all.changes';
+my $amd64 = 'xdg-desktop-portal_1.2.0-1_amd64.changes';
+my $source = 'xdg-desktop-portal_1.2.0-1_source.changes';
+my %controls;
+my @words;
+my @lines;
+my $orig;
+
+sub verbose_run {
+ my $argv = shift;
+ diag("Running: @{$argv}");
+ return run($argv, @_);
+}
+
+sub capture {
+ my $output;
+ my $argv = shift;
+ ok(verbose_run($argv, '>', \$output), "@{$argv}");
+ chomp $output;
+ return $output;
+}
+
+sub uniq {
+ my %seen;
+ my @ret;
+ foreach my $member (@_) {
+ push @ret, $member unless defined $seen{$member};
+ $seen{$member} = 1;
+ }
+ return @ret;
+}
+
+sub verbose_is_deeply {
+ diag Dumper($_[0], $_[1]);
+ is_deeply(@_);
+}
+
+foreach my $name ($all, $amd64, $source) {
+ $controls{$name} = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+ $controls{$name}->load("mergechanges/$name");
+}
+
+diag('Help');
+$stdout = capture([
+ $mergechanges,
+ '--help',
+]);
+like($stdout, qr{Usage:});
+
+diag('Version');
+$stdout = capture([
+ $mergechanges,
+ '--version',
+]);
+like($stdout, qr{devscripts package});
+
+diag('Simple merge');
+$stdout = capture([
+ $mergechanges,
+ "mergechanges/$all",
+ "mergechanges/$amd64",
+ "mergechanges/$source",
+]);
+#diag $stdout;
+unlike($stdout, qr/BEGIN PGP/);
+unlike($stdout, qr/END PGP/);
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+open($fh, '<', \$stdout);
+$merged->parse($fh, 'stdout of mergechanges');
+close($fh);
+is($merged->{Format}, $controls{$source}->{Format});
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+@words = sort split / /, $merged->{Binary};
+is_deeply(\@words, [sort qw(
+ xdg-desktop-portal
+ xdg-desktop-portal-dbgsym
+ xdg-desktop-portal-dev
+ xdg-desktop-portal-tests
+ xdg-desktop-portal-tests-dbgsym
+)]);
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(amd64 all source)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Description}),
+ (split /\n/, $controls{$amd64}->{Description}),
+))]);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Files}),
+ (split /\n/, $controls{$amd64}->{Files}),
+ (split /\n/, $controls{$source}->{Files}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{'Checksums-Sha1'}),
+ (split /\n/, $controls{$amd64}->{'Checksums-Sha1'}),
+ (split /\n/, $controls{$source}->{'Checksums-Sha1'}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{'Checksums-Sha256'}),
+ (split /\n/, $controls{$amd64}->{'Checksums-Sha256'}),
+ (split /\n/, $controls{$source}->{'Checksums-Sha256'}),
+))]);
+
+diag('Source only');
+$stdout = capture([
+ $mergechanges,
+ '-S',
+ "mergechanges/$all",
+ "mergechanges/$amd64",
+ "mergechanges/$source",
+]);
+#diag $stdout;
+unlike($stdout, qr/BEGIN PGP/);
+unlike($stdout, qr/END PGP/);
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+open($fh, '<', \$stdout);
+$merged->parse($fh, 'stdout of mergechanges');
+close($fh);
+is($merged->{Format}, $controls{$source}->{Format});
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+is($merged->{Binary}, undef);
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(source)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+is($merged->{Description}, undef);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{Files}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha1'}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha256'}),
+))]);
+
+diag('Indep only');
+$stdout = capture([
+ $mergechanges,
+ '-i',
+ "mergechanges/$all",
+ "mergechanges/$amd64",
+ "mergechanges/$source",
+]);
+#diag $stdout;
+unlike($stdout, qr/BEGIN PGP/);
+unlike($stdout, qr/END PGP/);
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+open($fh, '<', \$stdout);
+$merged->parse($fh, 'stdout of mergechanges');
+close($fh);
+is($merged->{Format}, $controls{$source}->{Format});
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+is($merged->{Binary}, 'xdg-desktop-portal-dev');
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(all source)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Description}),
+))]);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{Files}),
+ (split /\n/, $controls{$all}->{Files}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha1'}),
+ (split /\n/, $controls{$all}->{'Checksums-Sha1'}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha256'}),
+ (split /\n/, $controls{$all}->{'Checksums-Sha256'}),
+))]);
+
+diag('To file');
+ok(run(['cp', "mergechanges/$source", "$tmp/source.changes"]));
+$stdout = capture([
+ $mergechanges,
+ '-f',
+ "$tmp/source.changes",
+ "mergechanges/$all",
+]);
+ok(-e "$tmp/source.changes");
+is($stdout, '');
+#system("cat", "$tmp/xdg-desktop-portal_1.2.0-1_multi.changes");
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+$merged->load("$tmp/xdg-desktop-portal_1.2.0-1_multi.changes");
+is($merged->{Format}, $controls{$source}->{Format});
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+is($merged->{Binary}, 'xdg-desktop-portal-dev');
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(all source)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Description}),
+))]);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{Files}),
+ (split /\n/, $controls{$all}->{Files}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha1'}),
+ (split /\n/, $controls{$all}->{'Checksums-Sha1'}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha256'}),
+ (split /\n/, $controls{$all}->{'Checksums-Sha256'}),
+))]);
+
+diag('Deleting');
+ok(run(['cp', "mergechanges/$source", "$tmp/source.changes"]));
+ok(run(['cp', "mergechanges/$all", "$tmp/all.changes"]));
+$stdout = capture([
+ $mergechanges,
+ '-d',
+ '-f',
+ "$tmp/source.changes",
+ "$tmp/all.changes",
+]);
+ok(! -e "$tmp/source.changes");
+ok(! -e "$tmp/all.changes");
+is($stdout, '');
+#system("cat", "$tmp/xdg-desktop-portal_1.2.0-1_multi.changes");
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+$merged->load("$tmp/xdg-desktop-portal_1.2.0-1_multi.changes");
+is($merged->{Format}, $controls{$source}->{Format});
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+is($merged->{Binary}, 'xdg-desktop-portal-dev');
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(all source)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Description}),
+))]);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{Files}),
+ (split /\n/, $controls{$all}->{Files}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha1'}),
+ (split /\n/, $controls{$all}->{'Checksums-Sha1'}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$source}->{'Checksums-Sha256'}),
+ (split /\n/, $controls{$all}->{'Checksums-Sha256'}),
+))]);
+
+diag('Merge with itself');
+$stdout = capture([
+ $mergechanges,
+ '--indep',
+ "mergechanges/$all",
+ "mergechanges/$all",
+]);
+#diag $stdout;
+unlike($stdout, qr/BEGIN PGP/);
+unlike($stdout, qr/END PGP/);
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+open($fh, '<', \$stdout);
+$merged->parse($fh, 'stdout of mergechanges');
+close($fh);
+is($merged->{Format}, $controls{$source}->{Format});
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+is($merged->{Binary}, 'xdg-desktop-portal-dev');
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(all)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Description}),
+))]);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Files}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{'Checksums-Sha1'}),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{'Checksums-Sha256'}),
+))]);
+
+diag('Format 1.7 and 1.8 are compatible');
+$stdout = capture([
+ $mergechanges,
+ '--indep',
+ "mergechanges/$all",
+ "mergechanges/format-1.7.changes",
+]);
+diag $stdout;
+unlike($stdout, qr/BEGIN PGP/);
+unlike($stdout, qr/END PGP/);
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+open($fh, '<', \$stdout);
+$merged->parse($fh, 'stdout of mergechanges');
+close($fh);
+# Formats 1.8 and 1.7 merge to 1.7
+is($merged->{Format}, '1.7');
+is($merged->{Date}, $controls{$source}->{Date});
+is($merged->{Source}, $controls{$source}->{Source});
+is($merged->{Binary}, 'xdg-desktop-portal-dev');
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(all)]);
+is($merged->{Version}, $controls{$source}->{Version});
+is($merged->{Distribution}, $controls{$source}->{Distribution});
+is($merged->{Urgency}, $controls{$source}->{Urgency});
+is($merged->{Maintainer}, $controls{$source}->{Maintainer});
+is($merged->{'Changed-By'}, $controls{$source}->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Description}),
+))]);
+is($merged->{Changes}, $controls{$source}->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ (split /\n/, $controls{$all}->{Files}),
+))]);
+# Format 1.7 didn't have Checksums-*
+is($merged->{'Checksums-Sha1'}, undef);
+is($merged->{'Checksums-Sha256'}, undef);
+
+diag('Only one');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$source",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{Not enough parameters});
+
+diag('ENOENT');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$source",
+ "mergechanges/does-not-exist.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{ERROR: Cannot read mergechanges/does-not-exist\.changes});
+
+diag('Different description');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$all",
+ "mergechanges/different-description.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{Error: Descriptions do not match});
+
+diag('Different format');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$all",
+ "mergechanges/unsupported-format.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{Error: Changes files have different Format fields});
+
+diag('Different source package');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$all",
+ "mergechanges/different-source.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{Error: Source packages do not match});
+
+diag('Different version');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$all",
+ "mergechanges/different-version.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{ERROR: Version numbers do not match});
+
+diag('Unsupported checksums');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/$all",
+ "mergechanges/unsupported-checksum.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{Error: Unsupported checksum fields});
+
+diag('Unsupported format');
+ok(! verbose_run([
+ $mergechanges,
+ "mergechanges/unsupported-format.changes",
+ "mergechanges/unsupported-format.changes",
+], '>', \$stdout, '2>', \$stderr));
+is($stdout, '');
+like($stderr, qr{Error: Changes files use unknown Format});
+
+diag('Multi-line Binary');
+$stdout = capture([
+ $mergechanges,
+ '--indep',
+ 'mergechanges/linux_4.9.161-1_amd64.changes',
+ 'mergechanges/linux_4.9.161-1_amd64.changes',
+]);
+unlike($stdout, qr/BEGIN PGP/);
+unlike($stdout, qr/END PGP/);
+$merged = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+open($fh, '<', \$stdout);
+$merged->parse($fh, 'stdout of mergechanges');
+close($fh);
+$orig = Dpkg::Control->new(type => CTRL_FILE_CHANGES);
+$orig->load('mergechanges/linux_4.9.161-1_amd64.changes');
+is($merged->{Format}, $orig->{Format});
+is($merged->{Date}, $orig->{Date});
+is($merged->{Source}, $orig->{Source});
+@words = sort split / /, $merged->{Binary};
+is_deeply(\@words, [sort qw(
+ linux-doc-4.9
+ linux-headers-4.9.0-9-common
+ linux-headers-4.9.0-9-common-rt
+ linux-manual-4.9
+ linux-source-4.9
+ linux-support-4.9.0-9
+)]);
+@words = sort split / /, $merged->{Architecture};
+is_deeply(\@words, [sort qw(all source)]);
+is($merged->{Version}, $orig->{Version});
+is($merged->{Distribution}, $orig->{Distribution});
+is($merged->{Urgency}, $orig->{Urgency});
+is($merged->{Maintainer}, $orig->{Maintainer});
+is($merged->{'Changed-By'}, $orig->{'Changed-By'});
+isnt($merged->{Description}, undef);
+@lines = sort split /\n/, $merged->{Description};
+is_deeply(\@lines, [sort(uniq(
+ grep({m/^$/ || m/^(linux-doc-4.9|linux-headers-4.9.0-9-common|linux-headers-4.9.0-9-common-rt|linux-manual-4.9|linux-source-4.9|linux-support-4.9.0-9) - /} (split /\n/, $orig->{Description})),
+))]);
+is($merged->{Changes}, $orig->{Changes});
+@lines = sort split /\n/, $merged->{Files};
+is_deeply(\@lines, [sort(uniq(
+ grep({! /_amd64\./} (split /\n/, $orig->{Files})),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha1'};
+is_deeply(\@lines, [sort(uniq(
+ grep({! /_amd64\./} (split /\n/, $orig->{'Checksums-Sha1'})),
+))]);
+@lines = sort split /\n/, $merged->{'Checksums-Sha256'};
+is_deeply(\@lines, [sort(uniq(
+ grep({! /_amd64\./} (split /\n/, $orig->{'Checksums-Sha256'})),
+))]);
+
+done_testing;
+
+# vim:set sts=4 sw=4 et:
diff --git a/test/test_mk-origtargz b/test/test_mk-origtargz
new file mode 100755
index 0000000..1aa8f1e
--- /dev/null
+++ b/test/test_mk-origtargz
@@ -0,0 +1,750 @@
+#!/bin/bash
+
+# Copyright 2014, Rafael Laboissiere <rafael@laboissiere.net>
+# Copyright 2015, James McCoy <jamessan@debian.org>
+
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+
+# Load GPG
+TESTTYPE=MkOrigTarGz
+. ./lib_test_uscan
+
+if test "${1:-}" = --installed; then
+ MK_ORIGTARGZ="mk-origtargz"
+ shift
+else
+ top_srcdir=$(readlink -f "${0%/*}/..")
+ make -C "$top_srcdir/scripts" mk-origtargz
+ MK_ORIGTARGZ="perl -I $top_srcdir/lib $top_srcdir/scripts/mk-origtargz"
+ PATH="$top_srcdir/scripts:$PATH"
+ export PATH
+ PERL5LIB="$top_srcdir/lib"
+ export PERL5LIB
+fi
+PROGNAME="mk-origtargz"
+
+LC_ALL=C
+export LC_ALL
+
+setUp () {
+ TMPDIR=$(mktemp -d -p "$SHUNIT_TMPDIR" test_mk-origtargz.XXXX)
+}
+
+
+makeSubDir () {
+ dir=$1
+ shift
+
+ mkdir -p "$TMPDIR/foo-0.1/$dir"
+ touch "$TMPDIR/foo-0.1/$dir/a-file"
+ mkdir "$TMPDIR/foo-0.1/$dir/a-subdir"
+ touch "$TMPDIR/foo-0.1/$dir/a-subdir/a-file"
+}
+
+
+makeUpstreamFiles () {
+ mkdir -p "$TMPDIR/foo-0.1"
+ touch "$TMPDIR/foo-0.1/include-this-file"
+ touch "$TMPDIR/foo-0.1/exclude-this-file"
+ touch "$TMPDIR/foo-0.1/.include-this-hidden-file"
+ touch "$TMPDIR/foo-0.1/.exclude-this-hidden-file"
+
+ makeSubDir "include-this-dir"
+ makeSubDir "exclude-this-dir"
+ makeSubDir "exclude-dir1"
+ makeSubDir "exclude-dir2"
+ makeSubDir ".include-this-hidden-dir"
+ makeSubDir ".exclude-this-hidden-dir"
+ makeSubDir "a-dir/include-this-subdir"
+ # Expected not to be removed since exclusion is anchored to top-level
+ makeSubDir "a-dir/exclude-this-subdir"
+
+ touch "$TMPDIR/foo-0.1/; echo strange-file; #"
+
+}
+
+makeGolangLikeVendorFiles() {
+ makeSubDir "vendor"
+
+ mkdir -p "$TMPDIR/foo-0.1/vendor/includeme"
+ touch "$TMPDIR/foo-0.1/vendor/includeme/important.go"
+}
+
+makeTarBall () {
+ comp="$1"
+ mkgpg="${2:-none}"
+ makeUpstreamFiles
+ COMP="--auto-compress"
+ if [ "$comp" = "zst" ]; then
+ COMP=--zstd
+ fi
+ tar --create $COMP --file "$TMPDIR/foo-0.1.tar.$comp" --directory "$TMPDIR" foo-0.1
+ local gpgopts=(
+ chronic_sh $GPG
+ --homedir "$GPGHOME"
+ --no-options -q --batch --no-default-keyring
+ --secret-keyring "$PRIVATE_KEYRING"
+ --default-key 72544FAF
+ --detach-sign
+ )
+ case "$mkgpg" in
+ sig)
+ "${gpgopts[@]}" "$TMPDIR/foo-0.1.tar.$comp"
+ ;;
+ asc)
+ "${gpgopts[@]}" --armor "$TMPDIR/foo-0.1.tar.$comp"
+ ;;
+ none)
+ ;;
+ *)
+ fail "unknown parameter in makeTarBall()"
+ ;;
+ esac
+ rm -rf "$TMPDIR/foo-0.1"
+}
+makeSimpleTar () {
+ makeUpstreamFiles
+ tar --create --file "$TMPDIR/foo-0.1.tar" --directory "$TMPDIR" foo-0.1
+ rm -rf "$TMPDIR/foo-0.1"
+}
+makeBrokenTarBall () {
+ echo foo > foo.txt
+ tar cf - foo.txt | sed -e 's/^/foo/' | gzip > "$TMPDIR/foo-0.1.tar.gz"
+ rm -f foo.txt
+}
+
+makeZipFile () {
+ makeUpstreamFiles
+ (cd $TMPDIR >/dev/null; zip -q -r "foo-0.1.zip" foo-0.1 )
+ rm -rf "$TMPDIR/foo-0.1"
+}
+
+makeJarFile () {
+ makeUpstreamFiles
+ cat > "$TMPDIR/MANIFEST.MF" <<END
+Manifest-Version: 1.0
+Main-Class: foo.bar
+END
+ (cd $TMPDIR >/dev/null; jar cf "foo-0.1.jar" MANIFEST.MF foo-0.1 )
+ rm -rf "$TMPDIR/foo-0.1" "$TMPDIR/MANIFEST.MF"
+}
+
+makeDebianChangelog() {
+ mkdir -p $TMPDIR/foo/debian
+ cat <<END > $TMPDIR/foo/debian/changelog
+foo (0.1-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+}
+
+makeDebianOldDir() {
+ makeDebianChangelog
+}
+
+makeDebianDir() {
+ makeDebianChangelog
+ mkdir -p $TMPDIR/foo/debian/source
+ echo -n "3.0 (quilt)" > $TMPDIR/foo/debian/source/format
+}
+
+makeDebianCopyright() {
+ cat <<'END' > $TMPDIR/foo/debian/copyright
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Files-Excluded: exclude-this*
+ .exclude-this*
+ exclude-dir1
+ exclude-dir2/
+ ;?echo?strange-file;?#
+END
+
+}
+
+makeWrongDebianCopyright() {
+ cat <<'END' > $TMPDIR/foo/debian/copyright
+Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174
+Files-Excluded: exclude-this*
+ .exclude-this*
+ exclude-dir1
+ exclude-dir2/
+ ;?echo?strange-file;?#
+END
+
+}
+
+makeUnmatchedExcludeCopyright() {
+ cat <<'END' > $TMPDIR/foo/debian/copyright
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Files-Excluded: exclude-this*
+ .exclude-this*
+ exclude-dir1
+ exclude-dir2
+ ;?echo?strange-file;?#
+ nomatch
+END
+}
+
+
+makeDuplicatePatternCopyright() {
+ cat <<'END' > $TMPDIR/foo/debian/copyright
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Files-Excluded: exclude-this*
+ .exclude-this*
+ exclude-dir1
+ exclude-dir*
+ ;?echo?strange-file;?#
+END
+}
+
+expected_stderr_after_removal="mk-origtargz warn: Files-Excluded pattern (exclude-dir2/) should not have a trailing /"
+
+expected_files_after_removal=$(LC_ALL=C sort <<END
+foo-0.1/
+foo-0.1/a-dir/
+foo-0.1/a-dir/exclude-this-subdir/
+foo-0.1/a-dir/exclude-this-subdir/a-file
+foo-0.1/a-dir/exclude-this-subdir/a-subdir/
+foo-0.1/a-dir/exclude-this-subdir/a-subdir/a-file
+foo-0.1/a-dir/include-this-subdir/
+foo-0.1/a-dir/include-this-subdir/a-file
+foo-0.1/a-dir/include-this-subdir/a-subdir/
+foo-0.1/a-dir/include-this-subdir/a-subdir/a-file
+foo-0.1/include-this-dir/
+foo-0.1/include-this-dir/a-file
+foo-0.1/include-this-dir/a-subdir/
+foo-0.1/include-this-dir/a-subdir/a-file
+foo-0.1/include-this-file
+foo-0.1/.include-this-hidden-dir/
+foo-0.1/.include-this-hidden-dir/a-file
+foo-0.1/.include-this-hidden-dir/a-subdir/
+foo-0.1/.include-this-hidden-dir/a-subdir/a-file
+foo-0.1/.include-this-hidden-file
+END
+)
+
+run_mk_origtargz() {
+ local dir="$1"
+ local exp_stderr="$2"
+ local exp_stdout="$3"
+ local stderrF="${SHUNIT_TMPDIR}/stderr"
+ shift
+ shift
+ shift
+ output="$( cd $TMPDIR/$dir >/dev/null; LC_ALL=C $MK_ORIGTARGZ "$@" 2> $stderrF )"
+ stderr="$(cat $stderrF)"
+ retval=$?
+ assertEquals "standard output of mk-origtargz $*\n" "$exp_stdout" "$output"
+ assertEquals "error output of mk-origtargz $*\n" "$exp_stderr" "$stderr"
+ assertEquals "return valueof mk-origtargz $*\n" "0" "$retval"
+}
+
+assertType () {
+ mime="$1"
+ file="$2"
+ actual="$(file --brief --mime-type "$file" | sed -e 's,/x-,/,')"
+ assertEquals "filetype for $(basename "$file")" "$mime" "$actual"
+}
+
+
+testSymlink() {
+ makeTarBall gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully symlinked ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ ../foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertEquals "final symlink" foo-0.1.tar.gz "$(readlink $TMPDIR/foo_0.1.orig.tar.gz)"
+}
+
+testSymlinkWithConvertedSig() {
+ makeTarBall gz sig
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully symlinked ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ --signature 1 --signature-file=../foo-0.1.tar.gz.sig \
+ ../foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertEquals "final symlink" foo-0.1.tar.gz "$(readlink $TMPDIR/foo_0.1.orig.tar.gz)"
+ assertTrue "signature isn't valid" "$GPG --homedir '$GPGHOME' --verify $TMPDIR/foo_0.1.orig.tar.gz.asc"
+}
+
+testSymlinkWithArmoredSig() {
+ # MR for https://lists.debian.org/debian-devel/2019/04/msg00459.html
+ makeTarBall gz asc
+ # an armored signature, but with the wrong extension.
+ mv $TMPDIR/foo-0.1.tar.gz.asc $TMPDIR/foo-0.1.tar.gz.sig
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully symlinked ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ --signature 1 --signature-file=../foo-0.1.tar.gz.sig \
+ ../foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertEquals "final symlink" foo-0.1.tar.gz "$(readlink $TMPDIR/foo_0.1.orig.tar.gz)"
+ assertTrue "signature isn't valid" "$GPG --homedir '$GPGHOME' --verify $TMPDIR/foo_0.1.orig.tar.gz.asc"
+}
+
+testCopy() {
+ makeTarBall gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully copied ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ --copy ../foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testRename() {
+ makeTarBall gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully renamed ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ --rename ../foo-0.1.tar.gz
+ assertFalse "original tarball does exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testSymlinkExplicit() {
+ makeTarBall gz
+ run_mk_origtargz "" "" \
+ "Successfully symlinked foo-0.1.tar.gz to foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertEquals "final symlink" foo-0.1.tar.gz "$(readlink $TMPDIR/foo_0.1.orig.tar.gz)"
+}
+
+testCopyExplicit() {
+ makeTarBall gz
+ run_mk_origtargz "" "" \
+ "Successfully copied foo-0.1.tar.gz to foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 --copy foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testRenameExplicit() {
+ makeTarBall gz
+ run_mk_origtargz "" "" \
+ "Successfully renamed foo-0.1.tar.gz to foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 --rename foo-0.1.tar.gz
+ assertFalse "original tarball does exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testSymlinkExplicitSubdir() {
+ makeTarBall gz
+ mkdir -p $TMPDIR/destdir
+ run_mk_origtargz "" "" \
+ "Successfully symlinked foo-0.1.tar.gz to destdir/foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 -C destdir foo-0.1.tar.gz
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/destdir/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not a symlink" "[ -L $TMPDIR/destdir/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/destdir/foo_0.1.orig.tar.gz ]"
+ assertEquals "final symlink" ../foo-0.1.tar.gz "$(readlink $TMPDIR/destdir/foo_0.1.orig.tar.gz)"
+}
+
+testRepackGZ2GZ() {
+ makeTarBall gz
+ run_mk_origtargz "" "" \
+ "Successfully copied foo-0.1.tar.gz to foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 --copy foo-0.1.tar.gz --repack --compression gzip
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertType application/gzip $TMPDIR/foo_0.1.orig.tar.gz
+}
+
+testForceRepackGZ2XZ() {
+ makeTarBall gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully repacked ../foo-0.1.tar.gz as ../foo_0.1.orig.tar.gz." \
+ --force-repack ../foo-0.1.tar.gz --compression gzip
+ assertTrue "original tarball does not exist" "[ -e $TMPDIR/foo-0.1.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not a file" "[ -f $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result is not readable" "[ -r $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testRepackGZ2XZ() {
+ makeTarBall gz
+ run_mk_origtargz "" ""\
+ "Successfully repacked foo-0.1.tar.gz as foo_0.1.orig.tar.xz." \
+ --package foo --version 0.1 --copy foo-0.1.tar.gz --repack
+ assertFalse "wrong result does exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+}
+
+testRepackXZ2GZ() {
+ makeTarBall xz
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.tar.xz as foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 --copy foo-0.1.tar.xz --repack --compression gzip
+ assertFalse "wrong result does exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertType application/gzip $TMPDIR/foo_0.1.orig.tar.gz
+}
+
+testRepackZST2XZRepackOpt() {
+ makeTarBall zst
+ run_mk_origtargz "" ""\
+ "Successfully repacked foo-0.1.tar.zst as foo_0.1.orig.tar.xz." \
+ --package foo --version 0.1 --copy foo-0.1.tar.zst --repack
+ assertFalse "wrong result does exist" "[ -e $TMPDIR/foo_0.1.orig.tar.zst ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+}
+
+testRepackZST2XZNoRepackOpt() {
+ makeTarBall zst
+ run_mk_origtargz "" ""\
+ "Successfully repacked foo-0.1.tar.zst as foo_0.1.orig.tar.xz." \
+ --package foo --version 0.1 --copy foo-0.1.tar.zst
+ assertFalse "wrong result does exist" "[ -e $TMPDIR/foo_0.1.orig.tar.zst ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+}
+
+testRepackZST2ZSTFail() {
+ makeTarBall zst
+ run_mk_origtargz "" "mk-origtargz error: Bad value for compression: Unknown compression scheme zst"\
+ "" \
+ --package foo --version 0.1 --copy foo-0.1.tar.zst --compression zst
+ assertFalse "wrong result does exist" "[ -e $TMPDIR/foo_0.1.orig.tar.zst ]"
+ assertFalse "result does exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+}
+
+testRepackZip2GZ() {
+ makeZipFile
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.zip as foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 --copy foo-0.1.zip --compression gzip
+ assertTrue "original zip file does not exist" "[ -e $TMPDIR/foo-0.1.zip ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertType application/gzip $TMPDIR/foo_0.1.orig.tar.gz
+}
+
+testRepackJar2GZ() {
+ if ! command -v jar >/dev/null
+ then
+ # skip to avoid dependency on java-jdk
+ return
+ fi
+ makeJarFile
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.jar as foo_0.1.orig.tar.gz." \
+ --package foo --version 0.1 --copy foo-0.1.jar --compression gzip
+ assertTrue "original zip file does not exist" "[ -e $TMPDIR/foo-0.1.jar ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertType application/gzip $TMPDIR/foo_0.1.orig.tar.gz
+}
+
+testRepackZip2GZRename() {
+ makeZipFile
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.zip as foo_0.1.orig.tar.gz, and removed the original file." \
+ --package foo --version 0.1 --rename foo-0.1.zip --compression gzip
+ assertFalse "original zip file does exist" "[ -e $TMPDIR/foo-0.1.zip ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertType application/gzip $TMPDIR/foo_0.1.orig.tar.gz
+}
+
+testRepackZip2XZ() {
+ makeZipFile
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.zip as foo_0.1.orig.tar.xz." \
+ --package foo --version 0.1 foo-0.1.zip
+ assertTrue "original zip file does not exist" "[ -e $TMPDIR/foo-0.1.zip ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+}
+
+testRepackXpi2XZ() {
+ makeZipFile
+ mv $TMPDIR/foo-0.1.zip $TMPDIR/foo-0.1.xpi
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.xpi as foo_0.1.orig.tar.xz." \
+ --package foo --version 0.1 foo-0.1.xpi
+ assertTrue "original xpi file does not exist" "[ -e $TMPDIR/foo-0.1.xpi ]"
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+}
+
+testRepackTAR2XZ() {
+ makeSimpleTar
+ run_mk_origtargz "" "" \
+ "Successfully repacked foo-0.1.tar as foo_0.1.orig.tar.xz." \
+ --package foo --version 0.1 --copy foo-0.1.tar --repack
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+}
+testOldFormat() {
+ makeTarBall xz
+ makeDebianOldDir
+ makeDebianCopyright
+ run_mk_origtargz foo "mk-origtargz warn: Missing debian/source/format, switch compression to gzip
+$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.tar.xz as ../foo_0.1.orig.tar.gz, deleting 19 files from it." \
+ ../foo-0.1.tar.xz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertType application/gzip $TMPDIR/foo_0.1.orig.tar.gz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.gz | sort)"
+}
+
+testExclude() {
+ makeTarBall gz
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.tar.gz as ../foo_0.1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+testGoVendorIncludeIgnore () {
+ makeGolangLikeVendorFiles
+ makeTarBall gz
+ makeDebianDir
+ makeDebianCopyright
+
+ # adjust existing test cases slightly
+ cat <<'END' >> $TMPDIR/foo/debian/copyright
+ vendor
+Files-Included:
+ vendor/includeme
+END
+
+ expected_files=$(LC_ALL=C sort <<END
+$expected_files_after_removal
+foo-0.1/vendor/
+foo-0.1/vendor/a-subdir/
+foo-0.1/vendor/includeme/
+foo-0.1/vendor/includeme/important.go
+END
+)
+
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.tar.gz as ../foo_0.1.orig.tar.xz, deleting 21 files from it." \
+ ../foo-0.1.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+ assertEquals "file contents" "$expected_files" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+testExcludeXZ() {
+ makeTarBall xz
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.tar.xz as ../foo_0.1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.tar.xz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+testExcludeZip() {
+ makeZipFile
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.zip as ../foo_0.1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.zip
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+testSuffix() {
+ makeTarBall gz
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.tar.gz as ../foo_0.1+dfsg1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.tar.gz --repack-suffix +dfsg1
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1+dfsg1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1+dfsg1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1+dfsg1.orig.tar.xz | sort)"
+}
+
+testSuffixXZ() {
+ makeTarBall xz
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.tar.xz as ../foo_0.1+dfsg1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.tar.xz --repack-suffix +dfsg1
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1+dfsg1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1+dfsg1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1+dfsg1.orig.tar.xz | sort)"
+}
+
+testSuffixZip() {
+ makeZipFile
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Successfully repacked ../foo-0.1.zip as ../foo_0.1+dfsg1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.zip --repack-suffix +dfsg1
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1+dfsg1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1+dfsg1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1+dfsg1.orig.tar.xz | sort)"
+}
+
+testSuffixNoExclusions() {
+ makeTarBall gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Successfully renamed ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ ../foo-0.1.tar.gz --rename --repack-suffix +dfsg1
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testSameNameSymlink() {
+ makeTarBall gz
+ mv $TMPDIR/foo-0.1.tar.gz $TMPDIR/foo_0.1.orig.tar.gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Leaving ../foo_0.1.orig.tar.gz where it is." \
+ --symlink ../foo_0.1.orig.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testSameNameCopy() {
+ makeTarBall gz
+ mv $TMPDIR/foo-0.1.tar.gz $TMPDIR/foo_0.1.orig.tar.gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Leaving ../foo_0.1.orig.tar.gz where it is." \
+ --copy ../foo_0.1.orig.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testSameNameRename() {
+ makeTarBall gz
+ mv $TMPDIR/foo-0.1.tar.gz $TMPDIR/foo_0.1.orig.tar.gz
+ makeDebianDir
+ run_mk_origtargz foo "" \
+ "Leaving ../foo_0.1.orig.tar.gz where it is." \
+ --rename ../foo_0.1.orig.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+}
+
+testSameNameExclude() {
+ makeTarBall gz
+ mv $TMPDIR/foo-0.1.tar.gz $TMPDIR/foo_0.1.orig.tar.gz
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Leaving ../foo_0.1.orig.tar.gz where it is, deleting 19 files from it." \
+ ../foo_0.1.orig.tar.gz --compression=gzip
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertFalse "result is a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.gz ]"
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.gz | sort)"
+}
+
+testSameNameExcludeSymlink() {
+ makeTarBall xz
+ ln -s foo-0.1.tar.xz $TMPDIR/foo_0.1.orig.tar.xz
+ makeDebianDir
+ makeDebianCopyright
+ run_mk_origtargz foo "$expected_stderr_after_removal" \
+ "Leaving ../foo_0.1.orig.tar.xz where it is, deleting 19 files from it." \
+ ../foo_0.1.orig.tar.xz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertTrue "result is not a symlink" "[ -L $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+testCopyrightFormatWarning() {
+ makeTarBall gz
+ makeDebianDir
+ makeWrongDebianCopyright
+ run_mk_origtargz foo \
+ "mk-origtargz warn: The file debian/copyright mentions Files-Excluded, but its format is not recognized. Specify Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ in order to remove files from the tarball with mk-origtargz." \
+ "Successfully symlinked ../foo-0.1.tar.gz to ../foo_0.1.orig.tar.gz." \
+ ../foo-0.1.tar.gz
+
+}
+
+testBrokenTarWarning() {
+ makeBrokenTarBall
+ makeDebianDir
+ if dpkg --compare-versions $(dpkg-query -W -f='${Version}' libdpkg-perl) lt 1.19.0~; then
+ local SUBPROCESS_ERROR="gave error exit status 2"
+ else
+ local SUBPROCESS_ERROR="subprocess returned exit status 2"
+ fi
+ run_mk_origtargz foo \
+ "tar: This does not look like a tar archive
+tar: Skipping to next header
+tar: Exiting with failure status due to previous errors
+$PROGNAME: error: tar --list --auto-compress --file ../foo_0.1.orig.tar.xz $SUBPROCESS_ERROR" \
+ "" \
+ ../foo-0.1.tar.gz --repack
+}
+
+testUnmatchedExclusion() {
+ makeTarBall gz
+ makeDebianDir
+ makeUnmatchedExcludeCopyright
+ run_mk_origtargz foo "mk-origtargz warn: No files matched excluded pattern as the last matching glob: nomatch" \
+ "Successfully repacked ../foo-0.1.tar.gz as ../foo_0.1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+testDuplicatePattern() {
+ makeTarBall gz
+ makeDebianDir
+ makeDuplicatePatternCopyright
+ run_mk_origtargz foo "mk-origtargz warn: No files matched excluded pattern as the last matching glob: exclude-dir1" \
+ "Successfully repacked ../foo-0.1.tar.gz as ../foo_0.1.orig.tar.xz, deleting 19 files from it." \
+ ../foo-0.1.tar.gz
+ assertTrue "result does not exist" "[ -e $TMPDIR/foo_0.1.orig.tar.xz ]"
+ assertType application/xz $TMPDIR/foo_0.1.orig.tar.xz
+ assertEquals "file contents" "$expected_files_after_removal" "$(tar taf $TMPDIR/foo_0.1.orig.tar.xz | sort)"
+}
+
+. shunit2
diff --git a/test/test_package_lifecycle b/test/test_package_lifecycle
new file mode 100755
index 0000000..9ed7485
--- /dev/null
+++ b/test/test_package_lifecycle
@@ -0,0 +1,386 @@
+#!/bin/bash
+
+# Copyright (C) 2015, Nicholas Bamber <nicholas@periapt.co.uk>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+WORKDIR=$(readlink -f "${0%/*}")
+_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)
+declare -r _ARCH
+if dpkg --compare-versions "$(dpkg-query -W -f='${Version}' dpkg-dev )" lt "1.19.1~"; then
+ echo "This test requires dpkg-dev >= 1.19.1." >&2
+ exit 1
+fi
+if dpkg --compare-versions "$(dpkg-query -W -f='${Version}' dpkg-dev )" lt "1.21.0~"; then
+ _dpkg_genchanges="dpkg-genchanges >"
+elif dpkg --compare-versions "$(dpkg-query -W -f='${Version}' dpkg-dev )" eq "1.21.0"; then
+ echo "This version of dpkg produces incorrect output, not supported" >&2
+ exit 1
+else
+ _dpkg_genchanges="dpkg-genchanges -O"
+fi
+declare -r _dpkg_genchanges
+
+if test "${1:-}" = --installed; then
+ shift
+else
+ PATH=${WORKDIR}/../scripts:${PATH}
+ PERL5LIB=${WORKDIR}/../lib:${PERL5LIB:-}
+ export PATH PERL5LIB
+fi
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+GPGHOME=$(mktemp -d -p /tmp gpg.XXXXX)
+
+oneTimeSetUp () {
+ GPG=gpg
+ if ! command -v $GPG >/dev/null 2>&1;then
+ echo "$GPG missing"
+ GPG=gpg2
+ if ! command -v $GPG >/dev/null 2>&1;then
+ echo "$GPG missing"
+ exit 1
+ fi
+ fi
+
+ PRIVATE_KEY=${WORKDIR}/uscan/PRIVATE_KEY.asc
+ PUBLIC_KEY=${WORKDIR}/uscan/PUBLIC_KEY.asc
+
+ PRIVATE_KEYRING=$GPGHOME/secring.gpg
+ PUBLIC_KEYRING=$GPGHOME/pubring.gpg
+
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --output $PRIVATE_KEYRING --dearmor $PRIVATE_KEY
+
+ $GPG -v --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --output $PUBLIC_KEYRING --dearmor $PUBLIC_KEY
+
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+ --list-keys --verbose
+
+ mkdir -p ${WORKDIR}/package_lifecycle/test/debian/source
+ cat > ${WORKDIR}/package_lifecycle/test/debian/control <<-EOS
+ Source: test
+ Section: devel
+ Priority: optional
+ Maintainer: Devscripts Devel Team <devscripts-devel@lists.alioth.debian.org>
+ Uploaders: Testophilus Testownik <tester@testity.org>
+ Standards-Version: 4.5.0
+ Rules-Requires-Root: no
+
+ Package: test
+ Architecture: all
+ Description: Short description
+ Longer description
+EOS
+ printf '#!/usr/bin/make -f\n%%:\n\tdh $@' > ${WORKDIR}/package_lifecycle/test/debian/rules
+ chmod +x ${WORKDIR}/package_lifecycle/test/debian/rules
+ _DATE=$(LC_ALL=C date '+%a, %d %b %Y %T +0000')
+ cat > ${WORKDIR}/package_lifecycle/test/debian/changelog <<-EOS
+ test (1.0-1) unstable; urgency=low
+
+ * Initial packaging
+
+ -- Testophilus Testownik <tester@testity.org> ${_DATE}
+EOS
+ echo 12 > ${WORKDIR}/package_lifecycle/test/debian/compat
+ echo '3.0 (quilt)' > ${WORKDIR}/package_lifecycle/test/debian/source/format
+ touch ${WORKDIR}/package_lifecycle/test/CONTENTS
+ cd ${WORKDIR}/package_lifecycle/ && tar cvf test_1.0.orig.tar --exclude debian -- test/CONTENTS 2>&1 > /dev/null && xz -f test_1.0.orig.tar
+ cd ${WORKDIR}
+}
+
+runCommandOutCmpFile() {
+ local param="$1"
+ local exp_stdoutfile="$2"
+ local exp_stderr="$3"
+ local exp_retval=$4
+ local stdoutF="${SHUNIT_TMPDIR}/stdout"
+ local stderrF="${SHUNIT_TMPDIR}/stderr"
+ eval "${COMMAND} $param" 2> ${stderrF} | \
+ grep -v File::FcntlLock | \
+ grep -v '^ *dh_' | \
+ grep -v '^dh_gencontrol debug symbol wrapper:' | \
+ grep -v '^ *create-stamp debian/debhelper' | \
+ sed -e "s/\`/'/g" | \
+ sed -e "s/^dpkg-buildpackage: info: /dpkg-buildpackage: /g" | \
+ sed -e "s/^dpkg-genchanges: info: /dpkg-genchanges: /g" | \
+ sed -e "/^ dpkg-genbuildinfo/d" | \
+ sed -e "/^gpg: /d" | \
+ sed -e's!^ -- Testophilus Testownik <tester@testity.org>.*! -- Testophilus Testownik <tester@testity.org>!' > ${stdoutF}
+ retval=$?
+ eval "cmp ${stdoutF} ${exp_stdoutfile}" 3>&1 >/dev/null
+ local diffretval=$?
+ assertEquals "standard output of ${COMMAND} $param matches ${exp_stdoutfile}\n" "0" "$diffretval" || diff ${stdoutF} ${exp_stdoutfile}
+ assertEquals "error output of ${COMMAND} $param\n" "$exp_stderr" "$(cat ${stderrF})"
+ assertEquals "return value of ${COMMAND} $param\n" $exp_retval $retval
+}
+
+
+test_debuild() {
+ export GNUPGHOME=$GPGHOME
+ cd ${WORKDIR}/package_lifecycle/test
+ COMMAND='LC_ALL=C debuild --no-conf --no-lintian --preserve-envvar=PATH --preserve-envvar=PERL5LIB --preserve-envvar=DEBFULLNAME --preserve-envvar=DEBEMAIL --preserve-envvar=GNUPGHOME --set-envvar=NO_PKG_MANGLE=1'
+ cat > ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ dpkg-buildpackage -us -uc -ui
+ dpkg-buildpackage: source package test
+ dpkg-buildpackage: source version 1.0-1
+ dpkg-buildpackage: source distribution unstable
+ dpkg-buildpackage: source changed by Testophilus Testownik <tester@testity.org>
+ dpkg-source --before-build .
+ dpkg-buildpackage: host architecture ${_ARCH}
+ debian/rules clean
+ dh clean
+ dpkg-source -b .
+ dpkg-source: info: using source format '3.0 (quilt)'
+ dpkg-source: info: building test using existing ./test_1.0.orig.tar.xz
+ dpkg-source: info: building test in test_1.0-1.debian.tar.xz
+ dpkg-source: info: building test in test_1.0-1.dsc
+ debian/rules binary
+ dh binary
+ dpkg-deb: building package 'test' in '../test_1.0-1_all.deb'.
+ ${_dpkg_genchanges}../test_1.0-1_${_ARCH}.changes
+ dpkg-genchanges: including full source code in upload
+ dpkg-source --after-build .
+ dpkg-buildpackage: full upload (original source is included)
+ Now signing changes and any dsc files...
+EOS
+ if command -v dpkg-genbuildinfo >/dev/null; then
+ cat >> ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ signfile dsc test_1.0-1.dsc uscan test key (no secret) <none@debian.org>
+
+ fixup_buildinfo test_1.0-1.dsc test_1.0-1_${_ARCH}.buildinfo
+ signfile buildinfo test_1.0-1_${_ARCH}.buildinfo uscan test key (no secret) <none@debian.org>
+
+ fixup_changes dsc test_1.0-1.dsc test_1.0-1_${_ARCH}.changes
+ fixup_changes buildinfo test_1.0-1_${_ARCH}.buildinfo test_1.0-1_${_ARCH}.changes
+ signfile changes test_1.0-1_${_ARCH}.changes uscan test key (no secret) <none@debian.org>
+
+ Successfully signed dsc, buildinfo, changes files
+EOS
+ else
+ cat >> ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ signfile dsc test_1.0-1.dsc uscan test key (no secret) <none@debian.org>
+
+ fixup_changes dsc test_1.0-1.dsc test_1.0-1_${_ARCH}.changes
+ signfile changes test_1.0-1_${_ARCH}.changes uscan test key (no secret) <none@debian.org>
+
+ Successfully signed dsc, changes files
+EOS
+ fi
+ runCommandOutCmpFile "-k'uscan test key (no secret) <none@debian.org>'" "${WORKDIR}/package_lifecycle/debuild.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_dscverify () {
+ cd ${WORKDIR}/package_lifecycle
+ COMMAND='dscverify --no-conf --keyring $GPGHOME/pubring.gpg'
+ cat > ${WORKDIR}/package_lifecycle/dscverify.txt <<-EOS
+ ${WORKDIR}/package_lifecycle/test_1.0-1.dsc:
+ Good signature found
+ validating test_1.0.orig.tar.xz
+ validating test_1.0-1.debian.tar.xz
+ All files validated successfully.
+EOS
+ runCommandOutCmpFile "${WORKDIR}/package_lifecycle/test_1.0-1.dsc" "${WORKDIR}/package_lifecycle/dscverify.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_dscextractControl () {
+ cd ${WORKDIR}/package_lifecycle
+ COMMAND='dscextract'
+ cat > ${WORKDIR}/package_lifecycle/dscextractControl.txt <<-EOS
+ Source: test
+ Section: devel
+ Priority: optional
+ Maintainer: Devscripts Devel Team <devscripts-devel@lists.alioth.debian.org>
+ Uploaders: Testophilus Testownik <tester@testity.org>
+ Standards-Version: 4.5.0
+ Rules-Requires-Root: no
+
+ Package: test
+ Architecture: all
+ Description: Short description
+ Longer description
+EOS
+ runCommandOutCmpFile "test_1.0-1.dsc debian/control" "dscextractControl.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_dscextractChangelog () {
+ cd ${WORKDIR}/package_lifecycle
+ COMMAND='dscextract'
+ cat > ${WORKDIR}/package_lifecycle/dscextractChangelog.txt <<-EOS
+ test (1.0-1) unstable; urgency=low
+
+ * Initial packaging
+
+ -- Testophilus Testownik <tester@testity.org>
+EOS
+ runCommandOutCmpFile "test_1.0-1.dsc debian/changelog" "dscextractChangelog.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_debchange () {
+ cd ${WORKDIR}/package_lifecycle/test
+ COMMAND='debchange'
+ export DEBFULLNAME='Testophilus Testownik'
+ export DEBEMAIL='tester@testity.org'
+ cat > ${WORKDIR}/package_lifecycle/debchange.txt <<-EOS
+ test (1.0-2) UNRELEASED; urgency=medium
+
+ * new killer app functionality
+
+ -- Testophilus Testownik <tester@testity.org>
+
+ test (1.0-1) unstable; urgency=low
+
+ * Initial packaging
+
+ -- Testophilus Testownik <tester@testity.org>
+EOS
+ runCommand "-iU 'new killer app functionality'" "" "" 0
+ COMMAND=cat
+ runCommandOutCmpFile "debian/changelog" "../debchange.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_list_unreleased () {
+ cd ${WORKDIR}/package_lifecycle/test
+ COMMAND='list-unreleased'
+ cat > ${WORKDIR}/package_lifecycle/list-unreleased.txt <<-EOS
+ test (1.0-2) UNRELEASED; urgency=medium
+
+ * new killer app functionality
+
+ -- Testophilus Testownik <tester@testity.org>
+EOS
+ runCommandOutCmpFile "-c -R" "../list-unreleased.txt" "" 0
+ cd ${WORKDIR}
+}
+
+
+test_debuild2() {
+ export GNUPGHOME=$GPGHOME
+ cd ${WORKDIR}/package_lifecycle/test
+ COMMAND='LC_ALL=C debuild --no-conf --no-lintian --preserve-envvar=PATH --preserve-envvar=PERL5LIB --preserve-envvar=DEBFULLNAME --preserve-envvar=DEBEMAIL --preserve-envvar=GNUPGHOME --set-envvar=NO_PKG_MANGLE=1'
+ cat > ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ dpkg-buildpackage -us -uc -ui
+ dpkg-buildpackage: source package test
+ dpkg-buildpackage: source version 1.0-2
+ dpkg-buildpackage: source distribution UNRELEASED
+ dpkg-buildpackage: source changed by Testophilus Testownik <tester@testity.org>
+ dpkg-source --before-build .
+ dpkg-buildpackage: host architecture ${_ARCH}
+ debian/rules clean
+ dh clean
+ dpkg-source -b .
+ dpkg-source: info: using source format '3.0 (quilt)'
+ dpkg-source: info: building test using existing ./test_1.0.orig.tar.xz
+ dpkg-source: info: building test in test_1.0-2.debian.tar.xz
+ dpkg-source: info: building test in test_1.0-2.dsc
+ debian/rules binary
+ dh binary
+ dpkg-deb: building package 'test' in '../test_1.0-2_all.deb'.
+ ${_dpkg_genchanges}../test_1.0-2_${_ARCH}.changes
+ dpkg-genchanges: not including original source code in upload
+ dpkg-source --after-build .
+ dpkg-buildpackage: binary and diff upload (original source NOT included)
+EOS
+ runCommandOutCmpFile "-k'uscan test key (no secret) <none@debian.org>'" "${WORKDIR}/package_lifecycle/debuild.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_debuild_forcesign() {
+ export GNUPGHOME=$GPGHOME
+ cd ${WORKDIR}/package_lifecycle/test
+ COMMAND='LC_ALL=C debuild --no-conf --no-lintian --preserve-envvar=PATH --preserve-envvar=PERL5LIB --preserve-envvar=DEBFULLNAME --preserve-envvar=DEBEMAIL --preserve-envvar=GNUPGHOME --set-envvar=NO_PKG_MANGLE=1 --force-sign'
+ cat > ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ dpkg-buildpackage -us -uc -ui
+ dpkg-buildpackage: source package test
+ dpkg-buildpackage: source version 1.0-2
+ dpkg-buildpackage: source distribution UNRELEASED
+ dpkg-buildpackage: source changed by Testophilus Testownik <tester@testity.org>
+ dpkg-source --before-build .
+ dpkg-buildpackage: host architecture ${_ARCH}
+ debian/rules clean
+ dh clean
+ dpkg-source -b .
+ dpkg-source: info: using source format '3.0 (quilt)'
+ dpkg-source: info: building test using existing ./test_1.0.orig.tar.xz
+ dpkg-source: info: building test in test_1.0-2.debian.tar.xz
+ dpkg-source: info: building test in test_1.0-2.dsc
+ debian/rules binary
+ dh binary
+ dpkg-deb: building package 'test' in '../test_1.0-2_all.deb'.
+ ${_dpkg_genchanges}../test_1.0-2_${_ARCH}.changes
+ dpkg-genchanges: not including original source code in upload
+ dpkg-source --after-build .
+ dpkg-buildpackage: binary and diff upload (original source NOT included)
+ Now signing changes and any dsc files...
+EOS
+ if command -v dpkg-genbuildinfo >/dev/null; then
+ cat >> ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ signfile dsc test_1.0-2.dsc uscan test key (no secret) <none@debian.org>
+
+ fixup_buildinfo test_1.0-2.dsc test_1.0-2_${_ARCH}.buildinfo
+ signfile buildinfo test_1.0-2_${_ARCH}.buildinfo uscan test key (no secret) <none@debian.org>
+
+ fixup_changes dsc test_1.0-2.dsc test_1.0-2_${_ARCH}.changes
+ fixup_changes buildinfo test_1.0-2_${_ARCH}.buildinfo test_1.0-2_${_ARCH}.changes
+ signfile changes test_1.0-2_${_ARCH}.changes uscan test key (no secret) <none@debian.org>
+
+ Successfully signed dsc, buildinfo, changes files
+EOS
+ else
+ cat >> ${WORKDIR}/package_lifecycle/debuild.txt <<-EOS
+ signfile dsc test_1.0-2.dsc uscan test key (no secret) <none@debian.org>
+
+ fixup_changes dsc test_1.0-2.dsc test_1.0-2_${_ARCH}.changes
+ signfile changes test_1.0-2_${_ARCH}.changes uscan test key (no secret) <none@debian.org>
+
+ Successfully signed dsc, changes files
+EOS
+ fi
+ runCommandOutCmpFile "-k'uscan test key (no secret) <none@debian.org>'" "${WORKDIR}/package_lifecycle/debuild.txt" "" 0
+ cd ${WORKDIR}
+}
+
+test_debdiff () {
+ cd ${WORKDIR}/package_lifecycle
+ COMMAND='debdiff --no-conf'
+ cat > ${WORKDIR}/package_lifecycle/debdiff.txt <<-EOS
+ File lists identical (after any substitutions)
+
+ Control files: lines which differ (wdiff format)
+ ------------------------------------------------
+ Version: [-1.0-1-] {+1.0-2+}
+EOS
+ runCommandOutCmpFile "test_1.0-1_${_ARCH}.changes test_1.0-2_${_ARCH}.changes" "debdiff.txt" "" 0
+ cd ${WORKDIR}
+}
+
+oneTimeTearDown () {
+ rm -rf ${WORKDIR}/package_lifecycle
+ gpgconf --homedir "$GPGHOME" --kill gpg-agent
+ rm -rf "$GPGHOME"
+}
+
+cd ${WORKDIR}
+. shunit2
+
diff --git a/test/test_perl b/test/test_perl
new file mode 100755
index 0000000..aed1906
--- /dev/null
+++ b/test/test_perl
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+LIB=-I../lib
+if test "${1:-}" = --installed; then
+ LIB=""
+ shift
+fi
+
+prove --norc $LIB t/*.t
+
diff --git a/test/test_perltidy b/test/test_perltidy
new file mode 100755
index 0000000..af9827c
--- /dev/null
+++ b/test/test_perltidy
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -u
+
+base="$(readlink -f "${0%/*}"/..)"
+
+
+# perltidy test is ran only during dev
+if test "$(cd "$base" && dpkg-parsechangelog -c0 -SDistribution)" != UNRELEASED; then
+ echo "SKIP: Not checking a released version with perltidy."
+ exit 0
+fi
+
+# perltidy test isn't ran in autopkgtest environment
+if test "${1:-}" = --installed; then
+ echo "SKIP: Not running perltidy in autopkgtest."
+ exit 0
+fi
+
+# Don't run this test with old Perltidy versions
+if test "$(perl -MPerl::Tidy -le 'print $Perl::Tidy::VERSION')" -lt 20220613; then
+ echo "SKIP: perltidy version too old, skipping this test."
+ exit 0
+fi
+
+
+testPerltidy() {
+ LIST=$(find "$base/lib/" "$base/scripts/" -iname '*.pl' -or -iname '*.pm')
+
+ for file in $LIST; do
+ perltidy --output-path="$SHUNIT_TMPDIR/" --profile="$base/.perltidyrc" "$file"
+ cmp -s "$file" "$SHUNIT_TMPDIR/$(basename "$file").tdy"
+ retval=$?
+ assertEquals "## $file isn't following perltidy" 0 "$retval"
+ done
+
+}
+
+. shunit2
diff --git a/test/test_sadt b/test/test_sadt
new file mode 100755
index 0000000..0292d20
--- /dev/null
+++ b/test/test_sadt
@@ -0,0 +1,100 @@
+#!/bin/sh
+
+# Copyright (C) 2018, Antonio Terceiro <terceiro@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+. ${0%/*}/test_helper.sh
+
+if test "${1:-}" = --installed; then
+ sadt="sadt"
+ shift
+else
+ sadt="$(readlink -f "${0%/*}/../scripts/sadt")"
+fi
+
+samples="${0%/*}/sadt"
+
+run_sadt() {
+ dir="$1"
+ shift
+ (cd "$samples/$dir" && $sadt "$@")
+}
+
+test_passes() {
+ assertPasses run_sadt passes
+}
+
+test_superficial() {
+ assertPasses run_sadt superficial
+ assertFails run_sadt superficial-fails
+}
+
+test_flaky() {
+ assertPasses run_sadt flaky
+}
+
+test_skippable() {
+ assertPasses run_sadt skippable
+}
+
+test_skippable_fails() {
+ assertFails run_sadt unskippable
+ assertFails run_sadt unskipped
+}
+
+test_fails() {
+ assertFails run_sadt fails
+}
+
+test_space_separated_tests() {
+ assertPasses run_sadt space-separated-tests
+ assertFalse "skipped=1 found in output" "grep -q skipped=1 $log"
+}
+
+test_comma_separated_tests() {
+ assertPasses run_sadt comma-separated-tests
+ assertFalse "skipped=1 found in output" "grep -q skipped=1 $log"
+}
+
+test_space_separated_restrictions() {
+ assertPasses run_sadt space-separated-restrictions
+ assertFalse "skipped=1 found in output" "grep -q skipped=1 $log"
+}
+
+test_comma_separated_restrictions() {
+ assertPasses run_sadt comma-separated-restrictions
+ assertFalse "skipped=1 found in output" "grep -q skipped=1 $log"
+}
+
+test_tests_directory() {
+ assertPasses run_sadt tests-directory
+ assertFalse "skipped=1 found in output" "grep -q skipped=1 $log"
+}
+
+test_test_command() {
+ assertPasses run_sadt test-command --verbose
+ assertTrue "recognizes Test-Command" "grep 'O: Test-Command is supported' $log"
+ assertTrue "recognizes Test-Command" "grep tests=1 $log"
+}
+
+test_run_specific_tests() {
+ assertPasses run_sadt comma-separated-tests --verbose test1
+ assertTrue "runs test1" "grep '^test1:' $log"
+ assertFalse "does not run test2" "grep '^test2:' $log"
+}
+
+. shunit2
diff --git a/test/test_salsa b/test/test_salsa
new file mode 100755
index 0000000..8c21342
--- /dev/null
+++ b/test/test_salsa
@@ -0,0 +1,106 @@
+#!/usr/bin/perl
+
+use strict;
+use lib '../lib';
+use Test::More;
+
+my $skip;
+
+BEGIN {
+ my $cwd = `pwd`;
+ chomp $cwd;
+ eval "use File::Temp 'tempdir';"
+ . "use Test::Output;use GitLab::API::v4;"
+ . "use lib '$cwd/../lib'";
+ $skip = $@ ? 1 : 0;
+}
+
+sub run {
+ my ($result, $out, @list) = @_;
+ @ARGV = @list;
+ my $res;
+ combined_like(
+ sub {
+ $res = Devscripts::Salsa->new->run;
+ },
+ $out,
+ "command: " . join(' ', @list));
+ ok($res =~ /^$result$/i, " result is $result");
+}
+
+sub mkDebianDir {
+ my $tmpdir = tempdir(CLEANUP => 1);
+ chdir $tmpdir;
+ $ENV{"GIT_CONFIG_NOGLOBAL"} = 1;
+ system "git init";
+ mkdir 'debian';
+ open F, ">debian/changelog";
+ print F <<EOF;
+foobar (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd\@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+EOF
+ close F;
+ open F, ">README.md";
+ print F <<EOF;
+# Salsa test
+EOF
+ system "git add *";
+ system "git commit -a -m 'Salsa test'";
+}
+
+SKIP: {
+ skip "Missing dependencies" if ($skip);
+ use_ok 'Devscripts::Salsa';
+ $Devscripts::Output::die_on_error = 0;
+
+ # Search methods
+ run(0, qr/Id.*\nUsername.*/s, 'whoami');
+ run(0, qr/Id.*\nName/s, 'search_group', 'js-team');
+ run(0, qr/Id.*\nName/s, 'search_group', '2666');
+ run(0, qr/Id.*\nName/s, 'search_group', 'perl-team/modules');
+ run(0, qr/Id.*\nUsername\s*: yadd/s, 'search_user', 'yadd');
+ run(0, qr/Id.*\nUsername\s*: yadd/s, 'search_user', 'yad');
+ run(0, qr/Id.*\nUsername\s*: yadd/s, 'search_user', '3818');
+ run(0, qr/Id.*\nName\s*: qa/s, 'search_project', 'qa');
+ run(0, qr/Id.*\nName\s*: qa/s, 'search_project', '1417');
+ run(0, qr/Id.*\nName\s*: qa/s, 'search_project', 'qa/qa');
+ run(0, qr/Id.*\nUsername.*/s, '--group', 'perl-team', 'group');
+ run(0, qr/Id.*\nName/s, '--group', 'perl-team', 'list_repos');
+ run(0, qr/Id.*\nName/s, 'list_groups');
+ run(0, qr/Id.*\n\tName/s, 'forks', 'qa/qa');
+ run(0, qr/^debian\/devscripts/m, 'mrs', 'debian/devscripts');
+ run(0, qr/^devscripts/m, 'mrs', 'devscripts', '--group-id', 2);
+ run(0, qr/master.*Maintainer.*Developers/m,
+ 'protected_branches', 'debian/devscripts');
+
+ # checkout
+ {
+ my $tmpdir = tempdir(CLEANUP => 1);
+ run(0, qr/gbp:info/, 'co', '-C', $tmpdir,
+ 'debian/libapache2-mod-fcgid');
+ ok(
+ -d "$tmpdir/libapache2-mod-fcgid/.git",
+ ' libapache2-mod-fcgid cloned'
+ );
+ run(0, qr/gbp:info/, 'checkout', '-C', $tmpdir, '--group=qa', 'qa');
+ ok(-d "$tmpdir/qa/.git", ' qa cloned');
+ }
+
+ # push_repo, update_repo and del_repo
+ if ($ARGV[0] eq '--full') {
+ mkDebianDir;
+ run(0, qr/Project .*created/s,
+ 'push_repo', '.', '--verbose', '--kgb', '--irc=devscripts');
+ diag "Verify that foobar appears in #devscripts channel";
+ run(0, qr/Project .*updated/s,
+ 'update_repo', 'foobar', '--rename-head');
+ run(1, qr/update_repo has failed for foobar/s,
+ 'update_repo', 'foobar', '--rename-head', '--no-fail');
+ run(0, qr/Project .*foobar deleted/s,
+ '--verbose', 'del_repo', 'foobar');
+ }
+}
+done_testing;
diff --git a/test/test_uscan b/test/test_uscan
new file mode 100755
index 0000000..1b66f30
--- /dev/null
+++ b/test/test_uscan
@@ -0,0 +1,548 @@
+#!/bin/bash
+
+# Copyright (C) 2013, Rafael Laboissiere <rafael@laboissiere.net>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+
+TESTTYPE=base
+test_dir=$(readlink -f "${0%/*}")
+. "$test_dir/lib_test_uscan"
+
+SUFFIX="1"
+if command -v dpkg-vendor >/dev/null; then
+ VENDER="$(dpkg-vendor --query Vendor 2>/dev/null|tr 'A-Z' 'a-z')"
+ case "$VENDER" in
+ debian) SUFFIX="1" ;;
+ *) SUFFIX="0${VENDER}1" ;;
+ esac
+fi
+
+if test "${1:-}" = --installed; then
+ COMMAND="uscan --no-conf --compression=xz"
+ shift
+else
+ top_srcdir=$(readlink -f "${0%/*}/..")
+ make -C "$top_srcdir/scripts" uscan mk-origtargz uupdate debchange
+ PATH="$top_srcdir/scripts:$PATH"
+ export PATH
+ PERL5LIB="$top_srcdir/lib"
+ export PERL5LIB
+ COMMAND="uscan --no-conf --compression=xz"
+fi
+
+COMMANDDEHS="$COMMAND --dehs"
+
+# comment out for debug
+#COMMAND="$COMMAND --debug"
+
+tearDown(){
+ killHttpServer
+ echo
+}
+
+trap tearDown EXIT
+
+containsName(){
+ echo "$1" | grep -qF "$2"
+ echo $?
+}
+
+validXML(){
+ echo "$1" | perl -ne 's/<[^\/].*?>.*?<\/.*>//g;$open++ if/<[^\/].*?>/;$open-- if/<\/.*>/;if(!$open and /^\s+\w/){$false++}}{exit ($false || $open) ? 1 : 0'
+ echo $?
+}
+
+. "$test_dir/shunit2-helper-functions.sh"
+
+# The following tests do the following: (1) create a minimal Debian package
+# directory, containing minimal files debian/{changelog,watch,copyright},
+# (2) create a minimal repository, containing a tarball (built on the fly),
+# (3) start an HTTP server that works offline, using the SimpleHTTPServer
+# module of Python, and (4) run uscan inside that minimal universe.
+
+
+# The following function tests the --repack feature
+helperTestRepack() {
+ from_ext="$1"
+ to_comp="$2"
+ file_output="$3"
+
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian/source
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=3
+http://localhost:$PORT/$PKG-(\d).$from_ext
+END
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ echo -n '3.0 (quilt)' > "$TEMP_PKG_DIR"/$PKG/debian/source/format
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ if [ "$from_ext" = "tar.zstd" ]
+ then
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ tar --zstd -cf $PKG-1.$from_ext $PKG/* )
+ else
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ tar -caf $PKG-1.$from_ext $PKG/* )
+ fi
+
+ OUTPUT=$( cd "$TEMP_PKG_DIR"/$PKG ; $COMMANDDEHS --repack --compression=$to_comp )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+
+ TARBALL=${PKG}_1.orig.tar.$to_comp
+ if [ "$from_ext" != "tar.$to_comp" ]
+ then
+ assertFalse 'unrepacked tarball still present' "[ -f "$TEMP_PKG_DIR"/${PKG}_1.orig.$from_ext ]"
+ fi
+ assertTrue 'pristine tarball is not created' "[ -f "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertNotNull "pristine tarball is not $to_comp-compressed" \
+ "$( file -L "$TEMP_PKG_DIR"/$TARBALL | grep "$file_output" )"
+ CONTENTS="$(tar atf "$TEMP_PKG_DIR"/$TARBALL)"
+ assertTrue 'file contents missing' \
+ $(containsName "$CONTENTS" content)
+ assertTrue "malfored target in dehs output: $OUTPUT" $(validXML "$OUTPUT")
+ assertTrue "malfored target in dehs output: $OUTPUT" \
+ $(containsName "$OUTPUT" "<target>$TARBALL</target>")
+
+}
+
+testRepackGZ_XZ() { helperTestRepack "tar.gz" "xz" "XZ compressed data" ; }
+testRepackGZ_BZ2() { helperTestRepack "tar.gz" "bz2" "bzip2 compressed data" ; }
+testRepackBZ2_GZ() { helperTestRepack "tar.bz2" "gz" "gzip compressed data" ; }
+testRepackGZ_GZ() { helperTestRepack "tar.gz" "gz" "gzip compressed data" ; }
+testRepackXZ_XZ() { helperTestRepack "tar.xz" "xz" "XZ compressed data" ; }
+testRepackTGZ_XZ() { helperTestRepack "tgz" "xz" "XZ compressed data" ; }
+testRepackTGZ_XZ() { helperTestRepack "tgz" "xz" "XZ compressed data" ; }
+testRepackLZ_XZ() { helperTestRepack "tar.lzma" "xz" "XZ compressed data" ; }
+testRepackZST_XZ() { helperTestRepack "tar.zst" "xz" "XZ compressed data" ; }
+testRepackZSTD_XZ() { helperTestRepack "tar.zstd" "xz" "XZ compressed data" ; }
+
+# The following function tests the --repack feature, with a zip file
+testRepackZip_XZ() {
+ to_comp=xz
+ file_output="XZ compressed data"
+
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian/source
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=3
+http://localhost:$PORT/$PKG-(\d).zip
+END
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+ echo -n '3.0 (quilt)' > "$TEMP_PKG_DIR"/$PKG/debian/source/format
+
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ zip -q -r $PKG-1.zip * )
+
+ OUTPUT=$( (cd "$TEMP_PKG_DIR"/$PKG ; $COMMANDDEHS --repack --compression=$to_comp) )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+
+ TARBALL=${PKG}_1.orig.tar.$to_comp
+ assertTrue 'unrepacked zipfile present' "[ -f "$TEMP_PKG_DIR"/${PKG}-1.zip ]"
+ assertTrue 'pristine tarball is not created' "[ -f "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertNotNull "pristine tarball is not $to_comp-compressed" \
+ "$( file -L "$TEMP_PKG_DIR"/$TARBALL | grep "$file_output" )"
+ CONTENTS="$(tar atf "$TEMP_PKG_DIR"/$TARBALL)"
+ assertTrue 'file contents missing' \
+ $(containsName "$CONTENTS" content)
+ assertTrue "malfored target in dehs output: $OUTPUT" $(validXML "$OUTPUT")
+ assertTrue "malfored target in dehs output: $OUTPUT" \
+ $(containsName "$OUTPUT" "<target>$TARBALL</target>")
+
+}
+
+
+
+# The following function tests the Files-Excluded feature of uscan, which
+# allows the selective exclusion of files from the upstream tarball before
+# repacking it.
+
+helperCreateRepo () {
+ mkdir -p $PKG/debian
+
+ cat <<END > $PKG/debian/watch
+version=3
+${OPTS:-}http://localhost:$PORT/$PKG-(\d).tar.gz debian ${SCRIPT:-}
+END
+
+ cat <<END > $PKG/debian/changelog
+$PKG (0+dfsg1-$SUFFIX) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ cat <<'END' > $PKG/debian/copyright
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Files-Excluded: exclude-this
+ exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+END
+ if [ -n "${SRCFORMAT:-}" ]; then
+ mkdir -p $PKG/debian/source
+ echo "$SRCFORMAT" > $PKG/debian/source/format
+ fi
+
+ mkdir -p repo
+ touch repo/include-this
+ touch repo/exclude-this
+ touch repo/.hidden
+ mkdir -p "repo/; echo baz; #/"
+ mkdir -p repo/exclude-dir
+ touch repo/exclude-dir/file
+ mkdir -p repo/exclude-dir/subdir
+ touch repo/exclude-dir/subdir/file2
+ mkdir -p repo/docs/html/js/
+ touch repo/docs/html/js/jquery.js
+
+}
+
+helperTestContent() {
+ assertTrue 'file that must be present is excluded in the tarball' \
+ $(containsName "$CONTENTS" include-this)
+ assertFalse 'file that must be excluded is present in the tarball' \
+ $(containsName "$CONTENTS" exclude-this)
+ assertFalse "dir that must be excluded is present in the tarball" \
+ $(containsName "$CONTENTS" exclude-dir)
+ assertFalse "subdir that must be excluded is present in the tarball" \
+ $(containsName "$CONTENTS" subdir)
+ assertFalse "non-root-file that must be excluded is present in the tarball" \
+ $(containsName "$CONTENTS" jquery.js)
+ assertFalse "hidden file that must be excluded is present in the zip file" \
+ $(containsName "$CONTENTS" .hidden)
+ assertFalse "path with whitespace that must be excluded is present" \
+ $(containsName "$CONTENTS" "; echo baz; #/")
+}
+
+testFileExclusion() {
+
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ (
+ cd "$TEMP_PKG_DIR"
+ OPTS="opts=repacksuffix=+dfsg1,dversionmangle=s/@DEB_EXT@// "
+ SCRIPT="uupdate"
+ SRCFORMAT="3.0 (quilt)"
+ helperCreateRepo
+ cd repo
+ tar cfz $PKG-1.tar.gz * .hidden )
+
+ (cd "$TEMP_PKG_DIR"/$PKG ; $COMMAND)
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+
+ TARBALL=${PKG}_1+dfsg1.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f "$TEMP_PKG_DIR"/${PKG}-1.tar.gz ]"
+ assertTrue 'pristine tarball is not created' "[ -f "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertFalse 'pristine tarball is a symlink (nothing repacked?)' "[ -L "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertNotNull 'pristine tarball is not XZ-compressed' \
+ "$( file "$TEMP_PKG_DIR"/$TARBALL | grep -i 'XZ compressed data' )"
+ CONTENTS="$(tar atf "$TEMP_PKG_DIR"/$TARBALL)"
+
+ helperTestContent
+
+ # check uupdate
+ assertTrue 'pristine tarball is not extracted' "[ -f "$TEMP_PKG_DIR"/${PKG}-1+dfsg1/debian/changelog ]"
+ DVERSION=`dpkg-parsechangelog -l"$TEMP_PKG_DIR"/${PKG}-1+dfsg1/debian/changelog -SVersion`
+ assertEquals "uscan: Version should be 1+dfsg1-$SUFFIX but $DVERSION" "$DVERSION" "1+dfsg1-$SUFFIX"
+
+}
+
+# the same, but run from a separate directory (no way for uupdate, just download)
+testFileExclusionSeparateDir() {
+
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ (
+ cd "$TEMP_PKG_DIR"
+ SCRIPT=""
+ OPTS="opts=repacksuffix=+dfsg1,dversionmangle=auto "
+ helperCreateRepo
+ cd repo
+ tar cfz $PKG-1.tar.gz * .hidden )
+
+ mkdir "$TEMP_PKG_DIR"/otherdir
+ (
+ cd "$TEMP_PKG_DIR"/otherdir;
+ $COMMAND --package $PKG --force-download --upstream-version 1 \
+ --watchfile ../$PKG/debian/watch --copyright-file ../$PKG/debian/copyright
+ )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+
+ TARBALL=${PKG}_1+dfsg1.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f "$TEMP_PKG_DIR"/${PKG}-1.tar.gz ]"
+ assertTrue 'pristine tarball is not created' "[ -f "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertFalse 'pristine tarball is a symlink (nothing repacked?)' "[ -L "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertNotNull 'pristine tarball is not XZ-compressed' \
+ "$( file "$TEMP_PKG_DIR"/$TARBALL | grep -i 'XZ compressed data' )"
+ CONTENTS="$(tar atf "$TEMP_PKG_DIR"/$TARBALL)"
+
+ helperTestContent
+
+}
+
+# The same, for a zip file that is being repacked
+
+testFileExclusionZipToTar() {
+
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ (
+ cd "$TEMP_PKG_DIR"
+ SRCFORMAT="3.0 (quilt)"
+ helperCreateRepo
+ cat <<END > $PKG/debian/watch
+version=3
+opts=repacksuffix=+dfsg1,dversionmangle=s/@DEB_EXT@// http://localhost:$PORT/$PKG-(\d).zip debian uupdate
+END
+
+ cd repo
+ zip -q -r $PKG-1.zip * .hidden )
+
+ (cd "$TEMP_PKG_DIR"/$PKG ; $COMMAND --repack)
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+
+ TARBALL=${PKG}_1+dfsg1.orig.tar.xz
+ assertTrue 'unrepacked zipfile not present' "[ -f "$TEMP_PKG_DIR"/${PKG}-1.zip ]"
+ assertTrue 'pristine tarball is not created' "[ -f "$TEMP_PKG_DIR"/$TARBALL ]"
+ assertNotNull 'pristine tarball is not xz-compressed' \
+ "$( file "$TEMP_PKG_DIR"/$TARBALL | grep 'XZ compressed data' )"
+ CONTENTS="$(tar atf "$TEMP_PKG_DIR"/$TARBALL)"
+ helperTestContent
+
+ # check uupdate
+ assertTrue 'pristine tarball is not extracted' "[ -f "$TEMP_PKG_DIR"/${PKG}-1+dfsg1/debian/changelog ]"
+ DVERSION=`dpkg-parsechangelog -l"$TEMP_PKG_DIR"/${PKG}-1+dfsg1/debian/changelog -SVersion`
+ assertEquals "uscan: Version should be 1+dfsg1-$SUFFIX but $DVERSION" "$DVERSION" "1+dfsg1-$SUFFIX"
+
+}
+
+testPlainMode() {
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=4
+opts="searchmode=plain" \
+http://localhost:$PORT/src.json http://localhost:$PORT/foo-(\d).zip
+END
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ zip -q -r $PKG-1.zip *;
+ cat > src.json <<END
+{"1.0":{"tarball":"http://localhost:$PORT/foo-1.zip"}}
+END
+ )
+
+ OUTPUT=$( (cd "$TEMP_PKG_DIR"/$PKG ; $COMMANDDEHS) )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+
+ TARBALL=${PKG}_1.orig.tar.$to_comp
+ assertTrue 'unrepacked zipfile present' "[ -f "$TEMP_PKG_DIR"/${PKG}-1.zip ]"
+
+}
+
+testLinksWithRelativeBase() {
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+ to_comp=xz
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=4
+http://localhost:$PORT/foo/index.html foo-([\d\.]+).zip
+END
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ for href in foo-1.zip /foo/foo-1.zip //localhost:$PORT/foo/foo-1.zip ../foo/foo-1.zip x/../../foo/foo-1.zip; do
+ ( cd "$TEMP_PKG_DIR"/repo/foo ;
+ zip -q -r $PKG-1.zip *;
+ zip -q -r $PKG-0.9.zip *;
+ cat > index.html <<END
+<html><body>
+<base href="/foo/" />
+<a href="$href">foo-1.zip</a>
+</body></html>
+END
+ )
+
+ (cd "$TEMP_PKG_DIR"/$PKG ; $COMMAND)
+ assertEquals "uscan: exit_code!=0 but exit_code=0 with $href" "$?" "0"
+ done
+
+ assertTrue 'unrepacked zipfile present' "[ -f "$TEMP_PKG_DIR"/${PKG}-1.zip ]"
+
+}
+
+testComponentDehsOutput() {
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=4
+http://localhost:$PORT/$PKG-(\d).zip debian
+
+opts="searchmode=plain,component=baz" \
+http://localhost:$PORT/src.json http://localhost:$PORT/foo-(\d).zip
+END
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ zip -q -r $PKG-1.zip *;
+ cat > src.json <<END
+{"1.0":{"tarball":"http://localhost:$PORT/foo-1.zip"}}
+END
+ )
+
+ OUTPUT=$( (cd "$TEMP_PKG_DIR"/$PKG ; $COMMANDDEHS --report --dehs) )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+ assertTrue "malfored target in dehs output: $OUTPUT" $(validXML "$OUTPUT")
+ assertTrue "malfored target in dehs output: $OUTPUT" \
+ $(containsName "$OUTPUT" '<component id="baz">')
+ assertTrue "malfored target in dehs output: $OUTPUT" \
+ $(containsName "$OUTPUT" "<component-upstream-version>1</component-upstream-version>")
+}
+
+testSimpleHeader() {
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian/source
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=4
+http://localhost:$PORT/$PKG-(\d).zip debian
+
+opts="searchmode=plain,component=baz,filenamemangle=s/.*-(@ANY_VERSION@@ARCHIVE_EXT@)/baz-\$1/" \
+http://localhost:$PORT/src.json http://localhost:$PORT/foo-(\d).zip
+END
+
+ echo -n '3.0 (quilt)' > "$TEMP_PKG_DIR"/$PKG/debian/source/format
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ zip -q -r $PKG-1.zip *;
+ cat > src.json <<END
+{"1.0":{"tarball":"http://localhost:$PORT/foo-1.zip"}}
+END
+ )
+
+ OUTPUT=$( (cd "$TEMP_PKG_DIR"/$PKG ; $COMMAND -v \
+ --http-header http://localhost:$PORT@Simple-Token=localtoken \
+ --http-header http://another.com@Ext-Token=exttoken \
+ ) )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+ assertTrue "per-host header not exported: $OUTPUT" \
+ $(containsName "$OUTPUT" "Set per-host custom header Simple-Token for http://localhost:$PORT/foo")
+ assertFalse "ext per-host header is exported: $OUTPUT" \
+ $(containsName "$OUTPUT" "Set per-host custom header Ext-Token")
+}
+
+. shunit2
diff --git a/test/test_uscan_ftp b/test/test_uscan_ftp
new file mode 100755
index 0000000..d35db8c
--- /dev/null
+++ b/test/test_uscan_ftp
@@ -0,0 +1,489 @@
+#!/bin/bash
+# vim: set shiftwidth=4 tabstop=8 noexpandtab:
+
+# Copyright (C) 2018, Osamu Aoki <osamu@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+
+TESTTYPE=FTP
+. ./lib_test_uscan
+
+DEB_HOST_OS="$(dpkg-architecture -qDEB_HOST_ARCH_OS)"
+if [ "$DEB_HOST_OS" = "kfreebsd" ]; then
+ # kbsd has a non-working semaphore, that is needed here.
+ echo "This test is not supported on $(dpkg-architecture -qDEB_HOST_ARCH), skipping"
+ exit 0
+fi
+
+COMMAND="uscan --no-conf"
+
+# set safe defaults
+WEBSCRIPT=":"
+DEBUGECHO=":"
+DEBUGLSLR=":"
+DEBUGBASH=":"
+# comment out for debug
+#COMMAND="$COMMAND --debug"
+#COMMAND="$COMMAND --verbose"
+#DEBUGECHO=echo
+#DEBUGLSLR="ls -laR"
+#DEBUGLSLR="ls -la"
+#DEBUGBASH="bash -i"
+
+# Initial Debian revision value is distribution dependent
+SUFFIX="1"
+if command -v dpkg-vendor >/dev/null; then
+ VENDER="$(dpkg-vendor --query Vendor 2>/dev/null|tr 'A-Z' 'a-z')"
+ case "$VENDER" in
+ debian) SUFFIX="1" ;;
+ *) SUFFIX="0${VENDER}1" ;;
+ esac
+fi
+
+cleanup(){
+ kill -9 $(cat $TMPDIR/$REPOPATH/pid)
+ rm -rf $TMPDIR
+ echo ""
+}
+
+spawnFtpServer(){
+ (
+ local USCAN_FTP_SERVER=${USCAN_FTP_SERVER:-ftpserver.py}
+ mkdir -p "$TMPDIR/$REPOPATH"
+ cd "$TMPDIR/$REPOPATH" || exit 1
+ echo "FTP starting ... $TMPDIR/$REPOPATH"
+ local pid
+ python3 "$test_dir/uscan/$USCAN_FTP_SERVER" 2>log &
+ pid=$!
+ echo $pid > pid
+ while ! [ -s port ]; do
+ sleep 2s
+ if ! kill -0 $pid 2> /dev/null ; then
+ echo "The FTP server returned an error:"
+ cat log
+ exit 1
+ fi
+ done
+ )
+}
+
+trap cleanup 1 2 3 13 15
+
+containsName(){
+ echo "$1" | grep -qF "$2"
+ echo $?
+}
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+# The following tests do the following: (1) create a minimal Debian package
+# directory, containing minimal files debian/{changelog,watch,copyright},
+# (2) create a minimal repository, containing a tarball (built on the fly),
+# (3) start an FTP server that works offline, using the pyftpdlib
+# module of Python, and (4) run uscan inside that minimal universe.
+
+# make debian/ in `pwd`
+# debian/watch contains $WATCHVER and $WATCHLINE with template URL updated
+makeDebianDir() {
+ DEBNAME=${1:-foo} # Debian source package name
+ DEBVER=${2:-1.0} # Debian source package version
+ mkdir -p debian/source
+
+ cat <<END > debian/rules
+%:
+ dh $@
+END
+chmod 755 debian/rules
+
+ cat <<END > debian/changelog
+$DEBNAME ($DEBVER) unstable; urgency=low
+
+ * Release of the $DEBNAME package $DEBVER.
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+ # debian/source/format
+ case $DEBVER in
+ *-*) # non-native package
+ echo "3.0 (quilt)" > debian/source/format
+ ;;
+ *) # native package
+ echo "3.0 (native)" > debian/source/format
+ ;;
+ esac
+ # debian/copyright
+ echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/" \
+ > debian/copyright
+ # debian/watch
+ echo "version=$WATCHVER" > debian/watch
+ echo "$WATCHLINE" | sed -e "s,@@@url@@@,ftp://127.0.0.1:${PORT}/,g" - \
+ >> debian/watch
+ # debian/upstream/signing-key.asc
+ mkdir -p debian/upstream
+ cp -f $test_dir/uscan/PUBLIC_KEY.asc debian/upstream/signing-key.asc
+}
+
+
+# make tarball in $REPOPATH/$POOLPATH
+makeUpstreamTar() {
+ UPNAME=${1:-foo} # Upstream package name
+ UPVER=${2:-1.0} # upstream package version
+ COMPRESSION=${3:-gz} # archve compression type
+ TYPE=${4:-non-native} # set this if native-type upstream
+ OLDDIR=`pwd`
+ mkdir -p $TMPDIR/$REPOPATH/$POOLPATH/$UPNAME-$UPVER
+ cd $TMPDIR/$REPOPATH/$POOLPATH
+ touch $UPNAME-$UPVER/FILE.$UPNAME.$UPVER
+ if [ "$TYPE" = "native" ]; then
+ cd $TMPDIR/$REPOPATH/$POOLPATH/$UPNAME-$UPVER
+ makeDebianDir $UPNAME $UPVER
+ cd $TMPDIR/$REPOPATH/$POOLPATH
+ fi
+ case $COMPRESSION in
+ gz|gzip)
+ NEWTAR=$UPNAME-$UPVER.tar
+ tar -cf $NEWTAR $UPNAME-$UPVER
+ NEWTAR=$UPNAME-$UPVER.tar.gz
+ tar -czf $NEWTAR $UPNAME-$UPVER
+ ;;
+ bz2|bzip2)
+ NEWTAR=$UPNAME-$UPVER.tar
+ tar -cf $NEWTAR $UPNAME-$UPVER
+ NEWTAR=$UPNAME-$UPVER.tar.bz2
+ tar --bzip2 -cf $NEWTAR $UPNAME-$UPVER
+ ;;
+ xz)
+ NEWTAR=$UPNAME-$UPVER.tar
+ tar -cf $NEWTAR $UPNAME-$UPVER
+ NEWTAR= $UPNAME-$UPVER.tar.xz
+ tar --xz -cf $NEWTAR $UPNAME-$UPVER
+ ;;
+ zip)
+ NEWTAR=$UPNAME-$UPVER.zip
+ zip -r $NEWTAR $UPNAME-$UPVER
+ ;;
+ *) echo "Wrong compression mode: $COMPRESSION"
+ exit 1
+ ;;
+ esac
+ # make $NEWTAR.asc
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+ --armor --detach-sign $NEWTAR
+ if [ "$COMPRESSION" != "zip" ]; then
+ NEWTAR=$UPNAME-$UPVER.tar
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+ --armor --detach-sign $NEWTAR
+
+ fi
+ cd $OLDDIR
+}
+
+# setup a common watch file test environment
+helperWatch() {
+ local SITESCRIPT=${1:-siteWebNonNative}
+ local VEROLD=${2:-1.0}
+ local VERNEW=${3:-2.0}
+ local PREFIX="${4:-}"
+ local TMPDIR=$(mktemp -d)
+ ORIGDIR=`pwd`
+ PKG=${PKG:-foo}
+ REPOPATH=${REPOPATH:-repo}
+ POOLPATH=${POOLPATH:-pool}
+ GZREPACK=${GZREPACK:-gz}
+ XCOMMAND=${XCOMMAND:-$COMMAND}
+ WATCHVER="${WATCHVER:-3}"
+ WATCHLINE0="@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate"
+ WATCHLINE="${WATCHLINE:-$WATCHLINE0}"
+ cd $TMPDIR
+ # start FTP server with its root at $TMPDIR/$REPOPATH
+ spawnFtpServer || exit 1
+ PORT=$(cat $TMPDIR/$REPOPATH/port)
+ $DEBUGECHO " ***** ftp://localhost:$PORT started showing $TMPDIR/$REPOPATH *****"
+ # make web site
+ $SITESCRIPT
+ # make local $VEROLD source tree
+ tar -xzf $TMPDIR/$REPOPATH/$POOLPATH/${PKG}-${VEROLD}.tar.gz
+ if [ -n "${PREFIX}" ]; then
+ mv $TMPDIR/${PKG}-${VEROLD} $TMPDIR/${PKG}-${PREFIX}${VEROLD}
+ fi
+ mv $TMPDIR/${PKG}-${PREFIX}${VEROLD} $TMPDIR/${PKG}
+ cd $TMPDIR/${PKG}
+ if [ ! -d debian ]; then
+ makeDebianDir $PKG ${PREFIX}${VEROLD}-$SUFFIX
+ fi
+ local UUPDATE=""
+ if grep -q "uupdate" $TMPDIR/${PKG}/debian/watch ; then
+ UUPDATE=uupdate
+ fi
+ local PGP=""
+ if grep -q "pgpurlmangle" $TMPDIR/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ if grep -q "pgpmode *= *auto" $TMPDIR/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ if grep -q "pgpmode *= *previous" $TMPDIR/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ $XCOMMAND
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+ cd $TMPDIR
+ $DEBUGLSLR
+ UTARBALL=${PKG}-${VERNEW}.tar.gz
+ STARBALL=${PKG}_${PREFIX}${VERNEW}.orig.tar.$GZREPACK
+ assertTrue "$UTARBALL missing: $WATCHLINE" "[ -f $UTARBALL ]"
+ assertTrue "$STARBALL missing: $WATCHLINE" "[ -f $STARBALL ]"
+ if [ "$PGP" = "pgp" ]; then
+ UTARSIG=${PKG}-${VERNEW}.tar.gz.asc
+ if [ ! -f $UTARSIG ]; then
+ UTARSIG=${PKG}-${VERNEW}.tar.asc
+ fi
+ STARSUG=${PKG}_${PREFIX}${VERNEW}.orig.tar.$GZREPACK.asc
+ assertTrue "$UTARSIG and *.sig missing: $WATCHLINE" "[ -f $UTARSIG ]"
+ assertTrue "$STARSIG missing: $WATCHLINE" "[ -f $STARSIG ]"
+ fi
+ # check uupdate
+ if [ "$UUPDATE" = "uupdate" ]; then
+ cd $TMPDIR/${PKG}-${PREFIX}${VERNEW}
+ assertTrue 'pristine tarball is not extracted' "[ -f debian/changelog ]"
+ DVERSION=`dpkg-parsechangelog -ldebian/changelog -SVersion`
+ assertEquals "uscan: Version should be ${PREFIX}${VERNEW}-$SUFFIX but $DVERSION" "$DVERSION" "${PREFIX}${VERNEW}-$SUFFIX"
+ cd $TMPDIR
+ fi
+ $DEBUGBASH
+ cd $ORIGDIR
+ cleanup
+ unset REPOPATH
+ unset POOLPATH
+ unset GZREPACK
+ unset XCOMMAND
+ unset WATCHVER
+ unset WATCHLINE
+}
+
+# setup a common watch file test environment with Zip upstream
+helperWatchZip() {
+ local SITESCRIPT=${1:-siteWebNonNative}
+ local VEROLD=${2:-1.0}
+ local VERNEW=${3:-2.0}
+ local PREFIX="${4:-}"
+ local TMPDIR=$(mktemp -d)
+ ORIGDIR=`pwd`
+ PKG=${PKG:-foo}
+ REPOPATH=${REPOPATH:-repo}
+ POOLPATH=${POOLPATH:-pool}
+ GZREPACK=${GZREPACK:-xz}
+ XCOMMAND=${XCOMMAND:-$COMMAND}
+ WATCHVER="${WATCHVER:-3}"
+ WATCHLINE0="@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate"
+ WATCHLINE="${WATCHLINE:-$WATCHLINE0}"
+ cd $TMPDIR
+ # start FTP server with its root at $TMPDIR/$REPOPATH
+ spawnFtpServer || exit 1
+ PORT=$(cat $TMPDIR/$REPOPATH/port)
+ $DEBUGECHO " ***** ftp://localhost:$PORT started showing $TMPDIR/$REPOPATH *****"
+ # make web site
+ $SITESCRIPT
+ # make local $VEROLD source tree
+ unzip $TMPDIR/$REPOPATH/$POOLPATH/${PKG}-${VEROLD}.zip
+ if [ -n "$PREFIX" ]; then
+ mv $TMPDIR/${PKG}-${VEROLD} $TMPDIR/${PKG}-${PREFIX}${VEROLD}
+ fi
+ mv $TMPDIR/${PKG}-${PREFIX}${VEROLD} $TMPDIR/${PKG}
+ cd $TMPDIR/${PKG}
+ if [ ! -d debian ]; then
+ makeDebianDir $PKG ${PREFIX}${VEROLD}-$SUFFIX
+ fi
+ local UUPDATE=""
+ if grep -q "uupdate" $TMPDIR/${PKG}/debian/watch ; then
+ UUPDATE=uupdate
+ fi
+ local PGP=""
+ if grep -q "pgpurlmangle" $TMPDIR/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ if grep -q "pgpmode *= *auto" $TMPDIR/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ if grep -q "pgpmode *= *previous" $TMPDIR/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ $XCOMMAND
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+ cd $TMPDIR
+ $DEBUGLSLR
+ UTARBALL=${PKG}-${VERNEW}.zip
+ STARBALL=${PKG}_${PREFIX}${VERNEW}.orig.tar.$GZREPACK
+ assertTrue "$UTARBALL missing: $WATCHLINE" "[ -f $UTARBALL ]"
+ assertTrue "$STARBALL missing: $WATCHLINE" "[ -f $STARBALL ]"
+ if [ "$PGP" = "pgp" ]; then
+ UTARSIG=${PKG}-${VERNEW}.zip.asc
+ STARSUG=${PKG}_${PREFIX}${VERNEW}.orig.tar.$GZREPACK.asc
+ assertTrue "$UTARSIG and *.sig missing: $WATCHLINE" "[ -f $UTARSIG ]"
+ assertTrue "$STARSIG missing: $WATCHLINE" "[ -f $STARSIG ]"
+ fi
+ # check uupdate
+ if [ "$UUPDATE" = "uupdate" ]; then
+ cd $TMPDIR/${PKG}-${PREFIX}${VERNEW}
+ assertTrue 'pristine tarball is not extracted' "[ -f debian/changelog ]"
+ DVERSION=`dpkg-parsechangelog -ldebian/changelog -SVersion`
+ assertEquals "uscan: Version should be ${PREFIX}${VERNEW}-$SUFFIX but $DVERSION" "$DVERSION" "${PREFIX}${VERNEW}-$SUFFIX"
+ cd $TMPDIR
+ fi
+ $DEBUGBASH
+ cd $ORIGDIR
+ cleanup
+ unset REPOPATH
+ unset POOLPATH
+ unset GZREPACK
+ unset XCOMMAND
+ unset WATCHVER
+ unset WATCHLINE
+}
+
+siteNonNative() {
+ local PKG=${1:-foo}
+ local EXTRA=${2:-}
+ makeUpstreamTar $PKG 0.0 gz non-native
+ makeUpstreamTar $PKG 1.0 gz non-native
+ makeUpstreamTar $PKG 2.0 gz non-native
+ mkdir -p $TMPDIR/$REPOPATH/0.0/$PKG/ooo/
+ mkdir -p $TMPDIR/$REPOPATH/1.0/$PKG/ooo/
+ mkdir -p $TMPDIR/$REPOPATH/2.0/$PKG/ooo/
+ if [ -n "$EXTRA" ]; then
+ makeUpstreamTar $PKG 3.0 gz non-native
+ mkdir -p $TMPDIR/$REPOPATH/3.0/$PKG/ooo/
+ fi
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz.asc $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.asc $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.asc
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz.asc $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.asc $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.asc
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz.asc $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.asc $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.asc
+ if [ -n "$EXTRA" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz.asc $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.asc $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.asc
+ fi
+}
+
+siteNonNativeZip() {
+ local PKG=${1:-foo}
+ local EXTRA=${2:-}
+ makeUpstreamTar $PKG 0.0 zip non-native
+ makeUpstreamTar $PKG 1.0 zip non-native
+ makeUpstreamTar $PKG 2.0 zip non-native
+ mkdir -p $TMPDIR/$REPOPATH/0.0/$PKG/ooo/
+ mkdir -p $TMPDIR/$REPOPATH/1.0/$PKG/ooo/
+ mkdir -p $TMPDIR/$REPOPATH/2.0/$PKG/ooo/
+ if [ -n "$EXTRA" ]; then
+ makeUpstreamTar $PKG 3.0 gz non-native
+ mkdir -p $TMPDIR/$REPOPATH/3.0/$PKG/ooo/
+ fi
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.zip $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.zip
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.zip.asc $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.zip.asc
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.zip $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.zip
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.zip.asc $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.zip.asc
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.zip $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.zip
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.zip.asc $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.zip.asc
+ if [ -n "$EXTRA" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.zip $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.zip
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.zip.asc $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.zip.asc
+ fi
+}
+
+siteNonNativeR() {
+ local PKG=${1:-foo}
+ local EXTRA=${2:-}
+ makeUpstreamTar $PKG 0.0 gz non-native
+ makeUpstreamTar $PKG 1.0 gz non-native
+ makeUpstreamTar $PKG 2.0 gz non-native
+ mkdir -p $TMPDIR/$REPOPATH/0.0/$PKG/ooo/
+ mkdir -p $TMPDIR/$REPOPATH/1.0/$PKG/ooo/
+ mkdir -p $TMPDIR/$REPOPATH/2.0/$PKG/ooo/
+ if [ -n "$EXTRA" ]; then
+ makeUpstreamTar $PKG 3.0 gz non-native
+ mkdir -p $TMPDIR/$REPOPATH/3.0/$PKG/ooo/
+ fi
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz.asc $TMPDIR/$REPOPATH/3.0/$PKG/ooo/${PKG}-0.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz.asc $TMPDIR/$REPOPATH/2.0/$PKG/ooo/${PKG}-1.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-2.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz.asc $TMPDIR/$REPOPATH/1.0/$PKG/ooo/${PKG}-2.0.tar.gz.asc
+ if [ -n "$EXTRA" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-3.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz.asc $TMPDIR/$REPOPATH/0.0/$PKG/ooo/${PKG}-3.0.tar.gz.asc
+ fi
+}
+
+# test a watch files
+
+### VERSION 4 ###
+# standard tests
+
+# test non-native package with uupdate, bare FTP server in normal order
+testWatch4NonNative() {
+ WATCHVER=4
+ WATCHLINE='opts=pgpsigurlmangle=s/$/.asc/ @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative
+}
+
+# test --download-current-version, bare FTP server in normal order
+testWatch4NonNativeDlCurrent() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-current-version"
+ WATCHLINE='opts=pgpsigurlmangle=s/$/.asc/ @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative 1.0 1.0
+}
+
+# test --download-version, bare FTP server in normal order
+testWatch4NonNativeDlUversion() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-version 0.0"
+ WATCHLINE='opts=pgpsigurlmangle=s/$/.asc/ @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative 1.0 0.0
+}
+
+# test non-native package with uupdate, bare FTP server in normal order with upstream ZIP
+testWatch4NonNativeZip() {
+ WATCHVER=4
+ COMPRESSION='zip'
+ WATCHLINE='opts=pgpsigurlmangle=s/$/.asc/ @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatchZip siteNonNativeZip
+}
+
+# test non-native package with uupdate, bare FTP server in normal order with repack to xz
+testWatch4NonNativeXz() {
+ WATCHVER=4
+ GZREPACK='xz'
+ WATCHLINE='opts=pgpsigurlmangle=s/$/.asc/,compression=xz,repack @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative
+}
+
+# test non-native package with uupdate, bare FTP server in normal order with ungzsig
+testWatch4NonNativeUngzsig() {
+ WATCHVER=4
+ WATCHLINE='opts=pgpsigurlmangle=s/.gz$/.asc/,decompress @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative
+}
+
+. shunit2
diff --git a/test/test_uscan_git b/test/test_uscan_git
new file mode 100755
index 0000000..61b5c81
--- /dev/null
+++ b/test/test_uscan_git
@@ -0,0 +1,207 @@
+#!/bin/bash
+
+# Copyright (C) 2018, Xavier <yadd@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+#set -x
+
+TESTTYPE=Git
+. ./lib_test_uscan
+
+COMMAND="chronic_sh uscan --no-conf --compression=xz --dehs"
+
+# prevent the local from messing with this test
+export GIT_CONFIG_NOGLOBAL=1
+export HOME=""
+export XDG_CONFIG_HOME=""
+
+# comment out for debug
+#COMMAND="$COMMAND --verbose"
+#COMMAND="$COMMAND --debug"
+
+cleanup(){
+ rm -rf "$TEMP_PKG_DIR"
+}
+
+spawnGitRepo(){
+ mkdir -p "$TEMP_PKG_DIR/repo"
+ (cd "$TEMP_PKG_DIR/repo" || exit 1
+ chronic_sh git init
+ git config user.name "Joe Developer"
+ git config user.email "none@debian.org"
+ touch changelog file.c extra.c
+ echo 'extra.c export-ignore' >.gitattributes
+ chronic_sh git add changelog file.c extra.c .gitattributes
+ chronic_sh git commit -a -m 'Init'
+ for version in 1.0 2.0; do
+ echo "# Version $version" >> file.c
+ cat >> changelog <<END
+Version $version
+
+END
+ chronic_sh git commit -a -m "Releasing $version"
+ chronic_sh git tag -s -u 72543FAF -m "Version $version" "v$version"
+ done)
+}
+
+trap cleanup EXIT
+
+containsName(){
+ echo "$1" | grep -F -q "$2"
+ echo $?
+}
+
+# shellcheck source=shunit2-helper-functions.sh
+. "${0%/*}/shunit2-helper-functions.sh"
+
+PKG=foo
+
+makeDebianDir() {
+ WATCHARGS=$1
+ TEMP_PKG_DIR=$(mktemp -d --tmpdir="$SHUNIT_TMPDIR" uscan_git.XXXXXX)
+ if [ -z "$TEMP_PKG_DIR" ]; then
+ echo "Failed to create temporary directory" >&2
+ exit 1
+ fi
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian/upstream
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian/source
+ spawnGitRepo
+
+ cat <<END > "$TEMP_PKG_DIR/$PKG/debian/watch"
+version=4
+opts="mode=git,gitmode=shallow,$WATCHARGS" \
+file:///$TEMP_PKG_DIR/repo refs/tags/v([\\d\\.]+) debian
+END
+
+ cat <<END > "$TEMP_PKG_DIR/$PKG/debian/changelog"
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+ echo '3.0 (quilt)' > "$TEMP_PKG_DIR/$PKG/debian/source/format"
+ cp -f "$test_dir/uscan/PUBLIC_KEY.asc" "$TEMP_PKG_DIR/$PKG/debian/upstream/signing-key.asc"
+}
+
+makeDebianDirWithUpstream() {
+ WATCHARGS=$1
+ makeDebianDir "$WATCHARGS"
+ cd "$TEMP_PKG_DIR/$PKG" || exit 1
+ chronic_sh git init
+ chronic_sh git remote add upstream "file:///$TEMP_PKG_DIR/repo"
+ chronic_sh git fetch upstream
+ cd - > /dev/null || exit 1
+}
+
+makeDebianDirHead() {
+ WATCHARGS=$1
+ makeDebianDir "$WATCHARGS"
+ cat <<END > "$TEMP_PKG_DIR/$PKG/debian/watch"
+version=4
+opts="mode=git,pretty=0.0+git%cd.%h" \
+file:///$TEMP_PKG_DIR/repo HEAD
+END
+}
+
+helperLaunch() {
+ WATCHARGS=$1
+ ARG="${2:-}"
+ CMD_ARG="${3:-}"
+ if test "$ARG" = "upstream"; then
+ makeDebianDirWithUpstream "$WATCHARGS"
+ elif test "$ARG" = "HEAD"; then
+ makeDebianDirHead "$WATCHARGS"
+ else
+ makeDebianDir "$WATCHARGS"
+ fi
+ ( cd "$TEMP_PKG_DIR/$PKG" || exit 1 ; $COMMAND $CMD_ARG --watchfile=debian/watch )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+}
+
+testGit() {
+ helperLaunch "pgpmode=none"
+ TARBALL=${PKG}_2.0.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$TEMP_PKG_DIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$TEMP_PKG_DIR/$TARBALL' ]"
+ cleanup
+}
+
+testGitHead() {
+ helperLaunch "pgpmode=none" HEAD
+ ORIG=$(find "$TEMP_PKG_DIR" | perl -ne 'print if/\/foo.*\.orig\.tar\.xz$/')
+ UPSTREAM=$(find "$TEMP_PKG_DIR" | perl -ne 'print if/\/foo.*(?<!orig)\.tar\.xz$/')
+ assertTrue 'downloaded tarfile not present' "[ -f '$UPSTREAM' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$ORIG' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$ORIG' ]"
+ cleanup
+}
+
+testGitSignedTag() {
+ helperLaunch "pgpmode=gittag"
+ TARBALL=${PKG}_2.0.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$TEMP_PKG_DIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$TEMP_PKG_DIR/$TARBALL' ]"
+ cleanup
+}
+
+testGitUpstream() {
+ helperLaunch "pgpmode=none" upstream
+ TARBALL=${PKG}_2.0.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$TEMP_PKG_DIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$TEMP_PKG_DIR/$TARBALL' ]"
+ cleanup
+}
+
+testGitUpstreamSignedTag() {
+ helperLaunch "pgpmode=gittag" upstream
+ TARBALL=${PKG}_2.0.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$TEMP_PKG_DIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$TEMP_PKG_DIR/$TARBALL' ]"
+ cleanup
+}
+
+testGitIgnoreExclusions() {
+ helperLaunch "gitexport=all"
+ assertTrue 'downloaded tarfile is incomplete' \
+ "tar tf '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' '${PKG}-2.0/extra.c'"
+ cleanup
+}
+
+testGitUpstreamIgnoreExclusions() {
+ helperLaunch "gitexport=all" upstream
+ assertTrue 'downloaded tarfile is incomplete' \
+ "tar tf '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' '${PKG}-2.0/extra.c'"
+ cleanup
+}
+
+testGitSignedTagWithDestDir() {
+ DESTDIR=$TEMP_PKG_DIR/destdir
+ mkdir -p $DESTDIR
+ helperLaunch "pgpmode=gittag" "" "--destdir $TEMP_PKG_DIR/destdir"
+ TARBALL=${PKG}_2.0.orig.tar.xz
+ assertTrue 'downloaded tarfile not present' "[ -f '$DESTDIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$DESTDIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$DESTDIR/$TARBALL' ]"
+ cleanup
+}
+
+# shellcheck disable=SC1091
+. shunit2
diff --git a/test/test_uscan_group b/test/test_uscan_group
new file mode 100755
index 0000000..c5e7ef9
--- /dev/null
+++ b/test/test_uscan_group
@@ -0,0 +1,210 @@
+#!/bin/bash
+
+# Copyright (C) 2020, Xavier Guimard <yadd@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+
+TESTTYPE=base
+test_dir=$(readlink -f "${0%/*}")
+. "$test_dir/lib_test_uscan"
+
+SUFFIX="1"
+if command -v dpkg-vendor >/dev/null; then
+ VENDER="$(dpkg-vendor --query Vendor 2>/dev/null|tr 'A-Z' 'a-z')"
+ case "$VENDER" in
+ debian) SUFFIX="1" ;;
+ *) SUFFIX="0${VENDER}1" ;;
+ esac
+fi
+
+if test "${1:-}" = --installed; then
+ COMMAND="uscan --no-conf --compression=gz"
+ shift
+else
+ top_srcdir=$(readlink -f "${0%/*}/..")
+ make -C "$top_srcdir/scripts" uscan mk-origtargz uupdate debchange
+ PATH="$top_srcdir/scripts:$PATH"
+ export PATH
+ PERL5LIB="$top_srcdir/lib"
+ export PERL5LIB
+ COMMAND="uscan --no-conf --compression=xz"
+fi
+
+COMMANDDEHS="$COMMAND --dehs"
+
+# comment out for debug
+#COMMAND="$COMMAND --debug"
+
+tearDown(){
+ killHttpServer
+ echo
+}
+
+trap tearDown EXIT
+
+containsName(){
+ echo "$1" | grep -qF "$2"
+ echo $?
+}
+
+makeRepo() {
+ lv="$1"
+ cmpopt1="$2"
+ lv1="$3"
+ cmpopt2="$4"
+ lv2="$5"
+ cmpopt3="$6"
+ lv3="$7"
+ cmpopt4="$8"
+ lv4="$9"
+ prev="${10}"
+ PKG=foo
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR")
+
+ mkdir -p "$TEMP_PKG_DIR"/$PKG/debian/source
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/repo/port)
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/watch
+version=4
+http://localhost:$PORT/ .*$PKG-([\d\.]+).tar.gz $lv
+
+opts="dversionmangle=auto,component=bar1$cmpopt1" http://localhost:$PORT/ .*bar1-([\d\.]+).tar.gz $lv1
+opts="dversionmangle=auto,component=bar2$cmpopt2" http://localhost:$PORT/ .*bar2-([\d\.]+).tar.gz $lv2
+opts="dversionmangle=auto,component=bar3$cmpopt3" http://localhost:$PORT/ .*bar3-([\d\.]+).tar.gz $lv3
+opts="dversionmangle=auto,component=bar4$cmpopt4" http://localhost:$PORT/ .*bar4-([\d\.]+).tar.gz $lv4
+END
+
+ cat <<END > "$TEMP_PKG_DIR"/$PKG/debian/changelog
+$PKG ($prev) unstable; urgency=medium
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+
+ echo -n '3.0 (quilt)' > "$TEMP_PKG_DIR"/$PKG/debian/source/format
+ mkdir -p "$TEMP_PKG_DIR"/repo/foo
+ touch "$TEMP_PKG_DIR"/repo/foo/content
+
+ # Upstream repo
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ tar -czf $PKG-1.0.0.tar.gz $PKG/* )
+
+ for i in 1 2 3 4; do
+ # Upstream repo
+ mkdir -p "$TEMP_PKG_DIR"/repo/bar$i
+ touch "$TEMP_PKG_DIR"/repo/bar$i/content
+ ( cd "$TEMP_PKG_DIR"/repo ;
+ tar -czf bar$i-2.0.$i.tar.gz bar$i/* )
+ # Debian dir
+ mkdir $TEMP_PKG_DIR/$PKG/bar$i
+ echo '{"name":"bar'$i'","version":"'1.0.$i'"}' > $TEMP_PKG_DIR/$PKG/bar$i/package.json
+ done
+}
+
+helperDownload() {
+ next="${11}"
+ makeRepo "$@"
+
+ OUTPUT=$( cd "$TEMP_PKG_DIR"/$PKG ; $COMMANDDEHS --dehs )
+ BASETARBALL=${PKG}_$next.orig
+ assertTrue 'pristine tarball foo is not created' "[ -f "$TEMP_PKG_DIR"/$BASETARBALL.tar.gz ]"
+ assertTrue "malformed target in dehs output: $OUTPUT" \
+ $(containsName "$OUTPUT" "<target>$BASETARBALL.tar.gz</target>")
+ for i in 1 2 3 4; do
+ assertTrue "pristine tarball bar$i is not created" "[ -f "$TEMP_PKG_DIR"/$BASETARBALL-bar$i.tar.gz ]"
+ assertTrue "malformed target in dehs output: $OUTPUT" \
+ $(containsName "$OUTPUT" "<component-target>$BASETARBALL-bar$i.tar.gz</component-target>")
+ done
+ #cat "$TEMP_PKG_DIR"/$PKG/debian/watch
+}
+
+testCmpIgnore() {
+ helperDownload "debian" "" "ignore" "" "ignore" "" "ignore" "" "ignore" "0.0.1" "1.0.0"
+}
+
+testCmpGroup() {
+ helperDownload "group" "" "group" "" "group" "" "group" "" "group" "0.0.1+~1" "1.0.0+~2.0.1+~2.0.2+~2.0.3+~2.0.4"
+}
+
+testCmpGroupOneCmpChanged() {
+ helperDownload "group" "" "group" "" "group" "" "group" "" "group" "1.0.0+~2.0.1+~2.0.2+~2.0.2+~2.0.4" "1.0.0+~2.0.1+~2.0.2+~2.0.3+~2.0.4"
+}
+
+testCmpPartialGroup() {
+ helperDownload "group" "" "group" "" "group" "" "ignore" "" "ignore" "0.0.1+~1" "1.0.0+~2.0.1+~2.0.2"
+}
+
+testCmpPartialGroup2() {
+ helperDownload "group" "" "group" "" "ignore" "" "group" "" "ignore" "0.0.1+~1" "1.0.0+~2.0.1+~2.0.3"
+}
+
+testCmpChecksum() {
+ helperDownload "group" "" "checksum" "" "checksum" "" "checksum" "" "checksum" "0.0.1+~1" "1.0.0+~cs8.0.10"
+}
+
+testCmpChecksumOneCmpChanged() {
+ helperDownload "group" "" "checksum" "" "checksum" "" "checksum" "" "checksum" "1.0.0+~cs8.0.9" "1.0.0+~cs8.0.10"
+}
+
+testCmpGroupAndChecksum() {
+ helperDownload "group" "" "group" "" "checksum" "" "checksum" "" "checksum" "0.0.1+~1" "1.0.0+~2.0.1+~cs6.0.9"
+}
+
+testCmpGroupIgnoreAndChecksum() {
+ helperDownload "group" "" "group" "" "ignore" "" "checksum" "" "checksum" "0.0.1+~1" "1.0.0+~2.0.1+~cs4.0.7"
+}
+
+helperNoDownload() {
+ next="${10}"
+ makeRepo "$@"
+
+ OUTPUT=$( cd "$TEMP_PKG_DIR"/$PKG ; $COMMANDDEHS --dehs 2>&1 )
+ assertTrue "bad change detected: $OUTPUT" \
+ $(containsName "$OUTPUT" "<status>up to date</status>")
+ BASETARBALL=${PKG}_$next.orig
+ assertTrue 'pristine tarball foo is created' "[ ! -f "$TEMP_PKG_DIR"/$BASETARBALL.tar.gz ]"
+}
+
+testCmpIgnoreND() {
+ helperNoDownload "debian" "" "ignore" "" "ignore" "" "ignore" "" "ignore" "1.0.0"
+}
+
+testCmpGroupND() {
+ helperNoDownload "group" "" "group" "" "group" "" "group" "" "group" "1.0.0+~2.0.1+~2.0.2+~2.0.3+~2.0.4"
+}
+
+testCmpGroupRepackND() {
+ helperNoDownload "group" "" "group" "" "group" "" "group" "" "group" "1.0.0+~2.0.1~ds+~2.0.2+~2.0.3+~2.0.4"
+}
+
+testCmpChecksumND() {
+ helperNoDownload "group" "" "checksum" "" "checksum" "" "checksum" "" "checksum" "1.0.0+~cs8.0.10"
+}
+
+# Same test but here Ctype detects change even if previous checksum is wrong
+testCmpChecksumCtype() {
+ helperDownload "group" ",ctype=nodejs" "checksum" ",ctype=nodejs" "checksum" ",ctype=nodejs" "checksum" ",ctype=nodejs" "checksum" "1.0.0+~cs8.0.10" "1.0.0+~cs8.0.10"
+}
+
+testCmpIgnoreCtype() {
+ helperNoDownload "debian" ",ctype=nodejs" "ignore" "" "ignore" "" "ignore" "" "ignore" "1.0.0"
+ assertTrue "Component change is not detected: $OUTPUT" \
+ $(containsName "$OUTPUT" "Newest version of bar1 on remote site is 2.0.1, local version is 1.0.1")
+}
+
+. shunit2
diff --git a/test/test_uscan_mangle b/test/test_uscan_mangle
new file mode 100755
index 0000000..409e16e
--- /dev/null
+++ b/test/test_uscan_mangle
@@ -0,0 +1,1543 @@
+#!/bin/bash
+
+# Copyright (C) 2013, Rafael Laboissiere <rafael@laboissiere.net>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+
+TESTTYPE=Mangle
+. ./lib_test_uscan
+
+COMMAND="uscan --no-conf"
+
+# set safe defaults
+WEBSCRIPT=":"
+DEBUGECHO=":"
+DEBUGLSLR=":"
+DEBUGBASH=":"
+# comment out for debug
+#COMMAND="$COMMAND --debug"
+#COMMAND="$COMMAND --verbose"
+#DEBUGECHO=echo
+#DEBUGLSLR="ls -laR"
+#DEBUGLSLR="ls -la"
+#DEBUGBASH="bash -i"
+
+# Initial Debian revision value is distribution dependent
+SUFFIX="1"
+if command -v dpkg-vendor >/dev/null; then
+ VENDER="$(dpkg-vendor --query Vendor 2>/dev/null|tr 'A-Z' 'a-z')"
+ case "$VENDER" in
+ debian) SUFFIX="1" ;;
+ *) SUFFIX="0${VENDER}1" ;;
+ esac
+fi
+
+tearDown(){
+ killHttpServer
+ echo
+}
+
+trap tearDown EXIT
+
+containsName(){
+ echo "$1" | grep -qF "$2"
+ echo $?
+}
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+# The following tests do the following: (1) create a minimal Debian package
+# directory, containing minimal files debian/{changelog,watch,copyright},
+# (2) create a minimal repository, containing a tarball (built on the fly),
+# (3) start an HTTP server that works offline, using the SimpleHTTPServer
+# module of Python, and (4) run uscan inside that minimal universe.
+
+# make debian/ in `pwd`
+# debian/watch contains $WATCHVER and $WATCHLINE with template URL updated
+makeDebianDir() {
+ DEBNAME=${1:-foo} # Debian source package name
+ DEBVER=${2:-1.0} # Debian source package version
+ mkdir -p debian/source
+
+ cat <<END > debian/rules
+%:
+ dh $@
+END
+chmod 755 debian/rules
+
+ cat <<END > debian/changelog
+$DEBNAME ($DEBVER) unstable; urgency=low
+
+ * Release of the $DEBNAME package $DEBVER.
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+ # debian/source/format
+ case $DEBVER in
+ *-*) # non-native package
+ echo "3.0 (quilt)" > debian/source/format
+ ;;
+ *) # native package
+ echo "3.0 (native)" > debian/source/format
+ ;;
+ esac
+ # debian/copyright
+ echo "Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/" \
+ > debian/copyright
+ if [ "${FILEEXCLUDE:-0}" = "1" ]; then
+ # exclude just for main
+ cat <<'END' >> debian/copyright
+Files-Excluded: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+END
+ elif [ "${FILEEXCLUDE:-0}" = "2" ]; then
+ # exclude for main(=foo) bar baz
+ cat <<'END' >> debian/copyright
+Files-Excluded: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+Files-Excluded-bar: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+Files-Excluded-baz: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+END
+ elif [ "${FILEEXCLUDE:-0}" = "3" ]; then
+ # exclude for foo bar baz
+ cat <<'END' >> debian/copyright
+Files-Excluded-foo: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+Files-Excluded-bar: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+Files-Excluded-baz: exclude-this
+ */exclude-dir
+ .*
+ */js/jquery.js
+ ;?echo?baz;?#
+END
+ fi
+ # debian/watch
+ echo "version=$WATCHVER" > debian/watch
+ echo "$WATCHLINE" | sed -e "s,@@@url@@@,http://localhost:${PORT}/,g" - \
+ >> debian/watch
+ # debian/upstream/signing-key.asc
+ mkdir -p debian/upstream
+ if [ "$KEYMODE" = "ASC" ]; then
+ cp -f $test_dir/uscan/PUBLIC_KEY.asc debian/upstream/signing-key.asc
+ else
+ cp -f "$GPGHOME/pubring.gpg" debian/upstream/signing-key.pgp
+ fi
+}
+
+
+# make tarball in $REPOPATH/$POOLPATH
+makeUpstreamTar() {
+ UPNAME=${1:-foo} # Upstream package name
+ UPVER=${2:-1.0} # upstream package version
+ COMPRESSION=${3:-gz} # archve compression type
+ TYPE=${4:-non-native} # set this if native-type upstream
+ OLDDIR=`pwd`
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/$POOLPATH/$UPNAME-$UPVER
+ cd "$TEMP_PKG_DIR"/$REPOPATH/$POOLPATH
+ touch $UPNAME-$UPVER/FILE.$UPNAME.$UPVER
+ touch $UPNAME-$UPVER/include-this
+ touch $UPNAME-$UPVER/exclude-this
+ touch $UPNAME-$UPVER/.hidden
+ mkdir -p "$UPNAME-$UPVER/; echo baz; #/"
+ mkdir -p $UPNAME-$UPVER/exclude-dir
+ touch $UPNAME-$UPVER/exclude-dir/file
+ mkdir -p $UPNAME-$UPVER/subdir/exclude-dir
+ touch $UPNAME-$UPVER/subdir/exclude-dir/file2
+ mkdir -p $UPNAME-$UPVER/docs/html/js/
+ touch $UPNAME-$UPVER/docs/html/js/jquery.js
+ if [ "$TYPE" = "native" ]; then
+ cd "$TEMP_PKG_DIR"/$REPOPATH/$POOLPATH/$UPNAME-$UPVER
+ makeDebianDir $UPNAME $UPVER
+ cd "$TEMP_PKG_DIR"/$REPOPATH/$POOLPATH
+ fi
+ case $COMPRESSION in
+ gz|gzip)
+ NEWTAR=$UPNAME-$UPVER.tar.gz
+ tar -czf $NEWTAR $UPNAME-$UPVER
+ ;;
+ bz2|bzip2)
+ NEWTAR=$UPNAME-$UPVER.tar.bz2
+ tar --bzip2 -cf $NEWTAR $UPNAME-$UPVER
+ ;;
+ xz)
+ NEWTAR= $UPNAME-$UPVER.tar.xz
+ tar --xz -cf $NEWTAR $UPNAME-$UPVER
+ ;;
+ zip)
+ NEWTAR=$UPNAME-$UPVER.zip
+ zip -r $NEWTAR $UPNAME-$UPVER
+ ;;
+ *) echo "Wrong compression mode: $COMPRESSION"
+ exit 1
+ ;;
+ esac
+ case "${SIGMODE:-}" in # undefined SIGMODE → no sig
+ ASC) # make $NEWTAR.asc
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+ --armor --detach-sign $NEWTAR
+ ;;
+ BIN) #make $NEWTAR.sig
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+ --detach-sign $NEWTAR
+ ;;
+ SELF) #make $NEWTAR.gpg
+ $GPG --homedir "$GPGHOME" --no-options -q --batch --no-default-keyring \
+ --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+ --sign $NEWTAR
+ esac
+
+ cd $OLDDIR
+}
+
+# setup a common watch file test environment
+helperWatch() {
+ local SITESCRIPT=${1:-siteWebNonNative}
+ local VEROLD=${2:-1.0}
+ local VERNEW=${3:-2.0}
+ local PREFIX="${4:-}"
+ TEMP_PKG_DIR=${TEMP_PKG_DIR:-$(mktemp -d -p "$SHUNIT_TMPDIR" uscan_mangle.XXXXXX)}
+ ORIGDIR=`pwd`
+ PKG=${PKG:-foo}
+ REPOPATH=${REPOPATH:-repo}
+ POOLPATH=${POOLPATH:-pool}
+ MGZREPACK=${MGZREPACK:-gz}
+ XCOMMAND=${XCOMMAND:-$COMMAND}
+ WATCHVER="${WATCHVER:-3}"
+ WATCHLINE0="@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate"
+ WATCHLINE="${WATCHLINE:-$WATCHLINE0}"
+ COMPONENTS=${COMPONENTS:-}
+ FILEEXCLUDE=${FILEEXCLUDE:-0} # no exclude
+ FILENAMEMANGLE=${FILENAMEMANGLE:-}
+ SIGMODE=${SIGMODE:-ASC} # ASC=ASCII or BIN=BINARY or SELF
+ KEYMODE=${KEYMODE:-ASC} # ASC=ASCII AEMORED or BIN=DEARMORED BINARY
+ cd "$TEMP_PKG_DIR"
+ # start HTTP server with its root at "$TEMP_PKG_DIR"/$REPOPATH
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/$REPOPATH/port)
+ $DEBUGECHO " ***** http://localhost:$PORT started showing "$TEMP_PKG_DIR"/$REPOPATH *****"
+ # make web site
+ $SITESCRIPT
+ # make local $VEROLD source tree
+ tar -xzf "$TEMP_PKG_DIR"/$REPOPATH/$POOLPATH/${PKG}-${VEROLD}.tar.gz
+ if [ -n "$PREFIX" ]; then
+ mv "$TEMP_PKG_DIR"/${PKG}-${VEROLD} "$TEMP_PKG_DIR"/${PKG}-${PREFIX}${VEROLD}
+ fi
+ mv "$TEMP_PKG_DIR"/${PKG}-${PREFIX}${VEROLD} "$TEMP_PKG_DIR"/${PKG}
+ cd "$TEMP_PKG_DIR"/${PKG}
+ if [ ! -d debian ]; then
+ makeDebianDir $PKG ${PREFIX}${VEROLD}-$SUFFIX
+ fi
+ local UUPDATE=""
+ if grep -q "uupdate" "$TEMP_PKG_DIR"/${PKG}/debian/watch ; then
+ UUPDATE=uupdate
+ fi
+ local PGP=""
+ if grep -q "pgpurlmangle" "$TEMP_PKG_DIR"/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ if grep -q "pgpmode *= *auto" "$TEMP_PKG_DIR"/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ if grep -q "pgpmode *= *previous" "$TEMP_PKG_DIR"/${PKG}/debian/watch ; then
+ PGP=pgp
+ fi
+ $XCOMMAND
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "$?" "0"
+ cd "$TEMP_PKG_DIR"
+ $DEBUGLSLR
+ UTARBALL=${PKG}-${UVERSION:-${VERNEW}}.tar.gz
+ if [[ "$FILENAMEMANGLE" != *"$PKG"* ]]; then
+ UTARBALL=${PKG}-${UVERSION:-${VERNEW}}.tar.gz
+ else
+ UTARBALL=${PKG}-${UVERSION:-${VERNEW}}-filenamemangle.tar.gz
+ fi
+ STARBALL=${PKG}_${PREFIX}${VERNEW}.orig.tar.$MGZREPACK
+ if [ ! -f $STARBALL ]; then
+ # testWatch4WebNonNativeMUT0() only repacks its component tarballs. It does
+ # not repack the main upstream tarball, which is the usual behaviour when
+ # excluding files from the upstream source. This means we need to find the
+ # upstream tarball.
+ STARBALL=${PKG}_${PREFIX}${VERNEW}.orig.tar.gz
+ fi
+ assertTrue "$UTARBALL missing: $WATCHLINE" "[ -f $UTARBALL ]"
+ assertTrue "$STARBALL missing: $WATCHLINE" "[ -f $STARBALL ]"
+ if [ "$PGP" = "pgp" ]; then
+ UTARSIG=${PKG}-${UVERSION:-${VERNEW}}.tar.gz.sig
+ if [ ! -f $UTARSIG ]; then
+ UTARSIG=${PKG}-${UVERSION:-${VERNEW}}.tar.gz.asc
+ fi
+ STARSIG=${PKG}_${PREFIX}${VERNEW}.orig.tar.$MGZREPACK.asc
+ assertTrue "$UTARSIG and *.sig missing: $WATCHLINE" "[ -f $UTARSIG ]"
+ assertTrue "$STARSIG missing: $WATCHLINE" "[ -f $STARSIG ]"
+ fi
+ for cpnt in $COMPONENTS; do
+ if [[ "$FILENAMEMANGLE" != *"$cpnt"* ]]; then
+ UTARBALL=${cpnt}-${CMPVERSION:-${VERNEW}}.tar.gz
+ else
+ UTARBALL=${PKG}-${cpnt}-${CMPVERSION:-${VERNEW}}.tar.gz
+ fi
+ STARBALL=${PKG}_${PREFIX}${VERNEW}.orig-${cpnt}.tar.$MGZREPACK
+ assertTrue "$UTARBALL missing: $WATCHLINE" "[ -f $UTARBALL ]"
+ assertTrue "$STARBALL missing: $WATCHLINE" "[ -f $STARBALL ]"
+ if [ "$PGP" = "pgp" ]; then
+ UTARSIG=${cpnt}-${CMPVERSION:-${VERNEW}}.tar.gz.sig
+ if [ ! -f $UTARSIG ]; then
+ UTARSIG=${cpnt}-${CMPVERSION:-${VERNEW}}.tar.gz.asc
+ fi
+ STARSIG=${PKG}_${PREFIX}${VERNEW}.orig-${cpnt}.tar.$MGZREPACK.asc
+ assertTrue "$UTARSIG and *.sig missing: $WATCHLINE" "[ -f $UTARSIG ]"
+ # Skipping this: signature link skipped when upstream file is repacked
+ #assertTrue "$STARSIG missing: $WATCHLINE" "[ -f $STARSIG ]"
+ fi
+ done
+ # check uupdate
+ if [ "$UUPDATE" = "uupdate" ]; then
+ cd "$TEMP_PKG_DIR"/${PKG}-${PREFIX}${VERNEW}
+ assertTrue 'pristine tarball is not extracted' "[ -f debian/changelog ]"
+ DVERSION=`dpkg-parsechangelog -ldebian/changelog -SVersion`
+ assertEquals "uscan: Version should be ${PREFIX}${VERNEW}-$SUFFIX but $DVERSION" "$DVERSION" "${PREFIX}${VERNEW}-$SUFFIX"
+ if [ "$FILEEXCLUDE" != "3" ]; then
+ # main is dummy
+ assertTrue 'file that must be present is excluded in the tarball' '[ -f include-this ]'
+ fi
+ if [ "$FILEEXCLUDE" = "1" ] || [ "$FILEEXCLUDE" = "2" ]; then
+ assertFalse "file that must be excluded is present in the tarball" '[ -f exclude-this ]'
+ assertFalse "hidden file that must be excluded is present in the tarball" '[ -f .hidden ]'
+ assertFalse "dir that must be excluded is present in the tarball" '[ -d exclude-dir ]'
+ assertFalse "subdir that must be excluded is present in the tarball" '[ -d subdir/exclude-dir ]'
+ CONTENTS=$(ls -R)
+ assertFalse "non-root-file that must be excluded is present in the tarball" \
+ $(containsName "$CONTENTS" jquery.js)
+ assertFalse "path with whitespace that must be excluded is present in the tarball" \
+ $(containsName "$CONTENTS" "; echo baz; #/")
+ fi
+ for c in $COMPONENTS ; do
+ cd "$TEMP_PKG_DIR"/${PKG}-${PREFIX}${VERNEW}/$c
+ assertTrue 'file that must be present is excluded in the tarball' '[ -f include-this ]'
+ if [ "$FILEEXCLUDE" = "1" ] || [ "$FILEEXCLUDE" = "2" ]; then
+ assertFalse "file that must be excluded is present in the orig-$c.tar" '[ -f exclude-this ]'
+ assertFalse "hidden file that must be excluded is present in the orig-$c.tar" '[ -f .hidden ]'
+ assertFalse "dir that must be excluded is present in the orig-$c.tar" '[ -d exclude-dir ]'
+ assertFalse "subdir that must be excluded is present in the orig-$c.tar" '[ -d subdir/exclude-dir ]'
+ CONTENTS=$(ls -R)
+ assertFalse "non-root-file that must be excluded is present in the orig-$c.tar" \
+ $(containsName "$CONTENTS" jquery.js)
+ assertFalse "path with whitespace that must be excluded is present in the orig-$c.tar" \
+ $(containsName "$CONTENTS" "; echo baz; #/")
+ fi
+ done
+ cd "$TEMP_PKG_DIR"
+ fi
+ $DEBUGBASH
+ cd $ORIGDIR
+ unset REPOPATH
+ unset POOLPATH
+ unset MGZREPACK
+ unset XCOMMAND
+ unset WATCHVER
+ unset WATCHLINE
+ unset COMPONENTS
+ unset FILEEXCLUDE
+ unset FILENAMEMANGLE
+ unset SIGMODE
+ unset KEYMODE
+}
+
+# setup a common watch file test environment to see user-agent
+helperWatchUA() {
+ local SITESCRIPT=${1:-siteWebNonNative}
+ TEMP_PKG_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR" uscan_mangle.XXXXXX)
+ ORIGDIR=`pwd`
+ PKG=${PKG:-foo}
+ REPOPATH=${REPOPATH:-repo}
+ POOLPATH=${POOLPATH:-pool}
+ XCOMMAND=${XCOMMAND:-$COMMAND}
+ WATCHVER="${WATCHVER:-3}"
+ WATCHLINE0="@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate"
+ WATCHLINE="${WATCHLINE:-$WATCHLINE0}"
+ KEYMODE=${KEYMODE:-ASC} # ASC=ASCII AEMORED or BIN=DEARMORED BINARY
+ cd "$TEMP_PKG_DIR"
+ # start HTTP server with its root at "$TEMP_PKG_DIR"/$REPOPATH
+ spawnHttpServer
+ PORT=$(cat "$TEMP_PKG_DIR"/$REPOPATH/port)
+ $DEBUGECHO " ***** http://localhost:$PORT started showing "$TEMP_PKG_DIR"/$REPOPATH *****"
+ # make web site
+ $SITESCRIPT
+ # make local $VEROLD source tree
+ mkdir -p "$TEMP_PKG_DIR"/${PKG}
+ cd "$TEMP_PKG_DIR"/${PKG}
+ if [ ! -d debian ]; then
+ makeDebianDir $PKG 1.0-$SUFFIX
+ fi
+ $XCOMMAND
+ USERAGENTX="$(grep -ie '^User-Agent:' ../repo/log |head -1 | perl -p -e "s/\r//g" )"
+ assertTrue "Bad $USERAGENTX" "[ \"$USERAGENTX\" = \"User-Agent: $USERAGENT\" ]"
+ echo "SENT: \"User-Agent: $USERAGENT\""
+ echo "GOT : \"$USERAGENTX\""
+ $DEBUGBASH
+ cd $ORIGDIR
+ unset REPOPATH
+ unset POOLPATH
+ unset XCOMMAND
+ unset WATCHVER
+ unset WATCHLINE
+ unset KEYMODE
+}
+
+# populate pool directory
+siteNative() {
+ local PKG=${1:-foo}
+ makeUpstreamTar $PKG 0.0 gz native
+ makeUpstreamTar $PKG 1.0 gz native
+ makeUpstreamTar $PKG 2.0 gz native
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz
+}
+
+siteNonNative() {
+ local PKG=${1:-foo}
+ local EXTRA=${2:-}
+ makeUpstreamTar $PKG 0.0 gz non-native
+ makeUpstreamTar $PKG 1.0 gz non-native
+ makeUpstreamTar $PKG 2.0 gz non-native
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/
+ if [ -n "$EXTRA" ]; then
+ makeUpstreamTar $PKG 3.0 gz non-native
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/3.0/$PKG/ooo/
+ fi
+ if [ "${SIGMODE:-}" = "ASC" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz.asc
+ if [ -n "$EXTRA" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz.asc
+ fi
+ elif [ "${SIGMODE:-}" = "BIN" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz.sig
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz.sig
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz.sig
+ if [ -n "$EXTRA" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz.sig
+ fi
+ elif [ "${SIGMODE:-}" = "SELF" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-0.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/0.0/$PKG/ooo/${PKG}-0.0.tar.gz.gpg
+ ln -sf ../../../$POOLPATH/${PKG}-1.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/1.0/$PKG/ooo/${PKG}-1.0.tar.gz.gpg
+ ln -sf ../../../$POOLPATH/${PKG}-2.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/2.0/$PKG/ooo/${PKG}-2.0.tar.gz.gpg
+ if [ -n "$EXTRA" ]; then
+ ln -sf ../../../$POOLPATH/${PKG}-3.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/3.0/$PKG/ooo/${PKG}-3.0.tar.gz.gpg
+ fi
+ fi
+}
+
+# hide siteNative behind a web page
+siteWebNative() {
+ siteNative
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/foo/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+</body>
+<html>
+END
+}
+
+siteWebNonNative() {
+ siteNonNative
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/foo/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+</body>
+<html>
+END
+}
+
+siteWebNonNativeRecWithBase() {
+ siteNonNative "$@"
+ for DIR in "$TEMP_PKG_DIR"/$REPOPATH/[0-9].*; do
+ [ -d "$DIR" ] && cat <<END > "$DIR"/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+<base href="/${DIR##*/}/foo/ooo/x.html"/>
+</head>
+<body>
+<a href="foo-${DIR##*/}.tar.gz">Blah</a> <br/ >
+</body>
+<html>
+END
+ done
+}
+
+siteWebNonNativeR() {
+ makeUpstreamTar foo 0.0 gz non-native
+ makeUpstreamTar foo 1.0 gz non-native
+ makeUpstreamTar foo 2.0 gz non-native
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/123/foo/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/124/foo/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/125/foo/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/325/foo/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/424/foo/ooo/
+ mkdir -p "$TEMP_PKG_DIR"/$REPOPATH/523/foo/ooo/
+ if [ "$SIGMODE" = "ASC" ]; then
+ ln -sf ../../../$POOLPATH/foo-0.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/125/foo/ooo/foo-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/foo-1.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/124/foo/ooo/foo-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/foo-2.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/123/foo/ooo/foo-2.0.tar.gz
+ ln -sf ../../../$POOLPATH/foo-0.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/325/foo/ooo/foo-0.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/foo-1.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/424/foo/ooo/foo-1.0.tar.gz.asc
+ ln -sf ../../../$POOLPATH/foo-2.0.tar.gz.asc "$TEMP_PKG_DIR"/$REPOPATH/523/foo/ooo/foo-2.0.tar.gz.asc
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/125/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/124/foo/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/123/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+<a href="/325/foo/ooo/foo-0.0.tar.gz.asc">Very old sig</a> <br/ >
+<a href="/424/foo/ooo/foo-1.0.tar.gz.asc">A bit OLD sig</a> <br />
+<a href="/523/foo/ooo/foo-2.0.tar.gz.asc">Latest sig</a> <br />
+</body>
+<html>
+END
+ elif [ "$SIGMODE" = "BIN" ]; then
+ ln -sf ../../../$POOLPATH/foo-0.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/125/foo/ooo/foo-0.0.tar.gz
+ ln -sf ../../../$POOLPATH/foo-1.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/124/foo/ooo/foo-1.0.tar.gz
+ ln -sf ../../../$POOLPATH/foo-2.0.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/123/foo/ooo/foo-2.0.tar.gz
+ ln -sf ../../../$POOLPATH/foo-0.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/325/foo/ooo/foo-0.0.tar.gz.sig
+ ln -sf ../../../$POOLPATH/foo-1.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/424/foo/ooo/foo-1.0.tar.gz.sig
+ ln -sf ../../../$POOLPATH/foo-2.0.tar.gz.sig "$TEMP_PKG_DIR"/$REPOPATH/523/foo/ooo/foo-2.0.tar.gz.sig
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/125/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/124/foo/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/123/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+<a href="/325/foo/ooo/foo-0.0.tar.gz.sig">Very old sig</a> <br/ >
+<a href="/424/foo/ooo/foo-1.0.tar.gz.sig">A bit OLD sig</a> <br />
+<a href="/523/foo/ooo/foo-2.0.tar.gz.sig">Latest sig</a> <br />
+</body>
+<html>
+END
+ elif [ "$SIGMODE" = "SELF" ]; then
+ ln -sf ../../../$POOLPATH/foo-0.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/325/foo/ooo/foo-0.0.tar.gz.gpg
+ ln -sf ../../../$POOLPATH/foo-1.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/424/foo/ooo/foo-1.0.tar.gz.gpg
+ ln -sf ../../../$POOLPATH/foo-2.0.tar.gz.gpg "$TEMP_PKG_DIR"/$REPOPATH/523/foo/ooo/foo-2.0.tar.gz.gpg
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/125/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/124/foo/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/123/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+<a href="/325/foo/ooo/foo-0.0.tar.gz.gpg">Very old sig</a> <br/ >
+<a href="/424/foo/ooo/foo-1.0.tar.gz.gpg">A bit OLD sig</a> <br />
+<a href="/523/foo/ooo/foo-2.0.tar.gz.gpg">Latest sig</a> <br />
+</body>
+<html>
+END
+ fi
+}
+
+sitePrWebNonNative() {
+ siteNonNative
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/boo/xxx/boo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/boo/xxx/boo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/boo/xxx/boo-2.0.tar.gz">Latest</a> <br />
+</body>
+<html>
+END
+}
+
+siteWebNonNativeLarge() {
+ makeUpstreamTar foo 19990101 gz non-native
+ makeUpstreamTar foo 20000101 gz non-native
+ makeUpstreamTar foo 20010101 gz non-native
+ mkdir -p $REPOPATH/0.0/foo/ooo/
+ mkdir -p $REPOPATH/1.0/foo/ooo/
+ mkdir -p $REPOPATH/2.0/foo/ooo/
+ ln -sf ../../../$POOLPATH/foo-19990101.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/0.0/foo/ooo/foo-19990101.tar.gz
+ ln -sf ../../../$POOLPATH/foo-20000101.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/1.0/foo/ooo/foo-20000101.tar.gz
+ ln -sf ../../../$POOLPATH/foo-20010101.tar.gz "$TEMP_PKG_DIR"/$REPOPATH/2.0/foo/ooo/foo-20010101.tar.gz
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/foo/ooo/foo-19990101.tar.gz">Very old</a> <br/ >
+<a href="/1.0/foo/ooo/foo-20000101.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/foo/ooo/foo-20010101.tar.gz">Latest</a> <br />
+</body>
+<html>
+END
+}
+
+siteXmlNonNative() {
+ siteNonNative
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<Key>/0.0/foo/ooo/foo-0.0.tar.gz</Key> <br/ >
+<Key>/1.0/foo/ooo/foo-1.0.tar.gz</Key> <br />
+<Key>/2.0/foo/ooo/foo-2.0.tar.gz</Key> <br />
+</body>
+<html>
+END
+}
+
+siteWebNonNativeMUT() {
+ siteNonNative foo
+ siteNonNative bar EXTRA
+ siteNonNative baz EXTRA
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/foo/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz.asc">Latest sig</a> <br />
+<a href="/0.0/bar/ooo/bar-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/bar/ooo/bar-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/bar/ooo/bar-2.0.tar.gz">Latest</a> <br />
+<a href="/3.0/bar/ooo/bar-3.0.tar.gz">OOPS Latest</a> <br />
+<a href="/3.0/bar/ooo/bar-3.0.tar.gz.asc">Latest sig</a> <br />
+<a href="/0.0/baz/ooo/baz-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/baz/ooo/baz-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/baz/ooo/baz-2.0.tar.gz">Latest</a> <br />
+<a href="/3.0/baz/ooo/baz-3.0.tar.gz">OOPS Latest</a> <br />
+<a href="/3.0/baz/ooo/baz-3.0.tar.gz.asc">Latest sig</a> <br />
+</body>
+<html>
+END
+}
+
+siteWebNonNativeMUT_filenamemangle() {
+ siteNonNative foo
+ siteNonNative bar EXTRA
+ siteNonNative baz EXTRA
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/foo/ooo/foo-1.0.tar.gz">A bit old</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz">Latest</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz.asc">Latest sig</a> <br />
+<a href="/0.0/bar/ooo/bar-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/bar/ooo/bar-1.0.tar.gz">A bit old</a> <br />
+<a href="/2.0/bar/ooo/bar-2.0.tar.gz">Latest</a> <br />
+<a href="/3.0/bar/ooo/bar-2.0.tar.gz.asc">Latest sig</a> <br />
+<a href="/0.0/baz/ooo/baz-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/baz/ooo/baz-1.0.tar.gz">A bit old</a> <br />
+<a href="/2.0/baz/ooo/baz-2.0.tar.gz">Latest</a> <br />
+<a href="/3.0/baz/ooo/baz-2.0.tar.gz.asc">Latest sig</a> <br />
+</body>
+<html>
+END
+}
+
+siteWebNonNativeGetOnlyHref() {
+ siteNonNative foo
+ cat <<END > "$TEMP_PKG_DIR"/$REPOPATH/index.html
+<html>
+<head>
+ <meta charset="utf-8">
+</head>
+<body>
+<a href="/0.0/foo/ooo/foo-0.0.tar.gz">Very old</a> <br/ >
+<a href="/1.0/bar/ooo/foo-1.0.tar.gz">A bit OLD</a> <br />
+<a href="/2.0/foo/ooo/foo-2.0.tar.gz" data-foobar-href="">Latest</a> <br />
+<aueu href="/2.0/foo/ooo/foo-3.0.tar.gz" data-foobar-href="">Nothing here</a> <br />
+</body>
+<html>
+END
+}
+
+# test a watch files
+
+### VERSION3 ###
+# version locking calls suffer changes due to uupdate calling differences
+
+# test --download-current-version
+testWatch3WebNonNativeDlCurrent() {
+ WATCHVER=3
+ XCOMMAND="$COMMAND --download-current-version"
+ WATCHLINE='@@@url@@@/ (?:.*)/foo-([\.\d]+).tar.gz debian uupdate'
+ helperWatch siteWebNonNative 1.0 1.0
+}
+
+# test --download-version
+testWatch3WebNonNativeDlUversion() {
+ WATCHVER=3
+ XCOMMAND="$COMMAND --download-version 0.0"
+ WATCHLINE='@@@url@@@/ (?:.*)/foo-([\.\d]+).tar.gz debian uupdate'
+ helperWatch siteWebNonNative 1.0 0.0
+}
+
+# test --download-debversion uupdate
+testWatch3WebNonNativeDlDversion() {
+ WATCHVER=3
+ XCOMMAND="$COMMAND --download-debversion 0.0-1"
+ WATCHLINE='@@@url@@@/ (?:.*)/foo-([\.\d]+).tar.gz debian uupdate'
+ helperWatch siteWebNonNative 1.0 0.0
+}
+
+### VERSION 4 ###
+# standard tests
+
+# test native package w/o uupdate, bare HTTP server in normal order
+testWatch4Native() {
+ WATCHVER=4
+ WATCHLINE='@@@url@@@/([\.\d]+)/(.+)/(.+)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian'
+ helperWatch siteNative
+}
+
+# test non-native package with uupdate, bare HTTP server in normal order
+testWatch4NonNative() {
+ WATCHVER=4
+ WATCHLINE='@@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative
+}
+
+# test non-native package with uupdate, bare HTTP server with dirversionmangle
+testWatch4NonNativeDMangle() {
+ WATCHVER=4
+ WATCHLINE='opts="dirversionmangle=s/^\d*[13579]\./0~$&/, uversionmangle=s/^\d*[13579]\./0~$&/" @@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch "siteNonNative foo EXTRA"
+}
+
+# ... and without dirversionmangle, should return version 3
+testWatch4NonNativeDMangleWithoutD() {
+ WATCHVER=4
+ WATCHLINE='@@@url@@@([\.\d]+)/(.+)/(.+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch "siteNonNative foo EXTRA" 1.0 3.0
+}
+
+# test non-native package with uupdate, bare HTTP server with dirversionmangle and base
+testWatch4NonNativeDMangleB() {
+ WATCHVER=4
+ WATCHLINE='opts="dirversionmangle=s/^\d*[13579]\./0~$&/, uversionmangle=s/^\d*[13579]\./0~$&/" @@@url@@@([\.\d]+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch "siteWebNonNativeRecWithBase foo EXTRA"
+}
+
+# ... and without dirversionmangle, should return version 3
+testWatch4NonNativeDMangleBWithoutD() {
+ WATCHVER=4
+ WATCHLINE='@@@url@@@([\.\d]+)/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch "siteWebNonNativeRecWithBase foo EXTRA" 1.0 3.0
+}
+
+# test 3 parameter watch line
+testWatch4WebNative() {
+ WATCHVER=4
+ WATCHLINE='@@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian'
+ helperWatch siteWebNative
+}
+
+# test normal web page
+testWatch4WebNonNative() {
+ WATCHVER=4
+ helperWatch
+}
+
+# test normal web page (Files-exclude)
+testWatch4WebNonNativeFE() {
+ MGZREPACK=xz
+ FILEEXCLUDE=1
+ WATCHVER=4
+ helperWatch
+}
+
+# test normal web page (file path reverse order)
+testWatch4WebNonNativeR() {
+ WATCHVER=4
+ helperWatch siteWebNonNativeR
+}
+
+# test for downloadurlmangle and filenamemangle for tricky web page
+testWatch4PrWebNonNative() {
+ WATCHVER=4
+ WATCHLINE='opts="downloadurlmangle = s%boo/xxx%@PACKAGE@/ooo% ; s%boo-%@PACKAGE@-%, \
+ filenamemangle = s%.*boo-(.*)%@PACKAGE@-$1% " \
+ @@@url@@@/ (?:.*)/boo@ANY_VERSION@@ARCHIVE_EXT@ \
+ debian uupdate'
+ helperWatch sitePrWebNonNative
+}
+
+# test --download-current-version
+testWatch4NonNativeDlCurrent() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-current-version"
+ WATCHLINE='@@@url@@@/([\d\.]+)/@PACKAGE@/ooo/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative 1.0 1.0
+}
+
+# test --download-version
+testWatch4NonNativeDlUversion() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-version 0.0"
+ WATCHLINE='@@@url@@@/([\d\.]+)/@PACKAGE@/ooo/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative 1.0 0.0
+}
+
+# test --download-debversion uupdate
+testWatch4NonNativeDlDversion() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-debversion 0.0-1"
+ WATCHLINE='@@@url@@@/([\d\.]+)/@PACKAGE@/ooo/ @PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteNonNative 1.0 0.0
+}
+
+# test --download-current-version
+testWatch4WebNonNativeDlCurrent() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-current-version"
+ WATCHLINE='@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteWebNonNative 1.0 1.0
+}
+
+# test --download-version
+testWatch4WebNonNativeDlUversion() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-version 0.0"
+ WATCHLINE='@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteWebNonNative 1.0 0.0
+}
+
+# test --download-debversion uupdate
+testWatch4WebNonNativeDlDversion() {
+ WATCHVER=4
+ XCOMMAND="$COMMAND --download-debversion 0.0-1"
+ WATCHLINE='@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteWebNonNative 1.0 0.0
+}
+
+# Debian version is 0.19990101 for future proof while upstream is 19990101
+testWatch4WebNonNativeLarge() {
+ WATCHVER=4
+ WATCHLINE='opts=" dversionmangle = s/0\.(.*)/$1/ , \
+ oversionmangle = s/(.*)/0.$1/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteWebNonNativeLarge 20000101 20010101 0.
+}
+
+# test for pagemangle
+testWatch4XmlNonNative() {
+ WATCHVER=4
+ WATCHLINE='opts="pagemangle = \
+ s%<Key>([^<]*)</Key>%<Key><a href=\"$1\">$1</a></Key>%g" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteXmlNonNative
+}
+
+# test user-agent string setting via opts=
+testWatch4WebNonNativeUA() {
+ WATCHVER=4
+ KEYMODE=BIN
+ USERAGENT="foo/bar; baz:12,3.45"
+ WATCHLINE='opts="useragent= '$USERAGENT' "'" \
+"'@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatchUA
+ unset USERAGENT
+}
+
+# test repack and compression
+testWatch4WebNonNativeBZ2() {
+ WATCHVER=4
+ WATCHLINE='opts=repack,compression=bz2 @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ MGZREPACK=bz2
+ helperWatch
+}
+
+# test repack and compression
+testWatch4WebNonNativeXZ() {
+ MGZREPACK=xz
+ WATCHVER=4
+ WATCHLINE='opts=repack,compression=xz @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test spaces everywhere
+testWatch4PrWebNonNativeXZ() {
+ MGZREPACK=xz
+ WATCHVER=4
+ WATCHLINE='opts = "downloadurlmangle = s%boo/xxx%@PACKAGE@/ooo% ; s%boo-%@PACKAGE@-%, \
+ filenamemangle = s%.*boo-(.*)%@PACKAGE@-$1% , \
+ repack , compression=xz" \
+ @@@url@@@/ (?:.*)/boo@ANY_VERSION@@ARCHIVE_EXT@ \
+ debian uupdate'
+ helperWatch sitePrWebNonNative
+}
+
+# test get strictly href from links and not something like foo-href. See #904578 and MR !25
+testWatchGetOnlyHref() {
+ WATCHVER=4
+ WATCHLINE='@@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch siteWebNonNativeGetOnlyHref 1.0 2.0
+}
+
+### VERSION 4 with sig check ###
+
+# test normal web page with sig(asc)
+testWatch4WebNonNativeSig() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpsigurlmangle = s%(.*)%$1.asc%" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(asc) with < and >
+testWatch4WebNonNativeSigAngleBraket() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpsigurlmangle = s<(.*)><$1.asc>" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(asc) with < and > with space
+testWatch4WebNonNativeSigAngleBraketSpace() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpsigurlmangle = s<(.*)> <$1.asc>" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(asc) with < and > with tab
+testWatch4WebNonNativeSigAngleBraketTab() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpsigurlmangle = s<(.*)> <$1.asc>" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(asc) with [ and ]
+testWatch4WebNonNativeSigSquareBraket() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpsigurlmangle = s[(.*)][$1.asc]" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(asc) with { and }
+testWatch4WebNonNativeSigCurlyBraket() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpsigurlmangle = s{(.*)}{$1.asc}" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(asc) - auto
+testWatch4WebNonNativeSigAuto() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpmode = auto" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig(bin) (Files-exclude)
+testWatch4WebNonNativeFESig() {
+ MGZREPACK=xz
+ FILEEXCLUDE=1
+ WATCHVER=4
+ SIGMODE=BIN
+ KEYMODE=BIN
+ WATCHLINE='opts = "pgpsigurlmangle = s%(.*)%$1.sig%" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ \
+ debian uupdate'
+ helperWatch
+}
+
+# test normal web page with sig (different file path for sig and tar; reverse order)
+testWatch4WebNonNativeRSig() {
+ WATCHVER=4
+ WATCHLINE='opts = "pgpmode=next" @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts = "pgpmode=previous" @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@.asc previous uupdate'
+ helperWatch siteWebNonNativeR
+}
+
+# test normal web page with sig (different file path for sig and tar; reverse order, BIN)
+testWatch4WebNonNativeRSigBIN() {
+ WATCHVER=4
+ SIGMODE=BIN
+ WATCHLINE='opts = "pgpmode=next" @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts = "pgpmode=previous" @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@.sig previous uupdate'
+ helperWatch siteWebNonNativeR
+}
+
+# test normal web page with sig (different file path for sig and tar; reverse order, BIN BIN)
+testWatch4WebNonNativeRSigBINiBIN() {
+ WATCHVER=4
+ SIGMODE=BIN
+ KEYMODE=BIN
+ WATCHLINE='opts = "pgpmode=next" @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts = "pgpmode=previous" @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@.sig previous uupdate'
+ helperWatch siteWebNonNativeR
+}
+
+# test normal web page with sig (self)
+testWatch4WebNonNativeSelfSig() {
+ WATCHVER=4
+ SIGMODE=SELF
+ WATCHLINE='opts = "pgpmode = self" \
+ @@@url@@@/ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@.gpg debian uupdate'
+ helperWatch siteWebNonNativeR
+}
+
+### VERSION 4 only ###
+
+# filenamemangle supports two patterns, each causing different behaviour.
+# * The first pattern replaces the existing URL with the new filename.
+# * The second pattern modifies the filename component, creating a new (and invalid) URL.
+
+# test normal web page (filenamemangle on main upstream tarball [pattern 1])
+testWatch4WebNonNative_filenamemangle1a() {
+ WATCHVER=4
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s#.+/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)#$1-filenamemangle$2#" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian'
+ helperWatch siteWebNonNative
+}
+
+# test normal web page (signature and filenamemangle on main upstream tarball [pattern 1])
+testWatch4WebNonNative_filenamemangle1b() {
+ WATCHVER=4
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s#.+/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)#$1-filenamemangle$2#, \
+ pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian'
+ helperWatch siteWebNonNative
+}
+
+# test normal web page (filenamemangle on main upstream tarball [pattern 2])
+testWatch4WebNonNative_filenamemangle1c() {
+ WATCHVER=4
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s/(\d\S+)(@ARCHIVE_EXT@)/$1-filenamemangle$2/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian'
+ helperWatch siteWebNonNative
+}
+
+# test normal web page (signature and filenamemangle on main upstream tarball [pattern 2])
+testWatch4WebNonNative_filenamemangle1d() {
+ WATCHVER=4
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s/(\d\S+)(@ARCHIVE_EXT@)/$1-filenamemangle$2/, \
+ pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian'
+ helperWatch siteWebNonNative
+}
+
+# test normal web page (MUT)
+testWatch4WebNonNativeMUT() {
+ MGZREPACK=xz
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ SIGMODE=BIN
+ FILEEXCLUDE=2
+ WATCHLINE='
+opts=" pgpsigurlmangle=s/$/.sig/" @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar,pgpsigurlmangle=s/$/.sig/" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz,pgpsigurlmangle=s/$/.sig/" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same uupdate'
+ helperWatch siteWebNonNativeMUT
+}
+
+# test normal web page (MUT, filenamemangle on main upstream tarball [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle1a() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s#.+/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)#$1-filenamemangle$2#" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signature and filenamemangle on main upstream tarball [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle1b() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s#.+/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)#$1-filenamemangle$2#, \
+ pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on main upstream tarball [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle1c() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)/$1-filenamemangle$2/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signature and filenamemangle on main upstream tarball [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle1d() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=foo
+ WATCHLINE='
+opts="filenamemangle=s/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)/$1-filenamemangle$2/, \
+ pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on first component tarball [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle2a() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=bar
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s#.+/(bar-)#@PACKAGE@-$1#" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signature and filenamemangle on first component tarball [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle2b() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=bar
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s#.+/(bar-)#@PACKAGE@-$1#, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on first component tarball [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle2c() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=bar
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s/(bar-)/@PACKAGE@-$1/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signature and filenamemangle on first component tarball [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle2d() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=bar
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s/(bar-)/@PACKAGE@-$1/, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on second component tarball [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle3a() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=baz
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s#.+/(baz-)#@PACKAGE@-$1#" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signature and filenamemangle on second component tarball [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle3b() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=baz
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s#.+/(baz-)#@PACKAGE@-$1#, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on second component tarball [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle3c() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=baz
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s/(baz-)/@PACKAGE@-$1/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signature and filenamemangle on second component tarball [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle3d() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE=baz
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s/(baz-)/@PACKAGE@-$1/, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on both component tarballs [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle4a() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="$COMPONENTS"
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s#.+/(bar-)#@PACKAGE@-$1#" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s#.+/(baz-)#@PACKAGE@-$1#" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signatures and filenamemangle on both component tarballs [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle4b() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="$COMPONENTS"
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s#.+/(bar-)#@PACKAGE@-$1#, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s#.+/(baz-)#@PACKAGE@-$1#, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on both component tarballs [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle4c() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="$COMPONENTS"
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s/(bar-)/@PACKAGE@-$1/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s/(baz-)/@PACKAGE@-$1/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signatures and filenamemangle on both component tarballs [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle4d() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="$COMPONENTS"
+ WATCHLINE='
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s/(bar-)/@PACKAGE@-$1/, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s/(baz-)/@PACKAGE@-$1/, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on all upstream tarballs [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle5a() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="foo $COMPONENTS"
+ WATCHLINE='
+opts="filenamemangle=s#.+/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)#$1-filenamemangle$2#" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s#.+/(bar-)#@PACKAGE@-$1#" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s#.+/(baz-)#@PACKAGE@-$1#" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signatures and filenamemangle on all upstream tarballs [pattern 1])
+testWatch4WebNonNativeMUT_filenamemangle5b() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="foo $COMPONENTS"
+ WATCHLINE='
+opts="filenamemangle=s#.+/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)#$1-filenamemangle$2#, \
+ pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s#.+/(bar-)#@PACKAGE@-$1#, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s#.+/(baz-)#@PACKAGE@-$1#, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, filenamemangle on all upstream tarballs [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle5c() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="foo $COMPONENTS"
+ WATCHLINE='
+opts="filenamemangle=s/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)/$1-filenamemangle$2/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s/(bar-)/@PACKAGE@-$1/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s/(baz-)/@PACKAGE@-$1/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT, signatures and filenamemangle on all upstream tarballs [pattern 2])
+testWatch4WebNonNativeMUT_filenamemangle5d() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILENAMEMANGLE="foo $COMPONENTS"
+ WATCHLINE='
+opts="filenamemangle=s/(@PACKAGE@-\d\S+)(@ARCHIVE_EXT@)/$1-filenamemangle$2/, \
+ pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar, filenamemangle=s/(bar-)/@PACKAGE@-$1/, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz, filenamemangle=s/(baz-)/@PACKAGE@-$1/, pgpsigurlmangle=s/$/.asc/" \
+ @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same'
+ helperWatch siteWebNonNativeMUT_filenamemangle
+}
+
+# test normal web page (MUT with O main)
+testWatch4WebNonNativeMUT0() {
+ WATCHVER=4
+ COMPONENTS="foo bar baz"
+ FILEEXCLUDE=3
+ MGZREPACK=xz
+ WATCHLINE='
+opts="component=foo,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="component=bar,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ same
+opts="component=baz,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ same uupdate'
+ helperWatch siteWebNonNativeMUT
+}
+
+# Group test without signatures
+testWatch4WebNonNativeGroup() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=baz,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ group'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0+~3.0
+}
+
+# Group test with repack suffix
+testWatch4WebNonNativeGroupRepackSuffix() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,repacksuffix=+ds,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=baz,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ group'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0+ds+~3.0
+}
+
+testWatch4WebNonNativeGroupRepackSuffix2() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="dversionmangle=auto,pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="dversionmangle=auto,component=bar,repacksuffix=~ds,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="dversionmangle=auto,component=baz,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ group'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0~ds+~3.0
+}
+
+# Group test with pgpsigurlmangle
+testWatch4WebNonNativeGroupSigned() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=baz,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ group'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0+~3.0
+}
+
+# Group test with pgpmode next/previous
+testWatch4WebNonNativeGroupSignedNext() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ SIGMODE=ASC
+ WATCHLINE='
+opts="pgpmode=next" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="pgpmode=previous" @@@url@@@/ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@.asc previous
+opts="component=bar,pgpmode=next" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,pgpmode=previous" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@.asc previous
+opts="component=baz,pgpmode=next" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=baz,pgpmode=previous" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@.asc previous'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0+~3.0
+}
+
+testWatch4WebNonNativeGroupWithCompression() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,compression=xz,repack,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=baz,repack,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ group'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0+~3.0
+}
+
+testWatch4WebNonNativeGroupWithChecksum1() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,compression=xz,repack,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=baz,repack,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ checksum'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~3.0+~cs3.0
+}
+
+testWatch4WebNonNativeGroupWithChecksum2() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,compression=xz,repack,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ checksum
+opts="component=baz,repack,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ checksum'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~cs6.0
+}
+
+testWatch4WebNonNativeGroupWithChecksumAndIgnore() {
+ WATCHVER=4
+ COMPONENTS="bar baz"
+ FILEEXCLUDE=3
+ UVERSION=2.0
+ CMPVERSION=3.0
+ WATCHLINE='
+opts="pgpmode=none" @@@url@@@ (?:.*)/foo@ANY_VERSION@@ARCHIVE_EXT@ group
+opts="component=bar,compression=xz,repack,pgpmode=none" @@@url@@@ (?:.*)/bar@ANY_VERSION@@ARCHIVE_EXT@ checksum
+opts="component=baz,repack,pgpmode=none" @@@url@@@ (?:.*)/baz@ANY_VERSION@@ARCHIVE_EXT@ ignore'
+ helperWatch siteWebNonNativeMUT 1.0 2.0+~cs3.0
+}
+
+. shunit2
diff --git a/test/test_uscan_online b/test/test_uscan_online
new file mode 100755
index 0000000..47ecda2
--- /dev/null
+++ b/test/test_uscan_online
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# Copyright (C) 2012, Benjamin Drung <bdrung@debian.org>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+set -u
+
+# Operation mode
+if test "${1:-}" = --installed; then
+ COMMAND="uscan --no-conf"
+ shift
+else
+ top_srcdir=$(readlink -f "${0%/*}/..")
+ make -C "$top_srcdir/scripts" uscan mk-origtargz uupdate debchange
+ PATH="$top_srcdir/scripts:$PATH"
+ export PATH
+ PERL5LIB="$top_srcdir/lib"
+ export PERL5LIB
+ COMMAND="uscan --no-conf"
+fi
+
+. "${0%/*}/shunit2-helper-functions.sh"
+
+found() {
+ runCommand "--report --watchfile ${0%/*}/uscan/$1 --package $2 --upstream-version $3" "$4" "" 0
+}
+
+testS3Bucket() {
+ local latest=$(curl -s http://s3.amazonaws.com/rds-downloads | \
+ sed 's@\(</[A-Za-z]*>\)@\1\n@g' | grep '<Key>RDSCli-' | \
+ sed 's@.*<Key>RDSCli-\([-0-9.]*\)\.zip</Key>.*@\1@g' | \
+ sort -n | tail -n 1)
+ local result="uscan: Newest version of rdscli on remote site is ${latest}, local version is 1.4.007
+uscan: => Newer package available from:
+ => http://s3.amazonaws.com/rds-downloads/RDSCli-${latest}.zip"
+ found "s3bucket" "rdscli" "1.4.007" "$result"
+}
+
+. shunit2
diff --git a/test/test_uscan_svn b/test/test_uscan_svn
new file mode 100755
index 0000000..fdc3c2d
--- /dev/null
+++ b/test/test_uscan_svn
@@ -0,0 +1,201 @@
+#!/bin/bash
+
+# Copyright (C) 2018, Xavier <yadd@debian.org>
+# 2019-2020, Andrius Merkys <merkys@debian.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 3 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# On Debian systems, the complete text of the GNU General Public License
+# version 3 can be found in the /usr/share/common-licenses/GPL-3 file.
+
+set -u
+#set -x
+
+DEB_HOST_OS="$(dpkg-architecture -qDEB_HOST_ARCH_OS)"
+if [ "$DEB_HOST_OS" = "kfreebsd" ]; then
+ # kbsd has a non-working semaphore, that is needed here.
+ echo "This test is not supported on $(dpkg-architecture -qDEB_HOST_ARCH), skipping"
+ exit 0
+fi
+DEB_HOST_ARCH="$(dpkg-architecture -qDEB_HOST_ARCH)"
+if [ "$DEB_HOST_ARCH" = "i386" ]; then
+ echo "To \"help\" Ubuntu that has a fondamentally broken i386 (so that we can't depend on svn), this test is simply skipped on i386."
+ exit 0
+fi
+
+TESTTYPE=Svn
+. ./lib_test_uscan
+
+COMMAND="chronic_sh uscan --no-conf --compression=xz --dehs"
+
+# prevent the local from messing with this test
+export HOME=""
+export XDG_CONFIG_HOME=""
+
+# comment out for debug
+#COMMAND="$COMMAND --verbose"
+#COMMAND="$COMMAND --debug"
+
+cleanup(){
+ rm -rf "$TEMP_PKG_DIR"
+}
+
+spawnSvnRepo(){
+ mkdir -p "$TEMP_PKG_DIR/repo"
+ (cd "$TEMP_PKG_DIR/repo" || exit 1
+ chronic_sh svnadmin create .)
+ mkdir -p "$TEMP_PKG_DIR/working-copy"
+ (cd "$TEMP_PKG_DIR/working-copy" || exit 1
+ chronic_sh svn checkout "file:///$TEMP_PKG_DIR/repo" .
+ chronic_sh mkdir trunk tags
+ touch trunk/changelog trunk/file.c
+ chronic_sh svn add trunk tags
+ chronic_sh svn commit -m 'Init'
+ export TZ=UTC
+ for version in 1.0 2.0; do
+ echo "# Version $version" >> trunk/file.c
+ cat >> trunk/changelog <<END
+Version $version
+
+END
+ chronic_sh faketime -f '2000-01-01 12:34:56' svn commit -m "Releasing $version"
+ chronic_sh faketime -f '2000-01-01 12:34:56' svn copy ^/trunk "^/tags/v$version" -m "Version $version"
+ done)
+}
+
+trap cleanup EXIT
+
+containsName(){
+ echo "$1" | grep -F -q "$2"
+ echo $?
+}
+
+# shellcheck source=shunit2-helper-functions.sh
+. "${0%/*}/shunit2-helper-functions.sh"
+
+PKG=foo
+
+makeDebianDir() {
+ WATCHARGS=$1
+ TEMP_PKG_DIR=$(mktemp -d --tmpdir="$SHUNIT_TMPDIR" uscan_svn.XXXXXX)
+ if [ -z "$TEMP_PKG_DIR" ]; then
+ echo "Failed to create temporary directory" >&2
+ exit 1
+ fi
+ mkdir -p "$TEMP_PKG_DIR/$PKG/debian/source"
+ spawnSvnRepo
+
+ cat <<END > "$TEMP_PKG_DIR/$PKG/debian/watch"
+version=4
+opts="mode=svn,$WATCHARGS" \
+file:///$TEMP_PKG_DIR/repo/tags v([\\d\\.]+)\/ debian
+END
+
+ cat <<END > "$TEMP_PKG_DIR/$PKG/debian/changelog"
+$PKG (0-1) unstable; urgency=low
+
+ * Initial release
+
+ -- Joe Developer <jd@debian.org> Mon, 02 Nov 2013 22:21:31 -0100
+END
+ echo '3.0 (quilt)' > "$TEMP_PKG_DIR/$PKG/debian/source/format"
+}
+
+makeDebianDirHead() {
+ WATCHARGS=$1
+ makeDebianDir "$WATCHARGS"
+ cat <<END > "$TEMP_PKG_DIR/$PKG/debian/watch"
+version=4
+opts="mode=svn,$WATCHARGS" \
+file:///$TEMP_PKG_DIR/repo/trunk HEAD
+END
+}
+
+helperLaunch() {
+ WATCHARGS=$1
+ ARG="${2:-}"
+ if test "$ARG" = "HEAD"; then
+ makeDebianDirHead "$WATCHARGS"
+ else
+ makeDebianDir "$WATCHARGS"
+ fi
+ ( cd "$TEMP_PKG_DIR/$PKG" || exit 1 ; $COMMAND --watchfile=debian/watch )
+ assertEquals "uscan: exit_code!=0 but exit_code=0" "0" "$?"
+}
+
+helperLaunchFail() {
+ WATCHARGS=$1
+ ARG="${2:-}"
+ if test "$ARG" = "HEAD"; then
+ makeDebianDirHead "$WATCHARGS"
+ else
+ makeDebianDir "$WATCHARGS"
+ fi
+ # discard output as it's expected to fail
+ ( cd "$TEMP_PKG_DIR/$PKG" || exit 1 ; $COMMAND --watchfile=debian/watch > /dev/null)
+ assertEquals "uscan: exit_code!=2 but exit_code=2" "2" "$?"
+}
+
+testSvn() {
+ helperLaunch "pgpmode=none"
+ TARBALL="${PKG}_2.0.orig.tar.xz"
+ CHECKSUM=$(sha1sum "$TEMP_PKG_DIR/${PKG}-2.0.tar.xz" | awk '{print $1}')
+ assertTrue 'downloaded tarfile not present' "[ -f '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$TEMP_PKG_DIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$TEMP_PKG_DIR/$TARBALL' ]"
+ if [ "$CHECKSUM" != 'bd4a60786013848e402bcf20db211fd465afeda5' ]; then
+ set -x
+ echo "Copying the faulty tarball to the artefact directory, if available..."
+ if [ -n "${AUTOPKGTEST_ARTIFACTS:-}" ] && [ -d "$AUTOPKGTEST_ARTIFACTS" ]; then
+ cp -v "$TEMP_PKG_DIR/${PKG}-2.0.tar.xz" "$AUTOPKGTEST_ARTIFACTS"/
+ fi
+ set +x
+ fi
+ assertTrue 'checksums do not match' "[ '${CHECKSUM}' = 'bd4a60786013848e402bcf20db211fd465afeda5' ]"
+ cleanup
+}
+
+testSvnPgpmodeDefault() {
+ helperLaunch "pgpmode=default"
+ TARBALL="${PKG}_2.0.orig.tar.xz"
+ assertTrue 'downloaded tarfile not present' "[ -f '$TEMP_PKG_DIR/${PKG}-2.0.tar.xz' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$TEMP_PKG_DIR/$TARBALL' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$TEMP_PKG_DIR/$TARBALL' ]"
+ cleanup
+}
+
+testSvnPgpmodeNext() {
+ helperLaunchFail "pgpmode=next"
+ cleanup
+}
+
+testSvnHead() {
+ helperLaunch "pgpmode=none" HEAD
+ ORIG="$TEMP_PKG_DIR/foo_0.0~svn4.orig.tar.xz"
+ UPSTREAM="$TEMP_PKG_DIR/foo-0.0~svn4.tar.xz"
+ assertTrue 'downloaded tarfile not present' "[ -f '$UPSTREAM' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$ORIG' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$ORIG' ]"
+ cleanup
+}
+
+testSvnHeadMangle() {
+ helperLaunch "pgpmode=none,uversionmangle=s/^[^~]+/1.23.45/" HEAD
+ ORIG="$TEMP_PKG_DIR/foo_1.23.45~svn4.orig.tar.xz"
+ UPSTREAM="$TEMP_PKG_DIR/foo-1.23.45~svn4.tar.xz"
+ assertTrue 'downloaded tarfile not present' "[ -f '$UPSTREAM' ]"
+ assertTrue 'pristine tarball is not created' "[ -f '$ORIG' ]"
+ assertTrue 'pristine tarball is a symlink' "[ -L '$ORIG' ]"
+ cleanup
+}
+
+# shellcheck disable=SC1091
+. shunit2
diff --git a/test/test_wrap-and-sort b/test/test_wrap-and-sort
new file mode 100755
index 0000000..2ad9389
--- /dev/null
+++ b/test/test_wrap-and-sort
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+# Copyright (C) 2022, Niels Thykier <niels@thykier.net>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -u
+
+
+WORK_DIR="$(readlink -f "${0%/*}")"
+if test "${1:-}" = --installed; then
+ wrap_and_sort="wrap-and-sort "
+ shift
+else
+ wrap_and_sort="${WORK_DIR}/../scripts/wrap-and-sort"
+fi
+
+. "${WORK_DIR}/test_helper.sh"
+
+oneTimeSetUp() {
+ TEMP_DIR=$(mktemp -d -p "$SHUNIT_TMPDIR" wrap-and-sort.XXXXX)
+}
+
+# Run as `prepare_and_run_wrap_and_sort <test-name> [args-for-wrap-and-sort]`
+prepare_and_run_wrap_and_sort() {
+ TEST_NAME="${1}"
+ TEST_DIR="${TEMP_DIR}/${TEST_NAME}"
+
+ mkdir "${TEST_DIR}"
+ cp -a "${WORK_DIR}/wrap-and-sort/${TEST_NAME}/in/"* "$TEST_DIR/" || exit 1
+ assertPasses $wrap_and_sort -d "$TEST_DIR"
+ assertPasses diff -Nuarp "${WORK_DIR}/wrap-and-sort/${TEST_NAME}/out" "${TEST_DIR}"
+}
+
+test_install_comments() {
+ prepare_and_run_wrap_and_sort 'install-comments'
+}
+
+test_control_templates() {
+ prepare_and_run_wrap_and_sort 'control-templates'
+}
+
+. shunit2
diff --git a/test/uscan/PRIVATE_KEY.asc b/test/uscan/PRIVATE_KEY.asc
new file mode 100644
index 0000000..01ca198
--- /dev/null
+++ b/test/uscan/PRIVATE_KEY.asc
@@ -0,0 +1,106 @@
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1
+
+lQcYBFXnCocBEACkNFn2IKAMyk3zR8QMVmZuZOESBivnbVUHfXiVCVKBTzLGrIUQ
+WlMjw02CXJyekjHyB3Eqik4X7TEv5EqKME2oXj0WrMZLQQvu+8Mmx67kaYUoYIoH
+U0I/a0yyEkshfki5tsr9qPkgC6R5OSAuGVaL9SC1q+p3uMbHQGnLsBzY8I8S7Ac2
+gsPPQTtX1EK2ZQ1xPUD6NgmTQHlsyJLFhe5XUYxEJm/vn+dh+YAfloElQjdh/V03
+G/d5jte33TxbyNwjCzhlX4Fa+yh2RqsR5s4tHRsfIDte0MIE2vva8ctxeHMSSjRV
+mSufkwSe/3ScY2fHcGI9UzgR1bcdJon0yLfbdZrnBruFVKj8xEEmkrL/kXCRu/2c
+5d1vHwRtHSF7+sY+XubuOGDxkZYr8Kghv50YG8E8fPAhrPhult6fylKDDvFrc5Ai
+RBmfJTXWjcGNgMkFjkXtWzqdgg91Rgr1MRqL9Jxn/30K+EWFPAHjggLrtGjTjtML
+4K0hc0OcqMEzK5ERCuQaYaBcQnDseoBeKCMQMYSZQZij97r+GCPGOLsuPSYKHk2x
+KnUm12WYkkbi4R6Ab+La3PjWqhAtcS9AVzoF7h2n6pSM3V2ldrHcke9qKLdhDrsp
+BXTwZ9RsEBILoEpnjJ/zO75sdH2LLh3XlFfTzUU6yeUiPO2aKXHSbv2/MwARAQAB
+AA/9Gsu1koX9wu3l4o683gvgvfXAX3dFBYhrQ8RPP82RpSsOF4BiW9TMPx3JMZN4
+tiJtUW2yze+xPBOnidqF6h8PzStJFMDaaxVmTngkfy4+yroIJ2/5llBukyLTaou0
+WaGIr1BhDRvclkTQG5LIPuhA81NBJI8KvWwYeWjNhZZrtAstjeJDxbrOcVfXyJwJ
+dvJD9fgPo8UwXX3mqBXjEvtUIEkHzBHpr6o3JrSBxVCDgAJaP1IKkB+u4YCp5ds4
+f6c7eoyDhidxAy5739vltrokvb/uLm94Fh+YSb/ihvbGQvIWSnnJfd53ppwQjlG+
+7yEETSDN0ewZTkUYk1fiqLYd1R4Eenp1h6Yf5mbLJ3+7aqV3ni5Daz8+oVfhv4Pb
+mrYDCYHsY3xoKXxw7OgwHhLS9enojpYmJ22gbNzkweNC0xa6aHcKgiUWu/o84mNe
+5Jle12LFkf+rk7byA7eLgg6ROFk064zpnR+2qj1FiYxtuvzNch4MKUnVw1hdeFoU
+4BLp+9sO/MhPsMmGCfP/eAde1//EwC7qqJIp7AlZxw18fLm9k7zDTpvGhFWWvwXV
+ueHN9Kqmi7CcXajFINnKSOoSZMNEHzoCOmZyp+LvG0ljjZuVShlj5zfV4S1X10TP
+hNYIWHqtpGALC+Eq+s2PrCH+13AJHOgiL9UKnHjHc0imZCEIAMWaQJOxiNdtq1EF
+5wgTe1xdijpSTnnIXHS+jEQvl0DshAzd49C+JR3O6lUtY0yeilXv7IYLiLUWqmv3
+1X8tygUlRiEDA9+cxmPLhoWRIK1Cn1Mh+V1QV6+c9AYkvp6PPueiqOArnhBrYqJ3
+yPsuZbxiVA1IcJ+tZsZI4dXdA3j1icnIM6kwVUveRT0bQUDkgHR7doPLRWykSoH9
+NTSdGNXoVlnJaEpsBydNoAO/XoffysHP3b9+/SvdSo0G7B7V5lwP4bryX1AvglIK
+w0bZs5KrtB/qkcp7egWQ2wLW4850/A+GH4o+e/FnLeAmGbyW5ptifmk7xZF9F+LC
+yF9epnUIANS7WSRNLuzSVUeIZg8iH9+cwZjNUyVXy6/pdp+tJfS52uJIfP826I5W
+uCZCMrahyaByy+0TszVrfS+unWs77vivuk362aeWIXglnSrZ9vw7SElyrAXjbOxC
+DmCyHpXpo61S/4RuxYFXnWo2ixR92lOdU/wDZLF2ZbpE2p+CP2fPfEg42mK7Mg2M
+eVwAIRyy+ZsXPmu1osrch4cTHq2KMdnkjod737OEejMhuP9mK9suBa3u9o+C5DCL
+MQxMAqpxv14CWjHE3G+qE28rVp/Zo5WwYwO8X4r2T3b0BEkaXr4Eb6lBCu6RwCdj
+MACjqmXWVwYltJeURCUDgrzOuwi4KgcH/2Sa2LHjBG8ub9nBBYw3+AEzrP0sjrDJ
+acZZmCn9IaJCbmHPXtOZMCndGxp0NqavE6TpWi616/y9mXqHMYsYFSJeBzKDJBVy
+5uDP/Z9xCPZlzvlEr3SQq0MiLoyDvGWSdSB/qcCNPzOdIgRoXn/o4XvtVfzv2qw6
+HF+25hPrDhjWYNyNFB0cagCoD7Iwv/zBk7JLYJoKd2xNCEbGQ4u/fXfSLXublzFc
+Fgud8lLdq3KirT/NElvyLnbm3UEjeNfcMGGSaJiR7p7mgLXNr+SzAD/zX/NNgbS4
+Jx+zceIK0p/ndPvjdvju24x4Hi1UH+4qOcTUNUAdutDkWBqmKp3ipgOD77QsdXNj
+YW4gdGVzdCBrZXkgKG5vIHNlY3JldCkgPG5vbmVAZGViaWFuLm9yZz6JAjgEEwEC
+ACIFAlXnCocCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEMd+LWhyVD+v
+zLkP/ikDCjvi8/Fh2ePj22+t9H4P+ShMPkOzcbC++zhqNrxiwwmyr0s7vd1nAKJN
+IoGxS+WhDOxUGyfhd5Pr2fkJjyuDZ/Mwi5xwKNc2XRQmlRT6pKvtV3XZTvRbYKGs
+p/nmkjE9ip+R6k0KFy8XbS8iFb4OM8hUcNvQPZBMkg2XurDIILfNABqbCIuK1HJR
+ST53FLdwswuXGUVBUkwG2PjGLxzM7V/GIF7ON2GXtC6sty5Kk+q804YFCLjPsUR7
+9Goq8/scAhgBvnytfPeoOGrHOCVIPfBD7CJODbTBhyENQGyrBXuiHGRBIxHkrfG/
+DDsSH4GCimdDMVtpyGRWsWe94oMe0VOJJq5uganTDPqioll/PbyrTrKZwbtRgtZr
+eUG6mEOv+tQ26xL7++V3G0C5HIF6MUrisvMsJutEtWGQ93iAUR2RDasSn3LfFmqT
+uvPPM8Ogz3rUNp1dd5YpKzyZEBqNM5FlEO15gCK1LjM3F9KQhhQrMTeS85Ytn7F+
+/FXhEXg77JDbKaByRvQ4nfesWV72ZAO2ukfBWZ01yWma8vaw+XJlwYFoWtk2JV2e
+ZpZR5q1e7NUc1rdHo4/6cTc072bpOAatZ1STvfPnolvBPuUyhE8XC6qBBBK3ETbV
+XoXHNJ6KFHrBMGT7oS9aMVzHyWhZA5fGFgqbocI8Gx7lkJr/nQcYBFXnCocBEADI
+hu6xdCWopsyv9wrmpAareEC50o+cztqQh1oJn/ldJ+ECVb9YRcD2x/H1L3DQwGEl
+zKZ6D6up5bzOjyZpaMJn6aT/ONFPfQL6myA3Q/yZST3eirhQ4xfDAMJJKAxtqVW3
+1KYbxl877I0mR9WOxKenWeS4JI+zwWuuDZnDIAxU9vgYs1WHoekg1R1ydLk7r7DA
+qIGNfwY/V8HtZx4M7Frvtk6MNfBsGB54q7mxTCkUAD3LWxI7nDsx47GhwiRf5d5r
+P/lWOZEbgwQaM3n5JqUSNuGU/3arTRbzGhOjgvIq95tR4CQsL0cv9ajJ8o9o5kts
+zuR7URyHBB3SloCOVqAHdmH9Y28jzM2NRgcVgsCVgWB3AqTGbmiZ0gIkIWzeDrBZ
+tqb04GWo8sp6IhjsVtcPB/MwENsi5WoJ6rEDyS0sSH5HDsIbeElKbS3ZAB7vunVZ
+kYxCsD4N90Jey0qCamWtrhCdxoswKPf4sV5X5IEdVPSlV0T/JKzp39pqOdMA+BIx
+W8lKaDyOWBGB7m54wfiiJpeItB7ligM47ylk/L5YYDd4w8PiYYt+VPG7id/jkTVi
+p1V5U33KIIgL/Vc7LfEXoZ6HLUNQFq6VxPP7iNeiBuJMd2izElLuWDXkIlnoOEE+
+on8crCJlRtH3gWfcZSR6qaCgwHwk8w9ockpMsnJeRQARAQABAA/5Ab4WbelV+HC2
+n6LUb+ul+TB604KOZ+zuPkpG0IWY26Pgky4ekwxMIHjdU+WdI9tAHN155t6i/b92
+1A6vZUQZSGDh46vhOcEa2QWnEoPfOo/F31yyPFW026dyiMM11HAfxBCvftdK9ZDZ
+Kyd9phd0Y4Jm9+itbQD1yBXrK6RoJwbcYg6Q5DRWe8gOUPPNtkSREyODuLCNY9iF
+4WO/gZo+Mg4SAaroU3AkN6U6YF2Kj9dusgkxD96MLyNM5Fx1B3ZOZ/0u0/59EdGi
+I/4lhbI9xfo/HJXZuKRbWjJ0UDvvkcsECQKbHd0tT6/hTxvx/hXeOuxTVPT/+/Zf
+sfhH1rTPAC2pGPM0ZybxopGh3kAElcsQvS33NPHrSOIwZEmwARt65+YdFQrZgeYO
+s4kidFNawM+xjOXXQjSMsx2BznfepbSKUyK+HU8Bq/cpgAAALQcgwDUqp0Gm4qng
+DeuRc1fnQUXBadL69cwcLFUDUkxuPZxm06zpDLjeKi92dBWAU2WUb/pvde35aWPj
+HOvsN2B/FysTurgdIMRnLKGFKmxPFH3p5K4S5YoabKm9H8syq2u3yXZFc1z2UV76
+7BHMYX5moC82wq5WcaOnDzzhx54k+/qDFrwrLMjB+V8I/M8YwjYd+SYvvvXrJgbY
+YZif5YhsIc/0LnrsyFylrsWIN1MpTNMIANt5fBsGc/xYY/A5n+4BDFajPn74foLP
+UV4E5zNgGm10YtEJ07o3pBvw1Nqoj3jwdHFlXwjVVo90Uzuw6SvekANKQEEtdpGm
+c959mNk0mHzJjZ1FvC2/tttX7QvXKuF8jLWgkfC0Kby6Aa0DxAzwQQ1abo60UJi2
+OxPM1FI0IsjtRoKu4ryUvCgbMNY9bKhJokYz5BZqqs2lPu9B2EGXrqbC/rq6dgbh
+Y8Xwbu2wypi6G7JHSa8kpwcEacdherJYh17J2xkRHLf857icDNYJPB0GMfg+3evk
+qm3KAu6amB4q+QHf18Z0k6yWmagecdSxTY6LAjog+2Q8YO8N6eqpp08IAOnmNS26
+kDEzE6NfYWdrySfNhJ2SP8W8bx+UvFUVLCZJDgnO9K12R5A7JiO07pijxqorjlOy
+KtIRu/wgtH6wHzhg5i7J443dgz8jtCCLB8O6B8bvzZ75XbwSGAOcSapbAJm7FGyG
+b82TZjBWZE3++TWmUPk8kARCoJR5rGamVKyiTnkooB0638NnAb0aNkJhKLUOjRY+
+SOG0Czf19bRoKEQuwmwe8vwOrQcfLXLYSZGsax4AMM4SacO/2LpddYL1k0FIPs1X
+S9NBIAbw/j2pQfQrG4E6CVMKo6ihcTwIchiny7yKE2BZHAAWwd0cZM1JCnRQ/DOG
+3H9Lwt1enQxHfCsIANYc3aLnUeNls3ZpfmZBlW8fMkRvWz1Tf8vWc2rcHDBx4OeI
+Rn/trD8dN6eON3feKcYx3th+MIGTXzi8rPzOUVPai2iX4yuf2zGh3I3ItyxtgEXn
+gms0KqeQwwQ/jeEUkhuFkq9sT4UwTqBwgMYsWSLMg76/es/zLBpI4LxBaK+BV9ek
+KgD8RQl2IHI8F2XmJQSQex/nbdYVGHXDv1qJ+sMcdHvQ5VAZ1lPSqroM30YFSmzc
+zQq0qaK6mGKCm0RDE24DNa+T5KhdSCeDyIpewiB6ORScNO+WdNxqlfQTBTf5kzEQ
+eGI/TufRQ35CCvvHsFjZilJQa+qSdzzg5vQ+rlF26YkCHwQYAQIACQUCVecKhwIb
+DAAKCRDHfi1oclQ/r536EACBepjhwPL3qYfZNkJlSz34VYDngbzf4KLsYQIypEyU
+6GcBMX5kjKKFrh30+e6atQ40LxRW5QgzEQsuDSBrp/x/qRv6i87oqHC5dG7pEYuv
+E/Fpb3fSQPpbTY5SpKvqWTVYOpXy++QrtpWqOGsGbKUep1/QZzBQnh4HHNHSbKdv
+o73RSCg82A2YxuKiN226pqhI2MaC2+4MZgF6VkF2gmSr/Q84RdlyCcNN2l9uwQ0b
+hiYkB04m/uB1agIiz6OO4VXklUVrbXrvEJmr8At+he4bDL4+W3khKKhR8JzIcR15
+fj7ja+gBRx/hIanusYbjmA20JWdKNEL5IHJwIBsvfuA0kq+eqXDcgL/MndOFkpoG
+LslyJAhdhGMS57UZKq70SkyhMhFNtPv+JQ7qXwrXK7GzfFmymaQVvZ3Csf3YkTsb
+zGcO44Lin/0b4kRA4kVA6m2sVdW2unKVeQqXRAT9k4CRQe57YmwynTboD3/gClRJ
+8QWLCPTqUI9wqKrfb/RXDgzQ5UBKBY97FD+xL2jSSzJpq4ycVvrYVU9aJmFawlLV
+gfdfTLGy50iWTYVjjrYUfryPhW/BSc8/DlbiihPHUpZOPBeJ418upVVhLuyQPfev
+9N/hp5UpLqojA4Ti2ygzdnZQTFnYV5hS/m/OsYs5I3ZVBo1+NnEk2JVdV3hgeLAl
+2g==
+=nZ3G
+-----END PGP PRIVATE KEY BLOCK-----
diff --git a/test/uscan/PUBLIC_KEY.asc b/test/uscan/PUBLIC_KEY.asc
new file mode 100644
index 0000000..214a603
--- /dev/null
+++ b/test/uscan/PUBLIC_KEY.asc
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQINBFXnCocBEACkNFn2IKAMyk3zR8QMVmZuZOESBivnbVUHfXiVCVKBTzLGrIUQ
+WlMjw02CXJyekjHyB3Eqik4X7TEv5EqKME2oXj0WrMZLQQvu+8Mmx67kaYUoYIoH
+U0I/a0yyEkshfki5tsr9qPkgC6R5OSAuGVaL9SC1q+p3uMbHQGnLsBzY8I8S7Ac2
+gsPPQTtX1EK2ZQ1xPUD6NgmTQHlsyJLFhe5XUYxEJm/vn+dh+YAfloElQjdh/V03
+G/d5jte33TxbyNwjCzhlX4Fa+yh2RqsR5s4tHRsfIDte0MIE2vva8ctxeHMSSjRV
+mSufkwSe/3ScY2fHcGI9UzgR1bcdJon0yLfbdZrnBruFVKj8xEEmkrL/kXCRu/2c
+5d1vHwRtHSF7+sY+XubuOGDxkZYr8Kghv50YG8E8fPAhrPhult6fylKDDvFrc5Ai
+RBmfJTXWjcGNgMkFjkXtWzqdgg91Rgr1MRqL9Jxn/30K+EWFPAHjggLrtGjTjtML
+4K0hc0OcqMEzK5ERCuQaYaBcQnDseoBeKCMQMYSZQZij97r+GCPGOLsuPSYKHk2x
+KnUm12WYkkbi4R6Ab+La3PjWqhAtcS9AVzoF7h2n6pSM3V2ldrHcke9qKLdhDrsp
+BXTwZ9RsEBILoEpnjJ/zO75sdH2LLh3XlFfTzUU6yeUiPO2aKXHSbv2/MwARAQAB
+tCx1c2NhbiB0ZXN0IGtleSAobm8gc2VjcmV0KSA8bm9uZUBkZWJpYW4ub3JnPokC
+OAQTAQIAIgUCVecKhwIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQx34t
+aHJUP6/MuQ/+KQMKO+Lz8WHZ4+Pbb630fg/5KEw+Q7NxsL77OGo2vGLDCbKvSzu9
+3WcAok0igbFL5aEM7FQbJ+F3k+vZ+QmPK4Nn8zCLnHAo1zZdFCaVFPqkq+1XddlO
+9Ftgoayn+eaSMT2Kn5HqTQoXLxdtLyIVvg4zyFRw29A9kEySDZe6sMggt80AGpsI
+i4rUclFJPncUt3CzC5cZRUFSTAbY+MYvHMztX8YgXs43YZe0Lqy3LkqT6rzThgUI
+uM+xRHv0airz+xwCGAG+fK1896g4asc4JUg98EPsIk4NtMGHIQ1AbKsFe6IcZEEj
+EeSt8b8MOxIfgYKKZ0MxW2nIZFaxZ73igx7RU4kmrm6BqdMM+qKiWX89vKtOspnB
+u1GC1mt5QbqYQ6/61DbrEvv75XcbQLkcgXoxSuKy8ywm60S1YZD3eIBRHZENqxKf
+ct8WapO6888zw6DPetQ2nV13likrPJkQGo0zkWUQ7XmAIrUuMzcX0pCGFCsxN5Lz
+li2fsX78VeEReDvskNspoHJG9Did96xZXvZkA7a6R8FZnTXJaZry9rD5cmXBgWha
+2TYlXZ5mllHmrV7s1RzWt0ejj/pxNzTvZuk4Bq1nVJO98+eiW8E+5TKETxcLqoEE
+ErcRNtVehcc0nooUesEwZPuhL1oxXMfJaFkDl8YWCpuhwjwbHuWQmv+5Ag0EVecK
+hwEQAMiG7rF0JaimzK/3CuakBqt4QLnSj5zO2pCHWgmf+V0n4QJVv1hFwPbH8fUv
+cNDAYSXMpnoPq6nlvM6PJmlowmfppP840U99AvqbIDdD/JlJPd6KuFDjF8MAwkko
+DG2pVbfUphvGXzvsjSZH1Y7Ep6dZ5Lgkj7PBa64NmcMgDFT2+BizVYeh6SDVHXJ0
+uTuvsMCogY1/Bj9Xwe1nHgzsWu+2Tow18GwYHnirubFMKRQAPctbEjucOzHjsaHC
+JF/l3ms/+VY5kRuDBBozefkmpRI24ZT/dqtNFvMaE6OC8ir3m1HgJCwvRy/1qMny
+j2jmS2zO5HtRHIcEHdKWgI5WoAd2Yf1jbyPMzY1GBxWCwJWBYHcCpMZuaJnSAiQh
+bN4OsFm2pvTgZajyynoiGOxW1w8H8zAQ2yLlagnqsQPJLSxIfkcOwht4SUptLdkA
+Hu+6dVmRjEKwPg33Ql7LSoJqZa2uEJ3GizAo9/ixXlfkgR1U9KVXRP8krOnf2mo5
+0wD4EjFbyUpoPI5YEYHubnjB+KIml4i0HuWKAzjvKWT8vlhgN3jDw+Jhi35U8buJ
+3+ORNWKnVXlTfcogiAv9Vzst8RehnoctQ1AWrpXE8/uI16IG4kx3aLMSUu5YNeQi
+Weg4QT6ifxysImVG0feBZ9xlJHqpoKDAfCTzD2hySkyycl5FABEBAAGJAh8EGAEC
+AAkFAlXnCocCGwwACgkQx34taHJUP6+d+hAAgXqY4cDy96mH2TZCZUs9+FWA54G8
+3+Ci7GECMqRMlOhnATF+ZIyiha4d9PnumrUONC8UVuUIMxELLg0ga6f8f6kb+ovO
+6KhwuXRu6RGLrxPxaW930kD6W02OUqSr6lk1WDqV8vvkK7aVqjhrBmylHqdf0Gcw
+UJ4eBxzR0mynb6O90UgoPNgNmMbiojdtuqaoSNjGgtvuDGYBelZBdoJkq/0POEXZ
+cgnDTdpfbsENG4YmJAdOJv7gdWoCIs+jjuFV5JVFa2167xCZq/ALfoXuGwy+Plt5
+ISioUfCcyHEdeX4+42voAUcf4SGp7rGG45gNtCVnSjRC+SBycCAbL37gNJKvnqlw
+3IC/zJ3ThZKaBi7JciQIXYRjEue1GSqu9EpMoTIRTbT7/iUO6l8K1yuxs3xZspmk
+Fb2dwrH92JE7G8xnDuOC4p/9G+JEQOJFQOptrFXVtrpylXkKl0QE/ZOAkUHue2Js
+Mp026A9/4ApUSfEFiwj06lCPcKiq32/0Vw4M0OVASgWPexQ/sS9o0ksyaauMnFb6
+2FVPWiZhWsJS1YH3X0yxsudIlk2FY462FH68j4VvwUnPPw5W4ooTx1KWTjwXieNf
+LqVVYS7skD33r/Tf4aeVKS6qIwOE4tsoM3Z2UExZ2FeYUv5vzrGLOSN2VQaNfjZx
+JNiVXVd4YHiwJdo=
+=GzOB
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/test/uscan/ftpserver.py b/test/uscan/ftpserver.py
new file mode 100644
index 0000000..e14348a
--- /dev/null
+++ b/test/uscan/ftpserver.py
@@ -0,0 +1,29 @@
+#!/usr/bin/python3
+
+import logging
+import os
+
+from pyftpdlib.authorizers import DummyAuthorizer
+from pyftpdlib.handlers import FTPHandler
+from pyftpdlib.servers import FTPServer
+
+
+def test():
+ authorizer = DummyAuthorizer()
+ authorizer.add_anonymous(os.getcwd())
+
+ handler = FTPHandler
+ handler.authorizer = authorizer
+
+ logging.basicConfig(filename="info.log", level=logging.INFO)
+ # logging.basicConfig(filename='debug.log', level=logging.DEBUG)
+
+ ftpserver = FTPServer(("127.0.0.1", 0), handler)
+ sa = ftpserver.socket.getsockname()
+ with open("port", "w") as f:
+ f.write(str(sa[1]))
+ ftpserver.serve_forever()
+
+
+if __name__ == "__main__":
+ test()
diff --git a/test/uscan/httpserver.py b/test/uscan/httpserver.py
new file mode 100644
index 0000000..1dcd4ce
--- /dev/null
+++ b/test/uscan/httpserver.py
@@ -0,0 +1,25 @@
+#!/usr/bin/python3
+import http.server
+import logging
+from http.server import SimpleHTTPRequestHandler
+
+
+class GetHandler(SimpleHTTPRequestHandler):
+ def do_GET(self):
+ logging.error(self.headers)
+ SimpleHTTPRequestHandler.do_GET(self)
+
+
+def test():
+ Handler = GetHandler
+ httpd = http.server.HTTPServer(("", 0), Handler)
+
+ sa = httpd.socket.getsockname()
+ with open("port", "w") as f:
+ f.write(str(sa[1]))
+
+ httpd.serve_forever()
+
+
+if __name__ == "__main__":
+ test()
diff --git a/test/uscan/manual-test/Makefile b/test/uscan/manual-test/Makefile
new file mode 100644
index 0000000..382e479
--- /dev/null
+++ b/test/uscan/manual-test/Makefile
@@ -0,0 +1,35 @@
+TOPSRCDIR := $(abspath $(CURDIR)/../../..)
+PATH := $(TOPSRCDIR)/scripts:$(PATH)
+PERL5LIB := $(TOPSRCDIR)/lib
+export PATH
+export PERL5LIB
+COMMAND := uscan --no-conf --debug
+KEEP_THESE := $(wildcard _*)
+TOSS_THESE := $(filter-out $(KEEP_THESE) Makefile, $(wildcard *))
+
+all:
+ $(MAKE) prep # always run first
+ $(MAKE) test
+
+# Single archive run
+test-%:
+ cd $*; $(COMMAND)
+ touch $*/stamp
+
+# Many single archive runs
+test: $(patsubst %,test-%,$(KEEP_THESE))
+
+# Multiple archive run at once
+multi:
+ $(COMMAND)
+
+prep:
+ $(MAKE) -C $(TOPSRCDIR)/scripts uscan mk-origtargz uupdate debchange
+ $(MAKE) -C $(TOPSRCDIR)/scripts uscan.pl_check
+ touch stamp
+
+clean-%:
+ -rm $*/stamp
+
+clean: $(patsubst %,clean-%,$(KEEP_THESE))
+ -rm -rf $(TOSS_THESE)
diff --git a/test/uscan/manual-test/_dh-make-golang/debian/changelog b/test/uscan/manual-test/_dh-make-golang/debian/changelog
new file mode 100644
index 0000000..836ca5e
--- /dev/null
+++ b/test/uscan/manual-test/_dh-make-golang/debian/changelog
@@ -0,0 +1,5 @@
+dh-make-golang (0~0.0-1) unstable; urgency=medium
+
+ * dummy changelog.
+
+ -- Osamu Aoki <osamu@debian.org> Sat, 13 Jan 2018 22:48:47 +0900
diff --git a/test/uscan/manual-test/_dh-make-golang/debian/rules b/test/uscan/manual-test/_dh-make-golang/debian/rules
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/test/uscan/manual-test/_dh-make-golang/debian/rules
diff --git a/test/uscan/manual-test/_dh-make-golang/debian/source/format b/test/uscan/manual-test/_dh-make-golang/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/test/uscan/manual-test/_dh-make-golang/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/test/uscan/manual-test/_dh-make-golang/debian/watch b/test/uscan/manual-test/_dh-make-golang/debian/watch
new file mode 100644
index 0000000..08c6c95
--- /dev/null
+++ b/test/uscan/manual-test/_dh-make-golang/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts="mode=git, pgpmode=none" \
+https://github.com/Debian/dh-make-golang \
+HEAD debian uupdate
+
diff --git a/test/uscan/manual-test/_dl-poly-classic/debian/changelog b/test/uscan/manual-test/_dl-poly-classic/debian/changelog
new file mode 100644
index 0000000..90e29b1
--- /dev/null
+++ b/test/uscan/manual-test/_dl-poly-classic/debian/changelog
@@ -0,0 +1,5 @@
+dl-poly-classic (0~0.0-1) unstable; urgency=medium
+
+ * dummy changelog.
+
+ -- Osamu Aoki <osamu@debian.org> Sat, 13 Jan 2018 22:48:47 +0900
diff --git a/test/uscan/manual-test/_dl-poly-classic/debian/rules b/test/uscan/manual-test/_dl-poly-classic/debian/rules
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/test/uscan/manual-test/_dl-poly-classic/debian/rules
diff --git a/test/uscan/manual-test/_dl-poly-classic/debian/source/format b/test/uscan/manual-test/_dl-poly-classic/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/test/uscan/manual-test/_dl-poly-classic/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/test/uscan/manual-test/_dl-poly-classic/debian/watch b/test/uscan/manual-test/_dl-poly-classic/debian/watch
new file mode 100644
index 0000000..791b6d3
--- /dev/null
+++ b/test/uscan/manual-test/_dl-poly-classic/debian/watch
@@ -0,0 +1,7 @@
+version=4
+opts="hrefdecode=percent-encoding, pgpmode=no, \
+ filenamemangle=s/.*dl_class_([\d.]+)\.tar\.gz/dl-poly-classic-$1\.tar\.gz/" \
+https://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/frs/ \
+ /gf/download/frsrelease/\d+/\d+/dl_class_([\d.]+)\.tar\.gz debian uupdate
+
+
diff --git a/test/uscan/manual-test/_osamu-utils/debian/changelog b/test/uscan/manual-test/_osamu-utils/debian/changelog
new file mode 100644
index 0000000..c521065
--- /dev/null
+++ b/test/uscan/manual-test/_osamu-utils/debian/changelog
@@ -0,0 +1,5 @@
+osamu-utils (0~0.0-1) unstable; urgency=medium
+
+ * dummy changelog.
+
+ -- Osamu Aoki <osamu@debian.org> Sat, 13 Jan 2018 22:48:47 +0900
diff --git a/test/uscan/manual-test/_osamu-utils/debian/rules b/test/uscan/manual-test/_osamu-utils/debian/rules
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/test/uscan/manual-test/_osamu-utils/debian/rules
diff --git a/test/uscan/manual-test/_osamu-utils/debian/source/format b/test/uscan/manual-test/_osamu-utils/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/test/uscan/manual-test/_osamu-utils/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/test/uscan/manual-test/_osamu-utils/debian/watch b/test/uscan/manual-test/_osamu-utils/debian/watch
new file mode 100644
index 0000000..30f5597
--- /dev/null
+++ b/test/uscan/manual-test/_osamu-utils/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts="mode=git,pretty=describe,pgpmode=no, \
+ uversionmangle=s/^/0.0~/" \
+ https://github.com/osamuaoki/osamu-utils.git \
+ HEAD debian uupdate
diff --git a/test/uscan/manual-test/_tweeper/debian/changelog b/test/uscan/manual-test/_tweeper/debian/changelog
new file mode 100644
index 0000000..285d2e8
--- /dev/null
+++ b/test/uscan/manual-test/_tweeper/debian/changelog
@@ -0,0 +1,5 @@
+tweeper (0~0.0-1) unstable; urgency=medium
+
+ * dummy changelog.
+
+ -- Osamu Aoki <osamu@debian.org> Sat, 13 Jan 2018 22:48:47 +0900
diff --git a/test/uscan/manual-test/_tweeper/debian/rules b/test/uscan/manual-test/_tweeper/debian/rules
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/test/uscan/manual-test/_tweeper/debian/rules
diff --git a/test/uscan/manual-test/_tweeper/debian/source/format b/test/uscan/manual-test/_tweeper/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/test/uscan/manual-test/_tweeper/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/test/uscan/manual-test/_tweeper/debian/watch b/test/uscan/manual-test/_tweeper/debian/watch
new file mode 100644
index 0000000..83948f3
--- /dev/null
+++ b/test/uscan/manual-test/_tweeper/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts="mode=git, gitmode=full, pgpmode=none" \
+http://git.ao2.it/tweeper.git \
+refs/tags/v([\d\.]+) debian uupdate
+
diff --git a/test/uscan/manual-test/_upspin/debian/changelog b/test/uscan/manual-test/_upspin/debian/changelog
new file mode 100644
index 0000000..c39d194
--- /dev/null
+++ b/test/uscan/manual-test/_upspin/debian/changelog
@@ -0,0 +1,5 @@
+upspin (0~0.0-1) unstable; urgency=medium
+
+ * dummy changelog.
+
+ -- Osamu Aoki <osamu@debian.org> Sat, 13 Jan 2018 22:48:47 +0900
diff --git a/test/uscan/manual-test/_upspin/debian/rules b/test/uscan/manual-test/_upspin/debian/rules
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/test/uscan/manual-test/_upspin/debian/rules
diff --git a/test/uscan/manual-test/_upspin/debian/source/format b/test/uscan/manual-test/_upspin/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/test/uscan/manual-test/_upspin/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/test/uscan/manual-test/_upspin/debian/watch b/test/uscan/manual-test/_upspin/debian/watch
new file mode 100644
index 0000000..42c3945
--- /dev/null
+++ b/test/uscan/manual-test/_upspin/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts="mode=git, pgpmode=none" \
+https://upspin.googlesource.com/upspin \
+HEAD debian uupdate
+
diff --git a/test/uscan/s3bucket b/test/uscan/s3bucket
new file mode 100644
index 0000000..1391f38
--- /dev/null
+++ b/test/uscan/s3bucket
@@ -0,0 +1,3 @@
+version=4
+opts="pagemangle=s%<Key>([^<]*)</Key>%<Key><a href="$1">$1</a></Key>%g" \
+http://s3.amazonaws.com/rds-downloads/RDSCli-([0-9].*).zip
diff --git a/test/wrap-and-sort/control-templates/in/control.in b/test/wrap-and-sort/control-templates/in/control.in
new file mode 100644
index 0000000..2787a67
--- /dev/null
+++ b/test/wrap-and-sort/control-templates/in/control.in
@@ -0,0 +1,7 @@
+Source: foo
+
+Package: bar
+@TEMPLATE_AS_A_FIELD@
+Description: foo
+
+
diff --git a/test/wrap-and-sort/control-templates/in/control.in2 b/test/wrap-and-sort/control-templates/in/control.in2
new file mode 100644
index 0000000..8959b8c
--- /dev/null
+++ b/test/wrap-and-sort/control-templates/in/control.in2
@@ -0,0 +1,11 @@
+Source: foo
+
+{% for x in something; do %}
+
+Package: {% x %}
+
+{% end %}
+
+Package: foo-doc
+Description: foo docs
+
diff --git a/test/wrap-and-sort/control-templates/out/control.in b/test/wrap-and-sort/control-templates/out/control.in
new file mode 100644
index 0000000..61aa79b
--- /dev/null
+++ b/test/wrap-and-sort/control-templates/out/control.in
@@ -0,0 +1,5 @@
+Source: foo
+
+Package: bar
+@TEMPLATE_AS_A_FIELD@
+Description: foo
diff --git a/test/wrap-and-sort/control-templates/out/control.in2 b/test/wrap-and-sort/control-templates/out/control.in2
new file mode 100644
index 0000000..8959b8c
--- /dev/null
+++ b/test/wrap-and-sort/control-templates/out/control.in2
@@ -0,0 +1,11 @@
+Source: foo
+
+{% for x in something; do %}
+
+Package: {% x %}
+
+{% end %}
+
+Package: foo-doc
+Description: foo docs
+
diff --git a/test/wrap-and-sort/install-comments/in/install b/test/wrap-and-sort/install-comments/in/install
new file mode 100644
index 0000000..e1716b5
--- /dev/null
+++ b/test/wrap-and-sort/install-comments/in/install
@@ -0,0 +1,12 @@
+# Comment that stays in the top
+# A multiline comment should not be re-ordered
+
+# Some comment related to C
+C
+# B can have a
+# multiline comment
+B
+A
+
+
+# Not sure why anyone would finish with a comment, but it should work
diff --git a/test/wrap-and-sort/install-comments/out/install b/test/wrap-and-sort/install-comments/out/install
new file mode 100644
index 0000000..96bd150
--- /dev/null
+++ b/test/wrap-and-sort/install-comments/out/install
@@ -0,0 +1,11 @@
+# Comment that stays in the top
+# A multiline comment should not be re-ordered
+
+A
+# B can have a
+# multiline comment
+B
+# Some comment related to C
+C
+
+# Not sure why anyone would finish with a comment, but it should work