<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/test/integration/test-pdiff-usage, branch 1.2.8</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.2.8</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.2.8'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2016-03-14T10:47:19Z</updated>
<entry>
<title>don't use Desc.URI to calculate .diff/Index filenames</title>
<updated>2016-03-14T10:47:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-03-13T00:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b7a1076f18022cbeb7baf4d82ab8bae0f725a573'/>
<id>urn:sha1:b7a1076f18022cbeb7baf4d82ab8bae0f725a573</id>
<content type='text'>
The URI descibing an item can change via mirrors/redirectors which
causes the .diff/Index files to get the wrong names in storage.

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>require $(HASH)-Download field in .diff/Index files</title>
<updated>2016-03-14T10:47:19Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-03-14T00:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4a808deaac462e7714a345dac676c6da294a2ee0'/>
<id>urn:sha1:4a808deaac462e7714a345dac676c6da294a2ee0</id>
<content type='text'>
Now that we ignore SHA1-only files it makes sense to require also the
provision of hashes for the compressed patches as this was introduced in
the same patchset as support for non-SHA1 hashes in the file itself in
dak and adding support in other archive creators (if they support pdiffs
at all) will likely be in the same batch.

The reason for the change itself is simple: If you are 'scared' enough
about the security of SHA1, you shouldn't uncompress a file you haven't
verified at all – after all, it could be exploiting a bug or a zip bomb.
</content>
</entry>
<entry>
<title>test: remove SHA1 support testing as unsupported</title>
<updated>2016-03-14T10:47:18Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-03-13T20:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8d0d92558c00d1825e413ce67be51a46a5c18aea'/>
<id>urn:sha1:8d0d92558c00d1825e413ce67be51a46a5c18aea</id>
<content type='text'>
Given that we refuse to use SHA1-only .diff/Indexes no point in shipping
and running code which pretends to check support for it which given that
all these tests are run 3 times eats a noticeable amount of time.

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>Test that SHA1-only .diff/Index files are not used</title>
<updated>2016-03-13T12:05:30Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-03-13T12:05:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f345d0571d055c2cd5da3a9e423753f1ac21a9aa'/>
<id>urn:sha1:f345d0571d055c2cd5da3a9e423753f1ac21a9aa</id>
<content type='text'>
Ensure that .diff/Index files that only contain SHA1 values and no
SHA2 values are not used.
</content>
</entry>
<entry>
<title>do not move not-failed pdiff-patches into CWD on failure</title>
<updated>2016-03-06T11:57:38Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-03-06T11:03:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=dfcf7f356b790338f0a3e9df3c5d6f159814fe53'/>
<id>urn:sha1:dfcf7f356b790338f0a3e9df3c5d6f159814fe53</id>
<content type='text'>
If a single pdiff fails, we have to fail the entire patching endeavour
and fall back to getting the complete file instead. That is easy in
serverside merged pdiffs as we get them one by one. For clientside we
get them all at once through, which means that a failure in one has to
stop the entire pipeline, which works as expected (as proven by the
bugreporters as they don't even notice it happening). The problem is
just that the first failing pdiff will do the cleanup, so another pdiff
which happens to be successfully acquired after we processed the failure
doesn't find the file it is supposed to use as a basename anymore, so
the patch is renamed to what should be the unique extension and moved
into the current working directory. Processing is then stopped as the
patch realizes that it isn't the last one which completed downloading.

On the plus side this means this is neither us using a bad temporary
location nor a security problem. It "just" overrides unconditionally
files in your current working directory (if you happen to have them
named like a pdiff patch – a bit unlikely perhaps) and so drops files
there which are never used again.

I guess this was introduced in 4e3c5633b1e74b4f58b95f339cfbbf4cbf21ab3e
for real as I made the need for the existence of the base file rather
explicit, but the potential lingers in the code for far longer.

Closes: #816837
</content>
</entry>
<entry>
<title>remove uncompressed leftover partial file before pdiff bootstrap</title>
<updated>2016-01-08T16:51:23Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-08T16:51:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ef3c549e00b2a0487ddee0aeb70e3a29f76c2fbb'/>
<id>urn:sha1:ef3c549e00b2a0487ddee0aeb70e3a29f76c2fbb</id>
<content type='text'>
The code already deals with compressed leftovers, but forgot the
uncompressed files. The opertunity is picked to reorder this code and
add debug messages about the actions taken as well as produce such a
leftover file in the associated testcase.
</content>
</entry>
<entry>
<title>use filesize of compressed pdiffs for the limit if possible</title>
<updated>2016-01-08T14:40:01Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-08T14:30:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4e6219da0dd1e68fad7db972f7ddd76598645228'/>
<id>urn:sha1:4e6219da0dd1e68fad7db972f7ddd76598645228</id>
<content type='text'>
With the addition of the $HASH-Download field in the .diff/Index we got
the size of the compressed patches for 'free', so if that information is
available we can use it for a more fitting calculation of the size
requirements of the patches vs. the complete file.

Note that this predicts a too small size in the transition case in which
the information isn't available for all patches, but figuring this out
would be a lot of code for practically nothing as only one update can
ever be in such a transition phase.
</content>
</entry>
<entry>
<title>keep compressed indexes in a low-cost format</title>
<updated>2016-01-08T14:40:01Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-07T19:32:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0179cfa83cf0042235eda41db7f35c420781c63e'/>
<id>urn:sha1:0179cfa83cf0042235eda41db7f35c420781c63e</id>
<content type='text'>
Downloading and storing are two different operations were different
compression types can be preferred. For downloading we provide the
choice via Acquire::CompressionTypes::Order as there is a choice to
be made between download size and speed – and limited by whats available
in the repository.

Storage on the other hand has all compressions currently supported by
apt available and to reduce runtime of tools accessing these files the
compression type should be a low-cost format in terms of decompression.

apt traditionally stores its indexes uncompressed on disk, but has
options to keep them compressed. Now that apt downloads additional files
we also deal with files which simply can't be stored uncompressed as
they are just too big (like Contents for apt-file). Traditionally they
are downloaded in a low-cost format (gz) as repositories do not provide
other formats, but there might be even lower-cost formats and for
download we could introduce higher-cost in the repositories.

Downloading an entire index potentially requires recompression to
another format, so an update takes potentially longer – but big files
are usually updated via pdiffs which has to de- and re-compress anyhow
and does it on the fly anyhow, so there is no extra time needed and in
general it seems to be benefitial to invest the time in update to save
time later on file access.
</content>
</entry>
<entry>
<title>allow pdiff bootstrap from all supported compressors</title>
<updated>2016-01-08T14:40:01Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-05T23:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4e3c5633b1e74b4f58b95f339cfbbf4cbf21ab3e'/>
<id>urn:sha1:4e3c5633b1e74b4f58b95f339cfbbf4cbf21ab3e</id>
<content type='text'>
There is no reason to enforce that the file we start the bootstrap with
is compressed with a compressor which is available online. This allows
us to change the on-disk format as well as deals with repositories
adding/removing support for a specific compressor.
</content>
</entry>
<entry>
<title>tests: support spaces in path and TMPDIR</title>
<updated>2015-12-19T22:04:34Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2015-12-15T16:20:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2'/>
<id>urn:sha1:3abb6a6a1e485b3bc899b64b0a1b7dc2db25a9c2</id>
<content type='text'>
This doesn't allow all tests to run cleanly, but it at least allows to
write tests which could run successfully in such environments.

Git-Dch: Ignore
</content>
</entry>
</feed>
