// 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,
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
}
/*}}}*/
-pkgAcquire::UriIterator::~UriIterator() {}
-pkgAcquire::MethodConfig::~MethodConfig() {}
-pkgAcquireStatus::~pkgAcquireStatus() {}
+APT_CONST pkgAcquire::UriIterator::~UriIterator() {}
+APT_CONST pkgAcquire::MethodConfig::~MethodConfig() {}
+APT_CONST pkgAcquireStatus::~pkgAcquireStatus() {}
}
/*}}}*/
-pkgArchiveCleaner::~pkgArchiveCleaner() {}
+APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {}
}
/*}}}*/
-debRecordParser::~debRecordParser() {};
+debRecordParser::~debRecordParser() {}
}
/*}}}*/
-IndexCopy::~IndexCopy() {}
+APT_CONST IndexCopy::~IndexCopy() {}
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
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
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
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
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
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