Discussion topic for RPM packaging 101

Please use this topic to discuss the RPM packaging classroom session:


Hello @ankursinha
I’ve a question: how can I make the rpmbuild and other rpm commands look to the actual directory?
Not the ~/rpmbuild directory.

The answer, I guess, is
fedpkg mockbuild


Try setting these in ~/.rpmmacros:

%_topdir %{getenv:PWD}
%_sourcedir %{_topdir}
%_specdir %{_topdir}
%_srcrpmdir %{_topdir}
%_builddir %{_topdir}/BUILD
%_buildrootdir %{_topdir}/BUILDROOT

They set these to directories in the current folder, so when you run rpmbuild in a folder, it’ll look there instead of the default ~/rpmbuild folder.

This is only for rpmbuild though. rpm commands are different and look elsewhere.

1 Like

The video is here folks:

The first half of the video feels like he wanders off topic too much. Then I was disappointed at the end because it didn’t cover enough. I felt like if he stayed on topic more in the first half, he could have covered a lot more.

I’ve watched this Classroom several times since its first hit Youtube.