Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge ostree-rs into this repository #2575

Merged
merged 434 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
434 commits
Select commit Hold shift + click to select a range
903bd86
lib: clean up types for RepoCheckoutFilter
fkrull Jun 12, 2019
e39f8d7
lib: add repo_checkout_filter function for better ergonomics
fkrull Jun 12, 2019
d74c0fc
lib: add docs and safety notes to RepoCheckoutFilter
fkrull Jun 12, 2019
315cd53
lib: fix clippy
fkrull Jun 12, 2019
87b34be
lib: catch unwinds in RepoCheckoutFilter
fkrull Jun 13, 2019
01ae586
lib: brush up some docs
fkrull Jun 13, 2019
b51b81d
lib: generate some additional classes
fkrull Jun 13, 2019
b44202f
ci: add Makefile target to run gir -m not_bound
fkrull Jun 13, 2019
9e8192f
lib: add some glib types to generate more functions
fkrull Jun 13, 2019
7f8f32e
conf: clean up comments a bit
fkrull Jun 13, 2019
6a86340
conf: add some more loose types
fkrull Jun 13, 2019
1a301fa
Bump version
fkrull Jun 13, 2019
b1a41e9
Add notes about releases and tags
fkrull Jun 14, 2019
5b6991a
Bump gir version
fkrull Jun 28, 2019
2c07302
Update to new glib-rs versions
fkrull Jun 28, 2019
8d9aa7a
Enable futures feature
fkrull Jun 28, 2019
43c7791
ci: add job for futures feature
fkrull Jun 28, 2019
48de859
conf: remove a problematic function that was fixed in gir
fkrull Jun 28, 2019
27ac97d
ci: fix futures job maybe
fkrull Jun 28, 2019
d7ea8af
Fix tests on nightly (by avoiding UB, even)
fkrull Jun 28, 2019
3597c3c
ci: include `futures` in docs
fkrull Jun 28, 2019
39532d4
ci: remove separate futures build
fkrull Aug 27, 2019
e4c82f6
ci: clean up image
fkrull Aug 27, 2019
35fde60
ci: still need before_script for docs
fkrull Aug 27, 2019
110b09e
ci: fix features for -sys
fkrull Aug 27, 2019
14577da
ci: I guess we did need CMake
fkrull Aug 27, 2019
dee0490
ci: fix
fkrull Aug 28, 2019
7f61aeb
ci: use libostree from unstable
fkrull Aug 28, 2019
75ce6df
Update gir version
fkrull Aug 28, 2019
160bdae
Add features for docs.rs build
fkrull Aug 28, 2019
13556fd
Enable some functions that seem to work now
fkrull Aug 28, 2019
b94af87
Revert "Enable some functions that seem to work now"
fkrull Aug 28, 2019
f7d769c
ci: fix feature flags
fkrull Aug 28, 2019
3951ac1
Update gir files
fkrull Aug 28, 2019
d51861e
Update OSTree-1.0.gir
fkrull Aug 28, 2019
0e3b567
Disable build features constant
fkrull Aug 28, 2019
d2525da
Regenerate -sys
fkrull Aug 28, 2019
5980af7
Ignore BUILT_FEATURES from main crate
fkrull Aug 28, 2019
377b7ae
Clean up docs.rs sections in Cargo.tomls
fkrull Aug 28, 2019
e6a1fdd
Regenerate main crate
fkrull Aug 28, 2019
8f223ac
ci: bump used version
fkrull Aug 31, 2019
32173d5
Add generated KernelArgs (not working yet)
fkrull Aug 31, 2019
12d976d
Make kernel_args compile
fkrull Aug 31, 2019
3bfb805
kernel_args: enable and fix argv methods
fkrull Aug 31, 2019
6ef9ab2
kernel_args: fix feature flags
fkrull Aug 31, 2019
17a9d7c
Implement Checksum type for binary checksums
fkrull Aug 31, 2019
78a14d1
Implement Repo::write_content
fkrull Aug 31, 2019
bb4e0c5
Implement Repo::write_metadata
fkrull Sep 1, 2019
8002e06
Implement Repo::write_content_async
fkrull Sep 1, 2019
e424800
Implement Repo::write_metadata_async
fkrull Sep 1, 2019
6bc1a1d
Add SePolicy::fscreatecon_cleanup
fkrull Sep 1, 2019
d55d1b1
Fix file mode
fkrull Sep 2, 2019
4cd981d
Use pointer coercion instead of messing with -sys
fkrull Sep 2, 2019
7f3bd56
Implement ostree::checksum_file
fkrull Sep 2, 2019
14f2ff4
Implement ostree::checksum_file_from_input
fkrull Sep 2, 2019
815b856
Implement ostree::checksum_file_async
fkrull Sep 2, 2019
ad26aba
Implement ostree::checksum_file_at
fkrull Sep 2, 2019
2fdf020
checksum: implement conversion from string and to base64
fkrull Sep 2, 2019
f640444
checksum: implement more traits and functions
fkrull Sep 2, 2019
d801cac
Bump crate versions
fkrull Sep 2, 2019
376dc28
ci: fix build
fkrull Sep 3, 2019
febbd00
ci: run crates.io publish on release tags
fkrull Sep 3, 2019
bdf749b
ci: update sccache
fkrull Oct 31, 2019
4bdb7b8
ci: switch to Fedora Rawhide
fkrull Oct 31, 2019
75ab3f5
Fix clippy issue
fkrull Oct 31, 2019
486c604
Set up cargo workspace
fkrull Oct 31, 2019
ad6e056
ci: don't reformat -sys
fkrull Oct 31, 2019
2014336
ci: install make
fkrull Oct 31, 2019
53f9c1a
ci: install sccache during docs build
fkrull Oct 31, 2019
14b511d
ci: fix setup, again
fkrull Oct 31, 2019
366e9b7
Add feature alias for the latest OSTree version
fkrull Oct 31, 2019
f5c255b
Update bundled glib gir files
fkrull Oct 31, 2019
d2e384a
Update gir file
fkrull Oct 31, 2019
bf27ba5
Fix lint in tests
fkrull Oct 31, 2019
f0ef98a
Add some ignored types
fkrull Oct 31, 2019
59f9b69
Bump versions
fkrull Oct 31, 2019
5ecc8a0
gir: update OSTree-1.0.gir
fkrull Dec 15, 2019
5bfc5d1
Regenerate files
fkrull Dec 15, 2019
3f438a9
Add 2019.6 feature
fkrull Dec 15, 2019
2840703
Bump versions
fkrull Dec 15, 2019
241806b
Update glib + gir and regenerate
fkrull Dec 15, 2019
3e70feb
Start taking out futures feature
fkrull Dec 15, 2019
3290d5c
Rewrite handwritten futures functions
fkrull Dec 15, 2019
31c80cb
Bump versions
fkrull Dec 15, 2019
8576adf
ci: ignore changes in versions.txt lines
fkrull Dec 15, 2019
a4cee3c
Revert "ci: ignore changes in versions.txt lines"
fkrull Dec 15, 2019
1d262ca
Remove repo hash from versions.txt
fkrull Dec 15, 2019
f0d6172
ci: disable clippy warnings for the moment
fkrull Feb 22, 2020
8636b71
gir: update to OSTree 2020.2 gir
fkrull Mar 6, 2020
7c56e3c
Regenerate for OSTree 2020.2
fkrull Mar 6, 2020
5a852bd
Bump versions
fkrull Mar 6, 2020
8530365
Bump ostree version
fkrull Mar 6, 2020
2437901
gir-files: update to 2020.3
fkrull Mar 23, 2020
6ab1e99
ci: ignore gir differences in version files
fkrull Mar 6, 2020
6a077ff
ci: build every feature level separately
fkrull Mar 31, 2020
1756491
ci: install fewer things
fkrull Mar 31, 2020
935cbf4
ci: simplify pipeline a bit maybe
fkrull Mar 31, 2020
ddb781f
repo_checkout_at_options: fix version flags
fkrull Mar 31, 2020
a9d7623
Bump version
fkrull Apr 1, 2020
7c24103
Ignore ci-cached directories so they don't interfere with the publish
fkrull Apr 1, 2020
9af7577
Add LICENSE to ostree-sys
fkrull Jul 23, 2020
fddff04
Change branch name references
fkrull Jul 23, 2020
3be9cb5
gir: update bundled gir files
fkrull Jul 23, 2020
ec2476b
Start adding more update instructions to README
fkrull Jul 23, 2020
c040aa4
Regenerate with new gir files
fkrull Jul 23, 2020
130f0c2
Update gir version and regenerate
fkrull Jul 23, 2020
37f9e35
Switch from lazy_static to once_cell
fkrull Jul 23, 2020
c38d832
Bump dependency versions
fkrull Jul 23, 2020
05e86a6
gir: patch ostree_repo_finder_avahi_new
fkrull Jul 23, 2020
c36ee94
conf: disable RepoFinder methods that don't autogenerate correctly
fkrull Apr 1, 2020
d7b785c
sys: remove pkg-config dependency
fkrull Jul 23, 2020
990bbe2
Use forked gir with updated shell-words and cleaned-up build.rs
fkrull Jul 23, 2020
de0cee4
tests: use RepoMode::Archive (seems to be less finicky)
fkrull Jul 23, 2020
66f928d
src: use libc::c_char to improve non-x86 compatibility
fkrull Jul 23, 2020
296768c
ci: update sccache
fkrull Jul 23, 2020
66a16b1
ci: use --workspace instead of --all
fkrull Jul 23, 2020
be60eb7
ci: test building for non-x86 target
fkrull Jul 23, 2020
2c3c976
Switch back to upstream gir
fkrull Jul 24, 2020
dc69966
ci: change docs build command
fkrull Jul 24, 2020
253f46e
Update rustdoc-stripper
fkrull Jul 24, 2020
28c8a3e
ci: refactor pipeline
fkrull Jul 24, 2020
409527e
ci: update readme (and pipeline)
fkrull Jul 24, 2020
7ef8668
Add command to grab latest OSTree-1.0.gir from Fedora Rawhide
fkrull Jul 24, 2020
b082362
Also remove OSTree-1.0.gir when cleaning gir files
fkrull Jul 24, 2020
0b267b2
Add Vagrantfile
fkrull Jul 24, 2020
cc1b862
Bump versions
fkrull Jul 24, 2020
d7848fe
Fix indentation in readme
fkrull Jul 24, 2020
d7156df
Add script to get OSTree-1.0.gir from libostree source build
fkrull Jul 26, 2020
aee92d1
Update to OSTree 2020.4
fkrull Aug 25, 2020
cd36d8b
Add feature levels to Cargo.toml
fkrull Aug 25, 2020
1010581
Update docs
fkrull Aug 25, 2020
2504c97
ci: try different Fedora image?
fkrull Aug 25, 2020
7c72d29
PATCH: version on ostree_repo_commit_modifier_set_sepolicy_from_commit
fkrull Aug 25, 2020
65122a5
PATCH: version on OSTREE_SIGN_NAME_ED25519
fkrull Aug 25, 2020
e76a6b4
PATCH: versions on ostree_sign_* functions
fkrull Aug 25, 2020
d883810
Switch ostree source to git
fkrull Aug 25, 2020
977b51e
gir: switch to gir based on patched upstream source
fkrull Aug 25, 2020
be67b37
gir: start fixing OSTree.Sign
fkrull Aug 25, 2020
d900c58
gir: add missing version tag
fkrull Aug 25, 2020
24b5148
gir: fix out parameters not being marked correctly
fkrull Aug 25, 2020
cefbcca
gir: fix another out parameter
fkrull Aug 25, 2020
a39328a
sign: add sanity check for sign API
fkrull Aug 25, 2020
26f4170
conf: disable internal Sign subtypes
fkrull Aug 25, 2020
e49ee07
Update to OSTree 2020.5
fkrull Aug 25, 2020
3d8d5ce
Disable some irrelevant functions
fkrull Aug 25, 2020
5b1bc50
src: add CommitSizesEntry
fkrull Aug 25, 2020
4e7abb3
conf: remove some unfixable TODOs
fkrull Aug 25, 2020
f45bfa2
Makefile: only depend on gir bin in gir-report
felixkrull-neuland Aug 26, 2020
f3b0bbe
src: add support for write_deployments_with_options
felixkrull-neuland Aug 26, 2020
19076fe
src: reimplement checksum hex and base64 en/decoding
fkrull Aug 26, 2020
6f05869
conf: annotate ignores better
fkrull Aug 26, 2020
86897a5
src: add Checksum::from_bytes
fkrull Aug 26, 2020
5ae1a40
conf: ignore some more special-cased functions
fkrull Aug 26, 2020
8ef294b
Bump versions
fkrull Aug 26, 2020
1ab87e6
conf: anchor function name patterns to avoid unexpected exclusions
fkrull Aug 26, 2020
fe03ad1
Update gir file to 2020.6
fkrull Sep 4, 2020
e686a0b
gir: update misc gir files
fkrull Oct 15, 2020
4cbbbf2
gir: update OSTree gir
fkrull Oct 15, 2020
75848b2
Regenerate based on new gir
fkrull Oct 17, 2020
d345ea0
Switch to patched ostree gir
fkrull Oct 17, 2020
7576363
ci: fix rawhide stages?
fkrull Oct 17, 2020
e18919e
src: manually implement SysrootDeployTreeOpts
fkrull Oct 18, 2020
2caf026
src: fix tests
fkrull Oct 18, 2020
900973b
Remove outdated sentence in readme
fkrull Oct 18, 2020
b526f51
Bump versions
fkrull Oct 18, 2020
0c33d63
Update common gir files
fkrull Mar 26, 2021
be8dbd7
Fix ostree gir file update
fkrull Mar 26, 2021
c554594
Update OSTree-1.0.gir to 2021.1
fkrull Mar 26, 2021
0e9a16f
Regenerate
fkrull Mar 26, 2021
a96be52
Switch to patched ostree gir
fkrull Mar 26, 2021
674ad14
Regenerate
fkrull Mar 26, 2021
6043e5f
Bump all versions
fkrull Mar 26, 2021
0718f43
Update rustdoc-stripper
fkrull Mar 26, 2021
b5496f7
repo: Add concurrency=send
cgwalters Apr 2, 2021
9bb0dd3
ci: Add GH action to build
cgwalters Apr 8, 2021
7d15179
Update to 2021.2
cgwalters Apr 9, 2021
42110ce
Bump versions
cgwalters Apr 15, 2021
bd843b2
Bump sys version requirement
cgwalters Apr 15, 2021
78ca01c
repo_transaction_stats: move to a manual implementation
lucab Jun 23, 2021
ae189be
Mark src/auto/* as generated
cgwalters Jul 26, 2021
f276c04
ci: Fix buildroot to use new official image
cgwalters Jul 26, 2021
8a5ac02
Update to glib 0.14
cgwalters Jun 24, 2021
04a42df
Bump versions
cgwalters Jul 26, 2021
6303229
Add 2021.3 feature
cgwalters Jul 26, 2021
deedffd
Re-export glib, gio
cgwalters Jul 31, 2021
712570b
cargo: fix version in features chain
lucab Aug 2, 2021
20a025a
lib: fix 'dox' feature
lucab Aug 2, 2021
fdfaea1
cargo: point to docs.rs and clean up
lucab Aug 2, 2021
b2c6dd6
ostree: release 0.12.1
lucab Aug 2, 2021
f3df117
cargo: bump ostree-sys to 0.8.1
lucab Aug 2, 2021
48e0d33
Deny unused results, warn on missing docs (except auto/)
cgwalters Aug 2, 2021
83c829e
Add new GLib 0.14 variant types for metadata types
cgwalters Aug 2, 2021
abec2a9
Add more documentation for --features=v2021_3
cgwalters Aug 3, 2021
709b35b
Fix build with --features=v2021_3, use in CI by default
cgwalters Aug 3, 2021
9b57bda
Use glib-sys via re-exported `glib::ffi` (and similar for gio)
cgwalters Aug 3, 2021
9a5f14c
Release 0.12.2
cgwalters Aug 6, 2021
f9a91bf
lib: Export ffi too
cgwalters Aug 6, 2021
0f7a1d9
Cargo.toml: Bump to glib 0.14.4
cgwalters Aug 23, 2021
b17f3b3
Release 0.12.3
cgwalters Aug 25, 2021
09ef16f
Release 0.13
cgwalters Aug 26, 2021
2bfbfe3
sys: Release 0.9.0
cgwalters Sep 9, 2021
7b47de7
lib: Reexport libc::AT_FDCWD
cgwalters Sep 9, 2021
e33767c
Make `SePolicy` have `Send`
cgwalters Sep 20, 2021
955f0dd
repo: Expose dfd_as_file()
cgwalters Sep 21, 2021
5077871
(cargo-release) version 0.13.1
cgwalters Sep 23, 2021
6995057
(cargo-release) start next development iteration 0.13.2-alpha.0
cgwalters Sep 23, 2021
f8852ca
repo: Add `auto_transaction` and `TransactionGuard`
cgwalters Sep 28, 2021
c3141df
(cargo-release) version 0.13.2
cgwalters Sep 30, 2021
349933a
(cargo-release) version 0.13.3-alpha.1
cgwalters Sep 30, 2021
99ac68c
Update to 2021.5
cgwalters Oct 6, 2021
0432bd4
Bump ostree-sys version
cgwalters Oct 6, 2021
3414747
(cargo-release) version 0.13.3
cgwalters Oct 6, 2021
faaf045
(cargo-release) start next development iteration 0.13.4-alpha.0
cgwalters Oct 6, 2021
440d872
repo: Add `require_rev` method
cgwalters Oct 22, 2021
ec572d7
sysroot: add a builder object
lucab Oct 27, 2021
51a03e1
sysroot: support create and load actions on builder
lucab Oct 28, 2021
16a4ddd
implement list_objects-function an test
mstuehn Nov 16, 2021
f6c1e0c
switch from if-else to match
mstuehn Nov 16, 2021
81ea925
update result type
mstuehn Nov 16, 2021
2ab55be
add ObjectDetails-struct and use it in list_objects-function
mstuehn Nov 16, 2021
1bd6e2f
Update impl Display, omit to_string, change wording
mstuehn Nov 23, 2021
86295e3
sys/cargo: refresh manifest
lucab Nov 23, 2021
810e86d
lib: fix new clippy warnings
lucab Dec 1, 2021
83b03d2
lib: run rustfmt
lucab Dec 1, 2021
f01c847
ci: add jobs for MSRV checks and linting
lucab Dec 1, 2021
d1731d0
repo: Add an API to read and parse directory metadata
cgwalters Dec 15, 2021
4f7eea6
Release 0.13.4
cgwalters Jan 5, 2022
6940896
Add a `cap-std-apis` feature with open/create
cgwalters Feb 2, 2022
19224a4
repo: Add two more cap-std APIs
cgwalters Feb 3, 2022
9250eff
Add `COMMIT_META_CONTAINER_CMD` constant
cgwalters Feb 3, 2022
dde1a7b
Release 0.13.5
cgwalters Feb 4, 2022
ecbe3ba
Fast-track fix for `ostree_gpg_verify_result_get_all()`
cgwalters Feb 9, 2022
46b4a12
Release 0.13.6
cgwalters Feb 10, 2022
1199ae9
Add manual bindings for MutableTree reading
cgwalters Feb 17, 2022
887f5b0
repo: Add `query_file` API
cgwalters Feb 26, 2022
1cb07e0
gir-files: bump to v2022.2
lucab Mar 4, 2022
cf54621
ostree-sys: refresh after gir bump
lucab Mar 4, 2022
61b4629
ostree-sys: release 0.9.2
lucab Mar 4, 2022
3fc55a5
ostree/cargo: bump to ostree-sys 0.9.2
lucab Mar 4, 2022
dd0cfc6
ostree: refresh after gir bump
lucab Mar 4, 2022
04c8e3e
ostree: manually patch generated files
lucab Mar 4, 2022
d1fad37
ostree: release 0.13.7
lucab Mar 4, 2022
1541c5e
lib: Run `cargo fmt`
cgwalters Apr 6, 2022
a5ef4cd
Add a `repo()` accessor to `TransactionGuard`
cgwalters Apr 26, 2022
2520609
build-sys: Adjust for merge of ostree-rs
cgwalters Mar 31, 2022
d72f168
cfg.mk: Don't even look at rust-bindings/
cgwalters May 6, 2022
558d966
tests/inst: Fix install rules for ostree-rs merger
cgwalters May 9, 2022
ee2c31b
tests/inst: Add .gitignore
cgwalters May 9, 2022
e9141e9
ci: Move rust-bindings CI to toplevel
cgwalters May 9, 2022
6040456
rust-bindings: Remove some unused CI/test bits
cgwalters May 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 46 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,68 @@
---
name: Rust

permissions:
actions: read

on:
push:
branches: [main]
branches: [ main ]
pull_request:
branches: [main]

permissions:
contents: read
branches: [ main ]

env:
CARGO_TERM_COLOR: always
ACTIONS_LINTS_TOOLCHAIN: 1.53.0
CARGO_PROJECT_FEATURES: "v2021_3"
# Minimum supported Rust version (MSRV)
ACTION_MSRV_TOOLCHAIN: 1.54.0
# Pinned toolchain for linting
ACTION_LINTS_TOOLCHAIN: 1.56.0

jobs:
build:
runs-on: ubuntu-latest
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
- uses: actions/checkout@v2
- name: Cache Dependencies
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
- name: Build
run: cargo build --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }}
- name: Run tests
run: cargo test --verbose --features=${{ env['CARGO_PROJECT_FEATURES'] }}
build-minimum-toolchain:
name: "Build, minimum supported toolchain (MSRV)"
runs-on: ubuntu-latest
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Remove system Rust toolchain
run: dnf remove -y rust cargo
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env['ACTION_MSRV_TOOLCHAIN'] }}
default: true
- name: Cache Dependencies
uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
- name: cargo build
run: cargo build --features=${{ env['CARGO_PROJECT_FEATURES'] }}
linting:
name: "Lints, pinned toolchain"
runs-on: ubuntu-latest
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Remove system Rust toolchain
run: dnf remove -y rust cargo
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env['ACTIONS_LINTS_TOOLCHAIN'] }}
toolchain: ${{ env['ACTION_LINTS_TOOLCHAIN'] }}
default: true
components: rustfmt, clippy
- name: cargo fmt (check)
run: cargo fmt -- --check -l
run: cargo fmt -p ostree -- --check -l
- name: cargo clippy (warnings)
run: cargo clippy -p ostree --features=${{ env['CARGO_PROJECT_FEATURES'] }} -- -D warnings
98 changes: 93 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,94 @@
# Today, this repository only uses Rust for tests. This
# toplevel Cargo.toml helps tools like rust-analyzer understand
# that this project contains Rust code. We don't otherwise currently
# use `cargo` for any part of the core build.
[package]
authors = ["Felix Krull"]
description = "Rust bindings for libostree"
documentation = "https://docs.rs/ostree"
edition = "2018"
keywords = ["ostree", "libostree"]
license = "MIT"
name = "ostree"
readme = "README.md"
repository = "https://github.com/ostreedev/ostree-rs"
version = "0.13.6"

exclude = [
"rust-bindings/conf/**",
"rust-bindings/gir-files/**",
"rust-bindings/sys/**",
".gitlab-ci.yml",
"LICENSE.LGPL*",
]

[package.metadata.docs.rs]
features = ["dox"]

[lib]
name = "ostree"
path = "rust-bindings/src/lib.rs"

[workspace]
members = ["tests/inst"]
members = [".", "rust-bindings/sys"]

[dependencies]
bitflags = "1.2.1"
cap-std = { version = "0.24", optional = true}
io-lifetimes = { version = "0.5", optional = true}
ffi = { package = "ostree-sys", path = "rust-bindings/sys", version = "0.9.1" }
gio = "0.14"
glib = "0.14.4"
hex = "0.4.2"
libc = "0.2"
once_cell = "1.4.0"
radix64 = "0.6.2"
thiserror = "1.0.20"

[dev-dependencies]
maplit = "1.0.2"
openat = "0.1.19"
tempfile = "3"
cap-tempfile = "0.24"

[features]
cap-std-apis = ["cap-std", "io-lifetimes", "v2017_10"]
dox = ["ffi/dox"]
v2014_9 = ["ffi/v2014_9"]
v2015_7 = ["v2014_9", "ffi/v2015_7"]
v2016_3 = ["v2015_7", "ffi/v2016_3"]
v2016_4 = ["v2016_3", "ffi/v2016_4"]
v2016_5 = ["v2016_4", "ffi/v2016_5"]
v2016_6 = ["v2016_5", "ffi/v2016_6"]
v2016_7 = ["v2016_6", "ffi/v2016_7"]
v2016_8 = ["v2016_7", "ffi/v2016_8"]
v2016_14 = ["v2016_8", "ffi/v2016_14"]
v2017_1 = ["v2016_14", "ffi/v2017_1"]
v2017_2 = ["v2017_1", "ffi/v2017_2"]
v2017_3 = ["v2017_2", "ffi/v2017_3"]
v2017_4 = ["v2017_3", "ffi/v2017_4"]
v2017_6 = ["v2017_4", "ffi/v2017_6"]
v2017_7 = ["v2017_6", "ffi/v2017_7"]
v2017_8 = ["v2017_7", "ffi/v2017_8"]
v2017_9 = ["v2017_8", "ffi/v2017_9"]
v2017_10 = ["v2017_9", "ffi/v2017_10"]
v2017_11 = ["v2017_10", "ffi/v2017_11"]
v2017_12 = ["v2017_11", "ffi/v2017_12"]
v2017_13 = ["v2017_12", "ffi/v2017_13"]
v2017_15 = ["v2017_13", "ffi/v2017_15"]
v2018_2 = ["v2017_15", "ffi/v2018_2"]
v2018_3 = ["v2018_2", "ffi/v2018_3"]
v2018_5 = ["v2018_3", "ffi/v2018_5"]
v2018_6 = ["v2018_5", "ffi/v2018_6"]
v2018_7 = ["v2018_6", "ffi/v2018_7"]
v2018_9 = ["v2018_7", "ffi/v2018_9"]
v2019_2 = ["v2018_9", "ffi/v2019_2"]
v2019_3 = ["v2019_2", "ffi/v2019_3"]
v2019_4 = ["v2019_3", "ffi/v2019_4"]
v2019_6 = ["v2019_4", "ffi/v2019_6"]
v2020_1 = ["v2019_6", "ffi/v2020_1"]
v2020_2 = ["v2020_1", "ffi/v2020_2"]
v2020_4 = ["v2020_2", "ffi/v2020_4"]
v2020_7 = ["v2020_4", "ffi/v2020_7"]
v2020_8 = ["v2020_7", "ffi/v2020_8"]
v2021_1 = ["v2020_8", "ffi/v2021_1"]
v2021_2 = ["v2021_1", "ffi/v2021_2"]
v2021_3 = ["v2021_2", "ffi/v2021_3"]
v2021_4 = ["v2021_3", "ffi/v2021_4"]
v2021_5 = ["v2021_4", "ffi/v2021_5"]
2 changes: 1 addition & 1 deletion cfg.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export VC_LIST_EXCEPT_DEFAULT=^(docs/.*|git.mk|lib/.*|m4/.*|md5/.*|build-aux/.*|src/gettext\.h|.*ChangeLog|buildutil/.*)$$
export VC_LIST_EXCEPT_DEFAULT=^(rust-bindings/.*|docs/.*|git.mk|lib/.*|m4/.*|md5/.*|build-aux/.*|src/gettext\.h|.*ChangeLog|buildutil/.*)$$

local-checks-to-skip = \
sc_const_long_option \
Expand Down
28 changes: 28 additions & 0 deletions rust-bindings/.ci/generate-test-jobs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
set -eu

get_features() {
cargo read-manifest \
| jq -jr '.features
| keys
| map(select(. != "dox"))
| map(. + " ")
| .[]'
}

cat <<EOF
include: /.ci/gitlab-ci-base.yml
EOF

features=$(get_features)

for feature in $features; do

cat <<EOF
test_feature_${feature}:
extends: .fedora-ostree-devel
script:
- cargo test --verbose --workspace --features ${feature}
EOF

done
31 changes: 31 additions & 0 deletions rust-bindings/.ci/gitlab-ci-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.sccache:
variables:
SCCACHE_URL: https://github.com/mozilla/sccache/releases/download/0.2.13/sccache-0.2.13-x86_64-unknown-linux-musl.tar.gz
CARGO_TARGET_DIR: ${CI_PROJECT_DIR}/target
CARGO_HOME: ${CI_PROJECT_DIR}/cargo
SCCACHE_DIR: ${CI_PROJECT_DIR}/sccache
RUSTC_WRAPPER: sccache
cache:
paths:
- cargo/
- sccache/

# config with sccache based on Fedora Rawhide, i.e. very recent libostree
.fedora-ostree-devel:
image: registry.fedoraproject.org/fedora:rawhide
extends: .sccache
before_script:
- dnf install -y cargo rust ostree-devel
- curl -L "${SCCACHE_URL}" | tar -C /usr/bin/ -xz --wildcards --strip-components=1 '*/sccache'
# ??? This seems to not work correctly on Fedora Rawhide right now?
- ln -s /usr/bin/x86_64-redhat-linux-gnu-pkg-config /usr/bin/x86_64-redhat-linux-pkg-config

# config with sccache based on Rust image, i.e. older libostree but shorter setup and rustup access
.rust-ostree-devel:
image: rust
extends: .sccache
before_script:
- apt-get update
- apt-get install -y libostree-dev
- curl -L "${SCCACHE_URL}" | tar -C /usr/bin/ -xz --wildcards --strip-components=1 '*/sccache'

7 changes: 7 additions & 0 deletions rust-bindings/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.idea
target
cargo
sccache
**/*.rs.bk
Cargo.lock
.vagrant
21 changes: 21 additions & 0 deletions rust-bindings/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018, 2019, 2020 Felix Krull

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading