LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-20-2011, 01:03 PM   #1
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
Question RPM encapsulated in a shell script


Dear Gurus,

Few weeks ago, I just came across this link, which has shell (.sh) script for all flavors of Unix.

I am particularly interested in RPM version it.

On installing this script, few RPMs get installed. I am curious to know how RPMs have been encapsulated in the script. I earlier thought, that all they must have created all files of RPM in it, then spec file and finally built it through rpmbuild command.

But, this was not the case. I can see some junk characters in the script, probably those are RPMs (not sure though).

Any ideas, how RPMs have been encapsulated in the sh script ?
 
Old 10-20-2011, 01:14 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
You need to encode the binary package and append it to the script. Basically you need uuencode and uudecode. First you create a shell script where at some point you put a uudecode statement to decode the binary part. Then you use uuencode and append the output to the shell script itself. Here are some detailed explanations:
http://www.linuxjournal.com/content/...-shell-scripts
http://mspo.com/how-to/embedfilesinshell.html
 
1 members found this post helpful.
Old 10-20-2011, 02:09 PM   #3
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Original Poster
Rep: Reputation: 107Reputation: 107
Thumbs up Thanks

Quote:
Originally Posted by colucix View Post
You need to encode the binary package and append it to the script. Basically you need uuencode and uudecode. First you create a shell script where at some point you put a uudecode statement to decode the binary part. Then you use uuencode and append the output to the shell script itself. Here are some detailed explanations:
http://www.linuxjournal.com/content/...-shell-scripts
http://mspo.com/how-to/embedfilesinshell.html
Many many thanks colucix, now I will explicitly use this in my script.
 
  


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
rpm shell script linuxment Linux - Newbie 4 04-11-2012 12:42 PM
How to create a RPM from a Shell script bipinkdas Fedora 1 03-21-2007 02:52 AM
how does a rpm build happen + shell script help sailu_mvn Linux - Software 38 07-21-2006 03:40 AM
accepting root passwd from UI and passing it to a shell script to extract a rpm rameshvl Linux - Software 4 03-18-2003 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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