LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2012, 01:55 AM   #1
vivekvraj
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Error displayed on creating rpm package on Red Hat Linux.


Hi,

I am very new to rpm packaging (new learner ).
Please find below mentioned spec file (apache-tomcat-5.5.35-src.spec) content:
------------------------------
Summary: Apache Tomcat source to bytecode compiler
%define version 5.5.35
Group: Development/Languages
Name: ApacheTomcat
Prefix: /usr
Provides: ApacheTomcat
Release: 1
Source: apache-tomcat-5.5.35-src.tar.gz
URL: http://tomcat.apache.org/download-55.cgi
Version: 5.5.35
Buildroot: /root/ApacheTomcat/ApacheTomcat-5.5.35
License: /apache-tomcat-5.5.35-src.tar.gz/apache-tomcat-5.5.35-src/LICENSE
%description
This is the top-level entry point of the documentation bundle for the Apache Tomcat Servlet/JSP container. Apache Tomcat version 5.5 implements the Servlet 2.4 and JavaServer Pages 2.0 specifications from the Java Community Process, and includes many additional features that make it a useful platform for developing and deploying web applications and web services.

%prep
%setup -q

%build
./configure CXXFLAGS=-O3 --prefix=$RPM_BUILD_ROOT/usr
make

%install
rm -fr $RPM_BUILD_ROOT
make install

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(0444,root,root)
/usr/bin/ApacheTomcat
-------------------------------------

while building rpm using the command 'rpmbuild -bb spec_file_name ' it displayed :

-----------------------------------
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.78993
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf ApacheTomcat-5.5.35
+ /usr/bin/gzip -dc /usr/src/redhat/SOURCES/apache-tomcat-5.5.35-src.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd ApacheTomcat-5.5.35
/var/tmp/rpm-tmp.78993: line 36: cd: ApacheTomcat-5.5.35: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.78993 (%prep)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.78993 (%prep)
---------------------------------------

Please help me to resolve this and let me know why this happened.... Thanks in advance...
 
Old 08-22-2012, 10:04 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
Quote:
Originally Posted by vivekvraj View Post
Code:
+ cd /usr/src/redhat/BUILD
Please don't build packages as root but as unprivileged user.



Quote:
Originally Posted by vivekvraj View Post
Code:
+ cd ApacheTomcat-5.5.35
/var/tmp/rpm-tmp.78993: line 36: cd: ApacheTomcat-5.5.35: No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.78993 (%prep)
Please use lowercase directive, file and directory names in .spec files except where required (like BestCrypt or BCWipe .src.rpms).


Also:
- License is a type (GPL, MIT, BSD) and not a file.
- Name may be "tomcat", RHEL5(-like) ship tomcat5-* packages (tomcat5, tomcat5-admin-webapps, tomcat5-jsp-2.0-api-javadoc, tomcat5-servlet-2.4-api, you get the idea).
- %files section looks odd, it most likely doesn't contain only "/usr/bin/ApacheTomcat". Best read some basic RPM-packager docs, Fedora has a good one.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install src.rpm package on Red hat Linux? asimpeter Linux - Newbie 10 09-21-2011 09:57 AM
Error while creating RPM package kavinsiva Linux - Newbie 3 08-21-2009 06:54 AM
Can Red Hat Enterprise Linux 4 utilize Fedora 9 / 10 RPM package johncsl82 Red Hat 5 02-16-2009 09:31 PM
Firefox 0.9.1/0.9.2 rpm package for Red Hat 9.0 ? southpole.dk Linux - Software 2 07-16-2004 09:10 AM


All times are GMT -5. The time now is 09:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration