]>
git.saurik.com Git - apt.git/blob - test/integration/test-bug-596498-trusted-unsigned-repo
4 TESTDIR
=$(readlink -f $(dirname $0))
7 configarchitecture
'i386'
9 buildsimplenativepackage
'cool' 'i386' '1.0' 'unstable'
11 msgmsg
'default setup'
15 rm -rf rootdir
/var
/lib
/apt
/ rootdir
/var
/cache
/apt
/*.bin
16 ${1:-testwarning} aptget update
--allow-insecure-repositories
19 PKGTEXT
="$(aptget install cool --assume-no -d | head -n 8)"
20 DOWNLOG
="$(echo "$PKGTEXT" | tail -n 1)"
21 PKGTEXT
="$(echo "$PKGTEXT" | head -n 7)"
22 DEBFILE
='rootdir/etc/apt/sources.list.d/apt-test-unstable-*.list'
24 testsuccessequal
"$PKGTEXT
26 Download complete and in download only mode" aptget
install cool
--assume-no -d
28 testsuccessequal
"$PKGTEXT
30 Download complete and in download only mode" aptget
install cool
--assume-no -d --allow-unauthenticated
32 msgmsg
'sources marked trusted=no'
33 sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=no] #' $DEBFILE
34 aptgetupdate
'testsuccess'
36 testfailureequal
"$PKGTEXT
37 WARNING: The following packages cannot be authenticated!
39 Install these packages without verification? [y/N] N
40 E: Some packages could not be authenticated" aptget
install cool
--assume-no -d
42 configarchitecture
'amd64' 'i386'
43 testequal
"$(echo "$PKGTEXT" | sed 's#cool$#cool:i386#g')
44 WARNING: The following packages cannot be authenticated!
46 Authentication warning overridden.
48 Download complete and in download only mode" aptget
install cool
:i386
--assume-no -d --allow-unauthenticated
49 configarchitecture
'i386'
51 find aptarchive
/ \
( -name 'Release.gpg' -o -name 'InRelease' \
) -delete
52 msgmsg
'unsigned repo'
53 sed -i -e 's#\(deb\(-src\)\?\) \[trusted=no\] #\1 #' $DEBFILE
56 testfailureequal
"$PKGTEXT
57 WARNING: The following packages cannot be authenticated!
59 Install these packages without verification? [y/N] N
60 E: Some packages could not be authenticated" aptget
install cool
--assume-no -d
62 testsuccessequal
"$PKGTEXT
63 WARNING: The following packages cannot be authenticated!
65 Authentication warning overridden.
67 Download complete and in download only mode" aptget
install cool
--assume-no -d --allow-unauthenticated
69 msgmsg
'sources marked trusted=yes'
70 sed -i -e 's#\(deb\(-src\)\?\) #\1 [trusted=yes] #' $DEBFILE
71 aptgetupdate
'testsuccess'
73 testsuccessequal
"$PKGTEXT
75 Download complete and in download only mode" aptget
install cool
--assume-no -d