I am following Munge installation guide I downloaded the tar.gz file but i am unable to create three rpm binaries as mentioned in the tutorials because of this
sudo rpmbuild -tb --clean munge-0.5.12-11-g4699a9f.tar.gz
error: File /home/user1/Downloads/munge-0.5.12.tar.xz: No such file or directory
In home/rpmbuild/SPEC/munge.spec is created. But I am not getting where to edit. I referred answer to this question by Thomas Dickey it says to override the location of BUILDROOT directory not sure how one does that and according to answer by muschy we need to add %install so i did that as well
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
touch %{buildroot}/%{_sysconfdir}/munge/munge.key
touch %{buildroot}/%{_localstatedir}/lib/munge/munge.seed
touch %{buildroot}/%{_localstatedir}/log/munge/munged.log
touch %{buildroot}/%{_localstatedir}/run/munge/munged.pid
rm -f %{buildroot}/%{_sysconfdir}/sysconfig/munge
rm -f %{buildroot}/%{_initddir}/munge
Any help greatly appreciated.
Calling "rpmbuild -tb" is quite unusual and barely documented. So I think it does:
*.spec
from tar file into ~/rpmbuild/SPECS/rpmbuild -ba ~/rpmbuild/SOURCES/that_extracted.spec
And because you spec contains:
Then rpmbuild is looking for
munge-0.5.12.tar.xz
but your tar file is actually namedmunge-0.5.12-11-g4699a9f.tar.gz