LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2014, 05:05 AM   #1
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Rep: Reputation: 61
rpm spec help


I'm very new at writing rpm spec files. I have one rpm that installs a version of tomcat in a specified directory. That works as expected. I'm trying to make a new rpm to replace the webdav directory with the files from the project. What I'd like to do is:
Code:
cd /mydir/apps/tomcat
rm -r webapps
tar xzfpPz ${RPM_INSTALL_PREFIX}/%{name}-%{version}.tar.gz
chown -R myid:mygroup webapps
I'm just not sure how to put the cd and rm into spec syntax.

Any suggestions would be greatly appreciated!

Last edited by bradvan; 09-24-2014 at 07:18 AM.
 
Old 09-11-2014, 05:21 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Now are you trying to build and rpm or a tar.gz, or an rpm that contains a tar.gz?
 
Old 09-11-2014, 06:29 AM   #3
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Original Poster
Rep: Reputation: 61
I have a gzip'd tar file of the projects webapps directory. I want to build an rpm that will go in to a new system, after I have installed tomcat, and delete the stock webapps directory and replace it with the contents of the tar file.
 
Old 09-25-2014, 04:58 AM   #4
bradvan
Member
 
Registered: Mar 2009
Posts: 367

Original Poster
Rep: Reputation: 61
I changed my tomcat rpm setup to have appBase point to a location outside of the tomcat structure. I then created the web page rpm to extract to this new location. This works.
 
  


Reply



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
LFS RPM SPEC files: Binutils RPM spec for x86 arch nocountryman Linux From Scratch 2 10-25-2010 09:09 AM
rpm spec file help AutoC Fedora 3 01-30-2008 08:25 AM
cannot use rpm -q in rpm spec file? Okashiiken Programming 5 06-29-2007 02:13 AM
rpm spec file alrawab Linux - General 2 03-28-2007 06:39 AM
rpm spec files pk21 Programming 3 06-11-2003 04:53 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:51 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
Open Source Consulting | Domain Registration