Question about rpmbuild --root

2011-02-13 Thread Eric MSP Veith
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello list,

I try to build in a chroot with an old RPM-5.1.9 using 

sudo rpmbuild --root=/var/tmp/eglibc-2.13.buildroot -ba eglibc.spec

Basically, what I want to know, is: Am I doing something completely wrong 
besides using an old and dusty RPM version? ;-)

eglibc.spec resides in the current directory alias 
~/gnyupkg/eglibc/eglibc.spec.

What happens is:

- ---%---
~/gnyupkg/eglibc $ sudo rpmbuild --root=/var/tmp/eglibc-2.13.buildroot  -ba 
eglibc.spec 21 | tee build.log
Fetching(Source3): bindresvport.blacklist
error: Fetching Source3 failed: Unknown or unexpected error
error: Missing Source3: bindresvport.blacklist: No such file or directory
Fetching(Source2): nsswitch.conf
error: Fetching Source2 failed: Unknown or unexpected error
error: Missing Source2: nsswitch.conf: No such file or directory
Fetching(Source1): nscd.ii
error: Fetching Source1 failed: Unknown or unexpected error
error: Missing Source1: nscd.ii: No such file or directory
Fetching(Source0): eglibc-2.13.12839.tar.bz2
error: Fetching Source0 failed: Unknown or unexpected error
error: Missing Source0: eglibc-2.13.12839.tar.bz2: No such file or directory
Executing(%prep): /bin/bash -e /var/tmp/eglibc-2.13.buildroot/var/tmp/rpm-
tmp.8989
+ umask 022
+ cd /usr/src/rpm/BUILD
+ exit 0
error: Bad file: /usr/src/rpm/SOURCES/bindresvport.blacklist: No such file 
or directory
error: Bad file: /usr/src/rpm/SOURCES/nsswitch.conf: No such file or 
directory
error: Bad file: /usr/src/rpm/SOURCES/nscd.ii: No such file or directory
error: Bad file: /usr/src/rpm/SOURCES/eglibc-2.13.12839.tar.bz2: No such 
file or directory
- ---%---

The sources mentioned are residing in $CHROOT/usr/src/rpm/SOURCES, but not 
in /usr/src/rpm/SOURCES. The $CHROOT itself is populated only with the bare 
minimum, meaning that there's also no RPM installation in the buildroot. (I 
guessed from some mails that this should theoretically be possible?) Having 
attached strace to the process, I see that there's no actual call to 
chroot(2).

Any hints, besides upgrading? (On the agenda on that system.)

TIA!

Eric
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBAgAGBQJNWC/PAAoJEIXD2TZ1epVBZyUQAIzVCYcN6Ja9Q49rIXG/QOBO
K1k4HXTQNLT/ZR7TsLbf2PzsoIMK+Rrfe67Bd5LQRqbJ7EwdcS67uTxuf8BQR+Nd
jsPayMOSz91aiu6Dc9ZgLTe3Yr+w6yFZgKx/oTNjmIb7V+UX980EXOww0oiFA20g
OUNl6ZL9bBud/zqHIOEztxAESk5YpWX7eofkC6+mihyrEiuprl8d+5Mb3zGSm6oq
FT0YHiE36jxjxFC39jzSlN+TfjH30ZnTEsFERgkWbP6oguFtBRk5mvZWyWUzaUPK
v/hjWw9U8iKXzX4jrOPomT6RISgRUSbXibj+5+AacJgM2SkH8W5k75pDf19aFwgg
OtgJPrlghUE0RSUOSjgahflTjVZguGmv2j1gGyB2SHoStHuAP3e2hv740Vi5VqQN
qhu+uWx5zs5RFia6z+pq56qhfAJj1aUlD9qYQDmdcf11v7h3nNLLXgGmgh0bxO/l
kuMlif+8pNi0ABQh05PdU2MDwcTbLHqrid9dR4R5L0JCYIpIgOOlCMW7OUni5mUC
085kwlJUO/bnq1InQiMpAOI9grsBrW/aKRk5BLVGS2MC++BV17yHsgq5LKz2W0BB
cyZ0jXu1tjpyFnt6NP8c8anui0SF857EybVagy7gMvKoFVBDU+Qa9B8LYTVKtGTP
JrOCoAGDaLqlsEBmng+p
=I7Q8
-END PGP SIGNATURE-
__
RPM Package Managerhttp://rpm5.org
User Communication List rpm-users@rpm5.org


Re: Question about rpmbuild --root

2011-02-13 Thread Jeff Johnson

On Feb 13, 2011, at 2:23 PM, Eric MSP Veith wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello list,
 
 I try to build in a chroot with an old RPM-5.1.9 using 
 
   sudo rpmbuild --root=/var/tmp/eglibc-2.13.buildroot -ba eglibc.spec
 
 Basically, what I want to know, is: Am I doing something completely wrong 
 besides using an old and dusty RPM version? ;-)

Depends. --root (as wired in rpmbuild) isn't doing what you think
its doing. What rpmbuild --root is actually attempting is considerably
harder to explain, dates back to 2000 or so ...


Try
chroot /wherever rpmbuild ...
if you want/need single invocation functionality. But you
likely just want to enter the chroot, and use rpmbuild inside.
chroot /wherever
rpmbuild ...

hth

73 de Jeff

smime.p7s
Description: S/MIME cryptographic signature