rpmbuild - how to not print commands in spec file

Tim Mooney Tim.Mooney at ndsu.edu
Thu Oct 12 21:43:31 UTC 2017

In regard to: rpmbuild - how to not print commands in spec file , Tech...:

>    Sorry if this is an obvious question, but I've gone through the rpm
> documentation (all 400 pages of it) and I'm not finding the solution. When I
> run rpmbuild with the spec file, every command is printed out with all of
> the expanded arguments. The docs say that there's a way to turn that off.
> What I would like to do is only print out what I tell it to print out and
> not print all of the commands. Any insight at all would be greatly
> appreciated.

I haven't followed how recent Fedora & Red Hat's rpm 4.x has diverged
(advanced?) from the documentation, so there may be a global macro that
you can set that will disable the "set -x" that gets added in each
section, but the "old way" to do it would be to put

set +x

at the top of each section (right after %prep, right after %build,
right after %install) etc.

Tim Mooney                                             Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, Quentin Burdick Building                  701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

More information about the Rpm-list mailing list