Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error trying to sign RPM

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?

like image 914
vpram86 Avatar asked Aug 10 '12 14:08

vpram86


1 Answers

As the OP mentioned in a comment, setting the %gpg_name macro via a --define flag to rpm/rpmbuild/rpmsign works.

rpm --define "_gpg_name <your email or name>" --addsign <RPM to sign>

like image 97
dfarrell07 Avatar answered Sep 20 '22 14:09

dfarrell07