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 04-14-2010, 02:36 AM   #1
Rabiya Tahir
LQ Newbie
 
Registered: Apr 2010
Location: Karachi Pakistan
Distribution: CentOS
Posts: 2

Rep: Reputation: 0
getting problem in building RPM :(


well, em just new to linux and working on the trixbox server. . i have made some editing in the php files of the packed rpm of trixbox and wana see that whether these editing are fruitfull by repacking the rpm but em getting the below mention error while running the rpmbuild command after done with making spec file and copying say xxxx.tar.gz in the SOURCE directory:

[rabiya@trixbox1 bilal]$ rpmbuild -v -bb --clean SPECS/abcd.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9334
+ umask 022
+ cd /home/bilal/BUILD
+ cd /home/bilal/BUILD
+ rm -rf abcd-1.1
+ /bin/gzip -dc /home/bilal/SOURCES/abcd-1.1.tar.gz
+ tar -xf -
tar: about.php: Cannot open: File exists
tar: adLDAP.php: Cannot open: File exists
tar: Anakin.GIF: Cannot open: File exists
tar: app_cbmysql.c: Cannot open: File exists
tar: app_cbmysql.o: Cannot open: File exists
tar: app_cbmysql.so: Cannot open: File exists
tar: asterisk.gif: Cannot open: File exists
tar: btn_top_12x12.gif: Cannot open: File exists
tar: button-search.gif: Cannot open: File exists
tar: call_operator.php: Cannot open: File exists
tar: cbEnd.php: Cannot open: File exists
tar: cb-extensions.conf.sample: Cannot open: File exists
tar: cbmysql.conf: Cannot open: File exists
tar: CHANGELOG: Cannot open: File exists
tar: conf_add.php: Cannot open: File exists
tar: conf_cdr.php: Cannot open: File exists
tar: Error exit delayed from previous errors
error: Bad exit status from /var/tmp/rpm-tmp.9334 (%prep)


kindly help me out,where em doing wrong
 
Old 04-14-2010, 07:43 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Can you please post your spec file ? ...
 
Old 04-14-2010, 12:38 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,943

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
Originally Posted by Rabiya Tahir View Post
well, em just new to linux and working on the trixbox server. . i have made some editing in the php files of the packed rpm of trixbox and wana see that whether these editing are fruitfull by repacking the rpm but em getting the below mention error while running the rpmbuild command after done with making spec file and copying say xxxx.tar.gz in the SOURCE directory:

[rabiya@trixbox1 bilal]$ rpmbuild -v -bb --clean SPECS/abcd.spec
tar: conf_cdr.php: Cannot open: File exists
tar: Error exit delayed from previous errors
error: Bad exit status from /var/tmp/rpm-tmp.9334 (%prep)

kindly help me out,where em doing wrong
Well, it's going to be hard to provide any useful help, since you give no real details. What version/distro of Linux are you using?? What did you edit? Can you build the RPM file BEFORE you make youre edits?

Also, you are trying to run the rpmbuild as a standard user...did you try running it as root?
 
Old 04-14-2010, 12:49 PM   #4
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,970
Blog Entries: 1

Rep: Reputation: 208Reputation: 208Reputation: 208
Quote:
Originally Posted by TB0ne View Post
Also, you are trying to run the rpmbuild as a standard user...did you try running it as root?
It's funny...

When I build an RPM as root and ask for help...people scream "DON'T RUN AS ROOT"

Then I have an issue...people say "Did you try running as root?"

Anyway...

Quote:
Originally Posted by Rabiya Tahir
well, em just new to linux and working on the trixbox server. . i have made some editing in the php files of the packed rpm of trixbox and wana see that whether these editing are fruitfull by repacking the rpm but em getting the below mention error while running the rpmbuild command after done with making spec file and copying say xxxx.tar.gz in the SOURCE directory:

[rabiya@trixbox1 bilal]$ rpmbuild -v -bb --clean SPECS/abcd.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.9334
+ umask 022
+ cd /home/bilal/BUILD
+ cd /home/bilal/BUILD
+ rm -rf abcd-1.1
+ /bin/gzip -dc /home/bilal/SOURCES/abcd-1.1.tar.gz
+ tar -xf -
tar: about.php: Cannot open: File exists
tar: adLDAP.php: Cannot open: File exists
tar: Anakin.GIF: Cannot open: File exists
tar: app_cbmysql.c: Cannot open: File exists
tar: app_cbmysql.o: Cannot open: File exists
tar: app_cbmysql.so: Cannot open: File exists
tar: asterisk.gif: Cannot open: File exists
tar: btn_top_12x12.gif: Cannot open: File exists
tar: button-search.gif: Cannot open: File exists
tar: call_operator.php: Cannot open: File exists
tar: cbEnd.php: Cannot open: File exists
tar: cb-extensions.conf.sample: Cannot open: File exists
tar: cbmysql.conf: Cannot open: File exists
tar: CHANGELOG: Cannot open: File exists
tar: conf_add.php: Cannot open: File exists
tar: conf_cdr.php: Cannot open: File exists
tar: Error exit delayed from previous errors
error: Bad exit status from /var/tmp/rpm-tmp.9334 (%prep)


kindly help me out,where em doing wrong
Like TB0be said; we need your OS, and your spec file as well
 
Old 04-14-2010, 01:30 PM   #5
Rabiya Tahir
LQ Newbie
 
Registered: Apr 2010
Location: Karachi Pakistan
Distribution: CentOS
Posts: 2

Original Poster
Rep: Reputation: 0
well lemme further ellobrate.
em using the CentOS linux with trixbox server on it. actually the orignal RPM is on Cd i have extract that made some editing in sum php files and now i wana repacked that rpm to check whether the editing i performed are properly done or not.i have tried this command by switching the user as well bt its same here's my spec file:

define _topdir /home/bilal
%define name abcd
%define release 1
%define version 1.1
%define buildroot %{_topdir}/%{name}-%{version}-root

BuildRoot: %{buildroot}
Summary: abcd rpm package
License: GPL
Name: %{name}
Version: %{version}
Release: %{release}
Source: %{name}-%{version}.tar.gz
Prefix: /usr
Group: Development/Tools

%description
this will add the application utilities in the server

%prep
%setup -q

%build
./configure
make

%install
make install prefix=$RPM_BUILD_ROOT/usr


%files
%defattr(-,root,root)
/usr/local/bin/abcd

%attr(0444,root,root) /usr/local/share/man/man1/abcd.1
 
Old 04-14-2010, 06:40 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Try this process instead:

- download the abcd src.rpm
- install it
- extract SOURCES/abcd-<version>.src.rpm to a working directory
- make your changes in the working directory
- create new tarball and replace the original under SOURCES/
- if you've added any files, update the %files section in the spec
- rpmbuild

cheers

Last edited by kbp; 04-14-2010 at 06:41 PM. Reason: added extra step
 
Old 04-14-2010, 07:11 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by kbp View Post
- create new tarball and replace the original under SOURCES/
That's a good approach though I'd not replace files but diff them, especially if you're going to distribute packages publicly. Using diffs (preferably RCS / CVS / SVN / whateverelse) working with revisions, annotating and tracking changes and makes things more efficient and then you can use the specs Source and Patch lines to "inject" your changes, use the %patch macros and build the (license-required?) .src.rpm for others to use. If you don't want to use diffs then you can easily keep your changed or added files separate and inject them with a simple 'install $RPM_SOURCE_DIR/filename .' at %setup time.
 
Old 04-14-2010, 07:24 PM   #8
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Good idea ... I usually keep it simple by changing the release to include my initials to differentiate it from the original, my stuff generally isn't for public consumption
 
Old 04-14-2010, 08:11 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,825

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
what version of CentOS ?
the 4 sires ?
or the 5 series ?
5.1, 5.2, 5.3, 5.4 ????
 
Old 09-25-2010, 11:07 AM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,943

Rep: Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693Reputation: 3693
Quote:
cited advertising removed
Too bad you're not also experts at writing clearly, and reading the LQ rules, where advertising is prohibited.

Last edited by Mara; 09-25-2010 at 03:45 PM.
 
  


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
Problem building 32bit RPM on 64bit host RattleSn@ke Linux - Software 2 09-25-2009 09:45 AM
Configure problem while building rpm with krpmbuilder on SUSE 10.0 OSS Zsub SUSE / openSUSE 4 09-15-2006 11:39 PM
Help building an .rpm from a .src.rpm ssenuta Linux - Software 6 04-10-2006 11:36 PM
Building RPM via src.Rpm ivanatora Linux - Newbie 2 02-20-2006 05:29 PM
problem building and installing rpm from ndiswrapper source steveman2000 Linux - Newbie 5 10-23-2005 08:01 PM


All times are GMT -5. The time now is 10:50 AM.

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