summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/acquire-item.cc8
-rw-r--r--apt-pkg/acquire.cc6
-rw-r--r--apt-pkg/clean.cc2
-rw-r--r--apt-pkg/deb/debrecords.cc2
-rw-r--r--apt-pkg/indexcopy.cc2
-rw-r--r--test/integration/framework2
-rwxr-xr-xtest/integration/test-apt-get-update-unauth-warning5
-rwxr-xr-xtest/integration/test-apt-update-expected-size2
-rwxr-xr-xtest/integration/test-apt-update-ims3
-rwxr-xr-xtest/integration/test-apt-update-rollback2
-rwxr-xr-xtest/integration/test-sourceslist-trusted-options27
11 files changed, 43 insertions, 18 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 44d45cedb..5ca2d57fa 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1742,10 +1742,6 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
// check if we need to fail at this point
if (AuthPass == true && CheckStopAuthentication(RealURI, Message))
return;
- else if (AuthPass == false)
- _error->Warning(_("The data from '%s' is not signed. Packages "
- "from that repository can not be authenticated."),
- URIDesc.c_str());
// FIXME: meh, this is not really elegant
string InReleaseURI = RealURI.replace(RealURI.rfind("Release.gpg"), 12,
@@ -1774,6 +1770,10 @@ void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)/*{{{*/
return;
}
}
+ else
+ _error->Warning(_("The data from '%s' is not signed. Packages "
+ "from that repository can not be authenticated."),
+ URIDesc.c_str());
// this ensures that any file in the lists/ dir is removed by the
// transaction
diff --git a/apt-pkg/acquire.cc b/apt-pkg/acquire.cc
index 3ef912600..1aa709381 100644
--- a/apt-pkg/acquire.cc
+++ b/apt-pkg/acquire.cc
@@ -1018,6 +1018,6 @@ void pkgAcquireStatus::Fetched(unsigned long long Size,unsigned long long Resume
}
/*}}}*/
-pkgAcquire::UriIterator::~UriIterator() {}
-pkgAcquire::MethodConfig::~MethodConfig() {}
-pkgAcquireStatus::~pkgAcquireStatus() {}
+APT_CONST pkgAcquire::UriIterator::~UriIterator() {}
+APT_CONST pkgAcquire::MethodConfig::~MethodConfig() {}
+APT_CONST pkgAcquireStatus::~pkgAcquireStatus() {}
diff --git a/apt-pkg/clean.cc b/apt-pkg/clean.cc
index 606f4ec8c..6edce5b6d 100644
--- a/apt-pkg/clean.cc
+++ b/apt-pkg/clean.cc
@@ -132,4 +132,4 @@ bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
}
/*}}}*/
-pkgArchiveCleaner::~pkgArchiveCleaner() {}
+APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {}
diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc
index d08bb3c7e..b41aa5584 100644
--- a/apt-pkg/deb/debrecords.cc
+++ b/apt-pkg/deb/debrecords.cc
@@ -208,4 +208,4 @@ void debRecordParser::GetRec(const char *&Start,const char *&Stop)
}
/*}}}*/
-debRecordParser::~debRecordParser() {};
+debRecordParser::~debRecordParser() {}
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc
index c8767d606..5fa57fd8b 100644
--- a/apt-pkg/indexcopy.cc
+++ b/apt-pkg/indexcopy.cc
@@ -794,4 +794,4 @@ bool TranslationsCopy::CopyTranslations(string CDROM,string Name, /*{{{*/
}
/*}}}*/
-IndexCopy::~IndexCopy() {}
+APT_CONST IndexCopy::~IndexCopy() {}
diff --git a/test/integration/framework b/test/integration/framework
index 76425f0c3..160df9301 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -851,7 +851,7 @@ setupaptarchive() {
else
setupflataptarchive
fi
- signreleasefiles 'Joe Sixpack' "$@"
+ signreleasefiles 'Joe Sixpack'
if [ "1" != "$NOUPDATE" ]; then
testsuccess aptget update -o Debug::pkgAcquire::Worker=true -o Debug::Acquire::gpgv=true
fi
diff --git a/test/integration/test-apt-get-update-unauth-warning b/test/integration/test-apt-get-update-unauth-warning
index 8e212a3c4..fe0cb45a4 100755
--- a/test/integration/test-apt-get-update-unauth-warning
+++ b/test/integration/test-apt-get-update-unauth-warning
@@ -24,10 +24,7 @@ testequal "Ign file: unstable InRelease
Err file: unstable Release
File not found
W: The repository 'file: unstable Release' does not have a Release file. This is deprecated, please contact the owner of the repository.
-W: Use --allow-insecure-repositories to force the update
-W: Failed to fetch file:$APTARCHIVE/dists/unstable/Release File not found
-
-E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update
+E: Use --allow-insecure-repositories to force the update" aptget update
# no package foo
testequal "Listing..." apt list foo
diff --git a/test/integration/test-apt-update-expected-size b/test/integration/test-apt-update-expected-size
index 58920f544..a039e9e1c 100755
--- a/test/integration/test-apt-update-expected-size
+++ b/test/integration/test-apt-update-expected-size
@@ -38,7 +38,7 @@ echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages.gz
echo "1234567890" >> aptarchive/dists/unstable/main/binary-i386/Packages
NEW_SIZE="$(stat --printf=%s aptarchive/dists/unstable/main/binary-i386/Packages)"
rm -f rootdir/var/lib/apt/lists/localhost*
-testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE) [IP: ::1 8080]
+testequal "W: Failed to fetch http://localhost:8080/dists/unstable/main/binary-i386/Packages Writing more data than expected ($NEW_SIZE > $SIZE)
E: Some index files failed to download. They have been ignored, or old ones used instead." aptget update -qq
diff --git a/test/integration/test-apt-update-ims b/test/integration/test-apt-update-ims
index 8aa5a7262..06b9c2b62 100755
--- a/test/integration/test-apt-update-ims
+++ b/test/integration/test-apt-update-ims
@@ -73,7 +73,8 @@ Ign http://localhost:8080 unstable Release.gpg
Hit http://localhost:8080 unstable/main Sources
Hit http://localhost:8080 unstable/main amd64 Packages
Hit http://localhost:8080 unstable/main Translation-en
-Reading package lists..."
+Reading package lists...
+W: The data from 'http://localhost:8080 unstable Release.gpg' is not signed. Packages from that repository can not be authenticated."
find aptarchive -name "Release.gpg" | xargs rm -f
diff --git a/test/integration/test-apt-update-rollback b/test/integration/test-apt-update-rollback
index 5b9c200fe..220c3052b 100755
--- a/test/integration/test-apt-update-rollback
+++ b/test/integration/test-apt-update-rollback
@@ -136,7 +136,7 @@ test_inrelease_to_unauth_inrelease() {
msgmsg 'Test InRelease to InRelease without good sig'
start_with_good_inrelease
- signreleasefiles 'Marvin Paranoid' '+1hour'
+ signreleasefiles 'Marvin Paranoid'
testequal "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: file: unstable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E8525D47528144E2
diff --git a/test/integration/test-sourceslist-trusted-options b/test/integration/test-sourceslist-trusted-options
index ae65cca83..1178df46a 100755
--- a/test/integration/test-sourceslist-trusted-options
+++ b/test/integration/test-sourceslist-trusted-options
@@ -166,3 +166,30 @@ insecureaptgetupdate
everythingfails
everythingfails -t stable
everythingfails -t testing
+
+# same as the one further above, but this time testing is unsigned
+find aptarchive/ \( -name 'InRelease' -o -name 'Release.gpg' \) -delete
+signreleasefiles 'Joe Sixpack' 'aptarchive/dists/stable'
+
+msgmsg 'Test without trusted option and unsigned and good sources'
+cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
+insecureaptgetupdate
+everythingfails
+everythingsucceeds -t stable
+everythingfails -t testing
+
+msgmsg 'Test with trusted=yes option and unsigned and good sources'
+cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
+sed -i 's#^deb\(-src\)\? #deb\1 [trusted=yes] #' rootdir/etc/apt/sources.list.d/*
+aptgetupdate
+everythingsucceeds
+everythingsucceeds -t stable
+everythingsucceeds -t testing
+
+msgmsg 'Test with trusted=no option and unsigned and good sources'
+cp -a rootdir/etc/apt/sources.list.d.bak/* rootdir/etc/apt/sources.list.d/
+sed -i 's#^deb\(-src\)\? #deb\1 [trusted=no] #' rootdir/etc/apt/sources.list.d/*
+insecureaptgetupdate
+everythingfails
+everythingfails -t stable
+everythingfails -t testing