Red Hat: Difference between revisions
No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 33: | Line 33: | ||
...and the RPM tools. | ...and the RPM tools. | ||
{{code|inline=y|lang=bash|dnf install rpmdevtools rpmlint}} | {{code|inline=y|lang=bash|dnf install rpmautospec rpmdevtools rpmlint}} | ||
===Initialize an RPM build environment=== | ===Initialize an RPM build environment=== | ||
| Line 65: | Line 65: | ||
* [https://www.redhat.com/sysadmin/create-rpm-package How to create a Linux RPM package - Enable Sysadmin] | * [https://www.redhat.com/sysadmin/create-rpm-package How to create a Linux RPM package - Enable Sysadmin] | ||
* [https://www.osradar.com/install-development-build-tools-fedora/ How to install the Development and build tools on Fedora 34/33 - osradar] | * [https://www.osradar.com/install-development-build-tools-fedora/ How to install the Development and build tools on Fedora 34/33 - osradar] | ||
[[ja:Red Hat]] | |||
Latest revision as of 11:20, 16 November 2025
Personal notes on the use of Red Hat's Linux distributions and their derivatives (RHEL, Fedora, CentOS, Alma, etc.).
Multimedia
Red Hat is strict about the software with "restricted" licenses that it will distribute, which means additional packages often need to be installed to enable features that "just work" in other distributions. Most of these are supplied by RPM Fusion.
Audacious: AAC playback
# dnf install faad2 audacious-plugins-freeworld-ffaudio
Reference
Package Development
Preparing a development environment, getting upstream sources to modify, and building.
Environment preparation
Install development tools
Red Hat's term for the usual...
Old dnf (up to fc40)
dnf groupinstall "Development Tools" "Development Libraries"
dnf5 (fc41 onwards)
dnf install @development-tools
...and the RPM tools.
dnf install rpmautospec rpmdevtools rpmlint
Initialize an RPM build environment
Creates the directory tree under ~/rpmbuild.
rpmdev-setuptree
Install a package's build dependencies
dnf builddep $PACKAGE
Retrieving upstream sources
Using the package manager
dnf can fetch SRPMs from the repository.
dnf download --source $PACKAGE
Extracting the SRPMs will give you a SPEC, a source tarball, and any distribution patches.
rpm2cpio $PACKAGE.src.rpm | cpio -idmv
Using git
Individual git repositories for packages are accessible from Fedora Package Sources.