Hi T.J.
I think this is caused by an error in the .spec file.
The error is saying it needs %_gpg_name defined in the spec file.
From the man page on rpm
rpm --addsign|--resign PACKAGE_FILE ...
Both of the --addsign and --resign options generate and insert new
signatures for each package PACKAGE_FILE
given, replacing any existing signatures. There are two options for
historical reasons, there is no differ-
ence in behavior currently.
USING GPG TO SIGN PACKAGES
In order to sign packages using GPG, rpm must be configured to run GPG
and be able to find a key ring with
the appropriate keys. By default, rpm uses the same conventions as GPG
to find key rings, namely the
$GNUPGHOME environment variable. If your key rings are not located
where GPG expects them to be, you will
need to configure the macro %_gpg_path to be the location of the GPG key
rings to use.
For compatibility with older versions of GPG, PGP, and rpm, only V3
OpenPGP signature packets should be
configured. Either DSA or RSA verification algorithms can be used, but
DSA is preferred.
If you want to be able to sign packages you create yourself, you also
need to create your own public and
secret key pair (see the GPG manual). You will also need to configure
the rpm macros
%_signature
The signature type. Right now only gpg and pgp are supported.
%_gpg_name
The name of the "user" whose key you wish to use to sign your
packages.
For example, to be able to use GPG to sign packages as the user "John Doe
<[email protected]>" from the key
rings located in /etc/rpm/.gpg using the executable /usr/bin/gpg you
would include
%_signature gpg
%_gpg_path /etc/rpm/.gpg
%_gpg_name John Doe <[email protected]>
%__gpg /usr/bin/gpg
in a macro configuration file. Use /etc/rpm/macros for per-system
configuration and ~/.rpmmacros for per-
user configuration. Typically it's sufficient to set just %_gpg_name.
On 08/26/2013 08:33 AM, T.J. Yang wrote:
Hi
I am not familiar with tcl "expect" script to sign the final package.
Can someone advise me how to get rid of following error message ?
<snipped>
Wrote: /home/tjyang/rpmbuild/RPMS/x86_64/ntopng-1.0.1_6710-6710.x86_64.rpm
Wrote:
home/tjyang/rpmbuild/RPMS/x86_64/ntopng-debuginfo-1.0.1_6710-6710.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.NPJH72
+ umask 022
+ cd /home/tjyang/rpmbuild/BUILD
+ cd ntopng-1.0.1_6710
+ rm -fr /home/tjyang/rpmbuild/BUILDROOT/ntopng-1.0.1_6710-6710.x86_64
+ exit 0
spawn rpm --addsign
/home/tjyang/rpmbuild/RPMS/x86_64/ntopng-1.0.1_6710-6710.x86_64.rpm
error: You must set "%_gpg_name" in your macro file
Pass phrase check failed
send: spawn id exp4 not open
while executing
"send -- "\r""
(file "./packages/rpm-sign.exp" line 7)
make: *** [build-rpm] Error 1
-bash-4.1$
--
T.J. Yang
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev
--
Stephen Clark
*NetWolves*
Director of Technology
Phone: 813-579-3200
Fax: 813-882-0209
Email: [email protected]
http://www.netwolves.com
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev