coreos / rpm-ostree

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

Unable to override package with Provides #1517

Open debarshiray opened 6 years ago

debarshiray commented 6 years ago

The current Fedora 28 Silverblue image has containernetworking-cni-0.7.1-1.fc28, which Provides containernetworking-plugins:

$ rpm --provides -q containernetworking-cni
containernetworking-cni = 0.7.1-1.fc28
containernetworking-cni(x86-64) = 0.7.1-1.fc28
containernetworking-plugins = 0.7.1-1.fc28
$ rpm -q containernetworking-cni
containernetworking-cni-0.7.1-1.fc28.x86_64

The package has since been renamed to containernetworking-plugins, and since I need a newer version for more recent podman builds, I want to temporarily override containernetworking-cni with containernetworking-plugins-0.7.3-1.fc28 until a new image is available. However, I am unable to do that. The rpm-ostree override replace command (see below) seems to succeed, but the override isn't reflected in rpm-ostree status, and after rebooting into the new image I don't see the new RPM.

$ rpm-ostree override replace containernetworking-plugins-0.7.3-1.fc28.x86_64.rpm
Checking out tree c441d54... done
Inactive base replacements:
  containernetworking-plugins-0.7.3-1.fc28.x86_64
Inactive requests:
  containernetworking-plugins (already provided by containernetworking-cni-0.7.1-1.fc28.x86_64)
Enabled rpm-md repositories: updates rpmfusion-free-updates rpmfusion-free fedora-cisco-openh264 fedora
rpm-md repo 'updates' (cached); generated: 2018-08-27 00:53:46
rpm-md repo 'rpmfusion-free-updates' (cached); generated: 2018-08-26 20:28:07
rpm-md repo 'rpmfusion-free' (cached); generated: 2018-04-27 09:40:17
rpm-md repo 'fedora-cisco-openh264' (cached); generated: 2018-03-17 00:29:29
rpm-md repo 'fedora' (cached); generated: 2018-04-25 04:27:32
Importing metadata [=============] 100%
Resolving dependencies... done
Checking out packages (26/26) [=============] 100%
Running pre scripts... 0 done
Running post scripts... 19 done
Writing rpmdb... done
Writing OSTree commit... done
Copying /etc changes: 15 modified, 1 removed, 33 added
Transaction complete; bootconfig swap: no; deployment count change: 0
Freed: 90.7 MB (pkgcache branches: 1)
(rpm-ostree override replace:3210): OSTree-DEBUG: 13:43:39.838: Deployment a2b28fd236a1d7a63e9557bb2b346c315554985c798dcd46d5f6264827503a8f.0 unlocked=0
(rpm-ostree override replace:3210): OSTree-DEBUG: 13:43:39.838: Deployment 68f5adcacf6f21610662e3c234a1c002ae8076223975b69a5e09b5a2259be74e.0 unlocked=0
Run "systemctl reboot" to start a reboot

Host system details

rpm-ostree status right after attempting the above override:

$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
  ostree://fedora-workstation:fedora/28/x86_64/workstation
                   Version: 28.20180826.0 (2018-08-26 23:40:17)
                BaseCommit: c441d54253c5da6f7d196dbecbb5ac478c02de75fd147f46f26cbd0e073aef8c
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
           LayeredPackages: emacs gstreamer1-libav gstreamer1-plugin-openh264 gstreamer1-plugins-bad-free-gtk gstreamer1-plugins-ugly libnice-gstreamer1 mozilla-openh264 reg
                            strace xterm
             LocalPackages: rpmfusion-free-release-28-1.noarch

● ostree://fedora-workstation:fedora/28/x86_64/workstation
                   Version: 28.20180826.0 (2018-08-26 23:40:17)
                BaseCommit: c441d54253c5da6f7d196dbecbb5ac478c02de75fd147f46f26cbd0e073aef8c
              GPGSignature: Valid signature by 128CF232A9371991C8A65695E08E7E629DB62FB1
           LayeredPackages: emacs gstreamer1-libav gstreamer1-plugin-openh264 gstreamer1-plugins-bad-free-gtk gstreamer1-plugins-ugly libnice-gstreamer1 mozilla-openh264 reg
                            strace xterm
             LocalPackages: rpmfusion-free-release-28-1.noarch
cgwalters commented 6 years ago

Yeah, entirely possible our logic for determining whether something is part of the "base image" is getting confused about provides.

JaneSmith commented 4 years ago

I'm not sure if I'm running into the same issue or not. I'm pretty confused.

I'm using Fedora Silverblue 31, and am trying to override the base package pulseaudio-module-bluetooth with pulseaudio-module-bluetooth-freeworld from RPM Fusion. This package adds support for a variety of Bluetooth audio codecs such as AptX, which is sadly missing out of the box with Fedora.

The instructions from that fork’s GitHub page say to run the following command:

rpm-ostree override remove pulseaudio-module-bluetooth -–install pulseaudio-module-bluetooth-freeworld

This just fails with the error “Unknown option --install”.

I then tried this instead:

rpm-ostree override replace pulseaudio-module-bluetooth-freeworld

And that fails with the error “Non-local replacement overrides not implemented yet”.

Finally, I tried this:

wget https://download1.rpmfusion.org/free/fedora/releases/31/Everything/x86_64/os/Packages/p/pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64.rpm
rpm-ostree override replace ./pulseaudio-module-bluetooth-freeworld-1.3-1.fc31.x86_64.rpm

This time it actually downloaded and supposedly installed the package. But after rebooting, I’m not sure it actually worked. rpm-ostree status doesn’t list any overridden packages, and rpm -q pulseaudio-module-bluetooth-freeworld says it’s not installed. Nothing seems any different with my audio, and the GitHub page’s instructions to check codec don’t work as expected, suggesting that I’m still on the stock package.

I tried removing the original package:

rpm-ostree override remove pulseaudio-module-bluetooth

That fails with a bunch of errors saying that the package is needed by various other things, such as gnome-tweaks and gnome-bluetooth, saying that "none of the providers can be installed".

I feel like this might be a similar issue to the OP, as I'm dealing with a package that has a different install name, it appears to install with override replace (at least when using a local .rpm file), but then rpm-ostree status doesn't list it. It sounds the same to me, but maybe I'm wrong.

Would appreciate any help.

jlebon commented 4 years ago

The instructions from that fork’s GitHub page say to run the following command:

rpm-ostree override remove pulseaudio-module-bluetooth -–install pulseaudio-module-bluetooth-freeworld

This just fails with the error “Unknown option --install”.

Hmm, that's weird. The syntax looks right to me. Can you provide the exact shell paste of the command and its output?

jlebon commented 4 years ago

Re. the issue itself, this is something I've thought about more recently since it's become much more popular now to replace the kernel with alternative versions (e.g. kernel-rt or kernel-debug) and right now, the way to do this is via rpm-ostree override remove kernel kernel-core ... --install <alternate kernel pkg> --install <alternate kernel-core pkg> ....

I mean, rpm-ostree is just being very strict about what's happening there. We're not just changing the EVR of a package, we're entirely replacing it with a different package.

Anyway, once you enter override replace-land, you've already expressed your intent to wanting to change the base layer, so automatically resolving that to multiple removes and installs I think is reasonable. Though I don't think we want to hide what actually happened from rpm-ostree status.