summaryrefslogtreecommitdiff
path: root/libglnx
Commit message (Collapse)AuthorAgeFilesLines
* libglnx: Bump to ef502aabf7d3a0d37f9c4d228f870ac93404447bColin Walters2021-10-141-0/+0
| | | | | | Various fixes there, including one for `gcc -fanalyzer`. Update submodule: libglnx
* libglnx: Bump to masterColin Walters2020-10-051-0/+0
| | | | | | | | | | | | | | | | To pull in the fix for `/var/tmp` on NixOS but also on general principle. Update submodule: libglnx ``` Colin Walters (1): xattrs: Add better error prefixing Rebecca Turner (2): glnx-fdio: try $TMPDIR if /var/tmp doesn't exist glnx-fdio: use $TMPDIR if set ```
* libglnx: Bump to latestJonathan Lebon2020-06-161-0/+0
| | | | | | | | For `copy_file_range` fix: https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/18 Update submodule: libglnx
* Bump libglnxColin Walters2019-11-081-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has a few fixes, mainly I want to get this in as prep for fs-verity. Update submodule: libglnx ``` Alex Kiernan (1): macros: Add TEMP_FAILURE_RETRY for musl Alexander Larsson (1): Add glnx_open_anonymous_tmpfile_full() allowing you to specify the directory Colin Walters (8): Merge branch 'shutil-rm-rf-errprefix' into 'master' Merge branch 'us-temp-failure-retry' into 'master' Merge branch 'anonymous-tmpfile-dir' into 'master' Merge branch 'meson-older-compilers' into 'master' fdio: Add glnx_tmpfile_reopen_rdonly() Merge branch 'reopen-rdonly' into 'master' build-sys: Add libglnx-testlib.c to Automake Merge branch 'testlib-automake' into 'master' Jonathan Lebon (1): Merge branch 'uchar' into 'master' Simon McVittie (5): missing: Remove unused <uchar.h> Run the fdio test in its own temporary directory meson: Define HAVE_DECL_FOO to 0 if foo isn't declared Make the Meson build work on older compilers CI: Target a Fedora stable release Will Thompson (3): Add meson.build files Document using this as a Meson subproject Add GitLab CI ```
* Update libglnxColin Walters2018-12-071-0/+0
| | | | | | | | | To pick up https://gitlab.gnome.org/GNOME/libglnx/merge_requests/4 Update submodule: libglnx Closes: #1781 Approved by: jlebon
* Update libglnxColin Walters2018-07-171-0/+0
| | | | | | | | | For `renameat2()` fix to build with latest glibc (e.g. Fedora rawhide). Update submodule: libglnx Closes: #1680 Approved by: jlebon
* Update libglnx to get g_autoptr backportsMatthew Leeds2018-05-291-0/+0
| | | | | | | Update submodule: libglnx Closes: #1603 Approved by: jlebon
* libglnx: Bump to fix F28 compilationJonathan Lebon2018-05-081-0/+0
| | | | | | | | | | Pull in https://github.com/GNOME/libglnx/pull/104 to fix compiling on F28. Update submodule: libglnx Closes: #1580 Approved by: cgwalters
* main, status: Factor out deployment printing into helperColin Walters2018-03-191-0/+0
| | | | | | | | | | | | | Prep for staged deployments; they won't be in the primary deployment list, and we want to print them first. Also pull in some code from rpm-ostree for the red/bold bits and use that tree-wide. Update submodule: libglnx Closes: #1504 Approved by: jlebon
* Bump libglnx, use "n items" progress for fsckColin Walters2017-12-151-0/+0
| | | | | | | | | | Sooo much nicer. See also https://github.com/projectatomic/rpm-ostree/pull/1143 Update submodule: libglnx Closes: #1383 Approved by: jlebon
* build: Add -Werror=undef by default, fix falloutColin Walters2017-11-061-0/+0
| | | | | | | | | | | | | The main thing here is that a ton of stuff has happened in gnulib since we imported `parse-datetime.y`. I cherry-picked a little bit of it, but that upstream doesn't seem to build with `-Wundef`, so I just deleted some hunks. (Note I reindented the warnings consistently) Update submodule: libglnx Closes: #1320 Approved by: jlebon
* Update libglnxColin Walters2017-11-011-0/+0
| | | | | | | | | | Mostly for https://github.com/GNOME/libglnx/pull/94 since I keep seeing it in the terminal. Update submodule: libglnx Closes: #1318 Approved by: jlebon
* tree-wide: Update to new libglnx fd APIsColin Walters2017-10-111-0/+0
| | | | | | | | | | | | | | | | | | | This ends up a lot better IMO. This commit is *mostly* just `s/glnx_close_fd/glnx_autofd`, but there's also a number of hunks like: ``` - if (self->sysroot_fd != -1) - { - (void) close (self->sysroot_fd); - self->sysroot_fd = -1; - } + glnx_close_fd (&self->sysroot_fd); ``` Update submodule: libglnx Closes: #1259 Approved by: jlebon
* tree-wide: Bump libglnx, port to new lockfile initColin Walters2017-09-271-0/+0
| | | | | | | | | | In particular I'd like to get the copy fix in, since it might affect users for the keyring bits. Update submodule: libglnx Closes: #1225 Approved by: jlebon
* Update libglnxColin Walters2017-09-181-0/+0
| | | | | | | | | | | | Update libglnx, which is mostly port the repo stagedir code to the new tmpdir API. This turned out to require some libglnx changes to support de-allocating the tmpdir ref while still maintaining the on-disk dir. Update submodule: libglnx Closes: #1172 Approved by: jlebon
* Update libglnxColin Walters2017-08-161-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly the `copy_file_range` changes plus the Coverity files. ``` Colin Walters (4): localalloc: Abort on EBADF from close() by default local-alloc: Remove almost all macros like glnx_free, glnx_unref_variant console: Fix Coverity NULL deref warning fdio: Merge systemd code to use copy_file_range(), use FICLONE Jonathan Lebon (1): console: trim useless check Matthew Leeds (1): dirfd: Fix typo in comment Philip Withnall (1): glnx-console: Add missing NULL check before writing out text ``` Update submodule: libglnx Closes: #1081 Approved by: jlebon
* Update libglnx, port some uses to newer APIsColin Walters2017-07-241-0/+0
| | | | | | | | | | Mostly for the latest `-Wmaybe-uninitialized` fix, but while here also port some places to newer APIs. Update submodule: libglnx Closes: #1027 Approved by: jlebon
* Update libglnx, port various bits to new APIColin Walters2017-07-181-0/+0
| | | | | | | | | | | | | | | | Using the error prefixing in the delta processing allows us to do new code style. Also strip trailing whitespace. Use error prefixing in a few other random places. I didn't hunt for all of them, just testing out the new API. Use `glnx_fchmod()`. Also note I dropped one `fchmod (tmpf, 0600)` which is no longer necessary. Update submodule: libglnx Closes: #1011 Approved by: jlebon
* pull: fix GLNX_HASH_TABLE_FOREACH_KV regressionsJonathan Lebon2017-06-301-0/+0
| | | | | | | | | | | | | | These are regression from #971. We were stuffing a pointer size inside a variable of integer size. So the assignment was spilling over into other variables' storage space. Actually use a gpointer and GPOINTER_TO_[U]INT as was done originally. Also bump libglnx which has static checks for this error in the future. Update submodule: libglnx Closes: #990 Approved by: cgwalters
* tree-wide: Misc porting to newer libglnx APIsColin Walters2017-06-281-0/+0
| | | | | | | | | | | | | - Use the new tmpfile bits - `glnx_try_fallocate` - `glnx_renameat()` Depends: https://github.com/GNOME/libglnx/pull/57 Update submodule: libglnx Closes: #970 Approved by: jlebon
* Port to GLnxTmpfileColin Walters2017-06-271-0/+0
| | | | | | | | | | | | | | | | | | | | | There's lots of mechanically replacing `OtTmpFile` with `GLnxTmpfile`; the biggest changes are in the commit path. Symlink commits are now very clearly separated from regular files. Symlinks are `OtCleanupUnlinkat`, and regular files are `GLnxTmpfile`. The commit codepath separates those as `_ostree_repo_commit_path_final()` and `_ostree_repo_commit_tmpf_final()`. A nice aspect of all of this is that they both *consume* the temporary on success. This avoids an extra spurious `unlink()` call. One of the biggest bits of code motion is in `commit_loose_regfile_object()`, which no longer needs to care about symlinks. For the most parth though it's just removing conditionals. Update submodule: libglnx Closes: #958 Approved by: jlebon
* libglnx: bump and use new helper methodsJonathan Lebon2017-05-121-0/+0
| | | | | | | Update submodule: libglnx Closes: #857 Approved by: cgwalters
* checkout/commit: Use glnx_regfile_copy_bytes() if possibleColin Walters2017-05-101-0/+0
| | | | | | | | | | | | | | | | | | | | | | | Rather than `g_output_stream_splice()`, where the input is a regular file. See https://github.com/GNOME/libglnx/pull/44 for some more information. I didn't try to measure the performance difference, but seeing the read()/write() to/from userspace mixed in with the pointless `poll()` annoyed me when reading strace. As a bonus, we will again start using reflinks (if available) for `/etc`, which is a regression from the https://github.com/ostreedev/ostree/pull/797 changes (which before used `glnx_file_copy_at()`). Also, for the first time we'll use reflinks when doing commits from file-backed content. This happens in `rpm-ostree compose tree` today for example. Update submodule: libglnx Closes: #817 Approved by: jlebon
* Bump libglnx, port a few callers to new error APIColin Walters2017-03-221-0/+0
| | | | | | | | Testing out the waters here. I think we should roll this into any future code cleanup reworking we do. Closes: #747 Approved by: jlebon
* libglnx: bump for -Wmaybe-uninitialized fixJonathan Lebon2017-03-021-0/+0
| | | | | | | https://github.com/GNOME/libglnx/pull/37 Closes: #715 Approved by: cgwalters
* libglnx: Re-bump to master due to accidental reversionColin Walters2017-02-211-0/+0
| | | | | | | | | | | Commit a1805d6101eb8efeaa72459c22d88ed08ff7a065 reverted this unintentionally. We should have some CI check that requires a commit message has something like "libglnx bump" or something? Closes: #693 Approved by: jlebon
* contrib/golang: rm directoryGiuseppe Scrivano2017-02-161-0/+0
| | | | | | | | | | rm -r the directory since we are keeping the Go bindings separately under https://github.com/ostreedev/ostree-go Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #690 Approved by: cgwalters
* libglnx: BumpColin Walters2017-02-141-0/+0
| | | | | | | Pulls in the xattr fixes and the tempname perf improvement. Closes: #680 Approved by: jlebon
* libglnx: Bump to master (for -fsanitize fixes)Colin Walters2016-10-281-0/+0
| | | | | Closes: #552 Approved by: jlebon
* libglnx: Update to latestColin Walters2016-10-061-0/+0
| | | | | | | | | This pulls in a new compilation flag for wrpseudo compatibility. Also note we need to add some includes since glnx-libcontainer went away, and with it some includes for `sys/mount.h` etc. Closes: #522 Approved by: cgwalters
* Final excision of libgsystem dependencyColin Walters2016-08-091-0/+0
| | | | | | | | | | | | | | Lots and lots of preparation led to this moment - when nothing apparent changes for users! Woo! But seriously, having the extra dependency is a minor annoyance, and in the big picture I think the libgsystem idea was wrong - we need to land things in GLib, and use git submodules for API-unstable or Linux-specific sharing. For a lot of OSTree, the libgsystem `GFile*` orientation was also wrong, we really want fd-relative. Closes: #444 Approved by: jlebon
* Update libglnx: Add missing files to libglnx distributionSimon McVittie2016-08-051-0/+0
| | | | | | | | | This fixes distcheck. Signed-off-by: Simon McVittie <smcv@debian.org> Closes: #436 Approved by: cgwalters
* lib: Use libglnx file replace API more consistentlyColin Walters2016-08-041-0/+0
| | | | | | | | | | We have a better API now, drop use of the internal helper, which also depended on libgsystem. This required bumping libglnx to pull in a fix. Closes: #429 Approved by: giuseppe
* Update libglnx for O_TMPFILE build time optionColin Walters2016-08-041-0/+0
| | | | | | | See: https://github.com/ostreedev/ostree/issues/421 Closes: #426 Approved by: gatispaeglis
* libglnx: bump to latestJonathan Lebon2016-07-221-0/+0
| | | | | | | | | | | OSTree can sometimes print very long lines which lead to many empty spaces getting printed if the output overflowed the line due to a bug in libglnx. Reported-by: Gatis Paeglis <gatis.paeglis@qt.io> Closes: #406 Approved by: cgwalters
* libglnx porting: delete temp files on failure of file creationYu Qi Zhang2016-06-161-0/+0
| | | | | | | | | We noticed the temp files being left over in ostree when (mistakenly) trying to create refs with names in use by folders. This fix removes temp files created by glnx_file_replace_contents_at on failure. Closes: #348 Approved by: cgwalters
* core: Port to new libglnx tempname APIColin Walters2016-05-311-0/+0
| | | | | | | Drops another libgsystem use, and as bonus we malloc less too. Closes: #311 Approved by: jlebon
* libglnx porting: Migrate to glnx_stream_fstat()Colin Walters2016-05-061-0/+0
| | | | | | | | | I ended up deciding to move this one into libglnx, seems like something other libglnx-using software might want to do, even though xdg-app doesn't right now. Closes: #282 Approved by: jlebon
* libglnx porting: Migrate from GSConsoleColin Walters2016-05-021-0/+0
| | | | | | | | | | | | | | | To GLnxConsoleRef. There were some subtleties here, for example we used to reference `GSConsole` inside the progress changed function, which at first seems like an ABI hazard, because e.g. rpm-ostree or xdg-app could still be passing a `GSConsole` instance there. Luckily, it turns out to be compatible to just start calling libglnx here. Another issue was that due to libglnx's use of the cleanup function, we needed to ensure we always called `ostree_async_progress_finish()` *before* the cleanup function was invoked. Closes: #280 Approved by: giuseppe
* repo: Port -refs.c to openat()Colin Walters2016-01-281-0/+0
| | | | | | | | I'd like to incrementally convert all of `ostree-repo*.c` to fd-relative usage, so that we can sanely introduce `ostree_repo_new_at()` which doesn't involve GFile. This one is medium risk, but passes the test suite.
* Update to latest libglnxAlexander Larsson2015-12-141-0/+0
|
* glnx: Update from masterMatthew Barnes2015-11-231-0/+0
| | | | More autocleanup backports, this time GFileOutputStream.
* libglnx: Update from masterMatthew Barnes2015-09-161-0/+0
| | | | Pick up PATH change for glnx_libcontainer_run_chroot_private().
* sysroot: Add a try_lock() APIColin Walters2015-05-101-0/+0
| | | | | | | | | | | | | The blocking locking API wasn't sufficient for use in the rpm-ostree daemon; it really wants to know if the lock is held, then continue to do other things (like service DBus requests), and get notification when the lock is available. We also add an async variant that can be called if the lock is not available. Implement a higher level "loop until lock is available" method in the `ostree admin` commandline.
* libglnx: Pick up bugfix and backportsMatthew Barnes2015-05-061-0/+0
| | | | Need more autocleanup backports for GIO types.
* libglnx: fix reference to commitGiuseppe Scrivano2015-05-051-0/+0
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* sysroot: Add an API to lockColin Walters2015-05-051-0/+0
| | | | | | | | | | | | | | | | | | If a system administrator happens to type `ostree admin upgrade` multiple times, currently that will lead to a potentially corrupted system. I originally attempted to do locking *internally* in `libostree`, but that didn't work out because currently a number of the commands perform multi-step operations that all need to be serialized. All of the current code in `ostree admin deploy` is an example. Therefore, allow callers to perform locking, as most of the higher level logic is presently implemented there. At some point, we can revisit having internal locking, but it will be difficult. A more likely approach would be similar to Java's approach with concurrency on iterators - a "fail fast" method.
* Fix build when using GLib < 2.44Matthew Barnes2015-05-041-0/+0
|
* deploy: Drop a fsync, use fd-relative APIsColin Walters2015-04-201-0/+0
| | | | | Now that we can rely on `syncfs()`, drop another fsync in the deploy path. While we're here, convert it to fd-relative.
* deploy: Drop fsync of modified config filesColin Walters2015-04-201-0/+0
| | | | | | | | | | These fsyncs were added for what turned out to be a fairly bogus reason; I was hitting read errors from extlinux after upgrades and out of conservatisim tried adding fsync calls, but the *actual* problem was that extlinux didn't support 64 bit ext4. Now that at least for Project Atomic hosts we're just targeting grub2, we can drop these fsync calls and rely on `syncfs()` being both faster and catching any errors.