LinuxQuestions.org
Visit Jeremy's Blog.
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, 03: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, 04:07 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,453

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

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

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
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 04:16 PM.
 
Old 02-14-2013, 04:17 PM   #4
lkurrt
Member
 
Registered: Feb 2013
Posts: 34

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

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
@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-14-2013, 11:17 PM   #6
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,089

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
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, 04:33 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,620

Rep: Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266Reputation: 3266
# 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, 05:14 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,353
Blog Entries: 55

Rep: Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541Reputation: 3541
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 09:09 AM
RPM: how to skip user created files during RPM upgrade purnima_sahoo Linux - Newbie 2 09-04-2009 01:56 PM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 05:24 PM
preserve configuration files during RPM upgrade (rpm -U) charrua Red Hat 3 03-14-2004 01:18 PM
Difference between src.rpm files and source.rpm files ja_nch Red Hat 2 09-06-2003 06:12 PM


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