Running a command in spec file?

Dave Johansen davejohansen at gmail.com
Wed Aug 28 16:09:42 UTC 2013


I'm trying to make a spec file that uses the devtoolset in RHEL 5/6 (
rhn.redhat.com/errata/RHEA-2013-0175.html ) but I haven't been able
to figure out how to enable devtoolset in the spec file. If I run 'scl
enable devtoolset-1.1 bash' before doing rpmbuild it works, but how do
I run a command like that in the spec file?

The closest thing I could find is this:
http://www.rpm.org/wiki/PackagerDocs/Macros

But when I tried using a macro or running just %(shell_command) it
appears that's happening in a subshell and not having the necessary
effect when returning to the main shell. Is there some trick to run a
shell command in the main shell?

Thanks,
Dave


More information about the devel mailing list