coreos / rpm-ostree

⚛📦 Hybrid image/package system with atomic upgrades and package layering
https://coreos.github.io/rpm-ostree
Other
839 stars 192 forks source link

"error: No installed package matches 'firefox'", when rebasing on a system without firefox #4812

Open czhang03 opened 5 months ago

czhang03 commented 5 months ago

Describe the bug

I started with a base that contains firefox, specifically silverblue-nvidia image from ublue. Then I removed firefox, and rebased onto a base without firefox, specifically silverblue-nvidia-userns-hardened from secureblue.

Then everytime I try to run ostree command it fails with the following error:

> rpm-ostree kargs --append-if-missing="init_on_alloc=1"
Checking out tree 4b1eed3... done
error: No installed package matches 'firefox'

rpm-ostree status looks fine:

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
Deployments:
● ostree-image-signed:docker://ghcr.io/secureblue/silverblue-nvidia-userns-hardened:latest
                   Digest: sha256:75b3f4ebd96c5369c21acd5aaeec1d0b684f9084aea3f13d1793187b38b4b66f
                  Version: 39.20240130.0 (2024-01-31T03:40:14Z)
          LayeredPackages: codium langpacks-en libreoffice

  ostree-image-signed:docker://ghcr.io/secureblue/silverblue-nvidia-userns-hardened:latest
                   Digest: sha256:4d9813d2250dc109d1e09e92eb6a53d8149a545811f75daa71664d502850c7aa
                  Version: 39.20240130.0 (2024-01-30T18:11:35Z)
          LayeredPackages: codium langpacks-en libreoffice

Reproduction steps

Here is my guess, I will test this later:

  1. start with silverblue-nvidia image from ublue (personally I installed via iso)
  2. remove firefox and firefox langpack
  3. rebase onto silverblue-nvidia-userns-hardened from secureblue (personally, I rebased directly onto the signed image: rpm-ostree rebase ostree-image-signed:docker://ghcr.io/secureblue/silverblue-nvidia-userns-hardened:latest)

Expected behavior

ostree command would run

Actual behavior

ostree command fail with error message: error: No installed package matches 'firefox'

System details

> rpm-ostree status -b
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: no runs since boot
BootedDeployment:
● ostree-image-signed:docker://ghcr.io/secureblue/silverblue-nvidia-userns-hardened:latest
                   Digest: sha256:75b3f4ebd96c5369c21acd5aaeec1d0b684f9084aea3f13d1793187b38b4b66f
                  Version: 39.20240130.0 (2024-01-31T03:40:14Z)
          LayeredPackages: codium langpacks-en libreoffice

> rpm-ostree --version 
rpm-ostree:
 Version: '2023.11'
 Git: d15b73c58879a43456d5eeeee6605f7524e9ae65
 Features:
  - rust
  - compose
  - container
  - fedora-integration

Additional information

Attempt Fix: Layering Firefox

layering firefox is not possible, as secureblue removed firefox from repo:

$ rpm-ostree install firefox
error: Cannot request 'firefox' provided by removed package 'firefox-122.0-1.fc39.x86_64'

Attempt Fixes: Go Back, Reser, Re-rebase

I rebased back to silverblue-nvidia image, reset all the override:

rpm-ostree override reset --all

And rebased back to silverblue-nvidia-userns-hardened image, and ostree worked like a charm. I used the signed repo for both rebase.

firefoxlover commented 3 months ago

Try rpm-ostree reset firefox firefox-langpacks ?

czhang03 commented 3 months ago

As I mentioned in the original issue, rebase back to the original base and reset works. But I don't think (I recalll I have tested this, but I don't feel like testing it at this momnet) resetting on the current base (the base that doesn't include firefox) works.