-
Notifications
You must be signed in to change notification settings - Fork 192
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
[merged] Package layering #289
Conversation
This builds upon the earlier prototype in https://github.com/cgwalters/atomic-pkglayer The `.origin` file says for a replicated installation: [origin] refspec=local:rhel-atomic-host/7/x86_64/standard If you then run `rpm-ostree pkg-add strace`, it will result in a new tree with: [origin] baserefspec=local:rhel-atomic-host/7/x86_64/standard [packages] requested=strace; Work still remaining here is to teach `rpm-ostree status` and `rpm-ostree upgrade` about this.
This patch fixes up errors in the parent commit which added pkg-add. Some of them are due to the rebase on top of the unprivileged infrastructure. - fix compile errors (due to libhif changes after rebase) - delete duplicate prototype for rpmostree_sysroot_upgrader_deploy - include allow-older in flags type - fix change_upgrader_refspec to use g_strdup() (this was causing the wrong old refspec to be registered) - in builtin-status.c, check for NULL before joining the packages array - sysroot-upgrader: fix gtype function names - roc_context_prepare_for_root(): delete unused param - assemble_commit(): delete unused param - RpmOstreeSysrootUpgraderFlags: fix docs - Fix sysroot property name and add reboot opt
- Delete unpack_to_dfd path - Get rid of copynpaste stuff and use the newly reworked ostree libarchive API which now supports the callbacks we need
This patch prepares RpmOstreeContext for supporting package layering. A relabel operation is added as well to support relabeling imported packages if the sepolicy of the rootfs we're overlaying onto is different from during import.
- Move the package layering logic away from pkg-add and into the upgrader - Add pkg-delete - Add dry-run option
To make it easier for others to play & test it, I composed an F23 tree. To use:
Adding e.g.
|
Will work on fixing those tests, and add some new tests. |
⬆️ Updated to pass tests. |
When setting a new refspec to rebase to, we need to also update the origin file. Otherwise the wrong refspec will be written to disk.
When checking if a new upgrade is available, we should be comparing the SHA of the base layer if packages are overlayed. Otherwise we'll always think there are updates.
@rh-atomic-bot try |
This builds upon the earlier prototype in https://github.com/cgwalters/atomic-pkglayer The `.origin` file says for a replicated installation: [origin] refspec=local:rhel-atomic-host/7/x86_64/standard If you then run `rpm-ostree pkg-add strace`, it will result in a new tree with: [origin] baserefspec=local:rhel-atomic-host/7/x86_64/standard [packages] requested=strace; Work still remaining here is to teach `rpm-ostree status` and `rpm-ostree upgrade` about this. Closes: #289 Approved by: <try>
This patch fixes up errors in the parent commit which added pkg-add. Some of them are due to the rebase on top of the unprivileged infrastructure. - fix compile errors (due to libhif changes after rebase) - delete duplicate prototype for rpmostree_sysroot_upgrader_deploy - include allow-older in flags type - fix change_upgrader_refspec to use g_strdup() (this was causing the wrong old refspec to be registered) - in builtin-status.c, check for NULL before joining the packages array - sysroot-upgrader: fix gtype function names - roc_context_prepare_for_root(): delete unused param - assemble_commit(): delete unused param - RpmOstreeSysrootUpgraderFlags: fix docs - Fix sysroot property name and add reboot opt Closes: #289 Approved by: <try>
- Delete unpack_to_dfd path - Get rid of copynpaste stuff and use the newly reworked ostree libarchive API which now supports the callbacks we need Closes: #289 Approved by: <try>
Closes: #289 Approved by: <try>
This patch prepares RpmOstreeContext for supporting package layering. A relabel operation is added as well to support relabeling imported packages if the sepolicy of the rootfs we're overlaying onto is different from during import. Closes: #289 Approved by: <try>
- Move the package layering logic away from pkg-add and into the upgrader - Add pkg-delete - Add dry-run option Closes: #289 Approved by: <try>
Closes: #289 Approved by: <try>
Closes: #289 Approved by: <try>
@rh-atomic-bot retry |
This builds upon the earlier prototype in https://github.com/cgwalters/atomic-pkglayer The `.origin` file says for a replicated installation: [origin] refspec=local:rhel-atomic-host/7/x86_64/standard If you then run `rpm-ostree pkg-add strace`, it will result in a new tree with: [origin] baserefspec=local:rhel-atomic-host/7/x86_64/standard [packages] requested=strace; Work still remaining here is to teach `rpm-ostree status` and `rpm-ostree upgrade` about this. Closes: #289 Approved by: <try>
This patch fixes up errors in the parent commit which added pkg-add. Some of them are due to the rebase on top of the unprivileged infrastructure. - fix compile errors (due to libhif changes after rebase) - delete duplicate prototype for rpmostree_sysroot_upgrader_deploy - include allow-older in flags type - fix change_upgrader_refspec to use g_strdup() (this was causing the wrong old refspec to be registered) - in builtin-status.c, check for NULL before joining the packages array - sysroot-upgrader: fix gtype function names - roc_context_prepare_for_root(): delete unused param - assemble_commit(): delete unused param - RpmOstreeSysrootUpgraderFlags: fix docs - Fix sysroot property name and add reboot opt Closes: #289 Approved by: <try>
This builds upon the earlier prototype in https://github.com/cgwalters/atomic-pkglayer The `.origin` file says for a replicated installation: [origin] refspec=local:rhel-atomic-host/7/x86_64/standard If you then run `rpm-ostree pkg-add strace`, it will result in a new tree with: [origin] baserefspec=local:rhel-atomic-host/7/x86_64/standard [packages] requested=strace; Work still remaining here is to teach `rpm-ostree status` and `rpm-ostree upgrade` about this. Closes: #289 Approved by: <try>
This patch fixes up errors in the parent commit which added pkg-add. Some of them are due to the rebase on top of the unprivileged infrastructure. - fix compile errors (due to libhif changes after rebase) - delete duplicate prototype for rpmostree_sysroot_upgrader_deploy - include allow-older in flags type - fix change_upgrader_refspec to use g_strdup() (this was causing the wrong old refspec to be registered) - in builtin-status.c, check for NULL before joining the packages array - sysroot-upgrader: fix gtype function names - roc_context_prepare_for_root(): delete unused param - assemble_commit(): delete unused param - RpmOstreeSysrootUpgraderFlags: fix docs - Fix sysroot property name and add reboot opt Closes: #289 Approved by: <try>
- Delete unpack_to_dfd path - Get rid of copynpaste stuff and use the newly reworked ostree libarchive API which now supports the callbacks we need Closes: #289 Approved by: <try>
Closes: #289 Approved by: <try>
This patch prepares RpmOstreeContext for supporting package layering. A relabel operation is added as well to support relabeling imported packages if the sepolicy of the rootfs we're overlaying onto is different from during import. Closes: #289 Approved by: <try>
- Move the package layering logic away from pkg-add and into the upgrader - Add pkg-delete - Add dry-run option Closes: #289 Approved by: <try>
Closes: #289 Approved by: <try>
Closes: #289 Approved by: <try>
☀️ Test successful - status-atomicjenkins |
@rh-atomic-bot do or do not, there is no try- |
Oh yes, that worked. 😎 |
Hah! |
You guys are having too much fun :) |
Okay, so I finally had some time to play with this and read the code a bit. I pushed one fixup to disable fsync...which makes the whole thing rather dramatically faster 🚤 Kind of avoids the need for:
But we can consider removing that later or something. I think my vote here is to merge and we can do fixups in master. |
This patch fixes up errors in the parent commit which added pkg-add. Some of them are due to the rebase on top of the unprivileged infrastructure. - fix compile errors (due to libhif changes after rebase) - delete duplicate prototype for rpmostree_sysroot_upgrader_deploy - include allow-older in flags type - fix change_upgrader_refspec to use g_strdup() (this was causing the wrong old refspec to be registered) - in builtin-status.c, check for NULL before joining the packages array - sysroot-upgrader: fix gtype function names - roc_context_prepare_for_root(): delete unused param - assemble_commit(): delete unused param - RpmOstreeSysrootUpgraderFlags: fix docs - Fix sysroot property name and add reboot opt Closes: #289 Approved by: cgwalters
- Delete unpack_to_dfd path - Get rid of copynpaste stuff and use the newly reworked ostree libarchive API which now supports the callbacks we need Closes: #289 Approved by: cgwalters
Closes: #289 Approved by: cgwalters
This patch prepares RpmOstreeContext for supporting package layering. A relabel operation is added as well to support relabeling imported packages if the sepolicy of the rootfs we're overlaying onto is different from during import. Closes: #289 Approved by: cgwalters
- Move the package layering logic away from pkg-add and into the upgrader - Add pkg-delete - Add dry-run option Closes: #289 Approved by: cgwalters
Closes: #289 Approved by: cgwalters
Closes: #289 Approved by: cgwalters
☀️ Test successful - status-atomicjenkins |
Wow, what a nice speedup. Awesome! |
This is a continuation of #107.
I'd first like to start with apologizing in advance for how massive this PR ended up being. I did my best to condense it into only 6 commits:
unpack_to_dfd
path and use only ostree's newly reworked support for libarchive ([merged] Rework libarchive import support ostreedev/ostree#275)rpmostree-core.c
(mostlyRpmOstreeContext
) for what will be required for package layering. The commit is larger than it should because I also reorganized the whole file to help me navigate better.The commits are not properly separate from each other, so rpm-ostree will most likely NOT compile in between them. If you'd like to review smaller, easier to follow patches, you can look over the package-layering-wip branch instead, which is the exact same final diff, but more representative of the path I followed. As a result there's a lot of added noise.