- Oct 25, 2016
-
-
Colin Walters authored
I wanted to add a new one, and realized it was wrong. Luckily, I think we were safe until now, since the set of bits for `(0, 1, 2)` is actually distinct. Although, hm, callers specifying `GLNX_FILE_COPY_OVERWRITE` may have not actually been getting that.
-
- Oct 05, 2016
-
-
Colin Walters authored
See https://mail.gnome.org/archives/ostree-list/2016-October/msg00003.html Basically https://github.com/wrpseudo/pseudo doesn't implement newer APIs like renameat2() and O_TMPFILE, so on the host side (as potentially opposed to the target system) we want to be able to disable them.
-
- Aug 31, 2016
-
-
Dan Nicholson authored
This is needed by ostree when creating a tarball with make dist.
-
- Aug 30, 2016
-
-
Colin Walters authored
No longer used by anything; see https://github.com/projectatomic/rpm-ostree/pull/429
-
- Aug 07, 2016
-
-
Colin Walters authored
I'm porting rpm-ostree and need this. Of course all this libcontainer stuff will be nuked in favor of bubblewrap when everything comes together.
-
- Aug 05, 2016
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@debian.org>
-
- Aug 04, 2016
-
-
Colin Walters authored
In some cases we want to replace with zero size, and `posix_fallocate()` is documented to return `EINVAL` in this case. Making this change since I noticed it elsewhere.
-
- Aug 03, 2016
-
-
Colin Walters authored
Some systems have bugs with it, so let's allow downstreams to easily disable it. https://bugzilla.gnome.org/show_bug.cgi?id=769453 https://github.com/ostreedev/ostree/issues/421
-
- Jul 29, 2016
-
-
Colin Walters authored
This drops a lot of duplicate code.
-
- Jul 22, 2016
-
-
Jonathan Lebon authored
A wild sordid tale of substractions and unsigned integers leads this team of variables down a loonng path... Reported-by:
Gatis Paeglis <gatis.paeglis@qt.io>
-
- Jul 08, 2016
-
-
Colin Walters authored
This is kind of an ABI change but it's for the better I think; on error we consistently clean up the temp file. This is obviously necessary without `O_TMPFILE`. With it, we still need an error cleanup in the case where we're trying to replace an existing file. I noticed this in ostree's `tests/test-refs.sh` which intentionally tries to rename a file over a directory path.
-
Colin Walters authored
While auditing this code to figure out why ostree's `tests/test-refs.sh` was failing, while the bug turned out to be different, I noticed that in the case where `dfd != target_dfd`, we failed to do the right `renameat()`. (No code I'm aware of does this now).
-
- Jul 01, 2016
-
-
Colin Walters authored
We had a bug previously where we failed to clean up a temporary file in an error path. This is a classic case where the new `O_TMPFILE` API in Linux is nicer. To implement this, as usual we start with some original bits from systemd. But in this case I ended up having to heavily modify it because systemd doesn't support "link into place and overwrite". They don't actually use their tempfile code much at all in fact - as far as I can tell, just in the coredump code. Whereas in many apps, ostree included, a very common use case is atomically updating an existing file, which is `glnx_file_replace_contents_at()`, including subtleties like doing an `fdatasync()` if the file already existed. Implementing this then is slightly weird since we need to link() the file into place, then rename() after. It's still better though because if we e.g. hit `ENOSPC` halfway through, we'll clean up the file automatically. We still do keep the mode where we error out if the file exists. Finally, the ostree core though does have a more unusual case where we want to ignore EEXIST (allow concurrent object writers), so add support for that now. Note: One really confusing bug I had here was that `O_TMPFILE` ignores the provided mode, and this caused ostree to write refs that weren't world readable. Rework things so we always call `fchmod()`, but as a consequence we're no longer honoring umask in the default case. I doubt anyone will care, and if they do we should probably fix ostree to consistently use a mode inherited from the repo or something.
-
- Jun 28, 2016
-
-
Alexander Larsson authored
This happens a lot if you use autocleanup for lock files, and the function returns early without the lock being taken.
-
- Jun 16, 2016
-
-
Yu Qi Zhang authored
We noticed the temp files being left over in ostree when (mistakenly) trying to replace the contents of a subpath that wasn't a directory. In the future we should look at the systemd code using `O_TMPFILE` here.
-
- May 31, 2016
-
-
Colin Walters authored
I swear I tested it...
-
- May 30, 2016
-
-
Colin Walters authored
We have multiple copies growing again of this code. glibc has this API internally and uses it in multiple places, let's do the same. Closes: #14
-
- May 10, 2016
-
-
Jonathan Lebon authored
Padding in the percentage case was useless (and actually didn't work properly) since all the real estate is taken up by the text and the bar. We only need padding in the text case, in case the new string is shorter.
-
- May 03, 2016
-
-
Colin Walters authored
Migrated from libgsystem's `gs_stream_fstat()`. It's a small function but I end up using it in OSTree a fair bit.
-
- May 02, 2016
-
-
Colin Walters authored
For rpm-ostree's use we always run in a new root, so we don't want to inherit the host system's PATH. For example, NixOS uses PATH for its software namespacing, but one could be using rpm-ostree to build CentOS commits.
-
- May 01, 2016
-
-
Colin Walters authored
Not sure if it ever worked. We need to not print the bars, etc.
-
- Mar 10, 2016
-
-
Alexander Larsson authored
We're ignoring the result from the close, but it can still affect errno, which is bad if you use this in functions that sets errno, because errno can unexpectedly change after you've set it.
-
Colin Walters authored
We had this internally, just need to expose it.
-
- Feb 08, 2016
-
-
Colin Walters authored
The previous fix added the last character of text, but failed to account for the space we're adding.
-
- Jan 26, 2016
-
-
Colin Walters authored
Not sure why we were doing this...I guess people were working around it by adding their own spaces?
-
- Jan 25, 2016
-
-
Colin Walters authored
This way, one can unlock the console while still using the cleanup macro. Otherwise we miss a lot of the ergonomics of cleanup macros.
-
Colin Walters authored
Otherwise we miss a lot of the ergonomics of cleanup macros.
-
- Jan 24, 2016
-
-
Colin Walters authored
This is taken from systemd, and is really useful when one has a few known-to-be-small strings one wants to concatenate without resorting to malloc.
-
- Jan 22, 2016
-
-
Alexander Larsson authored
-
- Jan 11, 2016
-
-
Colin Walters authored
I plan to use this in rpm-ostree. Sad how many times this gets reinvented. Should probably stick a copy in `glib-unix.h` or so.
-
- Jan 03, 2016
-
-
Colin Walters authored
It's quite common to iterate over a directory recursively, only caring about the file type, but not other bits returned by `stat()`. Good file systems fill in `dt_type`, but not all do. This function papers over that in userspace conveniently.
-
- Dec 17, 2015
-
-
Alexander Larsson authored
The g_autoptr support for GString was added in 2.45.8, so we need to define it on 2.44 for it to work.
-
- Dec 11, 2015
-
-
Alexander Larsson authored
Create a temporary directory using mkdirat. https://bugzilla.gnome.org/show_bug.cgi?id=757611
-
Alexander Larsson authored
This is very useful in combination with glnx_close_fd https://bugzilla.gnome.org/show_bug.cgi?id=757611
-
- Dec 02, 2015
-
-
Colin Walters authored
-
- Dec 01, 2015
-
-
Alexander Larsson authored
-
Alexander Larsson authored
-
- Nov 23, 2015
-
-
Matthew Barnes authored
-
- Nov 06, 2015
-
-
Matthew Barnes authored
-
Matthew Barnes authored
-