How To Install rpkg-macros on Fedora 36
Introduction
In this tutorial we learn how to install rpkg-macros
on Fedora 36.
What is rpkg-macros
Set of preproc macros to be used by rpkg utility. They are designed to dynamically generate certain parts of rpm spec files. You can use those macros also without rpkg by $ cat <file_with_the_macros> | preproc -s /usr/lib/rpkg.macros.d/all.bash -e INPUT_PATH=<file_with_the_macros> INPUT_PATH env variable is passed to preproc to inform macros about the input file location. The variable is used to derive INPUT_DIR_PATH variable which rpkg macros use. If neither INPUT_PATH nor INPUT_DIR_PATH are specified, INPUT_PATH will stay empty and INPUT_DIR_PATH will default to ‘.’ (the current working directory). Another option to experiment with the macros is to source /usr/lib/rpkg.macros.d/all.bash into your bash environment Then you can directly invoke the macros on your command-line as bash functions. See content in /usr/lib/rpkg.macros.d to discover available macros. Please, see man rpkg-macros for more information.
We can use yum
or dnf
to install rpkg-macros
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install rpkg-macros.
Install rpkg-macros on Fedora 36 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install rpkg-macros
using dnf
by running the following command:
sudo dnf -y install rpkg-macros
Install rpkg-macros on Fedora 36 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install rpkg-macros
using yum
by running the following command:
sudo yum -y install rpkg-macros
How To Uninstall rpkg-macros on Fedora 36
To uninstall only the rpkg-macros
package we can use the following command:
sudo dnf remove rpkg-macros
rpkg-macros Package Contents on Fedora 36
/usr/bin/pack_sources
/usr/lib/rpkg.macros.d
/usr/lib/rpkg.macros.d/all.bash
/usr/lib/rpkg.macros.d/git.bash
/usr/lib/rpkg.macros.d/helpers
/usr/lib/rpkg.macros.d/helpers/git
/usr/lib/rpkg.macros.d/helpers/git_branch
/usr/lib/rpkg.macros.d/helpers/git_head
/usr/lib/rpkg.macros.d/helpers/git_head_short
/usr/lib/rpkg.macros.d/helpers/git_merged_tag_refs
/usr/lib/rpkg.macros.d/helpers/git_remote
/usr/lib/rpkg.macros.d/helpers/git_remote_url
/usr/lib/rpkg.macros.d/helpers/git_root
/usr/lib/rpkg.macros.d/helpers/git_status
/usr/lib/rpkg.macros.d/helpers/git_submodule_refs
/usr/lib/rpkg.macros.d/library
/usr/lib/rpkg.macros.d/library/log.bash
/usr/lib/rpkg.macros.d/library/output.bash
/usr/lib/rpkg.macros.d/library/query.bash
/usr/lib/rpkg.macros.d/library/utils.bash
/usr/share/licenses/rpkg-macros
/usr/share/licenses/rpkg-macros/LICENSE
/usr/share/man/man1/rpkg-macros.1.gz
References
Summary
In this tutorial we learn how to install rpkg-macros
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).