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

Sysroot support #10

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sjoerdsimons
Copy link
Contributor

This implements just enough functionality to use pure Go code to create a new sysroot (for an image).

Fwiw i've mostly done things as a simple wrapper around the C ostree (or should i say libostree) functionality rather then mimicing the ostree builtin shell bits & pieces as that feels more natural and flexible but might not entirely be inline with the intention of this project.

Update glibobject to follow the more current strategy by gogtk3 to have
a go GObject embed a C.GObject rather then an unsafe pointer.

Signed-off-by: Sjoerd Simons <[email protected]>
This adds a wrapper for GKeyfile objects without any extra
functionality, this is useful for passing GKeyfiles as returned by some
ostree calls back to Go and pass them onto ostree calls taking them as
an argument

Signed-off-by: Sjoerd Simons <[email protected]>
Add small wappers around those to ostree functions.

OstreeAsyncProgress got a minimal wrapper so it can be used in the
function signatures (but really can only be used as a nil value)

ResolveRev is fully functional and a direct mirror of the C function,
for PullWithOptions rather then passing an options GVariant a
PullOptions go struct is defined which the wrapper converts to a
GVariant to both work around the fact that GVariant isn't usable from Go
and to make the API slightly nicer. For now only only the
override-remote-name and refs options are support as those were the ones
i happened to need in my usage.

Signed-off-by: Sjoerd Simons <[email protected]>
This simply creates a Go structure for it to allow from wrapping
GObjects (created by ostree functions) into Go and back again. No usable
functionality to inspect the objects from Go

Signed-off-by: Sjoerd Simons <[email protected]>
Add a wrapper for OstreeSysroot and a bunch of its functions, this
combined with the previous commits is enough to setup an ostree sysroot
from an existing ostree repository from fresh using Go code.

Signed-off-by: Sjoerd Simons <[email protected]>
@cgwalters
Copy link
Member

cgwalters commented Feb 14, 2019

@sjoerdsimons I know it's been a long time; sorry I completely missed seeing this originally (partly due to my email filters)

I haven't even looked at the patches yet - knowing you I'm sure they're good. But can you explain the higher level of what you're planning to do with them?

Presumably this is implementing something like eos-updater/rpm-ostree in Go? Is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants