]> git.saurik.com Git - apt.git/blame - test/integration/test-bug-838779-untrusted-to-trusted-Release-hit
reset HOME, USER(NAME), TMPDIR & SHELL in DropPrivileges
[apt.git] / test / integration / test-bug-838779-untrusted-to-trusted-Release-hit
CommitLineData
84eec207
DK
1#!/bin/sh
2set -e
3
4TESTDIR="$(readlink -f "$(dirname "$0")")"
5. "$TESTDIR/framework"
6setupenvironment
7configarchitecture 'amd64'
8
9buildsimplenativepackage 'foo' 'all' '1' 'stable'
10
11export APT_DONT_SIGN=''
12setupaptarchive --no-update
13
14changetowebserver
15
16testsuccess aptget update
17testdpkgnotinstalled 'foo'
18testsuccess apt install foo -y
19testdpkginstalled 'foo'
20testsuccess apt purge foo -y
21testdpkgnotinstalled 'foo'
22
23msgmsg 'Untrusted to trusted hit' 'InRelease'
24rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
25mv rootdir/etc/apt/trusted.gpg.d rootdir/etc/apt/trusted.gpg.d-bak
26testwarning aptget update
27testfailure apt install foo -y
28testdpkgnotinstalled 'foo'
29mv rootdir/etc/apt/trusted.gpg.d-bak rootdir/etc/apt/trusted.gpg.d
30testsuccess aptget update
31testsuccess apt install foo -y
32testdpkginstalled 'foo'
33testsuccess apt purge foo -y
34testdpkgnotinstalled 'foo'
35
36msgmsg 'Untrusted to trusted hit' 'Release.gpg'
37find aptarchive -name 'InRelease' -delete
38rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives
39mv rootdir/etc/apt/trusted.gpg.d rootdir/etc/apt/trusted.gpg.d-bak
40testwarning aptget update
41testfailure apt install foo -y
42testdpkgnotinstalled 'foo'
43mv rootdir/etc/apt/trusted.gpg.d-bak rootdir/etc/apt/trusted.gpg.d
44testsuccess aptget update
45testsuccess apt install foo -y
46testdpkginstalled 'foo'