-
Notifications
You must be signed in to change notification settings - Fork 24
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
sjoerdsimons
wants to merge
9
commits into
ostreedev:main
Choose a base branch
from
sjoerdsimons:sysroot-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Sysroot support #10
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Sjoerd Simons <[email protected]>
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]>
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]>
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]>
@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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.