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 02-14-2013, 04:40 PM   #1
lkurrt
Member
 
Registered: Feb 2013
Posts: 34

Rep: Reputation: Disabled
.RPM Files


What program to open .rpm files?
 
Old 02-14-2013, 05:07 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,360

Rep: Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000Reputation: 2000
With the program called "rpm"

What system are you working on and what are you trying to do?
 
Old 02-14-2013, 05:15 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
Unpacking ( "Open the package" ) goes like this :

$ rpm2cpio <package>.rpm | cpio -idmv

Or use the script unPack_rpm.sh by @unSpawn
http://www.linuxquestions.org/questi...4&d=1270886811
$ sh unPack_rpm.sh <package>.rpm


-

Last edited by knudfl; 02-14-2013 at 05:16 PM.
 
Old 02-14-2013, 05:17 PM   #4
lkurrt
Member
 
Registered: Feb 2013
Posts: 34

Original Poster
Rep: Reputation: Disabled
thanks
 
Old 02-14-2013, 07:52 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
@knudfl CYP point me to where I posted it?
Updated script:
Code:
#!/bin/bash
LANG=C; LC_ALL=C; export LANG LC_ALL
rpmDetails() { for Q in changelog provides requires scripts \
triggers triggerscripts; do rpm --nosignature -q -p --${Q} \
"${f}" 2>&1 | grep -v NOKEY > "${Q}.log"; done; }
rpmUnpack() { f=$(readlink -f "${f}"); file "${f}"|grep -q "RPM.v"
PLC=$(rpm --nosignature --qf="%{PAYLOADCOMPRESSOR}\n" -qp "${f}" 2>/dev/null)
case "$?" in 0) d=$(basename "${f}" .rpm); d="${HOME}/tmp/${d:=ERROR_$$}"
mkdir -p "${d}" && cd "${d}" || exit 1
case "${PLC}" in gzip) rpm2cpio "${f}"|cpio -idmv && rpmDetails "${f}";; 
xz|lzma) rpm2cpio "${f}"|unxz|cpio -idmv && rpmDetails "${f}";; *) echo \
"${progn}: Unknown compressor "${PLC}", exiting."; exit 1;; esac;;
*) echo "${progn}: Unknown package "${f}", exiting."; exit 1;; esac; }
for f in $@; do rpmUnpack "${f}"; done; exit 0
 
Old 02-15-2013, 12:17 AM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,986

Rep: Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447Reputation: 2447
If Gnome is used and you do NOT want to "install" the rpm but just extract the files
and do not need any of the information other than just the files

"file-roller" will do that just fine
r-click the rpm and select "open with file-roller" ( not the install)
you will get new folders in the folder that the rpm is in
a new "usr","bin","lib", and so on
 
Old 02-15-2013, 05:33 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
# 5, "unPack_rpm.sh by @unSpawn".

Was posted by you : 01 Aug 2008 .
LQ Search → → "Unpack RPM archives" , "unSpawn"
http://www.linuxquestions.org/questi...kage-659712/#4

(My version : I edited the unpack destination to the current directory.)

-
 
Old 02-15-2013, 06:14 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Thanks!
 
  


Reply

Tags
rpm2cpio, rpmunpack, unpack_rpm.sh


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
LFS RPM SPEC files: Binutils RPM spec for x86 arch nocountryman Linux From Scratch 2 10-25-2010 10:09 AM
RPM: how to skip user created files during RPM upgrade purnima_sahoo Linux - Newbie 2 09-04-2009 02:56 PM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 06:24 PM
preserve configuration files during RPM upgrade (rpm -U) charrua Red Hat 3 03-14-2004 02:18 PM
Difference between src.rpm files and source.rpm files ja_nch Red Hat 2 09-06-2003 07:12 PM


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