LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rpmbuild error: Bad exit status (https://www.linuxquestions.org/questions/linux-newbie-8/rpmbuild-error-bad-exit-status-775135/)

jonaskellens 12-12-2009 06:29 AM

rpmbuild error: Bad exit status
 
To install Open-Xchange, java-1.5.0.15 SDK is needed so I'm following a guide to create rpm's. I ran into the following error :

Code:

[root@ox ~]# rpmbuild --rebuild java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm
Installing java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID c431416d
warning: user jasonc does not exist - using root
warning: group jasonc does not exist - using root
warning: user jasonc does not exist - using root
warning: group jasonc does not exist - using root
warning: user jasonc does not exist - using root
warning: group jasonc does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.90171
+ umask 022
+ cd /usr/src/redhat/BUILD
+ rm -rf /usr/src/redhat/BUILD/jdk1.5.0_15
+ export MORE=10000
+ MORE=10000
+ sh /usr/src/redhat/SOURCES/jdk-1_5_0_15-linux-i586.bin
sh: /usr/src/redhat/SOURCES/jdk-1_5_0_15-linux-i586.bin: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.90171 (%prep)


RPM build errors:
    InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID c431416d
    user jasonc does not exist - using root
    group jasonc does not exist - using root
    user jasonc does not exist - using root
    group jasonc does not exist - using root
    user jasonc does not exist - using root
    group jasonc does not exist - using root
    Bad exit status from /var/tmp/rpm-tmp.90171 (%prep)

Code:

[root@ox ~]# ls -l /root/rpmbuild/SOURCES/
-rwxr-xr-x 1 root root 49647629 Dec 12 14:13 jdk-1_5_0_15-linux-i586.bin
[root@ox ~]# ls -l /root/
-rw-r--r-- 1 root root 17806 Jun 12  2008 java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm
drwxr-xr-x 3 root root  4096 Dec 12 14:04 rpmbuild

Can you advise ??

Thanks.

unSpawn 12-12-2009 07:00 AM

- Not build packages as root account user,
- Header V3 DSA signature: NOKEY: informational: install the GnuPG key,
- user does not exist: informational, not a fatal error,
- mv /root/rpmbuild/SOURCES/jdk-1_5_0_15-linux-i586.bin /home/unprivileged_user/redhat/SOURCES/, set up shop for building packages the right way then try again from the unprivileged_user account?

jonaskellens 12-12-2009 07:12 AM

Code:

[rpmbuilder@ox ~]$ rpmbuild --rebuild java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm
Installing java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID c431416d
error: cannot write to %sourcedir /usr/src/redhat/SOURCES
error: java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm cannot be installed
[rpmbuilder@ox ~]$ tree
.
|-- java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm
`-- redhat
    `-- SOURCES
        `-- jdk-1_5_0_15-linux-i586.bin

2 directories, 2 files

How do I change this %sourcedir ??

unSpawn 12-12-2009 09:58 AM

Quote:

Originally Posted by jonaskellens (Post 3788750)
How do I change this %sourcedir ??

In either your unprivileged users ~/.rpmmcros or in the .spec file used:
http://www.linuxquestions.org/questi...14/#post503358
http://www.linuxquestions.org/questi...4/#post3410037
http://www.linuxquestions.org/questi...6/#post3758229
..or Knudfl's posts in http://www.linuxquestions.org/questi...at-5.1-766486/

knudfl 12-12-2009 06:15 PM

How To ..
http://wiki.centos.org/HowTos/JavaOnCentOS

§ 3.4. Setting up the rpm build environment in /home/<user>

§ 3.5.1. Which says : download "java-<version>..bin"
and move it to /home/<user>/rpms/SOURCES/
( or /home/<user>/rpmbuild/SOURCES/ ).

From post # 1 :
Quote:

..SOURCES/jdk-1_5_0_15-linux-i586.bin: No such file or directory
:: The "bin file" must be downloaded beforehand ! ( Java jdk size = 65 MB.)

The 17 kB package java-1.5.0-sun-1.5.0.15-1jpp.nosrc.rpm :
contains five small "text files", used for the build.
.....

BubbaDoom 12-29-2009 03:01 PM

Problem with Java 1.6.0_11 on Centos5.3 x64
 
I'm having a strange problem building my Java rpms.

I setup the rpmbuild structure for my non-root user (dude).

.rpmmacros contains:
%_topdir /home/dude/rpmbuild
%_tmppath %{_topdir}/tmp

I put "java-1.6.0-sun-1.6.0.11-1jpp.nosrc.rpm" in ~/rpmbuild/.

I put "jdk-6u11-linux-x64.bin" in ~/rpmbuild/SOURCES/.

When I try to build the rpms, I get
$ rpmbuild --rebuild java-1.6.0-sun-1.6.0.11-1jpp.nosrc.rpm

Installing java-1.6.0-sun-1.6.0.11-1jpp.nosrc.rpm
warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID c431416d
warning: user jasonc does not exist - using root
warning: group jasonc does not exist - using root
warning: user jasonc does not exist - using root
warning: group jasonc does not exist - using root
warning: user jasonc does not exist - using root
warning: group jasonc does not exist - using root
Executing(%prep): /bin/sh -e /home/dude/rpmbuild/tmp/rpm-tmp.10035
+ umask 022
+ cd /home/dude/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ rm -rf /home/dude/rpmbuild/BUILD/jdk1.6.0_11
+ export MORE=10000
+ MORE=10000
+ sh /home/dude/rpmbuild/SOURCES/jdk-6u11-linux-x64.bin
error: can't create transaction lock on /var/lib/rpm/__db.000
+ cd /home/dude/rpmbuild/BUILD
+ cd jdk1.6.0_11
/home/dude/rpmbuild/tmp/rpm-tmp.10035: line 35: cd: jdk1.6.0_11: No such file or directory

error: Bad exit status from /home/dude/rpmbuild/tmp/rpm-tmp.10035 (%prep)

I have no idea why it didn't create "jdk1.6.0_11" in BUILD... what am I doing wrong? (or what other configs should I post?)

knudfl 12-31-2009 02:16 PM

BubbaDoom .. Welcome to LQ.
Quote:

... what am I doing wrong?
Nothing, but there seem to be a mismatch in file names :
rpms/BUILD/<jdk-name> .. and the name figured out by
rpms/SPECS/java-1.6.0-sun.spec .

Packages are available for EL5.x .. jdk6 update 17
http://ftp.scientificlinux.org/linux...fcs.x86_64.rpm
> > jdk-1.6.0_17-fcs.x86_64.rpm

jdk6 update 13
http://ftp.scientificlinux.org/linux...fcs.x86_64.rpm
> > jdk-1.6.0_13-fcs.x86_64.rpm

jdk6 update 12
http://ftp.scientificlinux.org/linux...fcs.x86_64.rpm

.. Found no "11" http://ftp.scientificlinux.org/linux/scientific/
( "10" is available.)
Scientific Linux (SL 53) is one of the free copies of Redhat EL 5.3,
and apparently they build the packages .. and frees us for the work.
.....


All times are GMT -5. The time now is 01:04 PM.