linux - rpmbuild outputting to /root/rpmbuild directory -


i have build rpm package drivers. need build rpm .tar.gz archive. tar ball contains .spec file. have set rpmbuild environment described here: http://wiki.centos.org/howtos/setuprpmbuildenvironment

my directory structure thus:

/home/rpmbuild /home/rpmbuild/build /home/rpmbuild/rpms /home/rpmbuild/sources /home/rpmbuild/specs /home/rpmbuild/srpms 

the .tar.gz file contains specfile , placed in /home/rpmbuild/sources

if navigate directory , run following, rpm package built correctly, placed in /root/rpmbuild/rpms instead of /home/rpmbuild/rpms (where expected be).

sudo rpmbuild -ta driver.tar.gz 

i assume because ran rpmbuild sudo. thinking of correctly? there way direct build in /home/rpmbuild instead?

i know bad practice use rpmbuild root, if don't run root run many errors (not having permissions access directories owned root - /tmp/orbit-root). seems more difficult change permissions of each of these directories change them back.

is correct way go this? appreciate help.

if needing non-root write permission on system directories, %install scriptlet not installing %{buildroot}.

you need patch build install %{buildroot}.

for autoconf generated makefiles done "make destdir=%{buildroot} …"


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -