I looked at the systemd code but it didn't have a variant of
mkdir_parents that used `*at()`. This is a fresh implementation, with
the risk that entails.
However I am changing libgsystem to call it now for testing, and
libgsystem APIs are covered by ostree usage at least.
We have to wrap the glibc version to ensure we get the right version,
otherwise depending on the variance of includes we may end up crashing
if we get the POSIX version.
This will allow deleting some code from OSTree for the config file
merging. We're reusing some code from systemd, which a nice modern
clean codebase, and among other things this gets us BTRFS reflinking
(if available) again.
We don't have this really in GLib, unfortunately. We do want
GCancellable, but we also want to operate on raw fds where possible.
The "read a file and validate as UTF-8" is a common use case of mine,
and this combines that with openat().
This module is a new successor to libgsystem. It currently contains a
backport of the GLib cleanup macros, but soon more Linux-specific code
will be added.