Bootc switch issues
- Vorherrschende Sprache
- Rust
- Sterne
- 2.3k
- Forks
- 230
- Ø Merge
- 3 T. 12 Std.
- Gemergte PRs (30 T.)
- 38
Beschreibung
At the bottom is a wrapper script I use to do podman build and bootc switch. Bug 1 is known I think, we have to do chcon to solve an selinux issue. Bug 2 is if you try and bootc switch to a container with the same name as the current one, it does nothing (even though one may have made an edit to the container image since, etc.). I workaround this by getting the sha from `podman images -q`, but it should be able to recognise it's not the same image as currently booted.
```
#!/bin/bash
main() {
set -exu -o pipefail
if [ "$EUID" -ne 0 ]; then
echo "Please run as root"
return 1
fi
podman build -t bootc -f Containerfile-bootc
# Bug 1, selinux issue, need to chcon
bootc usr-overlay || true
chcon --reference /usr/bin/rpm-ostree /usr/bin/bootc
# Bug 2, if you try a bootc switch to a new image with the same name
# nothing happens, use the sha from "podman images -q" to workaround it
local id="$(podman images -q localhost/bootc)"
bootc switch --transport containers-storage "$id"
}
main "$@"
```
Beitragsleitfaden
Rechercherichtung
Start with the wrapper script in the issue and reproduce both cases using `podman build`, `bootc usr-overlay`, and `bootc switch --transport containers-storage`. Investigate the SELinux failure and the same-name image switch behavior, using the SHA workaround as a comparison. Done means both reported cases work without the described manual workarounds.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- bash
- Bereich
- operating-systems, security
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100