How to install not official packages

Because I’m working with different OS and distributions I sometimes need apps not contained in the official repositories, i.e. Clipit Autokey-Common and Autokey-gtk, seafile and seafile-client …

That depends. While the repositories of AlmaLinux do have limited (although not small) selection of packages, there are third-party repositories that carry additional packages. Some of those, for example EPEL, work very well. For convenience, Alma offers:

sudo dnf install epel-release

That package makes EPEL accessible. (Technically, adds definition of that repo.)

Alas, the “built for EL8” and “built for EL9” packages in all repos that have them do not include everything. The next level is packages that built for something similar, usually Fedora. One can’t install those RPMs directly, but has to get their src.rpm and rebuild for Alma with ‘mock’. The mock is in EPEL. (Never rebuild / build as root.)

If that is not an option either, then one of the containers: flatpak, docker, snap, etc might be a solution.

Thank you very much, jlehtone, for your answer full of content. So I got an idea how it works and will have a look at mock (not to work as root seems to be similar to the AUR of Arch Linux. And I hope I find the src.rpm

found *.src.rpm. In spite of generating endless difficulties …

$ mock -r “/etc/mock/almalinux-9-x86_64.cfg” rebuild resultsb_dist_121_size_1202402_name_clipit-1.4.5-4.D20
210513gite5fa64c.fc35.src.rpm
INFO: mock.py version 3.1 starting (python version = 3.9.10, NVR = mock-3.1-1.el9)…
Start(bootstrap): init plugins
INFO: selinux enabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux enabled
Finish: init plugins
INFO: Signal handler active
Start: run
ERROR: Cannot find/open srpm: resultsb_dist_121_size_1202402_name_clipit-1.4.5-4.D20210513gite5fa64c.fc35.src.rpm. Error: error rea
ding package header

I have a little page on building rpms, with links to more complete pages. Building rpms. It goes through the steps.

Hello scottro, thanks a lot. Your page is wonderful. It is that I’m looking for. Sorry, but …

  • /rpmbuild/SRPMS has been made in /root/, not in ~/
  • I got tint2*.rpm in /root/rpmbuild/RPMS/
    So it worked fine.
    What is important and is in danger to be forgotten: rpm -ivh Without this step *.spec are not produced.
    I hope it is not wrong to work as root. In Arch Linux is mortal sin. :smiley:

In the meantime I install several other Apps i normally need, and everything worked fine. Scottro, you shoulde get the nobelprize for Alma. Thank you very much!

Building packages as root is quite dangerous. One minor typo/mistake can destroy the whole system.

What toracat said. :slight_smile: One mistake can break things. All you have to do is the lines mentioned either as root or with sudo and create the mockbuild user and mock group, then you can do it all in your home directory, not having to use root or sudo save for the build deps and actual install of the rpm. It’s very little added effort and can prevent a lot of problems.
And I believe the article does cover installing the srpm with rpm -ivh which will create the spec file.

(And, thank you for your kind words about the article).