4 TESTDIR
="$(readlink -f "$(dirname "$0")")"
8 configarchitecture "i386
"
12 mkdir -p var/lib/apt/keyrings
13 mkdir -p usr/share/keyrings
15 # install the fake master keyring
16 install -m0644 keys/test-master-keyring.pub usr/share/keyrings
17 echo "APT
::Key
::MasterKeyring
\"${TMPWORKINGDIRECTORY}/usr
/share
/keyrings
/test-master-keyring.pub
\";" >> ./aptconfig.conf
19 # setup archive-keyring
20 mkdir -p aptarchive/ubuntu/project
21 install -m0644 keys/test-archive-keyring.pub aptarchive/ubuntu/project/
22 echo "APT
::Key
::ArchiveKeyringURI
\"http
://localhost
:${APTHTTPPORT}/ubuntu
/project
/test-archive-keyring.pub
\";" >> ./aptconfig.conf
23 echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf
25 # test against the "real
" webserver
26 testsuccess aptkey --fakeroot net-update
27 testfailure grep 'not added' rootdir/tmp/testsuccess.output
28 testaptkeys 'oldarchive' 'newarchive'
30 # now try a different one
31 # setup archive-keyring
32 mkdir -p aptarchive/ubuntu/project
33 install -m0644 keys/marvinparanoid.pub aptarchive/ubuntu/project/
34 echo "APT
::Key
::ArchiveKeyringURI
\"http
://localhost
:${APTHTTPPORT}/ubuntu
/project
/marvinparanoid.pub
\";" >> ./aptconfig.conf
35 echo 'APT::Key::Net-Update-Enabled "1";' >> ./aptconfig.conf
37 # test against the "real
" webserver
38 testsuccessequal "Checking
for new archive signing keys now
39 Key
'DE66AECA9151AFA1877EC31DE8525D47528144E2' not added. It is not signed with a master key
" aptkey --fakeroot net-update
41 testaptkeys 'oldarchive' 'newarchive'