[CentOS] rpmbuild question
Gordon Messmer
gordon.messmer at gmail.com
Wed Oct 26 22:28:30 UTC 2016
On 10/26/2016 10:07 AM, m.roth at 5-cent.us wrote:
> Trying to build a package from a gzipped tarball of a python package.
> I'm trying to build it in /root/rpmbuild.
To echo Frank's advice: don't do that. Build rpms as a non-root user.
Consider using "mock", especially if you intend to distribute your packages.
> Python has a way to build it,
> but it creates its own tree, with a clone of the rpmbuild tree under
> *that*.
It sounds like you're using "setup.py bdist_rpm". When you do that,
python's setuptools will create a temporary rpm build environment in
./build/. You should also get the src.rpm in ./dist/
If you want to build the package in your own rpmroot, just take the
src.rpm from ./dist/ and rebuild it.
More information about the CentOS
mailing list