Colin Walters
6940896c4e
Add a `cap-std-apis` feature with open/create
...
I'm trying to make more use of `cap-std` in our stack, and
this will be a key enabling API.
Actually a notable side benefit of this is that we don't need
to teach the ostree C code itself to use `openat2`, we inherit
cap-std's setup.
All of the internal ostree code using the prior `openat()` should
continue to work.
I only did basic sanity checking of this; there may be bugs
in other APIs.
2022-05-06 12:53:57 -04:00
Manuel Stühn
2ab55beb98
add ObjectDetails-struct and use it in list_objects-function
2022-05-06 12:53:57 -04:00
Luca BRUNO
ec572d786e
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.
2022-05-06 12:53:57 -04:00
Colin Walters
7b47de7a14
lib: Reexport libc::AT_FDCWD
...
Useful with `Repo::open_at()`.
Right now ostree-rs-ext pulls in libc for this and `fgetxattr`,
but the latter should go into nix.
2022-05-06 12:53:57 -04:00
Colin Walters
f9a91bfabd
lib: Export ffi too
...
Matching how gtk-rs does it. Right now rpm-ostree does depend
on interacting with `ostree-sys` via the cxxrs bits.
2022-05-06 12:53:57 -04:00
Colin Walters
83c829eaad
Add new GLib 0.14 variant types for metadata types
...
This way it's more convenient for downstream crates like ostree-rs-ext
to convert loaded variants.
TODO: Can we add a feature for the `gvariant` crate and expose via
that too?
2022-05-06 12:53:57 -04:00
Colin Walters
48e0d334b8
Deny unused results, warn on missing docs (except auto/)
...
And add basic docs for our manually implemented functions.
2022-05-06 12:53:57 -04:00
Luca BRUNO
20a025a0eb
lib: fix 'dox' feature
...
This makes sure docs can be properly built when using the 'dox'
feature. It should fix auto-builds on docs.rs.
2022-05-06 12:53:56 -04:00
Colin Walters
deedffde06
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.
Closes: https://github.com/ostreedev/ostree-rs/issues/12
2022-05-06 12:53:56 -04:00
Colin Walters
8a5ac02822
Update to glib 0.14
...
An intimidating spam of compiler errors at the start, but the
biggest was handling the new convention of `ostree_sys::` => `ffi::`.
This will require a semver bump of course.
2022-05-06 12:53:56 -04:00
Luca BRUNO
78ca01c4e3
repo_transaction_stats: move to a manual implementation
...
This moves `RepoTransactionStats` into a manually implemented
source file in order to provide getters to expose relevant
fields.
2022-05-06 12:53:56 -04:00
Felix Krull
e18919e0ef
src: manually implement SysrootDeployTreeOpts
2022-05-06 12:53:56 -04:00
Felix Krull
19076fe6d8
src: reimplement checksum hex and base64 en/decoding
...
This allows us to provide actually useful error handling
2022-05-06 12:53:56 -04:00
Felix Krull
f3b0bbe64c
src: add support for write_deployments_with_options
2022-05-06 12:53:56 -04:00
Felix Krull
5b1bc50418
src: add CommitSizesEntry
2022-05-06 12:53:56 -04:00
Felix Krull
37f9e3599a
Switch from lazy_static to once_cell
2022-05-06 12:53:55 -04:00
Felix Krull
ddb781f399
repo_checkout_at_options: fix version flags
2022-05-06 12:53:55 -04:00
Felix Krull
3e70feb75f
Start taking out futures feature
2022-05-06 12:53:55 -04:00
Felix Krull
7f3bd56d0d
Implement ostree::checksum_file
2022-05-06 12:53:54 -04:00
Felix Krull
6bc1a1d995
Add SePolicy::fscreatecon_cleanup
2022-05-06 12:53:54 -04:00
Felix Krull
17a9d7c855
Implement Checksum type for binary checksums
2022-05-06 12:53:54 -04:00
Felix Krull
32173d5b81
Add generated KernelArgs (not working yet)
2022-05-06 12:53:54 -04:00
Felix Krull
8d9aa7a857
Enable futures feature
2022-05-06 12:53:54 -04:00
Felix Krull
19fdf706d5
lib: implement CheckoutOptions::filter (hackishly)
2022-05-06 12:53:54 -04:00
Felix Krull
eec4a2287d
lib: RepoCheckoutAtOptions
2022-05-06 12:53:54 -04:00
Felix Krull
dfcaf3eede
Ignore clippy issues in generated code
2022-05-06 12:53:54 -04:00
Felix Krull
faef3562b8
collection_ref: add accessors for collection_id and ref_name
2022-05-06 12:53:54 -04:00
Felix Krull
8fc327296e
Improve doc blurb a bit
2022-05-06 12:53:54 -04:00
Felix Krull
0fe1b0d951
Add ignored test for empty FileInfo crash
2022-05-06 12:53:54 -04:00
Felix Krull
66cf9b288f
Move extra Repo methods to plain impl as well
2022-05-06 12:53:54 -04:00
Felix Krull
15c8e6376d
Add html_root_url
2022-05-06 12:53:54 -04:00
Felix Krull
2c7761047a
Add fmt check, check, clippy
2022-05-06 12:53:54 -04:00
Felix Krull
0d33525815
Suppress unused import warnings in generated code
2022-05-06 12:53:54 -04:00
Felix Krull
f7963d86ad
Fix
2022-05-06 12:53:53 -04:00
Felix Krull
3decba546e
Switch to generated CollectionRef
2022-05-06 12:53:53 -04:00
Felix Krull
60960612a3
Reorganise test code
...
This way I don't need to differentiate between tests for generated code
and tests for hand-written code.
2022-05-06 12:53:53 -04:00
Felix Krull
61e205b5c3
Regenerate and update to new gir and glib-rs version
2022-05-06 12:53:53 -04:00
Felix Krull
8bfefa2b14
Build CollectionRef manually
...
That way we can get Eq and Hash.
2022-05-06 12:53:53 -04:00
Felix Krull
f4cf9d3377
Rename libostree-sys to ostree-sys
2022-05-06 12:53:53 -04:00
Felix Krull
ced47cbb26
Move main crate into repo root
2022-05-06 12:53:53 -04:00