Hi, folks,
Trying to build a package from a gzipped tarball of a python package. I'm trying to build it in /root/rpmbuild. Python has a way to build it, but it creates its own tree, with a clone of the rpmbuild tree under *that*.
So, from the specfile, I'm trying to understand, after much googling, what I need to change the Source and BuildRoot to. My latest try for the latter is BuildRoot: %{_builddir}/BUILD/%{name}-%{version}-%{release} For Source0, I want to use the file in SOURCES.
Anyone got a better example than what I've been googling?
mark
On Wed, 26 Oct 2016 13:07:43 -0400 m.roth@5-cent.us wrote:
I'm trying to build it in /root/rpmbuild.
Don't do that. Install rpmdevtools so you build it under your home directory and avoid blowing up your system if there's an error.
On 10/26/2016 10:07 AM, m.roth@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.