What is the recommended way to install packages not included in any bundle?

Hi there,

I have started using Clear Linux and while installing the packages I need, I noticed that multiple package managers are present.

What is the recommended way to install packages not included in any bundle ?

  • yum ?
  • dnf ?
  • rpm2cpio ?
  • flatpack ?
  • something else ?

Is there any risk to install packages using a different way every time ?

Regards

1 Like

Flatpak is recommended. Otherwise I personally suggest to build from source, because that’s fun.

3 Likes

See: https://docs.01.org/clearlinux/latest/FAQ/index.html#can-i-install-a-software-package-from-another-os-on-cl

You can always compile from source as @doct0rHu said but keep in mind that if you do that, you own that software installation. So you have to make sure it doesn’t clash with CL files under /usr and it won’t be updated for you by CL.

If it’s opensource software, please request it to be added natively in CL so we can add it and others can benefit in the future.

2 Likes

Thank you both for your answers !
Looks like i had missed there FAQ in the first place.

I’ll look into it and browse related pages and get back here if needed

Regards

Flatpak works very well in CL, with so many flatpaks to choose from.

1 Like

I do a lot of work with multimedia, so I have to install flatpaks or build from source to get the codecs I need. I guess the answer depends on what you use your system for.

From you answers and FAQ content, I conclude this general rule of thumb :

  • swupd > flatpack > compiling/rpm2cpio > yum/dnf > rpm

What is the use case(s) which pushed to have yum and dnf available on CL ? I’m curious

dnf is used as an underlying mechanism for package dependency management and resolution during the mixing process to bundles. In otherwords, it’s used to make sure bundles can exist without conflict and not throw an error during installation.

Another reason to include dnf as a tool in the OS is for developers that need to query external repo information, but not necessarily install from it. Here is a guide that was recently publish for doing this against the CL packages, for example: https://docs.01.org/clearlinux/latest/guides/maintenance/query-upstream.html

1 Like

Thanks for these details!

  • Do you think dnf should be “upped” in my list ?
  • What about yum story ?

What is the use case(s) which pushed to have yum and dnf available on CL ? I’m curious

CL uses rpm as base to do the first packaging step, then use mixer to do
bundles and swupd is used to ship them.

Basically CL uses RPM to have a dependency and others stuff easy to
manage, that’s why we have autospec which is a tool to create SPEC
files from upstream source code.

BUT CL do not use RPM Database to ship binaries, CL uses deltas from
each bundle.

3 Likes

Thanks for you answer puneetse !

  • Is it safe to say that dnf and yum should be totally avoided for installing packages on CL ? Is there a real risk to brick the system or will the app simply break on next OS update ?
  • What about AppImages ? Should they be used as much as Flatpacks ?

Up) Still willing to have an answer

Sorry this got missed, thanks for bumping it.

For end users, yes. If you do choose use it, tread carefully and review what those external repos are putting on the filesystem.

FlatPak is the supported/integrated solution by CL to get immediate access to a large variety of applications. In the mean time, the focus is to get more and more software packaged natively in CL as bundles.

To your order of methods for obtaining software, I would add “request the software to be packaged in CL” somewhere in there. If it makes sense and checks all the boxes for open source, it’s likely faster and easier for it to be included in the distro. You can open new package request on Github: Sign in to GitHub · GitHub

3 Likes

Thank you for these precision :slight_smile:

Appimages are perfectly fine, and just as good as flatpak’s. They do not rely on any support from the OS, and may therefore be easier to work with - just download and run. However, updating them is a manual thing. Nonetheless, if you can get an appimage for something you really need, it’s a great solution.

2 Likes

I’m a little sad that you didn’t elaborate on this, because the solution is almost always trivial.

Most autotool applications install into /usr/local when you run configure without any parameters.

And that literally solves that problem.

My advice: don’t hesitate to compile from source. Here’s what I would recommend for standard parameters for configure scripts: --prefix=/usr/local --localstatedir=/var --sysconfdir=/etc.

6 Likes

Thank you for these precisions

TLDR for newcomers asking themselves the same question, the recommended way of installing packages is as follow :

5 Likes

I thought Clear’s stateless approach took over /usr entirely? Or is /usr/local excluded from this policy (as per linux tradition, I suppose)?

From the manual

The default is to ignore /usr/lib/kernel , /usr/lib/modules , /usr/src and /usr/local

The other paths are to do with compiling/installing kernel and modules. Would hate swupd to delete your Wi-fi or Nvidia kernel modules!

Or even just wiping out your current running kernel’s modules. clr-boot-manager handles when to clean up the kernel files, rather than swupd.

Great, thanks for the link @sunnyflunk