From f8a58c19cf1543010dbca2369fcbb5b9a29ed819 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 18 Sep 2014 07:59:01 +0200 Subject: ./pre-release pre-export --- configure.ac | 2 +- doc/apt-verbatim.ent | 2 +- doc/po/apt-doc.pot | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index e21220e3f..2e591cdf2 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) PACKAGE="apt" -PACKAGE_VERSION="1.0.8" +PACKAGE_VERSION="1.0.9.1" PACKAGE_MAIL="APT Development Team " AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_DEFINE_UNQUOTED(PACKAGE_VERSION,"$PACKAGE_VERSION") diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index c176e426d..126f26b8b 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -225,7 +225,7 @@ "> - + diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index 83e1de724..5538e4a04 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: apt-doc 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2014-09-09 20:35+0200\n" +"POT-Creation-Date: 2014-09-18 07:57+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3 From 8b451962751298876d1f399e4de492d8adbb135a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 19 Sep 2014 16:41:50 +0200 Subject: test/integration/test-apt-update-file: improve test --- test/integration/test-apt-update-file | 2 ++ test/integration/test-bug-762160-relpath | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 test/integration/test-bug-762160-relpath diff --git a/test/integration/test-apt-update-file b/test/integration/test-apt-update-file index e267c71da..fbcd473cc 100755 --- a/test/integration/test-apt-update-file +++ b/test/integration/test-apt-update-file @@ -29,6 +29,8 @@ aptget update -qq -o Debug::pkgAcquire::Auth=1 2> output.log canary="SHA512:$(bzcat aptarchive/dists/unstable/main/binary-amd64/Packages.bz2 | sha512sum |cut -f1 -d' ')" grep -q "RecivedHash: $canary" output.log +# foo is still available +testsuccess aptget install -s foo # the cleanup should still work chmod 750 aptarchive/dists/unstable/main/binary-amd64 diff --git a/test/integration/test-bug-762160-relpath b/test/integration/test-bug-762160-relpath new file mode 100755 index 000000000..0af71f57b --- /dev/null +++ b/test/integration/test-bug-762160-relpath @@ -0,0 +1,15 @@ +#!/bin/sh +set -e + +# dpkg implements versioned provides in commit 5bb02fe80e9f40dcad9703a72f67cf615ff217b5 +# but previous versions seem to allow parsing, working and ignoring it. + +TESTDIR=$(readlink -f $(dirname $0)) +. $TESTDIR/framework +setupenvironment +configarchitecture 'amd64' + +insertpackage 'unstable' 'foo' 'all' '1' +setupaptarchive + +aptget update -o Dir=./apt -- cgit v1.2.3 From 9da539c5aff025aab99537be1c75e8c6a853fd83 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 19 Sep 2014 16:41:55 +0200 Subject: Fix regression when copy: is used for a relative path When we do a ReverifyAfterIMS() we use the copy: method to verify the hashes again. If the user uses -o Dir=./something/relative this fails because we use the URI class in copy.cc that strips away the leading relative part. By not using URI this is fixed. Closes: #762160 --- methods/copy.cc | 4 ++-- test/integration/test-bug-762160-relpath | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/methods/copy.cc b/methods/copy.cc index 5570f31c8..b78053d36 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -55,8 +55,8 @@ void CopyMethod::CalculateHashes(FetchResult &Res) /* */ bool CopyMethod::Fetch(FetchItem *Itm) { - URI Get = Itm->Uri; - std::string File = Get.Path; + // this ensures that relative paths work in copy + std::string File = Itm->Uri.substr(Itm->Uri.find(':')+1); // Stat the file and send a start message struct stat Buf; diff --git a/test/integration/test-bug-762160-relpath b/test/integration/test-bug-762160-relpath index 0af71f57b..204587727 100755 --- a/test/integration/test-bug-762160-relpath +++ b/test/integration/test-bug-762160-relpath @@ -1,9 +1,9 @@ #!/bin/sh +# regresion test for bug #762160 where apt-get update fails when a +# relative directory is given +# set -e -# dpkg implements versioned provides in commit 5bb02fe80e9f40dcad9703a72f67cf615ff217b5 -# but previous versions seem to allow parsing, working and ignoring it. - TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment @@ -11,5 +11,7 @@ configarchitecture 'amd64' insertpackage 'unstable' 'foo' 'all' '1' setupaptarchive +changetowebserver -aptget update -o Dir=./apt +testsuccess aptget update -o Dir=./rootdir +testsuccess aptget update -o Dir=./rootdir \ No newline at end of file -- cgit v1.2.3 From 003bf0b2195c932e458c93fe3fd33c495e95c950 Mon Sep 17 00:00:00 2001 From: Holger Wansing Date: Fri, 19 Sep 2014 22:32:14 +0200 Subject: German program translation update Closes: 762223 --- po/de.po | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/po/de.po b/po/de.po index b5e05bd72..ae3b15d41 100644 --- a/po/de.po +++ b/po/de.po @@ -8,10 +8,10 @@ # msgid "" msgstr "" -"Project-Id-Version: apt 1.0.3\n" +"Project-Id-Version: apt 1.0.8\n" "Report-Msgid-Bugs-To: APT Development Team \n" "POT-Creation-Date: 2014-09-09 20:35+0200\n" -"PO-Revision-Date: 2014-06-09 22:42+0100\n" +"PO-Revision-Date: 2014-09-19 13:04+0100\n" "Last-Translator: Holger Wansing \n" "Language-Team: Debian German \n" "Language: \n" @@ -658,7 +658,7 @@ msgstr "" #: cmdline/apt-helper.cc:36 msgid "Need one URL as argument" -msgstr "" +msgstr "Eine URL als Argument wird benötigt" #: cmdline/apt-helper.cc:49 msgid "Must specify at least one pair url/filename" @@ -669,7 +669,6 @@ msgid "Download Failed" msgstr "Herunterladen fehlgeschlagen" #: cmdline/apt-helper.cc:80 -#, fuzzy msgid "" "Usage: apt-helper [options] command\n" " apt-helper [options] download-file uri target-path\n" @@ -683,12 +682,13 @@ msgid "" " This APT helper has Super Meep Powers.\n" msgstr "" "Aufruf: apt-helper [Optionen] Befehl\n" -" apt-helper [Optionen] download-file uri zielpfad\n" +" apt-helper [Optionen] download-file URI Zielpfad\n" "\n" "apt-helper ist ein internes Hilfsprogramm für apt.\n" "\n" "Befehle:\n" " download-file - den angegebenen URI in den Zielpfad herunterladen\n" +" auto-detect-proxy - erkennen eines Proxy-Servers mittels apt.conf\n" "\n" " Dieses APT-Hilfsprogramm hat Super-Road-Runner-Kräfte.\n" @@ -1822,11 +1822,15 @@ msgid "%i package can be upgraded. Run 'apt list --upgradable' to see it.\n" msgid_plural "" "%i packages can be upgraded. Run 'apt list --upgradable' to see them.\n" msgstr[0] "" +"Aktualisierung für %i Paket verfügbar. Führen Sie »apt list --upgradable« " +"aus, um es anzuzeigen.\n" msgstr[1] "" +"Aktualisierung für %i Pakete verfügbar. Führen Sie »apt list --upgradable« " +"aus, um sie anzuzeigen.\n" #: apt-private/private-update.cc:94 msgid "All packages are up to date." -msgstr "" +msgstr "Alle Pakete sind aktuell." #: apt-private/private-upgrade.cc:25 msgid "Calculating upgrade... " @@ -2116,9 +2120,8 @@ msgid "Failed to stat %s" msgstr "%s mit »stat« abfragen fehlgeschlagen" #: ftparchive/cachedb.cc:332 -#, fuzzy msgid "Failed to read .dsc" -msgstr "readlink von %s fehlgeschlagen" +msgstr "Lesen von .dsc fehlgeschlagen" #: ftparchive/cachedb.cc:365 msgid "Archive has no control record" @@ -2518,9 +2521,9 @@ msgid "Unable to lock directory %s" msgstr "Das Verzeichnis %s kann nicht gesperrt werden." #: apt-pkg/acquire.cc:490 apt-pkg/clean.cc:39 -#, fuzzy, c-format +#, c-format msgid "Clean of %s is not supported" -msgstr "Indexdateityp »%s« wird nicht unterstützt." +msgstr "Leeren von %s wird nicht unterstützt." #. only show the ETA if it makes sense #. two days -- cgit v1.2.3 From efcbb0f0c0ec92d6b61c6349a5ad69952939272e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= Date: Fri, 19 Sep 2014 23:03:55 +0200 Subject: disable timestamps in the footer of docs by doxygen The default being 'yes', but this spoils the effort of reproducible builds for no real gain. (https://wiki.debian.org/ReproducibleBuilds) --- doc/Doxyfile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 6ca8d1189..98eecdbd2 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -1128,7 +1128,7 @@ HTML_COLORSTYLE_GAMMA = 80 # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_TIMESTAMP = YES +HTML_TIMESTAMP = NO # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the -- cgit v1.2.3 From 2bd6be8ad24583ed9935f5c5d57c04ba7344111e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 20 Sep 2014 00:12:13 +0200 Subject: relax grep to support newer curl output format Git-Dch: Ignore --- test/integration/test-apt-https-no-redirect | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/integration/test-apt-https-no-redirect b/test/integration/test-apt-https-no-redirect index 73352a28c..bc744d6f2 100755 --- a/test/integration/test-apt-https-no-redirect +++ b/test/integration/test-apt-https-no-redirect @@ -25,6 +25,11 @@ msgtest 'download of a file does not work if' 'https redirected to http' downloadfile 'https://localhost:4433/redirectme/working' redirectfile >curloutput 2>&1 && msgfail || msgpass msgtest 'libcurl has forbidden access in last request to' 'http resource' -grep -q -- 'Protocol http not supported or disabled in libcurl' curloutput && msgpass || msgfail +if grep -q -E -- 'Protocol "?http"? not supported or disabled in libcurl' curloutput; then + msgpass +else + cat curloutput + msgfail +fi -- cgit v1.2.3 From b0f4b486e6850c5f98520ccf19da71d0ed748ae4 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 21 Sep 2014 10:18:03 +0200 Subject: generalize Acquire::GzipIndex --- apt-pkg/acquire-item.cc | 44 ++++++++++------ apt-pkg/deb/debindexfile.cc | 60 ++++++++++++++-------- apt-private/private-update.cc | 9 +++- cmdline/apt-get.cc | 2 +- methods/copy.cc | 11 ++-- .../test-bug-595691-empty-and-broken-archive-files | 2 +- test/integration/test-compressed-indexes | 20 ++++---- 7 files changed, 90 insertions(+), 58 deletions(-) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 5df43726b..da57f8d3b 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -969,8 +969,10 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, string const &S std::string const comprExt = CompressionExtension.substr(0, CompressionExtension.find(' ')); if (comprExt == "uncompressed") Desc.URI = URI; - else + else { Desc.URI = URI + '.' + comprExt; + DestFile = DestFile + '.' + comprExt; + } Desc.Description = URIDesc; Desc.Owner = this; @@ -984,10 +986,11 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, string const &S /* The only header we use is the last-modified header. */ string pkgAcqIndex::Custom600Headers() { + std::string const compExt = CompressionExtension.substr(0, CompressionExtension.find(' ')); string Final = _config->FindDir("Dir::State::lists"); Final += URItoFileName(RealURI); if (_config->FindB("Acquire::GzipIndexes",false)) - Final += ".gz"; + Final += compExt; string msg = "\nIndex-File: true"; // FIXME: this really should use "IndexTarget::IsOptional()" but that @@ -1027,8 +1030,8 @@ std::string pkgAcqIndex::GetFinalFilename(std::string const &URI, { std::string FinalFile = _config->FindDir("Dir::State::lists"); FinalFile += URItoFileName(URI); - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz") - FinalFile += ".gz"; + if (_config->FindB("Acquire::GzipIndexes",false) == true) + FinalFile += '.' + compExt; return FinalFile; } /*}}}*/ @@ -1036,8 +1039,8 @@ std::string pkgAcqIndex::GetFinalFilename(std::string const &URI, void pkgAcqIndex::ReverifyAfterIMS(std::string const &FileName) { std::string const compExt = CompressionExtension.substr(0, CompressionExtension.find(' ')); - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz") - DestFile += ".gz"; + if (_config->FindB("Acquire::GzipIndexes",false) == true) + DestFile += compExt; string FinalFile = GetFinalFilename(RealURI, compExt); Rename(FinalFile, FileName); @@ -1080,7 +1083,7 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash, /* Always verify the index file for correctness (all indexes must * have a Package field) (LP: #346386) (Closes: #627642) */ - FileFd fd(DestFile, FileFd::ReadOnlyGzip); + FileFd fd(DestFile, FileFd::ReadOnly, FileFd::Extension); // Only test for correctness if the file is not empty (empty is ok) if (fd.Size() > 0) { @@ -1104,8 +1107,8 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash, will work OK */ DestFile = _config->FindDir("Dir::State::lists") + "partial/"; DestFile += URItoFileName(RealURI); - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz") - DestFile += ".gz"; + if (_config->FindB("Acquire::GzipIndexes",false)) + DestFile += '.' + compExt; // Remove the compressed version. if (Erase == true) @@ -1146,16 +1149,23 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash, // matching the Release file if (!Local && StringToBool(LookupTag(Message,"IMS-Hit"),false) == true) { + // set destfile to the final destfile + if(_config->FindB("Acquire::GzipIndexes",false) == false) + { + DestFile = _config->FindDir("Dir::State::lists") + "partial/"; + DestFile += URItoFileName(RealURI); + } + ReverifyAfterIMS(FileName); return; } string decompProg; // If we enable compressed indexes, queue for hash verification - if (_config->FindB("Acquire::GzipIndexes",false) && compExt == "gz" && !Local) + if (_config->FindB("Acquire::GzipIndexes",false)) { DestFile = _config->FindDir("Dir::State::lists"); - DestFile += URItoFileName(RealURI) + ".gz"; + DestFile += URItoFileName(RealURI) + '.' + compExt; Decompression = true; Desc.URI = "copy:" + FileName; @@ -1201,11 +1211,11 @@ pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner, IndexTarget const *Target, // --------------------------------------------------------------------- string pkgAcqIndexTrans::Custom600Headers() { + std::string const compExt = CompressionExtension.substr(0, CompressionExtension.find(' ')); string Final = _config->FindDir("Dir::State::lists"); Final += URItoFileName(RealURI); - if (_config->FindB("Acquire::GzipIndexes",false)) - Final += ".gz"; + Final += compExt; struct stat Buf; if (stat(Final.c_str(),&Buf) != 0) @@ -1552,8 +1562,12 @@ void pkgAcqMetaIndex::AuthDone(string Message) /*{{{*/ URItoFileName((*Target)->URI); unlink(index.c_str()); // and also old gzipindexes - index += ".gz"; - unlink(index.c_str()); + std::vector types = APT::Configuration::getCompressionTypes(); + for (std::vector::const_iterator t = types.begin(); t != types.end(); ++t) + { + index += '.' + (*t); + unlink(index.c_str()); + } } } diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index a0dd15cd8..5b4289e92 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -80,14 +80,18 @@ pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const { string SourcesURI = _config->FindDir("Dir::State::lists") + URItoFileName(IndexURI("Sources")); - string SourcesURIgzip = SourcesURI + ".gz"; - if (!FileExists(SourcesURI) && !FileExists(SourcesURIgzip)) - return NULL; - else if (!FileExists(SourcesURI) && FileExists(SourcesURIgzip)) - SourcesURI = SourcesURIgzip; - - return new debSrcRecordParser(SourcesURI,this); + std::vector types = APT::Configuration::getCompressionTypes(); + for (std::vector::const_iterator t = types.begin(); t != types.end(); ++t) + { + string p; + p = SourcesURI + '.' + *t; + if (FileExists(p)) + return new debSrcRecordParser(p, this); + } + if (FileExists(SourcesURI)) + return new debSrcRecordParser(SourcesURI, this); + return NULL; } /*}}}*/ // SourcesIndex::Describe - Give a descriptive path to the index /*{{{*/ @@ -129,11 +133,15 @@ string debSourcesIndex::Info(const char *Type) const inline string debSourcesIndex::IndexFile(const char *Type) const { string s = URItoFileName(IndexURI(Type)); - string sgzip = s + ".gz"; - if (!FileExists(s) && FileExists(sgzip)) - return sgzip; - else - return s; + + std::vector types = APT::Configuration::getCompressionTypes(); + for (std::vector::const_iterator t = types.begin(); t != types.end(); ++t) + { + string p = s + '.' + *t; + if (FileExists(p)) + return p; + } + return s; } string debSourcesIndex::IndexURI(const char *Type) const @@ -259,11 +267,15 @@ string debPackagesIndex::Info(const char *Type) const inline string debPackagesIndex::IndexFile(const char *Type) const { string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); - string sgzip = s + ".gz"; - if (!FileExists(s) && FileExists(sgzip)) - return sgzip; - else - return s; + + std::vector types = APT::Configuration::getCompressionTypes(); + for (std::vector::const_iterator t = types.begin(); t != types.end(); ++t) + { + string p = s + '.' + *t; + if (FileExists(p)) + return p; + } + return s; } string debPackagesIndex::IndexURI(const char *Type) const { @@ -411,11 +423,15 @@ debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section inline string debTranslationsIndex::IndexFile(const char *Type) const { string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type)); - string sgzip = s + ".gz"; - if (!FileExists(s) && FileExists(sgzip)) - return sgzip; - else - return s; + + std::vector types = APT::Configuration::getCompressionTypes(); + for (std::vector::const_iterator t = types.begin(); t != types.end(); ++t) + { + string p = s + '.' + *t; + if (FileExists(p)) + return p; + } + return s; } string debTranslationsIndex::IndexURI(const char *Type) const { diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index 860d84b86..1cf3012ed 100644 --- a/apt-private/private-update.cc +++ b/apt-private/private-update.cc @@ -56,10 +56,17 @@ bool DoUpdate(CommandLine &CmdL) if (List->GetIndexes(&Fetcher,true) == false) return false; + std::string compExt = APT::Configuration::getCompressionTypes()[0]; pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); ++I) - c1out << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + { + std::string FileName = flNotDir(I->Owner->DestFile); + if(compExt.empty() == false && + APT::String::Endswith(FileName, compExt)) + FileName = FileName.substr(0, FileName.size() - compExt.size() - 1); + c1out << '\'' << I->URI << "' " << FileName << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << std::endl; + } return true; } diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 845d67d2b..2e283da5a 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -665,7 +665,7 @@ static bool DoDownload(CommandLine &CmdL) { pkgAcquire::UriIterator I = Fetcher.UriBegin(); for (; I != Fetcher.UriEnd(); ++I) - cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << + cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl; return true; } diff --git a/methods/copy.cc b/methods/copy.cc index b78053d36..40f8f85ec 100644 --- a/methods/copy.cc +++ b/methods/copy.cc @@ -37,15 +37,12 @@ class CopyMethod : public pkgAcqMethod void CopyMethod::CalculateHashes(FetchResult &Res) { - // For gzip indexes we need to look inside the gzip for the hash - // We can not use the extension here as its not used in partial - // on a IMS hit - FileFd::OpenMode OpenMode = FileFd::ReadOnly; + Hashes Hash; + FileFd::CompressMode CompressMode = FileFd::None; if (_config->FindB("Acquire::GzipIndexes", false) == true) - OpenMode = FileFd::ReadOnlyGzip; + CompressMode = FileFd::Extension; - Hashes Hash; - FileFd Fd(Res.Filename, OpenMode); + FileFd Fd(Res.Filename, FileFd::ReadOnly, CompressMode); Hash.AddFD(Fd); Res.TakeHashes(Hash); } diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index a05ed5fa6..23a638801 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -121,7 +121,7 @@ Reading package lists..." "empty archive Packages.$COMPRESS over http" testaptgetupdate "Get: http://localhost:8080 Packages Err http://localhost:8080 Packages Empty files can't be valid archives -W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages) Empty files can't be valid archives +W: Failed to fetch ${COMPRESSOR}:$(readlink -f rootdir/var/lib/apt/lists/partial/localhost:8080_Packages.${COMPRESS}) Empty files can't be valid archives E: Some index files failed to download. They have been ignored, or old ones used instead." "empty file Packages.$COMPRESS over http" } diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 6671dd75a..819cbd35e 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -5,7 +5,7 @@ TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configcompression '.' 'gz' # only gz is supported for this, so ensure it is used +configcompression '.' 'xz' 'gz' configarchitecture "i386" buildsimplenativepackage "testpkg" "i386" "1.0" @@ -32,13 +32,13 @@ testrun() { if [ "$1" = "compressed" ]; then ! test -e rootdir/var/lib/apt/lists/*_Packages || F=1 ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 - test -e rootdir/var/lib/apt/lists/*_Packages.gz || F=1 - test -e rootdir/var/lib/apt/lists/*_Sources.gz || F=1 + test -e rootdir/var/lib/apt/lists/*_Packages.xz || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources.xz || F=1 else test -e rootdir/var/lib/apt/lists/*_Packages || F=1 test -e rootdir/var/lib/apt/lists/*_Sources || F=1 - ! test -e rootdir/var/lib/apt/lists/*_Packages.gz || F=1 - ! test -e rootdir/var/lib/apt/lists/*_Sources.gz || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Packages.xz || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Sources.xz || F=1 fi if [ -n "$F" ]; then ls -laR rootdir/var/lib/apt/lists/ @@ -84,10 +84,9 @@ msgmsg "File: Test with uncompressed indexes (update unchanged without pdiffs)" testrun rm -rf rootdir/var/lib/apt/lists -echo 'Acquire::CompressionTypes::Order:: "gz"; -Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex +echo 'Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex -testsuccess aptget update +testsuccess aptget update -o Debug::pkgAcquire::worker=1 msgmsg "File: Test with compressed indexes" testrun "compressed" @@ -118,14 +117,13 @@ msgmsg "HTTP: Test with uncompressed indexes (update unchanged without pdiffs)" testrun rm -rf rootdir/var/lib/apt/lists -echo 'Acquire::CompressionTypes::Order:: "gz"; -Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex +echo 'Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex testsuccess aptget update msgmsg "HTTP: Test with compressed indexes" testrun "compressed" -testsuccess aptget update -o Acquire::Pdiffs=1 +testsuccess aptget update -o Acquire::Pdiffs=1 -o debug::pkgAcquire::Worker=1 -o debug::pkgAcquire::Auth=1 msgmsg "HTTP: Test with compressed indexes (update unchanged with pdiffs)" testrun "compressed" -- cgit v1.2.3 From 801745284905e7962aa77a9f37a6b4e7fcdc19d0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 21 Sep 2014 21:23:04 +0200 Subject: Fix regression for cdrom: sources from latest security update Skip a reverify for cdrom: sources. The reverify step is actually harmful here because the apt-cdrom add code uses the indexcopy.cc which will "normalize" the Packages file from the cdrom when it writes it to the local disk. This leads to changing the "MD5sum" field (notice the lower case "s") on the cdrom Packages file to a "MD5Sum" field on the local file in /var/lib/apt/lists. Which of course alters the hash and makes apt fail to reverify the file. --- apt-pkg/acquire-item.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 5df43726b..36c0fa567 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1141,6 +1141,12 @@ void pkgAcqIndex::Done(string Message,unsigned long long Size,string Hash, else Local = true; + // do not reverify cdrom sources as apt-cdrom may rewrite the Packages + // file when its doing the indexcopy + if (RealURI.substr(0,6) == "cdrom:" && + StringToBool(LookupTag(Message,"IMS-Hit"),false) == true) + return; + // The files timestamp matches, for non-local URLs reverify the local // file, for local file, uncompress again to ensure the hashsum is still // matching the Release file -- cgit v1.2.3 From d916e2a93b798e29d342e9498266767c5be8e2a5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 21 Sep 2014 21:40:10 +0200 Subject: Ensure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchive The iTFRewritePackageOrder is used in indexcopy to copy and normalize cdrom Packages files. This change will ensure that there is no "normalization" that changes MD5sum -> MD5Sum which alters the hash of the Packages file on disk (oh the irony). --- apt-pkg/tagfile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 91d176e3c..bf865bdc4 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -526,7 +526,7 @@ static const char *iTFRewritePackageOrder[] = { "Conffiles", "Filename", "Size", - "MD5Sum", + "MD5sum", "SHA1", "SHA256", "SHA512", -- cgit v1.2.3 From 5f982b9d903b38bb5549479f0111d31e2695090c Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 25 Sep 2014 11:52:41 +0200 Subject: rewrite compressed indexes test to check with all compressors Git-Dch: Ignore --- test/integration/framework | 30 ++++ .../test-bug-595691-empty-and-broken-archive-files | 33 +--- test/integration/test-compressed-indexes | 194 +++++++++++---------- 3 files changed, 135 insertions(+), 122 deletions(-) diff --git a/test/integration/framework b/test/integration/framework index ff010a5c4..7923e23d9 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -339,6 +339,36 @@ configcompression() { done > ${TMPWORKINGDIRECTORY}/rootdir/etc/testcase-compressor.conf } +forcecompressor() { + COMPRESSOR="$1" + COMPRESSOR_CMD="$1" + case $COMPRESSOR in + gzip) COMPRESS='gz';; + bzip2) COMPRESS='bz2';; + lzma) COMPRESS='lzma';; + xz) COMPRESS='xz';; + *) msgdie "Compressor $COMPRESSOR is unknown to framework, so can't be forced by forcecompressor!";; + esac + local CONFFILE="${TMPWORKINGDIRECTORY}/rootdir/etc/apt/apt.conf.d/00force-compressor" + echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; }; +Dir::Bin::uncompressed \"/does/not/exist\"; +Dir::Bin::gzip \"/does/not/exist\"; +Dir::Bin::bzip2 \"/does/not/exist\"; +Dir::Bin::lzma \"/does/not/exist\"; +Dir::Bin::xz \"/does/not/exist\";" > "$CONFFILE" + if [ -e "/bin/${COMPRESSOR}" ]; then + echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> "$CONFFILE" + elif [ -e "/usr/bin/${COMPRESSOR}" ]; then + echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> "$CONFFILE" + elif [ "${COMPRESSOR}" = 'lzma' ]; then + echo 'Dir::Bin::xz "/usr/bin/xz";' >> "$CONFFILE" + COMPRESSOR_CMD='xz --format=lzma' + else + msgtest 'Test for availability of compressor' "${COMPRESSOR}" + msgfail + fi +} + setupsimplenativepackage() { local NAME="$1" local ARCH="$2" diff --git a/test/integration/test-bug-595691-empty-and-broken-archive-files b/test/integration/test-bug-595691-empty-and-broken-archive-files index 23a638801..aea340203 100755 --- a/test/integration/test-bug-595691-empty-and-broken-archive-files +++ b/test/integration/test-bug-595691-empty-and-broken-archive-files @@ -48,37 +48,8 @@ createemptyfile() { rm -f aptarchive/Packages } -setupcompressor() { - COMPRESSOR="$1" - COMPRESSOR_CMD="$1" - case $COMPRESSOR in - gzip) COMPRESS="gz";; - bzip2) COMPRESS="bz2";; - lzma) COMPRESS="lzma";; - xz) COMPRESS="xz";; - esac - echo "Acquire::CompressionTypes::Order { \"${COMPRESS}\"; }; -Dir::Bin::uncompressed \"/does/not/exist\"; -Dir::Bin::gzip \"/does/not/exist\"; -Dir::Bin::bzip2 \"/does/not/exist\"; -Dir::Bin::lzma \"/does/not/exist\"; -Dir::Bin::xz \"/does/not/exist\";" > rootdir/etc/apt/apt.conf.d/00compressor - if [ -e "/bin/${COMPRESSOR}" ]; then - echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor - elif [ -e "/usr/bin/${COMPRESSOR}" ]; then - echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> rootdir/etc/apt/apt.conf.d/00compressor - elif [ "${COMPRESSOR}" = 'lzma' ]; then - echo "Dir::Bin::xz \"/usr/bin/xz\";" >> rootdir/etc/apt/apt.conf.d/00compressor - COMPRESSOR_CMD='xz --format=lzma' - else - msgtest "Test for availability of compressor" "${COMPRESSOR}" - msgfail - #exit 1 - fi -} - testoverfile() { - setupcompressor "$1" + forcecompressor "$1" createemptyfile 'en' testaptgetupdate 'Reading package lists...' "empty file en.$COMPRESS over file" @@ -100,7 +71,7 @@ E: Some index files failed to download. They have been ignored, or old ones used } testoverhttp() { - setupcompressor "$1" + forcecompressor "$1" createemptyfile 'en' testaptgetupdate "Get: http://localhost:8080 Packages [] diff --git a/test/integration/test-compressed-indexes b/test/integration/test-compressed-indexes index 819cbd35e..805ed5964 100755 --- a/test/integration/test-compressed-indexes +++ b/test/integration/test-compressed-indexes @@ -5,53 +5,68 @@ TESTDIR=$(readlink -f $(dirname $0)) . $TESTDIR/framework setupenvironment -configcompression '.' 'xz' 'gz' -configarchitecture "i386" - -buildsimplenativepackage "testpkg" "i386" "1.0" -setupaptarchive - -GOODSHOW="$(aptcache show testpkg) -" -GOODPOLICY="$(aptcache policy testpkg)" -GOODSHOWSRC="$(aptcache showsrc testpkg) -" - -test $(echo "$GOODSHOW" | grep -e '^Package: testpkg' -e '^Version: 1.0' -e '^Architecture: i386' | wc -l) -eq 3 || msgdie 'show is broken' -testequal "$GOODSHOW" aptcache show testpkg -test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 file:/' | wc -l) -eq 4 || msgdie 'policy is broken' -testequal "$GOODPOLICY" aptcache policy testpkg -test $(echo "$GOODSHOWSRC" | grep -e '^Package: testpkg' -e '^Format: 3.0 (native)' -e '^Files:' -e '^Checksums-Sha256:' | wc -l) -eq 4 || msgdie 'showsrc is broken' -testequal "$GOODSHOWSRC" aptcache showsrc testpkg - +configcompression '.' 'xz' 'bz2' 'lzma' 'gz' +configarchitecture 'i386' + +buildsimplenativepackage 'testpkg' 'i386' '1.0' + +buildaptarchive +setupdistsaptarchive +# fake a pdiff setup as apt wouldn't try pdiffs otherwise +find aptarchive -name 'Packages' -o -name 'Sources' | while read file; do + mkdir "${file}.diff" + PATCHINDEX="${file}.diff/Index" + echo 'SHA1-Current: adc83b19e793491b1c6ea0fd8b46cd9f32e592fc 0 +SHA1-History: + adc83b19e793491b1c6ea0fd8b46cd9f32e592fc 33053002 2010-08-18-2013.28 + ecfd1b19e793491b1c6ea123eabdcd9f32e592fc 33053001 2010-08-18-2013.29 +SHA1-Patches: + abc1fc0ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.28 + dfe3444ac57cd83d41c63195a9342e2db5650257 19722 2010-08-18-0814.29' > $PATCHINDEX +done +generatereleasefiles +signreleasefiles testrun() { local F - if [ -e rootdir/var/lib/apt/lists/*localhost*Release ]; then - msgtest "Check if all index files are" "${1:-uncompressed}" - if [ "$1" = "compressed" ]; then - ! test -e rootdir/var/lib/apt/lists/*_Packages || F=1 - ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 - test -e rootdir/var/lib/apt/lists/*_Packages.xz || F=1 - test -e rootdir/var/lib/apt/lists/*_Sources.xz || F=1 - else - test -e rootdir/var/lib/apt/lists/*_Packages || F=1 - test -e rootdir/var/lib/apt/lists/*_Sources || F=1 - ! test -e rootdir/var/lib/apt/lists/*_Packages.xz || F=1 - ! test -e rootdir/var/lib/apt/lists/*_Sources.xz || F=1 - fi - if [ -n "$F" ]; then - ls -laR rootdir/var/lib/apt/lists/ - msgfail - else - msgpass - fi - msgtest "Check if package is downloadable" - testsuccess --nomsg aptget install -d testpkg - msgtest "\tdeb file is present"; testsuccess --nomsg test -f rootdir/var/cache/apt/archives/testpkg_1.0_i386.deb - aptget clean - msgtest "\tdeb file is gone"; testfailure --nomsg test -f rootdir/var/cache/apt/archives/testpkg_1.0_i386.deb + msgtest 'Check if all index files are' "${1:-uncompressed}" + if [ "$1" = 'compressed' ]; then + ! test -e rootdir/var/lib/apt/lists/*_Packages || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Sources || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 + test -e rootdir/var/lib/apt/lists/*_Packages.${COMPRESS} || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources.${COMPRESS} || F=1 + test -e rootdir/var/lib/apt/lists/*_Translation-en.${COMPRESS} || F=1 + # there is no point in trying pdiff if we have compressed indexes + # as we can't patch compressed files (well, we can, but what is the point?) + ! test -e rootdir/var/lib/apt/lists/*.IndexDiff || F=1 + else + # clear the faked pdiff indexes so the glob below works + rm -f rootdir/var/lib/apt/lists/*.IndexDiff + test -e rootdir/var/lib/apt/lists/*_Packages || F=1 + test -e rootdir/var/lib/apt/lists/*_Sources || F=1 + test -e rootdir/var/lib/apt/lists/*_Translation-en || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Packages.* || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Sources.* || F=1 + ! test -e rootdir/var/lib/apt/lists/*_Translation-en.* || F=1 fi + if [ -n "$F" ]; then + ls -laR rootdir/var/lib/apt/lists/ + msgfail + else + msgpass + fi + msgtest 'Check if package is downloadable' + testsuccess --nomsg aptget download testpkg + msgtest '\tdeb file is present'; testsuccess --nomsg test -f testpkg_1.0_i386.deb + rm testpkg_1.0_i386.deb + testequal 'Reading package lists... +Building dependency tree... +The following NEW packages will be installed: + testpkg +0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. +Inst testpkg (1.0 unstable [i386]) +Conf testpkg (1.0 unstable [i386])' aptget install testpkg -s rm -f rootdir/var/cache/apt/pkgcache.bin rootdir/var/cache/apt/srcpkgcache.bin testequal "$GOODSHOW" aptcache show testpkg testequal "$GOODSHOW" aptcache show testpkg @@ -62,71 +77,68 @@ testrun() { testequal "$GOODSHOWSRC" aptcache showsrc testpkg testequal "$GOODSHOWSRC" aptcache showsrc testpkg aptget clean - msgtest "Check if the source is aptgetable" + msgtest 'Check if the source is aptgetable' testsuccess --nomsg aptget source testpkg - msgtest "\tdsc file is present"; testsuccess --nomsg test -f testpkg_1.0.dsc - msgtest "\tdirectory is present"; testsuccess --nomsg test -d testpkg-1.0 - rm -rf testpkg-1.0 + msgtest '\tdsc file is present'; testsuccess --nomsg test -f testpkg_1.0.dsc + msgtest '\tdirectory is present'; testsuccess --nomsg test -d testpkg-1.0 + rm -rf testpkg-1.0* testequal "$(aptcache show testpkg -o Acquire::Languages=none) " aptcache dumpavail } -echo 'Acquire::GzipIndexes "false";' > rootdir/etc/apt/apt.conf.d/02compressindex -msgmsg "File: Test with uncompressed indexes" -testrun +echo 'Debug::pkgAcquire::worker "true"; +debug::pkgAcquire::Auth "true"; +Debug::pkgAcquire::Diffs "true";' > rootdir/etc/apt/apt.conf.d/99debugconf -testsuccess aptget update -o Acquire::Pdiffs=1 -msgmsg "File: Test with uncompressed indexes (update unchanged with pdiffs)" -testrun +testovermethod() { + forcecompressor $2 -testsuccess aptget update -o Acquire::Pdiffs=0 -msgmsg "File: Test with uncompressed indexes (update unchanged without pdiffs)" -testrun + for INDEX in 'false' 'true'; do + rm -rf rootdir/var/lib/apt/lists + echo "Acquire::GzipIndexes \"${INDEX}\";" > rootdir/etc/apt/apt.conf.d/02compressindex + local INDCOMP + if [ "$INDEX" = 'false' ]; then + INDCOMP='uncompressed' + else + INDCOMP='compressed' + fi -rm -rf rootdir/var/lib/apt/lists -echo 'Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex + testsuccess aptget update + msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes" + testrun "$INDCOMP" -testsuccess aptget update -o Debug::pkgAcquire::worker=1 -msgmsg "File: Test with compressed indexes" -testrun "compressed" + testsuccess aptget update -o Acquire::Pdiffs=1 + msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes (update unchanged with pdiffs)" + testrun "$INDCOMP" -testsuccess aptget update -o Acquire::Pdiffs=1 -msgmsg "File: Test with compressed indexes (update unchanged with pdiffs)" -testrun "compressed" + testsuccess aptget update -o Acquire::Pdiffs=0 + msgmsg "${1}: ${COMPRESSOR}: Test with $INDCOMP indexes (update unchanged without pdiffs)" + testrun "$INDCOMP" -testsuccess aptget update -o Acquire::Pdiffs=0 -msgmsg "File: Test with compressed indexes (update unchanged without pdiffs)" -testrun "compressed" + rm rootdir/etc/apt/apt.conf.d/02compressindex + done +} -rm rootdir/etc/apt/apt.conf.d/02compressindex -changetowebserver testsuccess aptget update +GOODSHOW="$(aptcache show testpkg) +" +test $(echo "$GOODSHOW" | grep -e '^Package: testpkg' -e '^Version: 1.0' -e '^Architecture: i386' | wc -l) -eq 3 || msgdie 'show is broken' +testequal "$GOODSHOW" aptcache show testpkg +GOODSHOWSRC="$(aptcache showsrc testpkg) +" +test $(echo "$GOODSHOWSRC" | grep -e '^Package: testpkg' -e '^Format: 3.0 (native)' -e '^Files:' -e '^Checksums-Sha256:' | wc -l) -eq 4 || msgdie 'showsrc is broken' +testequal "$GOODSHOWSRC" aptcache showsrc testpkg GOODPOLICY="$(aptcache policy testpkg)" -test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4 +test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 file:/' | wc -l) -eq 4 || msgdie 'policy is broken' testequal "$GOODPOLICY" aptcache policy testpkg -msgmsg "HTTP: Test with uncompressed indexes" -testrun - -testsuccess aptget update -o Acquire::Pdiffs=1 -msgmsg "HTTP: Test with uncompressed indexes (update unchanged with pdiffs)" -testrun - -testsuccess aptget update -o Acquire::Pdiffs=0 -msgmsg "HTTP: Test with uncompressed indexes (update unchanged without pdiffs)" -testrun +for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'file' $COMPRESSOR; done +changetowebserver rm -rf rootdir/var/lib/apt/lists -echo 'Acquire::GzipIndexes "true";' > rootdir/etc/apt/apt.conf.d/02compressindex - testsuccess aptget update -msgmsg "HTTP: Test with compressed indexes" -testrun "compressed" - -testsuccess aptget update -o Acquire::Pdiffs=1 -o debug::pkgAcquire::Worker=1 -o debug::pkgAcquire::Auth=1 -msgmsg "HTTP: Test with compressed indexes (update unchanged with pdiffs)" -testrun "compressed" +GOODPOLICY="$(aptcache policy testpkg)" +test $(echo "$GOODPOLICY" | grep -e '^testpkg:' -e '^ Candidate:' -e '^ Installed: (none)' -e '500 http://' | wc -l) -eq 4 || msgdie 'policy is broken' +testequal "$GOODPOLICY" aptcache policy testpkg -testsuccess aptget update -o Acquire::Pdiffs=0 -msgmsg "HTTP: Test with compressed indexes (update unchanged without pdiffs)" -testrun "compressed" +for COMPRESSOR in 'gzip' 'bzip2' 'lzma' 'xz'; do testovermethod 'http' $COMPRESSOR; done -- cgit v1.2.3 From e359fe101e1a66277b340563c96e868451d9d4b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BA=A7n=20Ng=E1=BB=8Dc=20Qu=C3=A2n?= Date: Sun, 28 Sep 2014 15:33:19 +0700 Subject: Set STRIP_FROM_PATH for doxygen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Trần Ngọc Quân --- doc/Doxyfile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in index 98eecdbd2..ab3fc0a7c 100644 --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -152,7 +152,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = @top_srcdir@ # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -161,7 +161,7 @@ STRIP_FROM_PATH = # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = @top_srcdir@ # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't -- cgit v1.2.3 From e503a4d5ac668d233c11f64a0dd0c6d20f3b2be1 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 1 Oct 2014 08:22:26 +0200 Subject: debian/rules: add hardening=+all Because of dpkg-buildflags we already get most of the hardening features, +all adds -fPIE and ld -z now Thanks: Simon Ruderich, Markus Waldeck --- debian/rules | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index c7b5aa304..f031cfddb 100755 --- a/debian/rules +++ b/debian/rules @@ -21,9 +21,12 @@ endif -include build/environment.mak ifneq (,$(shell which dpkg-buildflags)) - export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS) - export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) - export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) + # make does not export to $(shell) so we need to workaround + # (http://savannah.gnu.org/bugs/?10593) + dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags + export CXXFLAGS = $(shell $(dpkg_buildflags) --get CXXFLAGS) + export LDFLAGS = $(shell $(dpkg_buildflags) --get LDFLAGS) + export CPPFLAGS = $(shell $(dpkg_buildflags) --get CPPFLAGS) else ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) export CXXFLAGS = -O0 -g -Wall -- cgit v1.2.3 From 4c370aad7539b7e3bc0028aa538f34b95a526cff Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 2 Oct 2014 17:48:13 +0200 Subject: apt-get: Create the temporary downloaded changelog inside tmpdir The code is creating a secure temporary directory, but then creates the changelog alongside the tmpdir in the same base directory. This defeats the secure tmpdir creation, making the filename predictable. Inject a '/' between the tmpdir and the changelog filename. --- cmdline/apt-get.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 2e283da5a..cfa79339b 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1563,7 +1563,7 @@ static bool DoChangelog(CommandLine &CmdL) { string changelogfile; if (downOnly == false) - changelogfile.append(tmpname).append("changelog"); + changelogfile.append(tmpname).append("/changelog"); else changelogfile.append(Ver.ParentPkg().Name()).append(".changelog"); if (DownloadChangelog(Cache, Fetcher, Ver, changelogfile) && downOnly == false) -- cgit v1.2.3 From 536fdb8823fdec24c26d984317b8162237c427c3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 2 Oct 2014 22:07:25 +0200 Subject: releasing package apt version 1.0.9.2 --- debian/changelog | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/debian/changelog b/debian/changelog index 36353bd95..6de853359 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,31 @@ +apt (1.0.9.2) unstable; urgency=medium + + [ Michael Vogt ] + * test/integration/test-apt-update-file: improve test + * Fix regression when copy: is used for a relative path (Closes: #762160) + * generalize Acquire::GzipIndex to support all compressions that + apt supports + * Fix regression for cdrom: sources from latest security update + * Ensure that iTFRewritePackageOrder is "MD5sum" to match + apt-ftparchive + * debian/rules: add hardening=+all. + Thanks to Simon Ruderich, Markus Waldeck + + [ Holger Wansing ] + * German program translation update (Closes: 762223) + + [ Jérémy Bobbio ] + * disable timestamps in the footer of docs by doxygen + + [ Trần Ngọc Quân ] + * Set STRIP_FROM_PATH for doxygen + + [ Guillem Jover ] + * apt-get: Create the temporary downloaded changelog inside tmpdir + (closes: #763780) + + -- Michael Vogt Thu, 02 Oct 2014 22:05:39 +0200 + apt (1.0.9.1) unstable; urgency=high [ Michael Vogt ] -- cgit v1.2.3