Ask Your Question
1

Why this rpmbuild error ?

asked 2011-12-05 13:02:03 -0500

rashid gravatar image

updated 2011-12-05 13:24:28 -0500

mether gravatar image

I am trying to build the rpm package while running the rpmbuild --sign --ba test.spec

I receive the below error:


[rashid@localhost SPECS]$ rpmbuild --sign -ba test.spec + umask 022 + cd /home/rashid/rpmbuild/BUILD + LANG=C + export LANG + unset DISPLAY + cd /home/rashid/rpmbuild/BUILD + rm -rf test-1.0 + /usr/bin/gzip -dc /home/rashid/rpmbuild/SOURCES/test-1.0.tar.gz + /bin/tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd test-1.0 + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + exit 0 + umask 022 + cd /home/rashid/rpmbuild/BUILD + cd test-1.0 + LANG=C + export LANG + unset DISPLAY + CFLAGS='-O2 -g -pipe -Wall -Wp,-DFORTIFYSOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' + export CFLAGS + CXXFLAGS='-O2 -g -pipe -Wall -Wp,-DFORTIFYSOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' + export CXXFLAGS + FFLAGS='-O2 -g -pipe -Wall -Wp,-DFORTIFYSOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -I/usr/lib64/gfortran/modules' + export FFLAGS + LDFLAGS='-Wl,-z,relro ' + export LDFLAGS + ./configure --build=x8664-unknown-linux-gnu --host=x8664-unknown-linux-gnu --program-prefix= --disable-dependency-tracking --disable-silent-rules --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info /var/tmp/rpm-tmp.CF0wrI: line 38: ./configure: No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.CF0wrI (%build) Bad exit status from /var/tmp/rpm-tmp.CF0wrI (%build) rpm: --addsign: No such file or directory

[rashid@localhost SPECS]$


my test.spec file is given below:

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& [rashid@localhost SPECS]$ cat test.spec

%define debug_package %{nil} Name: test
Version: 1.0 Release: 1%{?dist} Summary: A test Package

Group: testing License: GPL URL: http://www.localhost.com/testing Source0: %{name}-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

BuildRequires: /bin/rm, /bin/mkdir, /bin/cp Requires: /bin/bash, /bin/date

%description A testing package meant to deploy a single file

%prep %setup -q

%build %configure make %{?smpmflags}

%install rm -rf $RPMBUILDROOT

make install DESTDIR=$RPMBUILDROOT

mkdir -p $RPMBUILDROOT/usr/local/bin cp myscript $RPMBUILDROOT/usr/local/bin

%clean rm -rf $RPMBUILDROOT

%files %defattr(-,root,root,-)

%doc

%attr(0775,root,root)/usr/local/bin/myscript

%changelog

[rashid@localhost SPECS]$ &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

kindly help me to sort out this problem

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-12-05 13:11:38 -0500

sgordon gravatar image

updated 2011-12-05 14:04:39 -0500

You are using the --sign option to rpmbuild but don't have a GPG key set up. To view your GPG keys use:

$ gpg --list-secret-keys

Then add the details for the key you want to use to ~/.rpmmacros, for example:

%_signature     gpg
%_gpg_name      My Key Name

Once this is done try the rpmbuild command again. Alternatively dropping the --sign option when calling rpmbuild will allow you to build the RPM, albeit unsigned.

There are some further notes on this in the draft documentation available here:

http://docs.fedoraproject.org/en-US/FedoraDraftDocumentation/0.1/html/RPM_Guide/ch11s04.html

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-12-05 13:02:03 -0500

Seen: 3,006 times

Last updated: Dec 05 '11