summaryrefslogtreecommitdiff
path: root/docs/man
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2021-04-13 16:56:08 +0300
committerPanu Matilainen <pmatilai@redhat.com>2021-12-20 13:26:23 +0200
commit03b3df0ce01aa0c59ef72eba8c0b770cc20d93df (patch)
tree1d5ece235803832b4eb11284e751a205a6e115df /docs/man
parentec1a2459374bc4f47971b622936fbd62c4965949 (diff)
downloadrpm-03b3df0ce01aa0c59ef72eba8c0b770cc20d93df.tar.gz
Add an interactive macro shell mode to rpmspec
Handy for debugging and experimenting with macros, in and out of spec context. Placed in rpmspec because we don't want readline dependency on main rpm executable, this is more of a packager tool anyway.
Diffstat (limited to 'docs/man')
-rw-r--r--docs/man/rpmspec.8.md37
1 files changed, 33 insertions, 4 deletions
diff --git a/docs/man/rpmspec.8.md b/docs/man/rpmspec.8.md
index 39288e636..ab76927af 100644
--- a/docs/man/rpmspec.8.md
+++ b/docs/man/rpmspec.8.md
@@ -23,6 +23,11 @@ PARSING SPEC FILES TO STDOUT:
**rpmspec** {**-P\|\--parse**} *SPEC\_FILE \...*
+INVOKING MACRO SHELL:
+---------------------
+
+**rpmspec** {**--shell**} \[*SPEC_FILE \...*\]
+
DESCRIPTION
===========
@@ -83,7 +88,9 @@ file:
> rpm-build-libs-4.11.3-3.fc20.x86_64
> ...
>
-> Get summary infos for single binary packages generated from the rpm spec file:
+
+Get summary infos for single binary packages generated from the rpm spec file:
+
>
> $ rpmspec -q --qf "%{name}: %{summary}\n" rpm.spec
> rpm: The RPM package management system
@@ -91,19 +98,41 @@ file:
> rpm-build-libs: Libraries for building and signing RPM packages
> ...
>
-> Get the source package which would be generated from the rpm spec file:
+
+Get the source package which would be generated from the rpm spec file:
+
>
> $ rpmspec -q --srpm rpm.spec
> rpm-4.11.3-3.fc20.x86_64
>
-> Parse the rpm spec file to stdout:
->
+
+Parse the rpm spec file to stdout:
+
> $ rpmspec -P rpm.spec
> Summary: The RPM package management system
> Name: rpm
> Version: 4.14.0
> ...
+Run interactive macro shell for debugging macros:
+
+> $ rpmspec --shell
+> > %define foo bar
+> > %foo
+> bar
+> > %(date)
+> Tue Apr 13 03:55:37 PM EEST 2021
+> > %getncpus
+> 8
+
+Run interactive macros shell in spec context:
+
+> $ rpmspec --shell popt.spec
+> %name
+> popt
+> %version
+> 1.18
+
SEE ALSO
========