coreos/rpm-ostree

Can't rebase to images with older packages when using package overrides

Opened this issue · 4 comments

Host system details

State: idle
Deployments:
● fedora:fedora/rawhide/x86_64/silverblue
                  Version: Rawhide.20230813.n.0 (2023-08-13T05:51:38Z)
               BaseCommit: e90589964ddb1fe94ad1ad175038186ab7b7a666e2ccb141692520c1b5351ec7
             GPGSignature: Valid signature by 115DF9AEF857853EE8445D0A0727707EA15B79CC
      RemovedBasePackages: firefox firefox-langpacks 116.0.2-1.fc39
          LayeredPackages: corectrl fish gnome-tweaks langpacks-en langpacks-en_GB sysprof tor valgrind
            LocalPackages: opentabletdriver-0.6.0.4-1.x86_64

Expected vs actual behavior

❯ rpm-ostree rebase fedora:fedora/38/x86_64/silverblue
2 metadata, 0 content objects fetched; 788 B transferred in 1 seconds; 0 bytes content written
Checking out tree 2740517... done
Enabled rpm-md repositories: fedora-cisco-openh264 rawhide
Updating metadata for 'fedora-cisco-openh264'... done
Updating metadata for 'rawhide'... done
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2023-03-14T10:56:46Z solvables: 4
rpm-md repo 'rawhide'; generated: 2023-08-13T07:32:09Z solvables: 70313
Resolving dependencies... done
error: Could not depsolve transaction; 7 problems detected:
 Problem 1: cannot install both fmt-10.0.0-3.fc39.x86_64 from rawhide and fmt-9.1.0-2.fc38.x86_64 from @System
  - package corectrl-1.3.5-5.fc39.x86_64 from rawhide requires libfmt.so.10()(64bit), but none of the providers can be installed
  - conflicting requests
 Problem 2: cannot install both glibc-2.38-1.fc39.x86_64 from rawhide and glibc-2.37-4.fc38.x86_64 from @System
  - package fish-3.6.1-2.fc39.x86_64 from rawhide requires libm.so.6(GLIBC_2.38)(64bit), but none of the providers can be installed
  - package fish-3.6.1-2.fc39.x86_64 from rawhide requires libc.so.6(GLIBC_2.38)(64bit), but none of the providers can be installed
  - conflicting requests
 Problem 3: package langpacks-core-en-4.0-8.fc40.noarch from rawhide requires default-fonts-en, but none of the providers can be installed
  - package default-fonts-core-sans-4.0-8.fc40.noarch from rawhide obsoletes langpacks-core-font-en < 4.0-8.fc40 provided by langpacks-core-font-en-3.0-32.fc38.noarch from @System
  - package langpacks-en-4.0-8.fc40.noarch from rawhide requires langpacks-core-en, but none of the providers can be installed
  - conflicting requests
 Problem 4: cannot install both glibc-2.38-1.fc39.x86_64 from rawhide and glibc-2.37-4.fc38.x86_64 from @System
  - package glibc-all-langpacks-2.37-4.fc38.x86_64 from @System requires glibc = 2.37-4.fc38, but none of the providers can be installed
  - package tor-0.4.7.14-1.fc39.x86_64 from rawhide requires libc.so.6(GLIBC_2.38)(64bit), but none of the providers can be installed
  - conflicting requests
 Problem 5: package glibc-2.38-1.fc39.x86_64 from rawhide requires glibc-common = 2.38-1.fc39, but none of the providers can be installed
  - package dotnet-runtime-6.0-6.0.20-2.fc39.x86_64 from rawhide requires libm.so.6(GLIBC_2.38)(64bit), but none of the providers can be installed
  - package dotnet-runtime-6.0-6.0.20-2.fc39.x86_64 from rawhide requires libc.so.6(GLIBC_2.38)(64bit), but none of the providers can be installed
  - cannot install both glibc-common-2.38-1.fc39.x86_64 from rawhide and glibc-common-2.37-4.fc38.x86_64 from @System
  - package opentabletdriver-0.6.0.4-1.x86_64 from @commandline requires dotnet-runtime-6.0, but none of the providers can be installed
  - conflicting requests
 Problem 6: cannot install both glibc-2.38-1.fc39.x86_64 from rawhide and glibc-2.37-4.fc38.x86_64 from @System
  - package sysprof-cli-3.48.0-2.fc39.x86_64 from rawhide requires libc.so.6(GLIBC_2.38)(64bit), but none of the providers can be installed
  - package glibc-gconv-extra-2.37-4.fc38.x86_64 from @System requires glibc(x86-64) = 2.37-4.fc38, but none of the providers can be installed
  - package sysprof-3.48.0-2.fc39.x86_64 from rawhide requires sysprof-cli(x86-64) = 3.48.0-2.fc39, but none of the providers can be installed
  - conflicting requests
 Problem 7: python3-3.12.0~rc1-1.fc40.i686 from rawhide  does not belong to a distupgrade repository
  - package gnome-tweaks-42~beta-8.fc39.noarch from rawhide requires python(abi) = 3.12, but none of the providers can be installed
  - cannot install both python3-3.12.0~rc1-1.fc40.x86_64 from rawhide and python3-3.11.4-1.fc38.x86_64 from @System
  - conflicting requests
❯ rpm-ostree rebase fedora:fedora/39/x86_64/silverblue
⠠ Receiving objects; 99% (6302/6322) 3.3 MB/s 348.7 MB                                                                                                                                        1381 metadata, 4944 content objects fetched; 342131 KiB transferred in 109 seconds; 647.2 MB content written
Receiving objects; 99% (6302/6322) 3.3 MB/s 348.7 MB... done
Checking out tree 71f9f1f... done
Enabled rpm-md repositories: fedora-cisco-openh264 rawhide
Updating metadata for 'fedora-cisco-openh264'... done
Updating metadata for 'rawhide'... done
Importing rpm-md... done
rpm-md repo 'fedora-cisco-openh264'; generated: 2023-03-14T10:57:01Z solvables: 4
rpm-md repo 'rawhide'; generated: 2023-08-13T07:32:09Z solvables: 70313
Resolving dependencies... done
error: Could not depsolve transaction; 1 problem detected:
 Problem: package langpacks-fonts-en-4.0-8.fc40.noarch from rawhide requires default-fonts-en = 4.0-8.fc40, but none of the providers can be installed
  - cannot install both default-fonts-core-sans-4.0-8.fc40.noarch from rawhide and default-fonts-core-sans-4.0-8.fc39.noarch from @System
  - package langpacks-en-4.0-8.fc40.noarch from rawhide requires langpacks-fonts-en, but none of the providers can be installed
  - conflicting requests

Expected:

The rebase would go as normal, pulling in the appropriate dependencies and packages for the rebase.

Steps to reproduce it

Install some packages; to create a similar situation as me, sysprof should be enough, but you can try and reproduce most of my package list from what I've given. Then rebase to an older version of the system. I went from Rawhide to Fedora 38 and Fedora 39, but anything with older packages should be sufficient.

Would you like to work on the issue?

Should be assigned to someone else, I don't know C (nor do I really plan to, too much) and I'm not familiar with rpm-ostree internals - if the solution is easy enough, I may be able to get the Rust bits done.

When faced with dependencies issues on rebases, the common workaround is to reset overrides, rebase, and re-apply overrides.

While this may be a valid rpm-ostree issue in dependency resolution, in general, we don't expect downgrades to lower major versions of Fedora to work.

If you are on a stable version and want to try Rawhide, you should pin your current deployment, rebase to Rawhide to try it, and then rollback to your previous deploy instead of rebasing again.

I'm just a bit flummoxed by the fact that I've installed these overrides from the repositories, and rpm-ostree knows that - so why doesn't it pull a plain image and apply the appropriate packages from that image's repositories? It's trying to pull from the current image's repositories.

So it's all quite complex here; I think what you're running into is special to rawhide, which has distinct rpm-md repositories. Otherwise we do honor $releasever which Just Works when going between 38 and 39 for example.

In theory, yes we could indeed use the rpm-md repositories from the new base. And that's what ends up happening after the rebase for subsequent upgrades.

But, such a model ends up with a tricky loop because an immediate problem becomes how one changes the new /etc/yum.repos.d...ideally of course they'd be in /usr and then you can override them before the rebase in /etc.

I'm not sure this is likely to be fixed soon.

Ultimately...the main focus of the current developers on this project is on the container native flow, which already works the way you describe.

Encountering a similar issue here:

https://github.com/ericcurtin/silverblue-asahi/blob/5aa16f1/Containerfile

We are required to replace the branding for Silverblue Asahi Spin but encounter this issue, for development purposes we can just skip the branding replacement, but we cannot release this way:

STEP 8/9: RUN rpm-ostree override replace --experimental --from repo='copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding' fedora-asahi-remix-release fedora-asahi-remix-release-common fedora-asahi-remix-release-identity-basic fedora-asahi-remix-release-workstation
Enabled rpm-md repositories: copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts copr:copr.fedorainfracloud.org:group_asahi:kernel copr:copr.fedorainfracloud.org:group_asahi:mesa copr:copr.fedorainfracloud.org:group_asahi:u-boot fedora updates fedora-cisco-openh264 updates-archive
Importing rpm-md...done
rpm-md repo 'copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding' (cached); generated: 2023-10-07T09:57:50Z solvables: 55
rpm-md repo 'copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-scripts' (cached); generated: 2023-10-24T08:39:27Z solvables: 7
rpm-md repo 'copr:copr.fedorainfracloud.org:group_asahi:kernel' (cached); generated: 2023-10-12T03:31:00Z solvables: 125
rpm-md repo 'copr:copr.fedorainfracloud.org:group_asahi:mesa' (cached); generated: 2023-09-06T08:26:46Z solvables: 37
rpm-md repo 'copr:copr.fedorainfracloud.org:group_asahi:u-boot' (cached); generated: 2023-10-12T16:10:37Z solvables: 10
rpm-md repo 'fedora' (cached); generated: 2023-10-28T09:30:54Z solvables: 61704
rpm-md repo 'updates' (cached); generated: 2018-02-20T19:13:29Z solvables: 0
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2023-03-14T10:57:01Z solvables: 4
rpm-md repo 'updates-archive' (cached); generated: 2023-04-22T20:18:17Z solvables: 0
Resolving dependencies...done
error: Could not depsolve transaction; 2 problems detected:
 Problem 1: package fedora-asahi-remix-release-common-39-3.noarch from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding obsoletes fedora-release-common < 1:39-3 provided by fedora-release-common-39-30.noarch from @System
  - conflicting requests
 Problem 2: package fedora-release-silverblue-39-30.noarch from @System requires fedora-release-common = 39-30, but none of the providers can be installed
  - package fedora-asahi-remix-release-common-39-3.noarch from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding obsoletes fedora-release-common < 1:39-3 provided by fedora-release-common-39-30.noarch from @System
  - package fedora-asahi-remix-release-common-39-3.noarch from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding obsoletes fedora-release-common < 1:39-3 provided by fedora-release-common-39-30.noarch from fedora
  - package fedora-asahi-remix-release-workstation-39-3.noarch from copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding requires fedora-asahi-remix-release-common = 39-3, but none of the providers can be installed
  - conflicting requests
Error: building at STEP "RUN rpm-ostree override replace --experimental --from repo='copr:copr.fedorainfracloud.org:group_asahi:fedora-remix-branding' fedora-asahi-remix-release fedora-asahi-remix-release-common fedora-asahi-remix-release-identity-basic fedora-asahi-remix-release-workstation": while running runtime: exit status 1