I'm trying to build rpms from src.rpms and tarballs as a non-root user in mandrake 9.1.
So far I've mirrored /usr/src/rpm/ (with internal folders etc) in my home dir and created a .rpmmacros file (also in home dir) which points the top-level directory for rpm and rpmbuild to /home/me/rpm by running;
[me@mybox]$ echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros
but I'm getting inaccessible temp errors (verbose output below)
Code:
[me@mybox programs]$ rpmbuild -vv -ta gaim-0.70.tar.gz
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: ========== +++ gaim-0.70-1
D: opening db index /var/lib/rpm/Depends create mode=0x0
D: opening db index /var/lib/rpm/Providename rdonly mode=0x0
D: Requires: libao-devel YES (db provides)
D: Requires: libgtk+2.0_0-devel YES (db provides)
D: Requires: gtkspell-devel YES (db provides)
D: Requires: libtool YES (db provides)
D: Requires: audiofile-devel YES (db provides)
D: Requires: pkgconfig YES (db provides)
D: Requires: libnss3-devel YES (db provides)
D: opening db index /var/lib/rpm/Conflictname rdonly mode=0x0
D: closed db index /var/lib/rpm/Depends
D: closed db index /var/lib/rpm/Conflictname
D: closed db index /var/lib/rpm/Providename
D: closed db index /var/lib/rpm/Packages
error: Unable to open temp file.
RPM build errors:
Unable to open temp file.
How do I tell it to use /home/me/tmp for building?
Would creating a rpm database in my home folder work (i.e. look there rather than in /var/lib/rpms for dependencies etc) - a couple of docs mentioned this, but implied it wasn't necessary. I haven't had a chance to try it yet (not at home).
BTW: I know the package is ok, it has a spec file and builds as root, but I'm fed up with su-ing just to build a bloody package (besides, it's _frowned upon_ to build as root).