4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
7 configarchitecture 'amd64'
9 buildsimplenativepackage 'foo' 'all' '1' 'stable'
10 buildsimplenativepackage 'foo' 'all' '2' 'sid'
11 setupaptarchive --no-update
13 NEWMETHODS="$(readlink -f rootdir)/usr
/lib
/apt
/methods
"
14 OLDMETHODS="$(readlink -f rootdir/usr/lib/apt/methods)"
18 IFS="$(printf "\n\b")"
19 for METH in $(find "$OLDMETHODS" ! -type d); do
20 ln -s "$OLDMETHODS/$(basename "$METH")" "$NEWMETHODS"
24 changetohttpswebserver
25 for FILE in rootdir/etc/apt/sources.list.d/*-sid-* ; do
26 sed -i -e 's#https:#http:#' -e "s
#:${APTHTTPSPORT}/#:${APTHTTPPORT}/#" "$FILE"
30 rm -rf rootdir
/var
/lib
/apt
/lists
31 testsuccessequal
'N: Unable to locate package foo' aptcache policy foo
-q=0
34 testsuccess aptget update
35 testsuccessequal
"foo:
40 500 http://localhost:${APTHTTPPORT} sid/main all Packages
42 500 https://localhost:${APTHTTPSPORT} stable/main all Packages" aptcache policy foo
45 mv aptarchive
/dists
/stable aptarchive
/dists
/stable.good
46 testfailuremsg
"E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file." apt update
47 testfailure aptget update
-q=0 --no-allow-insecure-repositories
48 testequalor2
"Hit:1 http://localhost:${APTHTTPPORT} sid InRelease
49 Ign:2 https://localhost:${APTHTTPSPORT} stable InRelease
51 Err:3 https://localhost:${APTHTTPSPORT} stable Release
53 Reading package lists...
54 E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file.
55 N: Updating such a repository securily is impossible and therefore disabled by default.
56 N: See apt-secure(8) manpage for repository creation and user configuration details." "Ign:1 https://localhost:${APTHTTPSPORT} stable InRelease
58 Err:2 https://localhost:${APTHTTPSPORT} stable Release
60 Hit:3 http://localhost:${APTHTTPPORT} sid InRelease
61 Reading package lists...
62 E: The repository 'https://localhost:${APTHTTPSPORT} stable Release' does not have a Release file.
63 N: Updating such a repository securily is impossible and therefore disabled by default.
64 N: See apt-secure(8) manpage for repository creation and user configuration details." cat rootdir
/tmp
/testfailure.output
66 mv aptarchive
/dists
/stable.good aptarchive
/dists
/stable
68 testsuccessequal
"foo:
73 500 http://localhost:${APTHTTPPORT} sid/main all Packages" aptcache policy foo
78 rm "${NEWMETHODS}/https"
79 testfailuremsg
"E: The method driver ${TMPWORKINGDIRECTORY}/rootdir/usr/lib/apt/methods/https could not be found.
80 W: Failed to fetch https://localhost:${APTHTTPSPORT}/dists/stable/InRelease
81 E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
84 ln -s "$OLDMETHODS/https" "$NEWMETHODS"
86 for FILE
in rootdir
/etc
/apt
/sources.list.d
/*-stable-* ; do
87 # lets see how many testservers run also Doom
88 sed -i -e "s#:${APTHTTPSPORT}/#:666/#" "$FILE"
90 testwarningmsg
"W: Failed to fetch https://localhost:666/dists/stable/InRelease Failed to connect to localhost port 666: Connection refused
91 W: Some index files failed to download. They have been ignored, or old ones used instead." aptget update