install: .bootc-aleph.json is not written with --composefs-backend

Ouverte
#2,541 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
65/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
rust

Piste de recherche

Start in crates/lib/src/install.rs at the cited install_container and install_with_sysroot locations, then trace the composefs install path and compare it with the ostree path. Check how InstallAleph is created and written, and whether existing install tests cover composefs. Done means a composefs install writes .bootc-aleph.json to the physical root with the expected installation details.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

With --composefs-backend, bootc install doesn't write .bootc-aleph.json to the physical root. The docs describe it as written after installation and readable at /sysroot/.bootc-aleph.json (bootc-installation(7)). On a booted composefs install:

$ ls -a /sysroot
.  ..  boot  composefs  lost+found  ostree  state
$ cat /sysroot/.bootc-aleph.json
cat: /sysroot/.bootc-aleph.json: No such file or directory

The same install without --composefs-backend has the file, with the digest, image, kernel and labels filled in:

$ ls -a /sysroot
.  ..  .bootc-aleph.json  boot  lost+found  ostree

Reproduced on quay.io/fedora/fedora-bootc:44@sha256:5ab8ee5189bb0f3870279723f5343474df002d8d6f46564702b3ad3ba7382d98 (bootc 1.16.13). In the commands, $IMG is an image built FROM that one, adding only config files for other options.

truncate -s 20G a.raw b.raw
podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t \
  -v /dev:/dev -v /var/lib/containers:/var/lib/containers -v $PWD:/out $IMG \
  bootc install to-disk --via-loopback --filesystem ext4 --generic-image --wipe \
  --composefs-backend /out/a.raw
# the same again without --composefs-backend, writing b.raw

InstallAleph is created only in install_container (install.rs L1330) and written only in install_with_sysroot (L1986), and both are on the ostree path.

I'd expect a composefs install to write the same file.

Related: #2535

Langage dominant
Rust
Étoiles
2.3k
Forks
230
Merge moyen
3 j 19 h
PR mergées (30 j)
37

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de bootc-dev/bootc

Toutes les issues de bootc-dev/bootc

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.