How to extract a file from a package for comparison purposes?
Is there a way to extract a single file, or set of files from a package in one of he OpenSuSE repositories? I simply want to compare a file that I have configured/made changes to, with the original version of that file as it was installed on my system. My head is hurting from attempting DuckDuckGo research (found no joy looking at documentation for Yast, RPM, and Zypper. Maybe, NOT certain, YUM but dunno if usable) and figure I will just ask the gurus in this forum... I am running OpenSuSE 15.4 and 15.5 with the KDE/Plasma desktop if that is helpful. Thanks in advance as always, Marc....
Hello, In the Message; Subject : How to extract a file from a package for comparison purposes? Message-ID : <172189310592.28780.17363940427678739903@mailman3.infra.opensuse.org> Date & Time: Thu, 25 Jul 2024 07:38:25 -0000 [MC] == Marc Chamberlin via openSUSE Users <users@lists.opensuse.org> has written: MC> Is there a way to extract a single file, or set of files from a MC> package in one of he OpenSuSE repositories? I simply want to MC> compare a file that I have configured/made changes to, with the MC> original version of that file as it was installed on my MC> system. My head is hurting from attempting DuckDuckGo research MC> (found no joy looking at documentation for Yast, RPM, and MC> Zypper. Maybe, NOT certain, YUM but dunno if usable) and figure I MC> will just ask the gurus in this forum... $ rpm2cpio /somewhere/to/[package].rpm | cpio -id Best Regards. --- ┏━━┓彡 Masaru Nomiya mail-to: nomiya @ lake.dti.ne.jp ┃\/彡 ┗━━┛ "To hire for skills, firms will need to implement robust and intentional changes in their hiring practices ― and change is hard." -- Employers don’t practice what they preach on skills-based hiring --
Marc Chamberlin composed on 2024-07-25 07:38 (UTC):
Is there a way to extract a single file, or set of files from a package in one of he OpenSuSE repositories? I simply want to compare a file that I have configured/made changes to, with the original version of that file as it was installed on my system. My head is hurting from attempting DuckDuckGo research (found no joy looking at documentation for Yast, RPM, and Zypper. Maybe, NOT certain, YUM but dunno if usable) and figure I will just ask the gurus in this forum...
1-Visit the desired file(s) using Midnight Commander 2-Select desired file(s) 3-F5 A-If you wish to save to a particular non-current location, first switch panes and navigate it to that desired location. B-You may need to first configure MC to "visit" archive files of the type containing those you wish to visit, e.g. .rpm or .deb. Not all archive types are pre-configured for entry by openSUSE's MC. -- Evolution as taught in public schools is, like religion, based on faith, not based on science. Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata
On 7/25/24 3:08 AM, Felix Miata wrote:
1-Visit the desired file(s) using Midnight Commander 2-Select desired file(s) 3-F5 Expanded version in case the steps between 1-2 have you scratching your head a bit. I read Felix's post to mean:
1-Visit the desired RPM [edit] using Midnight Commander 1a - Press Enter to see contents of rpm packaging 1b - Select CONTENTS.cpio 1c - Press Enter to navigate to desired files 2-Select desired file(s) 3-F5
(correct me if that isn't what you meant or if I'm missing an easier way) mc provides a simple visual way to copy individual files out of any archive (including rpm) and some may find that easier than rpm2cpio. -- David C. Rankin, J.D.,P.E.
On 2024-07-25 09:38, Marc Chamberlin via openSUSE Users wrote:
I am running OpenSuSE 15.4 and 15.5 with the KDE/Plasma desktop if that is helpful. Thanks in advance as always, Marc....
You already got good answers but since you said you are using KDE you can also navigate to the rpm in question with Dolphin and right click on it and open with Ark and then extract the file you need. Ark can be used from the command line as well. ark -b file.rpm -o path_where_you_want_the_archive_to_end_up -- /bengan
Thanks guys, lots of good ideas and much appreciate the time you took to help me! Marc
participants (6)
-
Andrei Borzenkov
-
Bengt Gördén
-
David C. Rankin
-
Felix Miata
-
Marc Chamberlin
-
Masaru Nomiya