bootc-dev / bootc-dev/bootc

Bootc switch issues

Aperta
#1,024 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area/client bug needinfo
Lingua principale
Rust
Stelle
2.3k
Fork
230
Merge medio
3g 12h
PR unite (30g)
38

Descrizione

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 "$@"
```

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
bash
Ambito
operating-systems, security
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
38/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.