Re: rpmbuild and %_topdir

2005-11-17 Thread Kevin D. Clark

Ben Scott writes:
 On 11/16/05, Kevin D. Clark wrote:
 Is there a way to invoke rpmbuild such that %_topdir is specified?

 http://fedora.redhat.com/docs/drafts/rpm-guide-en/ch-customizing-rpm.html#id3034443

 ... suggests that ...

 rpmbuild --define '_topdir /where/you/want'

Cool.  That is *exactly* what I was looking for.  I've tested this and
it seems to work well.  

 -- Ben Docs are nice.  *Complete* docs are even better. Scott

Mailing lists where you can bounce questions off of knowledgable folks
are great too.

Regards,

--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


rpmbuild and %_topdir

2005-11-16 Thread Kevin D. Clark

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


Re: rpmbuild and %_topdir

2005-11-16 Thread Ben Scott
On 11/16/05, Kevin D. Clark [EMAIL PROTECTED] wrote:
 Is there a way to invoke rpmbuild such that %_topdir is specified?

http://fedora.redhat.com/docs/drafts/rpm-guide-en/ch-customizing-rpm.html#id3034443

... suggests that ...

rpmbuild --define '_topdir /where/you/want'

... will do what you want.  Note the lack of a percent sign in the
macro definition.  Said webpage also gives ...

rpmbuild --eval '%_topdir'

... as a way to evaluate macros from the command line.

No, this isn't mentioned in my RPM man pages, either.  :-/

-- Ben Docs are nice.  *Complete* docs are even better. Scott
___
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss