On 2013-08-28 18:09, Dave Johansen wrote:
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
Do you need it enabled while parsing the spec? Then I have no idea. Otherwise, can't you just run the command in e. g., %build like:

%build

scl
enable devtoolset-1.1 bash
more commands

--alec


--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Reply via email to