RPM Community Forums

Mailing List Message of <rpm-users>

Re: How do I set the _topdir ?

From: Sriram Narayanan <sriram@belenix.org>
Date: Sat 01 Jan 2011 - 18:46:19 CET
Message-ID: <AANLkTimOOzdD9F9-p70sVE=1UKb3sCsYcauEm-hs51rC@mail.gmail.com>
Ok, using dtrace, I was able to figure out what rpmbuild is doing:
  0   1837                       open:entry rpmbuild /var/ld/ld.config
  0   1837                       open:entry rpmbuild
/usr/local/lib/librpmbuild-5.2.so
  0   1837                       open:entry rpmbuild
/usr/local/lib/librpm-5.2.so
  0   1837                       open:entry rpmbuild
/usr/local/lib/librpmdb-5.2.so
  0   1837                       open:entry rpmbuild
/usr/local/lib/librpmio-5.2.so
  0   1837                       open:entry rpmbuild /usr/sfw/lib/libgcc_s.so.1
  0   1837                       open:entry rpmbuild
/export/home/sriram/altopt/lib/libpopt.so.0
  0   1837                       open:entry rpmbuild /usr/lib/libc.so.1
  0   1837                       open:entry rpmbuild
/usr/local/lib/librpmmisc-5.2.so
  0   1837                       open:entry rpmbuild
/export/home/sriram/altopt/lib/libbeecrypt.so.7
  0   1837                       open:entry rpmbuild /usr/sfw/lib/libstdc++.so.6
  0   1837                       open:entry rpmbuild /usr/lib/libresolv.so.2
  0   1837                       open:entry rpmbuild /usr/lib/libgen.so.1
  0   1837                       open:entry rpmbuild /usr/lib/libneon.so.27
  0   1837                       open:entry rpmbuild /usr/lib/libssl.so.0.9.8
  0   1837                       open:entry rpmbuild /usr/lib/libcrypto.so.0.9.8
  0   1837                       open:entry rpmbuild /usr/lib/libproxy.so.0
  0   1837                       open:entry rpmbuild /usr/lib/libxml2.so.2
  0   1837                       open:entry rpmbuild /usr/lib/libz.so.1
  0   1837                       open:entry rpmbuild /usr/lib/libpthread.so.1
  0   1837                       open:entry rpmbuild /usr/lib/libm.so.2
  0   1837                       open:entry rpmbuild /usr/lib/libsocket.so.1
  0   1837                       open:entry rpmbuild /usr/lib/libnsl.so.1
  0   2237                     open64:entry rpmbuild /usr/local/lib/rpm/rpmpopt
  0   2237                     open64:entry rpmbuild
/usr/local/lib/rpm/%{_target}/rpmpopt
dtrace: error on enabled probe ID 3 (ID 1955: syscall::openat:entry):
invalid address (0xffd19652) in action #2 at DIF offset 28
  0   2237                     open64:entry rpmbuild /etc/rpm/rpmpopt
  0   2237                     open64:entry rpmbuild /etc/rpm/%{_target}/rpmpopt
  0   2237                     open64:entry rpmbuild ~/.rpmpopt
  0   2237                     open64:entry rpmbuild
/export/home/sriram/altopt/etc/popt
  0   2237                     open64:entry rpmbuild /etc/popt
  0   2237                     open64:entry rpmbuild /home/sriram/.popt
  0   2237                     open64:entry rpmbuild /etc/rpm/platform
  0   2237                     open64:entry rpmbuild /usr/local/lib/rpm/macros
  0   2237                     open64:entry rpmbuild
/usr/local/lib/rpm/i86pc-sunos/macros
dtrace: error on enabled probe ID 3 (ID 1955: syscall::openat:entry):
invalid address (0xffd19652) in action #2 at DIF offset 28
  0   2237                     open64:entry rpmbuild /etc/rpm/macros
  0   2237                     open64:entry rpmbuild /etc/rpm/i86pc-sunos/macros
  0   2237                     open64:entry rpmbuild /home/sriram/.rpmmacros

If I want to set /workspace/rpmwork as the topdir (which would contain
SPECS, SOURCES, RPMS, etc), what should the contents of .rpmmacros be
?

I've tried the following:
topdir=/workspace/rpmwork
_topdir=/workspace/rpmwork
topdir:/workspace/rpmwork
_topdir:/workspace/rpmwork

None of the above have worked. What am I getting wrong ?

-- Ram

On Sat, Jan 1, 2011 at 10:16 PM, Jeff Johnson <n3npq@mac.com> wrote:
>
> On Jan 1, 2011, at 11:11 AM, Sriram Narayanan wrote:
>
>> Hi:
>>
>> This is a newbie question. I presently have ~/.rpmrc containing
>> _topdir:/workspace
>>
>
> You want ~/.rpmmacros.
>
> Check with
>        strace -e open rpmbuild ...
> if you run into issues figgering out what paths are open'ed.
>
> rpmbuild is _WAY_ too "Have it your own way!" flexible imho.
>
> 73 de Jeff
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> User Communication List                             rpm-users@rpm5.org
>



-- 
Belenix: www.belenix.org
Received on Sat Jan 1 18:54:12 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.