1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00
Commit Graph

3641 Commits

Author SHA1 Message Date
Colin Walters
cb223a0a69 Make tar import API async
We're currently using the synchronous tar library, so we need to
do bridging.  This pushes the bridging down a layer, changing
our tar import API to be async.

Then things will be even clear if we switch to e.g.
https://crates.io/crates/tokio-tar

But we need https://github.com/vorot93/tokio-tar/pull/3
2021-04-27 09:29:59 -04:00
Luca Bruno
17a991050c Merge pull request #19 from cgwalters/variant-utils
Variant utils
2021-04-27 08:47:24 +00:00
Colin Walters
6f444544a7 Make variant_utils a public module
Getting things into gtk-rs would take a while before we can
depend on it, and perhaps we want to move in the direction of
the `gvariant` crate anyways.

For now let's just make this a public stable API so it can
be shared between here and rpm-ostree and e.g. ostree's test suite.
2021-04-26 17:38:49 -04:00
Colin Walters
1d46751431 Merge pull request #16 from cgwalters/backend-skopeo-sync
container: Use skopeo to fetch images
2021-04-26 17:38:28 -04:00
Colin Walters
9d953ec62e container: Use skopeo to fetch images
Closes: https://github.com/ostreedev/ostree-rs-ext/issues/6

We want to honor things like mirroring set up in `/etc/containers` and ideally
things like signature verification too.  Plus we need to support the Docker
registry API, not pure OCI.

So depending on `oci-distribution` isn't a viable plan from that perspective.

We're not a Go project, so depending on github.com/containers/image directly
is out, plus even if we were vendoring all that is just a bad idea.  So
let's use skopeo as a subprocess.

I originally wrote this to use skopeo via a pipe like:
`skopeo copy docker://quay.io/exampleos/exampleos oci-archive:///proc/self/fd/5`
where fd `5` is a pipe, but the first blocker is that containers/image barfs
if the destination is a pipe.

But even more importantly, the `oci-archive://` backend just
spools everything to a temporary directory and then tars it
back up, entirely obviating the point of streaming.

So here we do the tempdir dance ourself for now.
2021-04-26 11:42:09 -04:00
Colin Walters
97da9b7a3f Merge pull request #17 from cgwalters/action-readonly
actions: Set read-only flag
2021-04-24 08:42:41 -04:00
Colin Walters
53575743f4 actions: Set read-only flag
See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
2021-04-24 08:36:12 -04:00
Colin Walters
b84955aa17 Merge pull request #14 from ostreedev/more-release-prep-2
lib: More Cargo.toml fixes
2021-04-15 18:06:03 -04:00
Colin Walters
16a5f2f365 lib: More Cargo.toml fixes 2021-04-15 17:59:43 -04:00
Colin Walters
5583a60cc0 Merge pull request #13 from ostreedev/more-release-prep
Two more small commits for release
2021-04-15 17:57:21 -04:00
Colin Walters
3b721fe6e6 lib: Remove unused crossbeam dep 2021-04-15 17:52:00 -04:00
Colin Walters
229faf06cf Copy README.md 2021-04-15 17:50:55 -04:00
Colin Walters
303da74f18 Merge pull request #8 from ostreedev/use-import-apis
tar/import: use new writing APIs
2021-04-15 17:49:33 -04:00
Colin Walters
c8b792d6c9 ci: Hack in updated ostree 2021-04-15 16:58:15 -04:00
Colin Walters
553408d141 Update to ostree v2021.2/0.11, use new writing APIs
This is a lot more efficient; before we were creating a thread
per object, etc.
2021-04-15 16:44:01 -04:00
Colin Walters
37d06c78d8 Merge pull request #10 from ostreedev/remove-unused
Minor cleanup patches
2021-04-15 15:19:22 -04:00
Colin Walters
e968875bb9 README: Clarify various bits 2021-04-15 15:14:37 -04:00
Colin Walters
ad9d7bbc97 lib/container: Remove unused file 2021-04-14 20:16:30 -04:00
Colin Walters
997a029206 lib/import: Remove unused file 2021-04-14 20:10:04 -04:00
Colin Walters
1a65cfe7a9 Merge pull request #9 from ostreedev/drop-repo-param
tar/export: Drop duplicate repo param
2021-04-14 20:06:53 -04:00
Colin Walters
6834c472dd tar/export: Drop duplicate repo param
It's already a member of the exporter struct.
2021-04-13 09:26:11 -04:00
Colin Walters
0751509192 Merge pull request #7 from cgwalters/fix-actions
ci: Use fcos buildroot
2021-04-07 13:44:20 -04:00
Colin Walters
40186a8a06 ci: Use fcos buildroot
So we have the latest libostree.
2021-04-07 13:01:41 +00:00
Colin Walters
147b0d5200 import: Require that we read exact length
I was just reading this code and I think this is cleaner.
2021-04-06 20:28:24 +00:00
Colin Walters
1d69adde38 Make container an optional feature
The dependencies are nontrivial.  Prep for adding more features,
which should also be optional.
2021-04-06 19:31:12 +00:00
Colin Walters
1bd614398b cli: Expose container verb
So one can do things from the CLI.
2021-04-06 19:00:52 +00:00
Colin Walters
187c11ba0d container/client: More explicitly join futures
So it's easy to debug errors.
2021-04-06 19:00:31 +00:00
Colin Walters
b924092786 import: Don't crash if we already have the object
In this case ostree will just drop the reader, which
will break the pipe.

TODO: push rather than pull based file write API
2021-04-06 18:59:48 +00:00
Colin Walters
8bb07acf4d Merge pull request #5 from cgwalters/openat-ext-02
lib: Update to openat-ext 0.2.0
2021-04-06 12:39:06 -04:00
Colin Walters
ee627dd641 ci: Fix branch name 2021-04-06 15:51:06 +00:00
Colin Walters
c0ce36c812 lib: Update to openat-ext 0.2.0 2021-04-06 15:35:02 +00:00
Colin Walters
0aa2d46fec Merge pull request #4 from cgwalters/gh-actions
ci: Add GH action for Rust
2021-04-06 11:10:46 -04:00
Colin Walters
b166bc2751 ci: Add GH action for Rust
Cargo culted from cgwalters/openat-ext
2021-04-06 15:09:30 +00:00
Colin Walters
e011ce2920 Re-merge https://github.com/cgwalters/ostree-container
I just split them out, but I think there's a decent argument
for keeping them together.  We'd likely just want the container
bits under a feature flag.

TODO:

 - feature flag
 - CLI `ostree-ext-cli container import|export`
2021-04-06 14:55:59 +00:00
Colin Walters
562e710933 README.md: Add diff module 2021-04-05 14:52:34 +00:00
Colin Walters
4f7f43c97b Add diff module
Taken from https://github.com/coreos/rpm-ostree/blob/master/rust/src/ostree_diff.rs
2021-04-04 18:00:29 +00:00
Colin Walters
ab9126dc86 wip 2021-04-04 13:38:37 +00:00
Colin Walters
ad2f5c69a8 Update to merged ostree-rs git 2021-04-04 13:38:15 +00:00
Colin Walters
26cf018d05 Add README.md and other misc docs 2021-04-03 21:10:16 +00:00
Colin Walters
d0289847a0 Fix tests, clean up imports 2021-04-03 21:03:28 +00:00
Colin Walters
66f6298d52 Initial code split from https://github.com/cgwalters/ostree-container
The core tar import/export is independent of OCI bits.
2021-04-03 20:48:33 +00:00