Enabling 3rd Party RPM Repos

I recently looked through the silverblue user guide and it seems like it is going to turn out pretty well.
Of course it is still incomplete so the most interesting question for me, how to enable third party rpm repos, is not yet included.

As was already pointed out Visual Studio Code is not yet completely usable as flatpak and at the same time it is not (and neither is Atom) available in fedora’s packages.

If someone knows how to add third party rpm repos in fedora silverblue it would be really nice if she or he could describe the process here (or even better complete the docs).

If you’re referring to these directions, the actual saving of the repo file would be identical. You’d just then run rpm-ostree install code.

However, if VS Code installs into /opt, it’s worth noting that rpm-ostree does not currently support that.

1 Like

Thank you for your answer, and good to know that you currently have to take care where the package is installed to.

1 Like

Just out of curiosity, have you tried the fedora-toolbox pet container? I would think it would give you a very satisfactory VSCode experience on Silverblue.

I did not. I am no expert, but the workflow felt similar to python’s virtual environments. Do I have to activate this environment every time I want to use VSCode?

The toolbox is a container so may be similar to pythons ve, I’m not familiar with that. You do have to enter the toolbox since it is a container and you do this in a terminal. To use the toolbox, you have to layer it onto your Silverblue system, rpm-ostree install fedora-toolbox, then after installed systemctl reboot. Once rebooted, in a terminal type fedora-toolbox create to make a pet container. When it’s done type fedora-toolbox enter to start using it. You can treat it like a Fedora Workstation basically, using dnf to install things, enabling third party repo’s, etc.

1 Like

I just tried
$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
and got
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Read-only file system)
error: https://packages.microsoft.com/keys/microsoft.asc: key 1 import failed.
on my Fedora Silverblue 29 on GNOME Boxes.

Are you running Silverblue in a VM?

Yes, but that is not what is causing Julian’s error.

You will note I didn’t say it was.

2 Likes

Hello,
For enabling repos for rpm-ostree to layer I would think you need to do it with ostree remote add. To import the keys you would use ostree remote gpg-import. Remember to use rpm-ostree cleanup -m before executing an installation of a layered package.

Wouldn’t this expect an OSTree repo, not an RPM repo?

I guess it would, uh nevermind… although you can install local rpm’s as layered pkgs

1 Like

BTW, in this case, the better solution may be to just use the Flatpak of VS Code or actually OSS Code.

Also note: VS Code is governed by the Microsoft EULA and thus legally said, proprietary. (and has some tracking and this feedback button enabled)
While OSS Code is the name of the actual source code you can find on GitHub and in flathub’s case, they compile it from source.

So here are the links:

In general, I agree with you, but I again want to refer to this link (Developing applications using Flatpak-packaged editors/IDEs). There are more examples, why flatpak is not yet an alternative for general purpose IDEs.

Thanks for the pointer and I understand the concern. However, IMHO, this is the wrong way to solve the problem.

What you do: Just going back to the “old” technology, because it does not work.
What should be done: Fix the “new” technology, so it works.

In a more specific way here, e.g., there is actually a way to make it work as flatpak is pretty flexible and with the correct privileges you can make apps break out of the sandbox to run commands on the host. This is usually all, it needs to fix the usual problem.

Unfortunately, it needs a little setup, but it’s possible. Actually, I’ve now explained it in detail in the thread you linked:

1 Like

I will look, into your wrapper script. If it works as expected ( flatpak probably provides even easier solutions in the future) this would eliminate my need for rpm repos.

Thank you!

Okay,

So there is basically no difference between an ‘OSTree repo’ and a standard package repo from everything I have read. and in practice If I enable a repo for my system to layer a package, it must be done with the command I mentioned, as well the gpg key import too. This is the only way I am aware of to enable a repo for Silerblue to use.

It is a good thing to note that Silverblue 30 Beta will likely still have toolbox issues as I have been unable to run mine since I upgraded from F29SB. I cannot access my previously created fedora-toolbox container that I made with F29SB, and I cannot create any containers in F30SB (prebeta) without using sudo. Even though toolbox creates a container as sudo, I cannot use it as my user since my UID is wrong for the container rights, and it messes up the home directory rights etc…

For accessing the F29 one, does --release 29 not work?