I am trying to build and sign an RPM. I created my .rpmmacro file in the location I am building /path/to/macrodir/ Then I am using --define with _topdir referring to /path/to/macrodir/
If I build the RPM without giving --sign; its working fine.
rpmbuild --define "_topdir /path/to/macrodir" -bb spec
The .rpmmacro is in macrodir and contains
%_signature gpg
%_gpg_name Name (Comment) <emailid>
%_gpgpath pathtognupgfolder
%_gpgbin locationofgpgexec
If I include --sign then its throwing the error
rpmbuild --define "_topdir /path/to/macrodir" -bb --sign spec
error: You must set "%_gpg_name" in your macro file
I am not able to see what I am doing wrong. Any suggestions?