diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-10-06 18:30:51 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2017-02-22 18:11:43 +0100 |
commit | 2a6d2e9c0781a0a7bb5d2aad7b8bdbee315d4461 (patch) | |
tree | 0cd8fdfba024586c5e976438ec92055b62f0a9c4 /test | |
parent | 9bacab3d7ead0246e2894d3a6498e16ee2798f8c (diff) |
keep Release.gpg on untrusted to trusted IMS-Hit
A user relying on the deprecated behaviour of apt-get to accept a source
with an unknown pubkey to install a package containing the key expects
that the following 'apt-get update' causes the source to be considered
as trusted, but in case the source hadn't changed in the meantime this
wasn't happening: The source kept being untrusted until the Release file
was changed.
This only effects sources not using InRelease and only apt-get, the apt
binary downright refuses this course of actions, but it is a common way
of adding external sources.
Closes: 838779
(cherry picked from commit 84eec207be35b8c117c430296d4c212b079c00c1)
LP: #1657440
(cherry picked from commit 5605c9880f36c764baaca59328777d34645a32fa)
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/test-bug-838779-untrusted-to-trusted-Release-hit | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/test/integration/test-bug-838779-untrusted-to-trusted-Release-hit b/test/integration/test-bug-838779-untrusted-to-trusted-Release-hit new file mode 100755 index 000000000..6fcc2b8e1 --- /dev/null +++ b/test/integration/test-bug-838779-untrusted-to-trusted-Release-hit @@ -0,0 +1,46 @@ +#!/bin/sh +set -e + +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" +setupenvironment +configarchitecture 'amd64' + +buildsimplenativepackage 'foo' 'all' '1' 'stable' + +export APT_DONT_SIGN='' +setupaptarchive --no-update + +changetowebserver + +testsuccess aptget update +testdpkgnotinstalled 'foo' +testsuccess apt install foo -y +testdpkginstalled 'foo' +testsuccess apt purge foo -y +testdpkgnotinstalled 'foo' + +msgmsg 'Untrusted to trusted hit' 'InRelease' +rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives +mv rootdir/etc/apt/trusted.gpg.d rootdir/etc/apt/trusted.gpg.d-bak +testwarning aptget update +testfailure apt install foo -y +testdpkgnotinstalled 'foo' +mv rootdir/etc/apt/trusted.gpg.d-bak rootdir/etc/apt/trusted.gpg.d +testsuccess aptget update +testsuccess apt install foo -y +testdpkginstalled 'foo' +testsuccess apt purge foo -y +testdpkgnotinstalled 'foo' + +msgmsg 'Untrusted to trusted hit' 'Release.gpg' +find aptarchive -name 'InRelease' -delete +rm -rf rootdir/var/lib/apt/lists rootdir/var/cache/apt/archives +mv rootdir/etc/apt/trusted.gpg.d rootdir/etc/apt/trusted.gpg.d-bak +testwarning aptget update +testfailure apt install foo -y +testdpkgnotinstalled 'foo' +mv rootdir/etc/apt/trusted.gpg.d-bak rootdir/etc/apt/trusted.gpg.d +testsuccess aptget update +testsuccess apt install foo -y +testdpkginstalled 'foo' |