Age | Commit message (Collapse) | Author |
|
Conflicts:
debian/changelog
|
|
EDSP code uses pipes opened via an FD as sources and later for those
files modification times and filesize are read - but never really used
again. The result we get from FileFd is probably wrong, but as we don't
use it anyway, we just don't fallback if we have nothing to fallback to
Git-Dch: Ignore
|
|
ContentsExtract::~ContentsExtract() needs to use free() because
Data got allocated via realloc()
Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
|
|
It is not very extensible to have the supported Hashes hardcoded
everywhere and especially if it is part of virtual method names.
It is also possible that a method does not support the 'best' hash
(yet), so we might end up not being able to verify a file even though we
have a common subset of supported hashes. And those are just two of the
cases in which it is handy to have a more dynamic selection.
The downside is that this is a MAJOR API break, but the HashStringList
has a string constructor for compatibility, so with a bit of luck the
few frontends playing with the acquire system directly are okay.
|
|
APT supports more than just one HashString and even allows to enforce
the usage of a specific hash. This class is intended to help with
storage and passing around of the HashStrings.
Git-Dch: Ignore
|
|
debian/experimental
|
|
APT_PKG_MINOR < 13)
|
|
|
|
debian/experimental
|
|
debian/sid
|
|
Conflicts:
apt-pkg/cachefilter.h
apt-pkg/contrib/fileutl.cc
apt-pkg/contrib/netrc.h
apt-pkg/deb/debsrcrecords.cc
apt-pkg/init.h
apt-pkg/pkgcache.cc
debian/apt.install.in
debian/changelog
|
|
Conflicts:
test/libapt/fileutl_test.cc
|
|
|
|
|
|
|
|
|
|
gzip only gives us 32bit of size, storing it in a 64bit container and
doing a 32bit flip on it has therefore unintended results.
So we just go with a exact size container and let the flipping be handled
by eglibc provided le32toh removing our #ifdef machinery.
Closes: 745866
|
|
fseek and co do this to their eof-flags and it is more logic this way as
we will usually seek away from the end (e.g. to re-read the file).
The commit also improves the testcase further and adds a test for the
binary compressor codepath (as gz, bzip2 and xz are handled by
libraries) via the use of 'rev' as a 'compressor'.
|
|
As the comment actually says: open() does the umask dance by itself, so
we don't need to do it for it. We have to do it after mkstemp in Atomic
though, so move it into the if.
Also removes the "micro-optimisation" "FilePermissions == 600" as it
doesn't trigger at the moment anyway as 600 != 0600.
|
|
FileFd::Read already deals with the increase of the skipposition so that
we as the caller in FileFd::Skip really shouldn't increase it, too.
|
|
|
|
Bug lp:#1304657 was caused by confusion around the name Perms.
The new name AccessMode should make it clear that its not the
literal file permissions but instead the AccessMode passed to
open() (i.e. the umask needs to be applied)
|
|
Commit 7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug
that caused FileFd to create insecure permissions when FileFd::Atomic
is used. This commit fixes the permissions and adds a test.
The bug is most likely caused by the confusing "Perm" parameter
that is passed to Open() - its not the file permissions but intead
the "mode" part of open/creat.
|
|
|
|
This debug option will display all scripts that are run
by apts RunScripts and RunScriptsWithPkgs helpers.
|
|
This methods should not be used by anyone expect the library itself as
they are helpers for the specific class and therefore perfect candidates
for hidding.
Git-Dch: Ignore
|
|
While it is a huge undertaking to enable it for our public libraries as
basically everything we exported so far could be seen as public
interface our private library is new and under our full control, so we
can do whatever we like with it. The benefits are not that big in return
of course, but it reduces the size a bit, so thats great nontheless.
Git-Dch: ignore
|
|
It can happen that content in our buffer is not enough to produce a
meaningful output in which case no output is created by liblzma, but
still reports that everything is okay and we should go on.
The code assumes it has reached the end through if it encounters a null
read, so this commit makes it so that it looks like this read was
interrupted just like the lowlevel read() on uncompressed files could.
It subsequently fixes the issue with that as well as until now our loop
would still break even if we wanted it to continue on.
(This bug triggers our usual "Hash sum mismatch" error)
Reported-By: Stefan Lippers-Hollmann <s.L-H@gmx.de>
|
|
AutoClose is both an argument in OpenDescriptor() and an enum. In
commit 84baaae93badc2da7c1f4f356456762895cef278 code using the AutoClose
parameter was moved to OpenDescriptorInternal(). In that function,
AutoClose meant the enum value, so the check was always false.
|
|
|
|
They tend to be ugly to look at, so hide them.
Git-Dch: Ignore
|
|
We have xz/lzma support for a while, but only via an external binary
provided by xz-utils. Now that the Debian archive provides xz by default
and dpkg pre-depends on the library provided by liblzma-dev we can switch
now to use this library as well to avoid requiring an external binary.
For now the binary is in a prio:required package, but this might change
in the future.
API wise it is quiet similar to bz2 code expect that it doesn't provide
file I/O methods, so we piece this together on our own.
|
|
Git-Dch: Ignore
|
|
Git-Dch: Ignore
|
|
Old code limited lines to 250 characters which is probably enough for
everybody, but who knows… It also takes care of device nodes which start
with the same prefix.
|
|
The mountpoint might be auto-generated by the mount command so pushing
an error on the stack will confuse the following code and let it believe
an unrecoverable error occured while potentially everything is okay.
Same goes for umount as a non-existing mountpoint is by definition not
mounted.
|
|
Checking that parent-directory of mountpoint and mountpoint are on
different devices is fine most of the time, but is too restrictive
for our testcases and there shouldn't be anything wrong with 'normal'
users copying disk-contents around either if they want to.
We check for the existance of the ".disk/" directory now as this will
not be present if the disk isn't 'mounted'. Disks doesn't need to have
such a directory through, so for those we fall back to the old way of
detecting mounted or not mounted.
|
|
Git-Dch: Ignore
Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
|
|
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)
|
|
also adds namespaced attributes for good usage
Git-Dch: Ignore
|
|
[-Wunsafe-loop-optimizations]
Git-Dch: Ignore
Reported-By: gcc -Wunsafe-loop-optimizations
|
|
Git-Dch: Ignore
Reported-By: gcc -Wuseless-cast
|
|
Git-Dch: Ignore
Reported-By: gcc -Wcast-qual
|
|
Git-Dch: Ignore
Reported-By: gcc -Wpedantic
|
|
Git-Dch: Ignore
|
|
Automatically handle the override of list options via its parent value
which can even be a comma-separated list of values. It also adds an easy
way of providing a default for the list.
|
|
|
|
Conflicts:
apt-private/private-list.cc
configure.ac
debian/apt.install.in
debian/changelog
|
|
|
|
Commit 6008b79adf1d7ea5607fab87a355d664c8725026 should have been guarded
by "Git-Dch: Ignore", but it wasn't and I only noticed it with the Close
message via deity thinking "hehe, I wonder if someone is gonna notice".
Looks like someone did: hats off to reddit user itisOmegakai!
Good to know that what I do isn't only monitored by goverments. :)
As there is another instance of basically the same code we just factor
out the code a bit and reuse, so its even cleaner and not only simpler.
Reported-By: scan-build
|