But that breaks the concept of a bidirectional bridge between
container image and ostree commit because this little bit of
knowledge is encoded at the buildsystem side.
This metadata key is intended to be written into an ostree commit,
and then we will use it automatically in `container encapsulate`.
The "source of truth" for this key will hence be able live in the same
place that's generating the ostree commit.
The more "proper" place for this is probably alongside the other
constants in the libostree core C code. But that's tedious and
slow to release. And Rust is the future. And we've been slowly
adding more "core ostree" functionality here.
Colin Walters [Thu, 3 Feb 2022 13:54:37 +0000 (08:54 -0500)]
repo: Add two more cap-std APIs
Followup to the previous PR. I realized now with `io_lifetimes`
we can offer a safe `dfd_borrow()` that *borrows* the file descriptor
for the repository. (In contrast to the current `.dfd()` that returns
the raw version)
Building on that, add another API that re-acquires a `Dir` instance.
(In the future in theory we could optimize this more by knowing
whether or not the repo was constructed via cap-std, and perhaps
in theory synthesize a `&Dir` reference, but I don't think we
need that now)
Luca BRUNO [Wed, 1 Dec 2021 15:13:57 +0000 (15:13 +0000)]
lib: fix new clippy warnings
This fixes the following warnings highlighted by clippy:
* https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark
* https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
* https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
Luca BRUNO [Thu, 28 Oct 2021 12:31:57 +0000 (12:31 +0000)]
sysroot: support create and load actions on builder
This splits the builder completion step into separate actions for
creating/loading a sysroot.
It also introduces a roundtrip test over a freshly-created empty
sysroot.
Luca BRUNO [Wed, 27 Oct 2021 09:45:34 +0000 (09:45 +0000)]
sysroot: add a builder object
This adds a `SysrootBuilder` in order to allow consumers to load
a configured `Sysroot` in an ergonomic way. It tries to prevent
logic bugs coming from handling half-initialized entities.
Colin Walters [Fri, 22 Oct 2021 13:38:09 +0000 (09:38 -0400)]
repo: Add `require_rev` method
The `resolve_rev` C method should really have been
`resolve_rev_optional` from the start - it is more obviously wrong
in Rust because the input parameter `allows_noent` controls
whether the returned `Option` can ever be `None`.
I debated adding this to the C bindings, and may still do so,
but eh it's faster to write + ship in Rust, and the future of ostree is
Rust anyways.
Colin Walters [Tue, 21 Sep 2021 12:59:17 +0000 (08:59 -0400)]
repo: Expose dfd_as_file()
The `dfd()` API returns just an integer. Add a safe API that
makes a copy of the fd. What we really want here is `BorrowedFd` from
https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md
but that isn't here yet.
Colin Walters [Fri, 6 Aug 2021 15:00:33 +0000 (11:00 -0400)]
Release 0.12.2
```
Colin Walters (8):
Add 2021.3 feature
Re-export glib, gio
Deny unused results, warn on missing docs (except auto/)
Add new GLib 0.14 variant types for metadata types
Fix build with --features=v2021_3, use in CI by default
Add more documentation for --features=v2021_3
Use glib-sys via re-exported `glib::ffi` (and similar for gio)
Release 0.12.2
Luca BRUNO (5):
cargo: fix version in features chain
lib: fix 'dox' feature
cargo: point to docs.rs and clean up
ostree: release 0.12.1
cargo: bump ostree-sys to 0.8.1
```
Colin Walters [Tue, 3 Aug 2021 19:41:30 +0000 (15:41 -0400)]
Use glib-sys via re-exported `glib::ffi` (and similar for gio)
In general only `-sys` crates should depend on other `-sys`
crates. IOW for us, `ostree-sys` depends on `glib-sys`.
By using the re-export, we avoid needing to keep a version lock
between `glib` and `glib-sys` in our main crate. And similar
is true of our higher level reverse dependencies (e.g. `ostree-rs-ext`).
Also weaken our dependency to `0.14` as that's clearer.
Luca BRUNO [Mon, 2 Aug 2021 14:36:33 +0000 (14:36 +0000)]
cargo: fix version in features chain
This fixes the definition of the `v2016_4` feature.
It restores the chain of versions so that 2016.3 symbols can be
actually reached from newer features/versions.
Colin Walters [Sat, 31 Jul 2021 21:15:03 +0000 (17:15 -0400)]
Re-export glib, gio
Re-export our dependencies. See https://gtk-rs.org/blog/2021/06/22/new-release.html
"Dependencies are re-exported". Users will need e.g. `gio::File`, so this avoids
them needing to update matching versions.
Felix Krull [Tue, 25 Aug 2020 18:17:25 +0000 (20:17 +0200)]
gir: start fixing OSTree.Sign
I don't think the SignDummy and SignEd25519 types even need to be
visible. The explicit dummy_* and ed25519_* don't need to be visible
either, I suspect.