Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create rpm package requires sudo permission #72

Open
dragon512 opened this issue Oct 6, 2020 · 0 comments
Open

create rpm package requires sudo permission #72

dragon512 opened this issue Oct 6, 2020 · 0 comments

Comments

@dragon512
Copy link

Expected Behavior

The command of invirtualenv --deploy_conf deploy.conf create_package rpm
should just work without elevation

Current Behavior

However, it fails with

error: failed to create directory %{_specdir}: /rpmbuild/SPECS: Permission denied
...
  File "/home/jkenny/.pyenv/versions/3.8.2/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/rpmbuild', '-ba', 'package.spec']' returned non-zero exit status 1.

Possible Solution

One solution to work around this is to make a /rpmbuild directory and set permission to allow this to work. However this requires sudo right which one may not have and is an undocumented step to have this tool work.

Ideally, an option can be passed to rpmbuild to build in the current directory ie
rpmbuild --define "_topdir <somedir>" ...

The docs should be updated to explain the been to create a directory, or the tool should not build in an area that requires elevated permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant