diff options
| author | Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> | 2025-03-12 19:45:18 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-03-14 08:29:23 +0000 |
| commit | f866dac363c6a22fe1b35baddf126b39a405410e (patch) | |
| tree | 7e85a693b39feb8a58c0232d7920c1e0eed1b598 /test | |
| parent | 8be7a10b43804fc4ebef712892e45bba26647d1f (diff) | |
cmdline/apt-get.cc: emit Signed-By field and support $(SIGNED_BY) in apt-get indextargets --format
Diffstat (limited to 'test')
| -rwxr-xr-x | test/integration/test-signed-by-option | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/integration/test-signed-by-option b/test/integration/test-signed-by-option index e6a3fbb86..62081eb06 100755 --- a/test/integration/test-signed-by-option +++ b/test/integration/test-signed-by-option @@ -40,13 +40,7 @@ setupaptarchive --no-update rm -f rootdir/etc/apt/sources.list.d/* rootdir/etc/apt/sources.list rm -f rootdir/etc/apt/trusted.gpg.d/* rootdir/etc/apt/trusted.gpg -cat > rootdir/etc/apt/sources.list.d/deb822.sources << EOF -Types: deb -URIs: file://$PWD/aptarchive -Suites: stable -Components: main -xSigned-By: - -----BEGIN PGP PUBLIC KEY BLOCK----- +GPGKEYBLOCK='-----BEGIN PGP PUBLIC KEY BLOCK----- . mQENBExsGNYBCADNVx+TQ6h1tEyUP11f7ihfta3ZePkW1rIdkdHgA3Fw/TeLnTEq mWuhMw2pL4zy1vQhU8efNrRaNUrUS7kV3LIdSjd5K4Aizqtsdy/gLKFoTcO8LFIm @@ -63,15 +57,22 @@ xSigned-By: xNHhRHzEPTYZ4PCCyaRX4YRAwsEMFsscsghpQgqRDhGSWq+jUVI+Aay7FTnd+1UA 1snsGpB0o9qxx8JpGMXI =c/k4 - -----END PGP PUBLIC KEY BLOCK----- + -----END PGP PUBLIC KEY BLOCK-----' +cat > rootdir/etc/apt/sources.list.d/deb822.sources << EOF +Types: deb +URIs: file://$PWD/aptarchive +Suites: stable +Components: main +xSigned-By: + $GPGKEYBLOCK EOF testfailure apt update -o Debug::Acquire::gpgv=1 testsuccess grep -E "(NO_PUBKEY 5A90D141DBAC8DAE|no keyring is specified)" rootdir/tmp/testfailure.output sed -i s/^xSigned-By/Signed-By/ rootdir/etc/apt/sources.list.d/deb822.sources testsuccess apt update -o Debug::Acquire::gpgv=1 +testsuccessequal "$(echo "$GPGKEYBLOCK" | sed 's/^ \+/ /')\n$(echo "$GPGKEYBLOCK" | sed 's/^ \+/ /')" aptget indextargets --format '$(SIGNED_BY)' # make sure we did not leave leftover files (LP: #1995247) testsuccessequal "" ls "${TMPDIR}" - rm -f rootdir/etc/apt/sources.list.d/* msgtest 'Check that a repository with' 'only the fisrt entry has no Signed-By value works' |
