FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > RPM Package Manager

 
 
LinkBack Thread Tools
 
Old 04-01-2008, 09:56 PM
"Brian J. Murrell"
 
Default trying to put "--define 'macro value'" in a variable

This is not making any sense to me. Please observe:

$ rpmbuild --version
RPM version 4.4.1
$ RPMBUILD_ARGS="--nodeps"
$ set -x
$ RPMBUILD_DEFINES="--define '_buildshell /bin/bash'"
+ RPMBUILD_DEFINES='--define '_buildshell /bin/bash'
$ rpmbuild $RPMBUILD_ARGS --rebuild SRPMS/opensm-3.1.10-1.ofed1.3.src.rpm $RPMBUILD_DEFINES
+ rpmbuild --nodeps --rebuild SRPMS/opensm-3.1.10-1.ofed1.3.src.rpm --define '_buildshell' '/bin/bash'
error: Macro % has illegal name (%define)
error: Macro % has illegal name (%define)
...
$ rpmbuild $RPMBUILD_ARGS --rebuild SRPMS/opensm-3.1.10-1.ofed1.3.src.rpm --define '_buildshell /bin/bash'
+ rpmbuild --nodeps --rebuild SRPMS/opensm-3.1.10-1.ofed1.3.src.rpm --define '_buildshell /bin/bash'
[ no Macro errors ]

I can't see why putting the "--define 'macro value'" in a shell variable
and substituting it onto the rpmbuild command line is having the ill
effects that it is.

Anyone got any ideas before I start digging into rpmb and popt any
deeper?

Thanx,
b.

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 
Old 04-01-2008, 10:03 PM
Jos Vos
 
Default trying to put "--define 'macro value'" in a variable

On Tue, Apr 01, 2008 at 05:56:28PM -0400, Brian J. Murrell wrote:

> I can't see why putting the "--define 'macro value'" in a shell variable
> and substituting it onto the rpmbuild command line is having the ill
> effects that it is.
>
> Anyone got any ideas before I start digging into rpmb and popt any
> deeper?

Why don't you put macros in ~/.rpmmacros to avoid ugly shell variable
escape issues? In my build environments, I usally create a tmpdir
with .rpmmacros and set $HOME accordingly (per build, if necessary).

--
-- Jos Vos <jos@xos.nl>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204

_______________________________________________
Rpm-list mailing list
Rpm-list@redhat.com
https://www.redhat.com/mailman/listinfo/rpm-list
 

Thread Tools




All times are GMT. The time now is 04:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org