Simplifying updates for RPM Fusion packages (and other packages shipping their own RPM repos)

Sorry, I did this and it worked, but I dont understand how.

1) How does ostree know what to do first? Doesnt it parse the command from the beginning to end? Does it know that it has to first install the new packages, then remove the the old .noarch ones, if so, how is it that “intelligent”?

2) Most important question: Another user asked this but the answer wasnt quite satisfactory - where do the versionless packages come from? They are NOT available on rpmfusion!
There are three packages available for each version (free/non-free) and here they are:

rpmfusion-nonfree-release.noarch : RPM Fusion (nonfree) Repository Configuration
rpmfusion-nonfree-release-rawhide.noarch : RPM Fusion Rawhide nonfree repo definitions
rpmfusion-nonfree-release-tainted.noarch : RPM Fusion nonfree Tainted repo definition

Thats it. No “rpmfusion-nonfree-release” with nothing else coming after the name, so let me repeat: Where do these packages come from? I googled too, but all I was getting for “versionless rpmfusion packages” was this forum post … I dont understand :slight_smile:


Sorry for the bump in the old thread, but Id really like to understand, could you have a look at my last post? Thanks!

I will try to explain.

If you are referring to the step below, yes, rpm-ostree will parse it top to bottom.

Not sure what you are referring to when you say “first install the new packages”. But yes, before running the code above, you need to follow the instructions as mentioned:

As for your second question…

At first you have a fresh system - never had RPM Fusion installed before. You have no rpmfusion-*.repo files installed in /etc/yum.repos.d. Fedora does not host any rpmfusion .rpm packages in their repositories, therefore you need to fetch those directly from running:

sudo rpm-ostree install$(rpm -E %fedora).noarch.rpm$(rpm -E %fedora).noarch.rpm

So that fetches the .rpm file from the mirror and installs the contents; which are basically the rpmfusion-*.repo files in /etc/yum.repos.d.

Now rpm-ostree tracks that there are overlays installed (of the rpmfusion rpms) - you can see them if you run rpm-ostree status - it will say:
LayeredPackages: rpmfusion-free-release-34.0.3.noarch rpmfusion-nonfree-release-34.0.2.noarch

To understand the problem, let’s look at a completely different example: say you want to overlay emacs. You would simply execute rpm-ostree install emacs. The emacs packages is sourced from the fedora-updates repo. The fedora-updates.repo file in /etc/yum.repos.d already accounts for the release (f34) and architecture (x86_64), so it will fetch from the repo mirrors the file emacs-27.2-11.fc36.src.rpm. Notice now that if you run rpm-ostree status to query the LayeredPackages it lists “emacs”, not “emacs-27.2-11.fc36.src.rpm”. When an upgrade is performed to the BaseCommit, the Layered Packages are queried again against the known repos, fetched, and upgraded.

Now going back to the RPM Fusion overlays. Why do those overlays have the “*-34.03.noarch” suffix? Because they weren’t queried against a repo using the base name (e.g. - “emacs” or “rpmfusion-free-release”), but rather we had to give it the explicit rpm source address and filename (…noarch.rpm). We couldn’t query the base name because “rpmfusion-free-release” didn’t exist in any known/installed repos yet. And rpm-ostree status lists the complete filename because it doesn’t know any better.

But once we installed it the first time, we now have the rpmfusion-*.repo files installed in /etc/yum.repos.d. And so we run the rpm-ostree uninstall rpmfusion-free-release-34.0.3.noarch. This removes the Layered Package, but remember in ostree, changes aren’t committed until reboot! So the rpmfusion-*.repo files still exist in /etc/yum.repos.d. This lets us do the second part, which is the rpm-ostree install rpmfusion-free-release. Now we are querying the repos using the base name, just like we did with “emacs”. And the repo that has that base name is the previously installed, and not-yet-uninstalled, rpmfusion-*.repo.

Now that all the pieces are in place: since the Layered Package is listed under the base name, not the explicit rpm file name, when an upgrade in performed, it will query the repos using the base name and correctly return the latest version appropriate for the system’s version and architecture.

1 Like

Thank you for that very in-depth answer and that you took the time to write it - I understood now.

I tried to explain this myself, but failed, since I missed an important detail.

All layered packages are “versionless”, while the local one has a version number. If I didnt miss this, I wouldnt have scratched my head for two weeks :grinning:

Thanks again!

This solution works with a couple of modifications for Fedora Silverblue 36 users who upgraded from 35. Note that there’s a dash where a dot used to be, as well as the updated version number:

rpm-ostree update \
            --uninstall rpmfusion-free-release-36-0.2.noarch \
            --uninstall rpmfusion-nonfree-release-36-0.2.noarch \
            --install rpmfusion-free-release \
            --install rpmfusion-nonfree-release

Note: Check your RPM Fusion repo versions and adjust this command if needed before running it.

1 Like

All this said, upgrading from 35 to 36 Beta with RPM Fusion repos required a lot more manual intervention than I like.

If I’m still on Silverblue when 37 comes out, I will be waiting until maybe a couple of weeks after the release before upgrading.

Can we have a version that verify which rpm NVRA are installed (layered ?) and

That so I can copy a “stable” version in the RPM Fusion wiki ? (referencing this post for credits).

Thanks in advance.

I’ve verified that the following suggestion works in a fresh Fedora Silverblue virtual machine:

# Install RPM Fusion repos
$ sudo rpm-ostree install$(rpm -E %fedora).noarch.rpm$(rpm -E %fedora).noarch.rpm
$ reboot

# Replace the versioned local packages by overlayed packages from the repo
$ sudo rpm-ostree update --uninstall rpmfusion-free-release --uninstall rpmfusion-nonfree-release --install rpmfusion-free-release --install rpmfusion-nonfree-release
$ reboot

Note that this applies to all rpm-ostree variants of Fedora: Fedora Kinoite, Fedora IoT and Fedora CoreOS.

However, it’s more likely to be used on Fedora Silverblue and Kinoite thus listing those two would be great.