LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 06-08-2018, 02:22 PM   #1
Corrado
Member
 
Registered: Aug 2004
Location: Washington
Distribution: RHEL
Posts: 174

Rep: Reputation: 16
Using tarball in creating rpm


What I am trying to do in the rpm which I am creating I thought would be fairly simple. I think I am getting hung up on the syntax.

I want the rpm to only create a new directory and from SOURCE extract the files from a tarball into the newly create dir.

Here is a snapshot of the sections I need help with in the spec file on my RHEL7 system. Have read many guides but can't quite understand how the tarball and files are integrated.

Quote:
Source0: myfiles.tar.gz
Source1: file1

BuildRequires:
Requires: bash

BuildArch: noarch

%description

%prep
# I think this extracts the tarball?
%setup -q

%build

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}/opt/install
install -m 0755 %{SOURCE0} /opt/install/

mkdir -p %{buildroot}/%{_bindir}
cp %{SOURCE1} %{buildroot}/%{_bindir}/


%files
Thanks!
Chris
 
Old 06-08-2018, 02:35 PM   #2
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Quote:
Originally Posted by Corrado View Post
What I am trying to do in the rpm which I am creating I thought would be fairly simple. I think I am getting hung up on the syntax.

I want the rpm to only create a new directory and from SOURCE extract the files from a tarball into the newly create dir.

Here is a snapshot of the sections I need help with in the spec file on my RHEL7 system. Have read many guides but can't quite understand how the tarball and files are integrated.

Thanks!
Chris
You haven't followed up with your thread here:

https://www.linuxquestions.org/quest...ry-4175612167/

And from the looks of it, most of your others either.

EDIT: Here's another one about building rpm's here:

https://www.linuxquestions.org/quest...pm%27s-580610/

Last edited by jsbjsb001; 06-08-2018 at 03:11 PM.
 
1 members found this post helpful.
Old 06-09-2018, 03:55 PM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Moderator response

Moved: This thread is more suitable in <Red Hat> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


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
Create RPM from tarball. dezavu Linux - Software 2 12-23-2011 04:11 AM
Why tarball is better than rpm maxy7710 Linux - Newbie 8 04-29-2008 09:12 AM
Creating tarball of a large, active, directory? abegetchell Linux - General 14 09-21-2006 04:06 PM
I need RPM to tarball conversion mhelliwell Linux - General 3 03-18-2005 10:11 AM
Creating a date-based filename for a tarball? HomeBrewer Linux - Newbie 4 12-20-2003 02:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:23 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