Age | Commit message (Collapse) | Author |
|
While it is mostly busywork to rewrite all instances it actually fixes
bugs as the data storage used by the new method is std::string rather
than a char*, the later mostly created by c_str() from a std::string
which the caller has to ensure keeps in scope – something apt-ftparchive
actually didn't ensure and relied on copy-on-write behavior instead
which c++11 forbids and hence the new default gcc abi doesn't use it.
|
|
This rename with value is ordered by the 'old' name 'Source', but should
be ordered by the new name… by splitting the operation in a delete and a
new field we can easily fix this problem locally for now.
|
|
Methods get told which hashes are expected by the acquire system, which
means we can use this list to restrict what we calculate in the methods
as any extra we are calculating is wasted effort as we can't compare it
with anything anyway.
Adding support for a new hash algorithm is therefore 'free' now and if a
algorithm is no longer provided in a repository for a file, we
automatically stop calculating it.
In practice this results in a speed-up in Debian as we don't have SHA512
here (so far), so we practically stop calculating it.
|
|
Working with strings c-style is complicated and error-prune,
so by converting to c++ style we gain some simplicity and
avoid buffer overflows by later extensions.
Git-Dch: Ignore
|
|
|
|
Your mileage may vary, but don't worry: There is more than one way to
do it, but our one size fits all is not a bigger hammer, but an entire
roundhouse kick! So brace yourself for the tl;dr: The limit is gone.*
Beware: This fixes also the problem that a double newline is
unconditionally added 'later' which is an overcommitment in case
the dsc filesize is limit-2 <= x <= limit.
* limited to numbers fitting into an unsigned long long.
Closes: 774893
|
|
It is a very simple hashstring, which is why it isn't contributing to
the usability of a list of them, but it is also trivial to check and
calculate, so it doesn't hurt checking it either as it can combined even
with the simplest other hashes greatly complicate attacks on them as you
suddenly need a same-size hash collision, which is usually a lot harder
to achieve.
|
|
Now that libapts acquire system happily passes around hashes and can be
made to support new ones without an ABI break in the future, we can
free ftparchive from all the deprecation warnings the last commit
introduced for it.
The goal here isn't to preserve ABI as we have none to keep here, but to
help avoiding introduction problems of 'new' hashes later as bugs creep
into the copy&paste parts, so short/less of them is good.
|
|
Arrays with predefined lengths are very fragile as they are
likely forgotten in future changes and the size in this case
is dynamic making it even more dangerous.
Git-Dch: Ignore
|
|
|
|
Beside being a bit cleaner it hopefully also resolves oddball problems
I have with high levels of parallel jobs.
Git-Dch: Ignore
Reported-By: iwyu (include-what-you-use)
|
|
Reported-By: gcc -Wunused-parameter
Git-Dch: Ignore
|
|
|
|
|
|
* ftparchive/writer.cc:
- use OpenMaybeClearSignedFile to be free from detecting and
skipping clearsigning metadata in dsc files
|
|
|
|
- handle the APT::FTPArchive::Packages::SHA512 option correctly instead
of overriding SHA256, thanks Christian Marillat! (Closes: #680252)
|
|
- include Contents-* files in Release files (Closes: #673647)
|
|
- drop support for i18n/Index file (introduced in 0.8.11) and use
the Release file instead to get the Translations (Closes: #649314)
* ftparchive/writer.cc:
- add 'Translation-*' to the default patterns
i18n/Index was never used outside debian - and even here it isn't used
consistently as only 'main' has such a file. As the Release file now
includes the Translation-* files we therefore drop support for i18n/Index.
A version supporting it was never part of a debian release and still
supporting it would mean that we get 99% of the time a 404 as response
to the request anyway and confuse archive maintainers who want to
provide all files APT tries to acquire.
|
|
on the FileFd instead
|
|
by again using the FileFd directly
|
|
|
|
size are pretty unlikely for now, but we need it for deb
packages which could become bigger than 4GB now (LP: #815895)
|
|
|
|
|
|
done on the mirco-optimazation level, so lets fix them:
(performance) Possible inefficient checking for emptiness.
(performance) Prefer prefix ++/-- operators for non-primitive types.
|
|
- generate all checksums in one run over the file for Release
|
|
|
|
|
|
- support adding new compressors by configuration
|
|
sha2_internal.{cc,h}
|
|
|
|
- support xz compressor to create xz-compressed Indexes and be able
to open data.tar.xz files
* ftparchive/writer.cc:
- include xz-compressed Packages and Sources files in Release file
|
|
- include xz-compressed Packages and Sources files in Release file
|
|
|
|
- ensure that Date and Valid-Until time strings are not localised
|
|
|
|
- add config option to search for more patterns in release command
|
|
- null the valid string instead of the date if Valid-Until is not set
* apt-pkg/acquire-item.cc:
- use also unsigned Release files again (Closes: #596189)
|
|
- write out {Files,Checksum-Sha1,Checksum-Sha256} only if
available LP: #633967. Thanks to Colin Watson
|
|
- null the valid string instead of the date if Valid-Until is not set
|
|
- init valid-until correctly to prevent garbage entering Release file
|
|
- add ValidTime option to generate a Valid-Until header in Release file
|
|
- remove 999 chars Files and Checksums rewrite limit (Closes: #577759)
|
|
the compressed files as we want them and to prevent the file to be
replaced without a reason which could save us from steady redownloads
of a file with the same content.
|
|
- write LongDescriptions if they shouldn't be included in Packages
file into i18n/Translation-en by default.
It is ensured that each package+description is listed only ones in the
Translation file even if we generate multiple Packages file in one run.
The file is only generated in "generate" - the simple file commands
can't create it by now. Also, the LongDescription is currently a
global setting, so generating archives with and without LongDescriptions
in the Packages file in the same run are currently not possible.
|
|
- if an arch is given accept only *_all.deb and *_arch.deb instead
of *.deb. Thanks Stephan Bosch for the patch! (Closes: #319710)
|
|
|
|
- Set Mode to Medium so that the correct prefix is used.
Thanks Stefan Haller for the patch! (Closes: #567304 LP: #275243)
* ftparchive/writer.cc:
- generate sha1 and sha256 checksums for dsc (Closes: #567343)
* cmdline/apt-get.cc:
- don't mark as manually if in download only (Closes: #468180)
|
|
- generate sha1 and sha256 checksums for dsc (Closes: #567343)
|