[Bug 1274466] Re: apt-ftparchive on-disk cache format changed between lucid and precise, results in Packages files with silently corrupted checksums fields
Michael Vogt
michael.vogt at canonical.com
Wed Jun 4 08:25:53 UTC 2014
Its not the fault of libdb, its the fault of commit
650faab01603caac04494d54cf6b10a65c00ea13
Here is the reason for the bug:
--- apt-0.7.25.3ubuntu7/ftparchive/cachedb.h
+++ apt-0.8.16~exp12ubuntu10/ftparchive/cachedb.h
...
struct StatStore
{
uint32_t Flags;
uint32_t mtime;
- uint32_t FileSize;
+ uint64_t FileSize;
uint8_t MD5[16];
uint8_t SHA1[20];
uint8_t SHA256[32];
+ uint8_t SHA512[64];
} CurStat;
...
Adding the sha512 at the end is fine as there is a flag for the hashes
so even if it reads garbage it will not use the not-yet-generated sha512
hash.
But the change of FileSize made it incompatibel.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to apt in Ubuntu.
https://bugs.launchpad.net/bugs/1274466
Title:
apt-ftparchive on-disk cache format changed between lucid and precise,
results in Packages files with silently corrupted checksums fields
Status in “apt” package in Ubuntu:
Confirmed
Bug description:
The archive.ubuntu.com master server has just been upgraded from lucid
to precise. As a result, the apt version went from 0.7.25.3 to
0.8.16~exp12, and apparently some time in that interval the on-disk
format of apt-ftparchive's cache changed.
This wouldn't be a problem, except apt-ftparchive itself doesn't
*notice* that the cache format has changed, and instead happily reads
the existing files and parses them incorrectly, resulting in corrupted
checksums output in the Packages file for each of the .debs.
apt-ftparchive should version its file formats so that it correctly
notices incompatible cache files.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1274466/+subscriptions
More information about the foundations-bugs
mailing list