<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/contrib/fileutl.cc, branch 2.7.2</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.7.2</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.7.2'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2023-03-06T09:57:55Z</updated>
<entry>
<title>Address statements of public domain</title>
<updated>2023-03-06T09:57:55Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2023-02-27T16:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d9039b2409e69e651bf0d7ba582dbf528086332d'/>
<id>urn:sha1:d9039b2409e69e651bf0d7ba582dbf528086332d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix integer underflow in flExtension</title>
<updated>2022-05-23T08:09:31Z</updated>
<author>
<name>Ronan Desplanques</name>
<email>ronan.desplanques@gmail.com</email>
</author>
<published>2022-05-23T07:57:10Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=cacdb54953dbc81eecf4c3a55c132836e7849098'/>
<id>urn:sha1:cacdb54953dbc81eecf4c3a55c132836e7849098</id>
<content type='text'>
Before this patch, the expression `Res - File.length()` that was
used as the length underflowed. It was very unlikely to cause any
problem given the saturating behavior of the std::string
constructor that's used.

Replacing `Res - File.length()` with `File.length() - Res` would
have worked, but omitting the last argument altogether invokes an
std::string constructor which does the right thing.
</content>
</entry>
<entry>
<title>RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL</title>
<updated>2021-03-01T20:26:24Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2021-03-01T20:26:24Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8eccb902aa3be22a151943286fb376759a2b3585'/>
<id>urn:sha1:8eccb902aa3be22a151943286fb376759a2b3585</id>
<content type='text'>
This caused python-apt to unset the Python signal handler when running
update or install commands, breaking KeyboardInterrupt amongst possibly
other things.

We do not set those signal handlers in this functions, and the calling
functions restore signal handlers to previous ones.

LP: #1898026
</content>
</entry>
<entry>
<title>Use 500 MB memory limit for xz/lzma decoding</title>
<updated>2021-02-02T18:56:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-12-02T14:46:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b4b5e9bf97970e0efc4a994de96066a92e3a9b8f'/>
<id>urn:sha1:b4b5e9bf97970e0efc4a994de96066a92e3a9b8f</id>
<content type='text'>
The buffers we feed in and read out are usually a couple kilobytes big
so allowing lzma to use an unlimited amount of memory is easy &amp; okay,
but not needed and confuses memory checkers as it will cause lzma to
malloc a huge chunk of memory (which it will never use).
So lets just use a "big enough" value instead.

In exchange we simplify the decoder calling as we were already using the
auto-variant for xz, so we can just avoid the if-else and let liblzma
decide what it decodes.
</content>
</entry>
<entry>
<title>Allow prefix to be a complete filename for GetTempFile</title>
<updated>2020-05-18T13:55:36Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-18T09:55:54Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c470d92366d7c3c239a689f0a10d6d0d9daafbff'/>
<id>urn:sha1:c470d92366d7c3c239a689f0a10d6d0d9daafbff</id>
<content type='text'>
Our testcases had their own implementation of GetTempFile with the
feature of a temporary file with a choosen suffix. Merging this into
GetTempFile lets us drop this duplicate and hence test more our code
rather than testing our helpers for test implementation.

And then hashsums_test had another implementation… and extracttar wasn't
even trying to use a real tempfile… one GetTempFile to rule them all!
That also ensures that these tempfiles are created in a temporary
directory rather than the current directory which is a nice touch and
tries a little harder to clean up those tempfiles.
</content>
</entry>
<entry>
<title>Prefer use of O_TMPFILE in GetTempFile if available</title>
<updated>2020-05-18T13:55:36Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-13T06:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=37cc8dcda9e97e0b9420d37bb886081fa629847d'/>
<id>urn:sha1:37cc8dcda9e97e0b9420d37bb886081fa629847d</id>
<content type='text'>
Not all filesystems implement this feature in all versions of Linux,
so this open call can fail &amp; we have to fallback to our old method.
</content>
</entry>
<entry>
<title>GetLock: No strerror if it's just another process holding the lock</title>
<updated>2020-03-06T12:07:55Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-03-06T12:07:55Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=68a83a64cd424385b613f58e23c03e262d840b91'/>
<id>urn:sha1:68a83a64cd424385b613f58e23c03e262d840b91</id>
<content type='text'>
This improves the locking message, getting rid of useless details. If
we have a process holding the lock, we got that because the lock is
being hold by it, so there's no point telling the people the reason
for not getting the lock is the EAGAIN error and displaying its
strerrror().
</content>
</entry>
<entry>
<title>Raise buffer size for Hashes::AddFD() from 4 KiB to 64 KiB</title>
<updated>2020-01-14T12:10:36Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-07T18:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=b350560e34a369ef7610f9fceeffb00660209390'/>
<id>urn:sha1:b350560e34a369ef7610f9fceeffb00660209390</id>
<content type='text'>
Move APT_BUFFER_SIZE to macros.h and re-use it in hashes,
this also might speed up stuff, the motivation for using
64 KiB buffers in fileutl.cc was precisely that after all.
</content>
</entry>
<entry>
<title>Fix some style warnings from cppcheck</title>
<updated>2019-11-26T11:36:46Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2019-09-13T10:01:47Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=35012abf30ec1cfc9b5ee29647d4b1e25d98e99f'/>
<id>urn:sha1:35012abf30ec1cfc9b5ee29647d4b1e25d98e99f</id>
<content type='text'>
Unused variable, std::algorithms instead of raw for-loops.
There should be no observeable difference in behaviour.

Reported-By: cppcheck
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>Improve locking messaging - pid and name, "do not remove lock file"</title>
<updated>2019-06-21T21:14:46Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-06-21T20:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=cde8399310e56faaa6928411392184bc403eff66'/>
<id>urn:sha1:cde8399310e56faaa6928411392184bc403eff66</id>
<content type='text'>
We want to tell users which process is holding the lock so they
can easily understand what's going on, and we want to advise
users not to remove the lock file, because ugh, that's bad.

Re-initalize the flock structure, in case it got mangled by
previous fcntl call.
</content>
</entry>
</feed>
