Is there a way to invoke rpmbuild such that %_topdir is specified?
I know that I can specify %_topdir in the $HOME/.rpmmacros file. I am
interested in knowing if there is a way to specify this variable on
the command line.
Specifying --buildroot isn't what I want.
Specifying --root seems to be more trouble than it is worth.
Faking out rpmbuild by resetting $HOME seems a little kludgy.
I've never been able to successfully invoke rpmbuild with --rcfile and
get all of the macros to expand correctly.
Some more background: I am vaguely interested in writing some code
that allows co-workers to produce RPMs, but I have to anticipate that
not all of my co-workers will have their own $HOME/.rpmmacros files
(and corresponding directories) setup. I am also vaguely interested
in making this process somewhat freestanding, such that somebody could
be creating two different RPMs on the same machine at the same time.
My current thinking is that setting %_topdir via the command line is
impossible (or brittle), and that I should just setup RPM build areas
for my co-workers if they don't already appear to be setup.
Something like:
# lots of hand-waving...
topdir=`rpmbuild --showrc | awk '$2 ~ /_topdir/ { print $NF }'`
if [ x%{_usrsrc}/redhat = x$topdir ] ; then
echo You need a RPM build area. I will set one up for you...
...
fi
With this scheme, I'll also be ignoring the problem of simultaneous
builds on the same machine, but this seems to be a corner case that I
can reasonably ignore.
Am I overlooking some obvious way of specifying %_topdir? Thanks!
--kevin
--
GnuPG ID: B280F24E And the madness of the crowd
alumni.unh.edu!kdc Is an epileptic fit
-- Tom Waits
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss