4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture 'native'
10 cat > aptarchive/Sources <<EOF
14 Maintainer: Joe Sixpack <joe@example.org>
17 9604ba9427a280db542279d9ed78400b 3 pkg-md5-ok_1.0.dsc
18 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-md5-ok_1.0.tar.gz
23 Maintainer: Joe Sixpack <joe@example.org>
26 324f464e6151a92cf57b26ef95dcfcf2059a8c44 3 pkg-sha1-ok_1.0.dsc
27 680254bad1d7ca0d65ec46aaa315d363abf6a50a 3 pkg-sha1-ok_1.0.tar.gz
29 Package: pkg-sha256-ok
32 Maintainer: Joe Sixpack <joe@example.org>
35 9604ba9427a280db542279d9ed78400b 3 pkg-sha256-ok_1.0.dsc
36 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-sha256-ok_1.0.tar.gz
38 324f464e6151a92cf57b26ef95dcfcf2059a8c44 3 pkg-sha256-ok_1.0.dsc
39 680254bad1d7ca0d65ec46aaa315d363abf6a50a 3 pkg-sha256-ok_1.0.tar.gz
41 943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a 3 pkg-sha256-ok_1.0.dsc
42 90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb 3 pkg-sha256-ok_1.0.tar.gz
47 Maintainer: Joe Sixpack <joe@example.org>
50 943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a 2 pkg-size-bad_1.0.dsc
51 90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb 4 pkg-size-bad_1.0.tar.gz
53 Package: pkg-sha256-bad
54 Binary: pkg-sha256-bad
56 Maintainer: Joe Sixpack <joe@example.org>
59 9604ba9427a280db542279d9ed78400b 3 pkg-sha256-bad_1.0.dsc
60 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-sha256-bad_1.0.tar.gz
62 324f464e6151a92cf57b26ef95dcfcf2059a8c44 3 pkg-sha256-bad_1.0.dsc
63 680254bad1d7ca0d65ec46aaa315d363abf6a50a 3 pkg-sha256-bad_1.0.tar.gz
65 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 pkg-sha256-bad_1.0.dsc
66 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3 pkg-sha256-bad_1.0.tar.gz
71 Maintainer: Joe Sixpack <joe@example.org>
74 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 pkg-md5-bad_1.0.dsc
75 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3 pkg-md5-bad_1.0.tar.gz
80 Maintainer: Joe Sixpack <joe@example.org>
83 324f464e6151a92cf57b26ef95dcfcf2059a8c44 3 pkg-no-md5_1.0.dsc
84 680254bad1d7ca0d65ec46aaa315d363abf6a50a 3 pkg-no-md5_1.0.tar.gz
86 943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a 3 pkg-no-md5_1.0.dsc
87 90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb 3 pkg-no-md5_1.0.tar.gz
92 Maintainer: Joe Sixpack <joe@example.org>
95 680254bad1d7ca0d65ec46aaa315d363abf6a50a 3 pkg-mixed-ok_1.0.tar.gz
97 943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a 3 pkg-mixed-ok_1.0.dsc
99 Package: pkg-mixed-sha1-bad
100 Binary: pkg-mixed-sha1-bad
102 Maintainer: Joe Sixpack <joe@example.org>
105 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 pkg-mixed-sha1-bad_1.0.dsc
107 90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb 3 pkg-mixed-sha1-bad_1.0.tar.gz
109 Package: pkg-mixed-sha2-bad
110 Binary: pkg-mixed-sha2-bad
112 Maintainer: Joe Sixpack <joe@example.org>
115 324f464e6151a92cf57b26ef95dcfcf2059a8c44 3 pkg-mixed-sha2-bad_1.0.dsc
117 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3 pkg-mixed-sha2-bad_1.0.tar.gz
119 Package: pkg-md5-disagree
120 Binary: pkg-md5-disagree
122 Maintainer: Joe Sixpack <joe@example.org>
125 9604ba9427a280db542279d9ed78400b 3 pkg-md5-disagree_1.0.dsc
126 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-md5-disagree_1.0.tar.gz
127 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 pkg-md5-disagree_1.0.dsc
128 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3 pkg-md5-disagree_1.0.tar.gz
130 Package: pkg-md5-agree
131 Binary: pkg-md5-agree
133 Maintainer: Joe Sixpack <joe@example.org>
136 9604ba9427a280db542279d9ed78400b 3 pkg-md5-agree_1.0.dsc
137 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-md5-agree_1.0.tar.gz
138 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-md5-agree_1.0.tar.gz
139 9604ba9427a280db542279d9ed78400b 3 pkg-md5-agree_1.0.dsc
141 Package: pkg-sha256-disagree
142 Binary: pkg-sha256-disagree
144 Maintainer: Joe Sixpack <joe@example.org>
147 9604ba9427a280db542279d9ed78400b 3 pkg-sha256-disagree_1.0.dsc
148 db5570bf61464b46e2bde31ed61a7dc6 3 pkg-sha256-disagree_1.0.tar.gz
150 324f464e6151a92cf57b26ef95dcfcf2059a8c44 3 pkg-sha256-disagree_1.0.dsc
151 680254bad1d7ca0d65ec46aaa315d363abf6a50a 3 pkg-sha256-disagree_1.0.tar.gz
153 943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a 3 pkg-sha256-disagree_1.0.dsc
154 90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb 3 pkg-sha256-disagree_1.0.tar.gz
155 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 3 pkg-sha256-disagree_1.0.dsc
156 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 3 pkg-sha256-disagree_1.0.tar.gz
159 # create fetchable files
160 for x in 'pkg-md5-ok' 'pkg-sha1-ok' 'pkg-sha256-ok' 'pkg-sha256-bad' 'pkg-no-md5' \
161 'pkg-mixed-ok' 'pkg-mixed-sha1-bad' 'pkg-mixed-sha2-bad' \
162 'pkg-md5-agree' 'pkg-md5-disagree' 'pkg-sha256-disagree' \
163 'pkg-md5-bad' 'pkg-size-bad'; do
164 echo -n 'dsc' > aptarchive/${x}_1.0.dsc
165 echo -n 'tar' > aptarchive/${x}_1.0.tar.gz
168 setupaptarchive --no-update
170 testsuccess aptget update
175 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
176 testsuccessequal "Reading package lists...
177 Need to get
6 B of
source archives.
178 Get
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
) [3 B
]
179 Get
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar) [3 B
]
180 Download complete and
in download only mode
" aptget source -d "$@
"
181 msgtest 'Files were successfully downloaded for' "$1"
182 testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
183 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
187 echo -n 'dsc' > ${1}_1.0.dsc
188 echo -n 'tar' > ${1}_1.0.tar.gz
189 testsuccessequal "Reading package lists...
190 Skipping already downloaded
file '${1}_1.0.dsc'
191 Skipping already downloaded
file '${1}_1.0.tar.gz'
192 Need to get
0 B of
source archives.
193 Download complete and
in download only mode
" aptget source -d "$@
"
194 msgtest 'Files already downloaded are kept for' "$1"
195 testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
196 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
200 #FIXME: Maybe we should fail in this case instead of skipping
201 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
202 testsuccessequal "Reading package lists...
203 Skipping download of
file '${1}_1.0.dsc' as requested hashsum is not available
for authentication
204 Skipping download of
file '${1}_1.0.tar.gz' as requested hashsum is not available
for authentication
205 Need to get
0 B of
source archives.
206 Download complete and
in download only mode
" aptget source -d "$@
"
207 msgtest 'Files are not downloaded for' "$1"
208 testfailure --nomsg test -e ${1}_1.0.dsc -o -e ${1}_1.0.tar.gz
212 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
214 if [ "$1" = 'pkg-size-bad' ]; then
215 FAILURE="Reading package lists...
216 Need to get
6 B of
source archives.
217 Get
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
) [2 B
]
218 Err
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
)
219 Writing
more data than expected
(3 > 2)
220 Get
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar) [4 B
]
221 Err
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar)
223 Hashes of expected
file:
224 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
225 - Checksum
-FileSize:4
226 Hashes of received
file:
227 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
228 - Checksum
-FileSize:3
229 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.dsc")
230 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/${1}_1.0.dsc Writing
more data than expected
(3 > 2)
231 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/${1}_1.0.
tar.gz Hash Sum mismatch
232 Hashes of expected
file:
233 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
234 - Checksum
-FileSize:4
235 Hashes of received
file:
236 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
237 - Checksum
-FileSize:3
238 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.dsc")
239 E
: Failed to fetch some archives.
"
240 elif [ "$1" = 'pkg-md5-bad' ]; then
241 FAILURE="Reading package lists...
242 Need to get
6 B of
source archives.
243 Get
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
) [3 B
]
244 Err
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
)
246 Hashes of expected
file:
247 - MD5Sum
:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
248 - Checksum
-FileSize:3
249 Hashes of received
file:
250 - SHA512
:e52b7bb395ea3f46974f1f65b7c5975839aad32d4e2ec0f458f735d5aa24d2bf36d7816ed1e01dc3c493e11879e9a8f66dfca42821608cfe993996929a6be18a
251 - SHA256
:943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a
252 - SHA1
:324f464e6151a92cf57b26ef95dcfcf2059a8c44
253 - MD5Sum
:9604ba9427a280db542279d9ed78400b
254 - Checksum
-FileSize:3
255 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.dsc")
256 Get
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar) [3 B
]
257 Err
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar)
259 Hashes of expected
file:
260 - MD5Sum
:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
261 - Checksum
-FileSize:3
262 Hashes of received
file:
263 - SHA512
:5aa4cad81553320574eb72ee92bd45a1f0575528e257749dff298b2a33df9e7fc7f5c1c87fc1c8fde230f1234cca3a99bf8625a0ff7bb3238eb7e5473f9b43c0
264 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
265 - SHA1
:680254bad1d7ca0d65ec46aaa315d363abf6a50a
266 - MD5Sum
:db5570bf61464b46e2bde31ed61a7dc6
267 - Checksum
-FileSize:3
268 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.tar.gz")
269 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/${1}_1.0.dsc Hash Sum mismatch
270 Hashes of expected
file:
271 - MD5Sum
:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
272 - Checksum
-FileSize:3
273 Hashes of received
file:
274 - SHA512
:e52b7bb395ea3f46974f1f65b7c5975839aad32d4e2ec0f458f735d5aa24d2bf36d7816ed1e01dc3c493e11879e9a8f66dfca42821608cfe993996929a6be18a
275 - SHA256
:943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a
276 - SHA1
:324f464e6151a92cf57b26ef95dcfcf2059a8c44
277 - MD5Sum
:9604ba9427a280db542279d9ed78400b
278 - Checksum
-FileSize:3
279 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.dsc")
280 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/${1}_1.0.
tar.gz Hash Sum mismatch
281 Hashes of expected
file:
282 - MD5Sum
:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
283 - Checksum
-FileSize:3
284 Hashes of received
file:
285 - SHA512
:5aa4cad81553320574eb72ee92bd45a1f0575528e257749dff298b2a33df9e7fc7f5c1c87fc1c8fde230f1234cca3a99bf8625a0ff7bb3238eb7e5473f9b43c0
286 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
287 - SHA1
:680254bad1d7ca0d65ec46aaa315d363abf6a50a
288 - MD5Sum
:db5570bf61464b46e2bde31ed61a7dc6
289 - Checksum
-FileSize:3
290 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.tar.gz")
291 E
: Failed to fetch some archives.
"
293 FAILURE="Reading package lists...
294 Need to get
6 B of
source archives.
295 Get
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
) [3 B
]
296 Err
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
)
298 Hashes of expected
file:
299 - SHA256
:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
300 - Checksum
-FileSize:3
301 - SHA1
:324f464e6151a92cf57b26ef95dcfcf2059a8c44
302 - MD5Sum
:9604ba9427a280db542279d9ed78400b
303 Hashes of received
file:
304 - SHA256
:943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a
305 - SHA1
:324f464e6151a92cf57b26ef95dcfcf2059a8c44
306 - MD5Sum
:9604ba9427a280db542279d9ed78400b
307 - Checksum
-FileSize:3
308 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.dsc")
309 Get
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar) [3 B
]
310 Err
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar)
312 Hashes of expected
file:
313 - SHA256
:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
314 - Checksum
-FileSize:3
315 - SHA1
:680254bad1d7ca0d65ec46aaa315d363abf6a50a
316 - MD5Sum
:db5570bf61464b46e2bde31ed61a7dc6
317 Hashes of received
file:
318 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
319 - SHA1
:680254bad1d7ca0d65ec46aaa315d363abf6a50a
320 - MD5Sum
:db5570bf61464b46e2bde31ed61a7dc6
321 - Checksum
-FileSize:3
322 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.tar.gz")
323 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/${1}_1.0.dsc Hash Sum mismatch
324 Hashes of expected
file:
325 - SHA256
:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
326 - Checksum
-FileSize:3
327 - SHA1
:324f464e6151a92cf57b26ef95dcfcf2059a8c44
328 - MD5Sum
:9604ba9427a280db542279d9ed78400b
329 Hashes of received
file:
330 - SHA256
:943d3bf22ac661fb0f59bc4ff68cc12b04ff17a838dfcc2537008eb9c7f3770a
331 - SHA1
:324f464e6151a92cf57b26ef95dcfcf2059a8c44
332 - MD5Sum
:9604ba9427a280db542279d9ed78400b
333 - Checksum
-FileSize:3
334 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.dsc")
335 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/${1}_1.0.
tar.gz Hash Sum mismatch
336 Hashes of expected
file:
337 - SHA256
:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
338 - Checksum
-FileSize:3
339 - SHA1
:680254bad1d7ca0d65ec46aaa315d363abf6a50a
340 - MD5Sum
:db5570bf61464b46e2bde31ed61a7dc6
341 Hashes of received
file:
342 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
343 - SHA1
:680254bad1d7ca0d65ec46aaa315d363abf6a50a
344 - MD5Sum
:db5570bf61464b46e2bde31ed61a7dc6
345 - Checksum
-FileSize:3
346 Last modification reported
: $(lastmodification "aptarchive/${1}_1.0.tar.gz")
347 E
: Failed to fetch some archives.
"
349 testfailureequal "$FAILURE" aptget source -d "$@
"
350 msgtest 'Files were not download as they have hashsum mismatches for' "$1"
351 testfailure --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
353 if [ "$2" != '--allow-unauthenticated' ]; then
354 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
355 testsuccessequal "Reading package lists...
356 Skipping download of
file '${1}_1.0.dsc' as requested hashsum is not available
for authentication
357 Skipping download of
file '${1}_1.0.tar.gz' as requested hashsum is not available
for authentication
358 Need to get
0 B of
source archives.
359 Download complete and
in download only mode
" aptget source -d "$@
" -o Acquire::ForceHash=ROT26
360 msgtest 'Files were not download as hash is unavailable for' "$1"
361 testfailure --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
364 if [ "$1" != 'pkg-size-bad' ]; then
365 rm -f ${1}_1.0.dsc ${1}_1.0.tar.gz
366 testsuccessequal "Reading package lists...
367 Need to get
6 B of
source archives.
368 Get
:1 http
://localhost
:${APTHTTPPORT} $1 1.0 (dsc
) [3 B
]
369 Get
:2 http
://localhost
:${APTHTTPPORT} $1 1.0 (tar) [3 B
]
370 Download complete and
in download only mode
" aptget source --allow-unauthenticated -d "$@
" -o Acquire::ForceHash=ROT26
371 msgtest 'Files were downloaded unauthenticated as user allowed it' "$1"
372 testsuccess --nomsg test -e ${1}_1.0.dsc -a -e ${1}_1.0.tar.gz
376 testnohash pkg-md5-ok
377 testnohash pkg-sha1-ok
379 testkeep pkg-sha256-ok
381 # pkg-sha256-bad has a bad SHA sum, but good MD5 sum. If apt is
382 # checking the best available hash (as it should), this will trigger
384 testmismatch pkg-sha256-bad
385 testok pkg-sha256-bad -o Acquire::ForceHash=MD5Sum
387 testnohash pkg-md5-bad
388 testmismatch pkg-md5-bad --allow-unauthenticated
390 testmismatch pkg-size-bad
392 # not having MD5 sum doesn't mean the file doesn't exist at all …
394 testok pkg-no-md5 -o Acquire::ForceHash=SHA256
395 testsuccessequal "Reading package lists...
396 Skipping download of
file 'pkg-no-md5_1.0.dsc' as requested hashsum is not available
for authentication
397 Skipping download of
file 'pkg-no-md5_1.0.tar.gz' as requested hashsum is not available
for authentication
398 Need to get
0 B of
source archives.
399 Download complete and
in download only mode
" aptget source -d pkg-no-md5 -o Acquire::ForceHash=MD5Sum
400 msgtest 'Files were not download as MD5 is not available for this package' 'pkg-no-md5'
401 testfailure --nomsg test -e pkg-no-md5_1.0.dsc -a -e pkg-no-md5_1.0.tar.gz
403 # deal with cases in which we haven't for all files the same checksum type
404 # mostly pathologic as this shouldn't happen, but just to be sure
405 testsuccessequal "Reading package lists...
406 Skipping download of
file 'pkg-mixed-ok_1.0.tar.gz' as requested hashsum is not available
for authentication
407 Need to get
3 B of
source archives.
408 Get
:1 http
://localhost
:${APTHTTPPORT} pkg
-mixed-ok 1.0 (dsc
) [3 B
]
409 Download complete and
in download only mode
" aptget source -d pkg-mixed-ok
411 testsuccessequal "Reading package lists...
412 Skipping download of
file 'pkg-mixed-sha1-bad_1.0.dsc' as requested hashsum is not available
for authentication
413 Need to get
3 B of
source archives.
414 Get
:1 http
://localhost
:${APTHTTPPORT} pkg
-mixed-sha1-bad 1.0 (tar) [3 B
]
415 Download complete and
in download only mode
" aptget source -d pkg-mixed-sha1-bad
416 msgtest 'Only tar file is downloaded as the dsc has hashsum mismatch' 'pkg-mixed-sha1-bad'
417 testsuccess --nomsg test ! -e pkg-mixed-sha1-bad_1.0.dsc -a -e pkg-mixed-sha1-bad_1.0.tar.gz
418 testfailureequal "Reading package lists...
419 Skipping download of
file 'pkg-mixed-sha2-bad_1.0.dsc' as requested hashsum is not available
for authentication
420 Need to get
3 B of
source archives.
421 Get
:1 http
://localhost
:${APTHTTPPORT} pkg
-mixed-sha2-bad 1.0 (tar) [3 B
]
422 Err
:1 http
://localhost
:${APTHTTPPORT} pkg
-mixed-sha2-bad 1.0 (tar)
424 Hashes of expected
file:
425 - SHA256
:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
426 - Checksum
-FileSize:3
427 Hashes of received
file:
428 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
429 - Checksum
-FileSize:3
430 Last modification reported
: $(lastmodification 'aptarchive/pkg-mixed-sha2-bad_1.0.tar.gz')
431 E
: Failed to fetch http
://localhost
:${APTHTTPPORT}/pkg
-mixed-sha2-bad_1.0.
tar.gz Hash Sum mismatch
432 Hashes of expected
file:
433 - SHA256
:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
434 - Checksum
-FileSize:3
435 Hashes of received
file:
436 - SHA256
:90aebae315675cbf04612de4f7d5874850f48e0b8dd82becbeaa47ca93f5ebfb
437 - Checksum
-FileSize:3
438 Last modification reported
: $(lastmodification 'aptarchive/pkg-mixed-sha2-bad_1.0.tar.gz')
439 E
: Failed to fetch some archives.
" aptget source -d pkg-mixed-sha2-bad
441 # it gets even more pathologic: multiple entries for one file, some even disagreeing!
442 testnohash pkg-md5-agree
443 testfailureequal 'Reading package lists...
444 E: Error parsing checksum in Files of source package pkg-md5-disagree' aptget source -d pkg-md5-disagree
445 testfailureequal 'Reading package lists...
446 E: Error parsing checksum in Checksums-SHA256 of source package pkg-sha256-disagree' aptget source -d pkg-sha256-disagree