Add update hooks
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 230
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 38
Description
One thing that rpm-ostree has is that by default it displays the rpm database diff between two OS images.
I think we could add something like:
```
/usr/lib/bootc/diff-hooks.d
```
That we'd run each time a deployment changes. Then software like `dnf` could drop in a `/usr/lib/bootc/hooks.d/dnf` that would basically do what `rpm-ostree db diff` does; it would get passed two filesystem roots (as file descriptors or maybe easier by running as a container with `/from` and `/to` mount points for the two roots).
This would get us into a space where typing `bootc upgrade` would at least have that CLI sugar for admins.
But I'd probably say that we shouldn't try to scope creep this package/container integration too much beyond that; if one wants to do things with packages one would invoke `apt/dnf` directly, which should learn how to interact with bootc.
See e.g. https://github.com/coreos/rpm-ostree/issues/4924 which is about codifying an API in rpm-ostree for these diffs. I don't think we should do anything like that here; the API for such a thing should live in a tool like `apt/dnf` which are about packages.
IOW there'd be e.g. `dnf bootc diff` perhaps. (But also, `dnf podman diff `!).
Basically a core tradeoff in rpm-ostree is that we didn't invest enough in the package-independent `ostree` tool, and I want bootc to feel first class for non-packaged content too, and deferring package things to package tools.
Contributor guide
Assessment
This issue has not been assessed yet.