LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .RPM Files (https://www.linuxquestions.org/questions/linux-newbie-8/rpm-files-4175450176/)

lkurrt 02-14-2013 03:40 PM

.RPM Files
 
What program to open .rpm files?

suicidaleggroll 02-14-2013 04:07 PM

With the program called "rpm"

What system are you working on and what are you trying to do?

knudfl 02-14-2013 04:15 PM

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


-

lkurrt 02-14-2013 04:17 PM

thanks

unSpawn 02-14-2013 06:52 PM

@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


John VV 02-14-2013 11:17 PM

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

knudfl 02-15-2013 04:33 AM

# 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.)

-

unSpawn 02-15-2013 05:14 AM

Thanks!


All times are GMT -5. The time now is 06:15 AM.