How to know the value of built-in macro in RPM?
11,228
Solution 1
Use the --eval
switch:
$ rpm --eval '%{_rpmdir}'
/usr/src/redhat/RPMS
Solution 2
The --showrc
option...
rpm --showrc
...will dump the complete rpmrc
to stdout. This will expose all sorts of interest definitions from the innards of RPM. But Corey's answer is better for finding the value of a particular symbol.
Related videos on Youtube
Author by
Amumu
Updated on June 04, 2022Comments
-
Amumu almost 2 years
How do I view the value of these macros in RPM? I can take a guess that %_bindir is /usr/bin, %_tmppath is /tmp, but: how exactly do I view these values and are their values system-dependent?
%_prefix %_exec_prefix %_bindir %_sbindir %_libexecdir %_datadir %_sysconfdir %_sharedstatedir %_localstatedir %_libdir %_includedir %_oldincludedir %_infodir %_mandir /usr %{_prefix) %{_exec_prefixl/bin %{_exec_prefix}/sbin %{_exec_prefix}/libexec %{_prefixJ/share %{_prefix}/etc %{_prefixJ/com %{_prefix}/var %{_exec_prefix}/lib %{_prefix}/include /usr/include %{_prefix}/info %{_prefixl/man