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: Add ostree_sysroot_write_deployments_with_options() #745

Closed
wants to merge 2 commits into from

Conversation

cgwalters
Copy link
Member

Depends: #744

More sophisticated users of libostree like rpm-ostree need control over things
like the system repository. Previously we introduced a "no cleanup" flag to
ostree_sysroot_simple_write_deployment(), but that's a high level API that
does filtering on its own.

Since rpm-ostree needs more control, let's expose the bare essentials of the
"sysroot commit" operation with an extensible options structure, where one of
the options is whether or not to do post-transaction repository operations.

@rh-atomic-bot
Copy link

☔ The latest upstream changes (presumably 5d413df) made this pull request unmergeable. Please resolve the merge conflicts.

@cgwalters cgwalters force-pushed the write-deployments-opts branch from fb2f00b to b000868 Compare March 20, 2017 20:58
@rh-atomic-bot
Copy link

☔ The latest upstream changes (presumably e665e51) made this pull request unmergeable. Please resolve the merge conflicts.

@cgwalters cgwalters force-pushed the write-deployments-opts branch from b000868 to cc990d6 Compare March 22, 2017 14:31
@cgwalters
Copy link
Member Author

🛫 Rebased 🛬

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 22, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
@rh-atomic-bot
Copy link

☔ The latest upstream changes (presumably 7b2370d) made this pull request unmergeable. Please resolve the merge conflicts.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 22, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
More sophisticated users of libostree like rpm-ostree need control over things
like the system repository. Previously we introduced a "no cleanup" flag to
`ostree_sysroot_simple_write_deployment()`, but that's a high level API that
does filtering on its own.

Since rpm-ostree needs more control, let's expose the bare essentials of the
"sysroot commit" operation with an extensible options structure, where one of
the options is whether or not to do post-transaction repository operations.
@cgwalters cgwalters force-pushed the write-deployments-opts branch from cc990d6 to 92be53b Compare March 23, 2017 13:02
@cgwalters
Copy link
Member Author

🛫 Rebased 🛬

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few minor typo nits.

Hmm, this is cool. It almost allows us to drop the baseref generation in rpm-ostree. But we would still have to guard against e.g. ostree admin cleanup and ostree prune operations (#262).

@@ -1686,25 +1686,41 @@ is_ro_mount (const char *path)
* @cancellable: Cancellable
* @error: Error
*
* Assuming @new_deployments have already been deployed in place on
* disk, atomically update bootloader configuration.
* Older verison of ostree_sysroot_write_deployments() - will perform
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/verison/version/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ostree_sysroot_write_deployments/ostree_sysroot_write_deployments_with_options/ ?

*
* Assuming @new_deployments have already been deployed in place on disk via
* ostree_sysroot_deploy_tree(), atomically update bootloader configuration. By
* default, no-post-transaction cleanup will be performed. You should invoke
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/no-/no /

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment here that I've addressed your comments on the code comments ⬇️

@jlebon
Copy link
Member

jlebon commented Mar 23, 2017

@rh-atomic-bot r+ ae59f35

@rh-atomic-bot
Copy link

⌛ Testing commit ae59f35 with merge 61bf2bd...

rh-atomic-bot pushed a commit that referenced this pull request Mar 23, 2017
More sophisticated users of libostree like rpm-ostree need control over things
like the system repository. Previously we introduced a "no cleanup" flag to
`ostree_sysroot_simple_write_deployment()`, but that's a high level API that
does filtering on its own.

Since rpm-ostree needs more control, let's expose the bare essentials of the
"sysroot commit" operation with an extensible options structure, where one of
the options is whether or not to do post-transaction repository operations.

Closes: #745
Approved by: jlebon
@rh-atomic-bot
Copy link

💔 Test failed - status-atomicjenkins

@cgwalters
Copy link
Member Author

@rh-atomic-bot retry

@rh-atomic-bot
Copy link

⌛ Testing commit ae59f35 with merge a5d5333...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing a5d5333 to master...

cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 23, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 24, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 27, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 27, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Mar 31, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 13, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 13, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 20, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 21, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
cgwalters added a commit to cgwalters/rpm-ostree that referenced this pull request Apr 25, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this pull request Apr 26, 2017
This is prep for livefs.  We need to tweak the logic from what
core libostree has in `ostree_sysroot_simple_write_deployment()`,
and while we could land improved logic there, I think it makes
sense to carry this here until we're confident enough in the logic
to make it ABI.

This does depend on a [new libostree API](ostreedev/ostree#745)
that allows writing deployments without doing cleanup.

The `bump_mtime()` bit is also prep for livefs, carrying in this patch to avoid
splitting things too much.

Closes: #709
Approved by: jlebon
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.

3 participants