Thursday 15 March 2012

RPM Build - Permission Denied -



RPM Build - Permission Denied -

i have python-based svn pre-commit script generates rpmbuild .spec file , runs rpmbuild -bb my.spec via subprocess. current state is:

1) when doing svn commit (svn on ssh) remotely rpmbuild fails with...

error: failed create directory %{_topdir}: /rpmbuild: permission denied

2) when rpmbuild -bb my.spec (local on svn server) completes successfully

i have ~/.rpmmacros...

%_topdir /tmp/rpmbuild

when doing #2 (above) rpmbuild create build, buildroot, rpms, sources, specs, , srpms under /tmp/rpmbuild , rpm created in rpms.

from command line, if rpm --showrc dirs expect (and should why process completes successfully).

but have different results process running via pre-commit...

command line... -14: _topdir /tmp/rpmbuild

pre-commit... -14: _topdir %{getenv:home}/rpmbuild

i suspect problem , not know how right this. tried:

1) set path in my.spec... %define _topdir /tmp/rpmbuild gave same permission denied error.

2) set path in rpmbuild command... rpmbuild --define='_topdir /tmp/rpmbuild' resulted in error: macro % has illegal name (%define).

your expertise in resolving appreciated; much!

that error means $home unset when pre-commit runs (so .rpmmacros file isn't beingness used , ${getenv:home} evaluating empty string).

i don't know why (perhaps svn change) seems issue.

rpm permission-denied rpmbuild rpm-spec

No comments:

Post a Comment