Discussion topic for RPM packaging 101

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

7 Likes

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

2 Likes

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: