How to best install compiled programs (e.g. xfd)?

I wanted to install xfd, and while it looks like it was included in xorg-x11-apps, that package is gone: Commit - rpms/xorg-x11-apps - e4469df65397004ab19a898ca350195f017891a2 - src.fedoraproject.org

Since also dnf provides '*/xfd' doesn’t seem to find this tool. I think I have to compile it myself. But I’d like to install it as package afterwards.

What is the easiest way to accomplish this? For debian checkinstall exists, is there a similar easy-to-use solution for fedora? Thank you

1 Like

It looks like that package was last built for Fedora Linux 34.

https://src.fedoraproject.org/rpms/xfd/tree/f34

You should be able to clone that and use rpmbuild to compile it as a rpm. Then you could install it as a package on your system with dnf or rpm.

Thank you, in this case I seem to be lucky then. But what about software that has no .spec file yet? Is there a simple checkinstall-like way to get a .rpm out of an arbitrary build-command?

I don’t know of any way/software to auto-generate a .spec file. But I’m not a packager. You might find people more knowledgeable about such things in Feodra’s “devel” Matrix channel.

2 Likes

@udavidson, I don’t recommend checkinstall: [1]

Checkinstall is limited in what it can do. To be precise, the packages it creates can only install files, and checkinstall does not care where it installs them. You can overwrite files in /home directories with checkinstall, among other things. The generated packages can not modify files. If the installation routine modifies existing files, they will be part of the generated package in their entirety.

A horror scenario occurs when an installation routine adds a user by modification of /etc/passwd, which is subsequently included in the package. Installation of the package causes /etc/passwd to be completely replaced, and the deinstallation of the package removes the file, breaking the system in half.

The generated packages also fail to register their configuration files with dpkg, therefore paving the way for upgrades that overwrite local configuration file changes.


  1. askubuntu.com/revisions/1138405/2 ↩︎

1 Like