Robert Moskowitz
2013-Jan-31 15:55 UTC
[CentOS] How to extract one file from rpm using yum?
I want to get the original version of /etc/clamd.d/amavis.conf from the amavisd-new rpm to get the defaults to submit a bug report. I could not figure out how to do this, so I did a reinstall, but it did not replace this file (whatprovides says it comes from this rpm). Is there a way to extract just the one file, and better yet, place it elsewhere than its regular destination? thanks
Andreas Reschke
2013-Jan-31 15:59 UTC
[CentOS] Antwort: How to extract one file from rpm using yum?
centos-bounces at centos.org wrote on 31.01.2013 16:55:37:> Robert Moskowitz <rgm at htt-consult.com> > Gesendet von: centos-bounces at centos.org > > 31.01.2013 16:55 > > Bitte antworten an > CentOS mailing list <centos at centos.org> > > An > > CentOS mailing list <centos at centos.org> > > Kopie > > Thema > > [CentOS] How to extract one file from rpm using yum? > > I want to get the original version of /etc/clamd.d/amavis.conf from the > amavisd-new rpm to get the defaults to submit a bug report. I could not> figure out how to do this, so I did a reinstall, but it did not replace > this file (whatprovides says it comes from this rpm). > > Is there a way to extract just the one file, and better yet, place it > elsewhere than its regular destination? > > thanks > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centosHi Robert, you can extract this file with cpio or open it with mc like a archive (zip, tar, ...) Mit freundlichen Gr??en Andreas Reschke ________________________________________________________________ Unix/Linux-Administration Andreas.Reschke at behrgroup.com
m.roth at 5-cent.us
2013-Jan-31 16:01 UTC
[CentOS] How to extract one file from rpm using yum?
Robert Moskowitz wrote:> I want to get the original version of /etc/clamd.d/amavis.conf from the > amavisd-new rpm to get the defaults to submit a bug report. I could not > figure out how to do this, so I did a reinstall, but it did not replace > this file (whatprovides says it comes from this rpm). > > Is there a way to extract just the one file, and better yet, place it > elsewhere than its regular destination?Didn't it create it in the normal destination as amavis.conf.rpmnew? mark
From: Robert Moskowitz <rgm at htt-consult.com>> I want to get the original version of /etc/clamd.d/amavis.conf from the > amavisd-new rpm to get the defaults to submit a bug report.? I could not > figure out how to do this, so I did a reinstall, but it did not replace > this file (whatprovides says it comes from this rpm). > Is there a way to extract just the one file, and better yet, place it > elsewhere than its regular destination?You could also just have renamed your conf file temporarily, reinstalled, moved the default conf file and renamed back your conf file... JD
Robert Moskowitz
2013-Jan-31 16:40 UTC
[CentOS] How to extract one file from rpm using yum?
On 01/31/2013 11:36 AM, John Doe wrote:> From: Robert Moskowitz <rgm at htt-consult.com> > >> I want to get the original version of /etc/clamd.d/amavis.conf from the >> amavisd-new rpm to get the defaults to submit a bug report. I could not >> figure out how to do this, so I did a reinstall, but it did not replace >> this file (whatprovides says it comes from this rpm). >> Is there a way to extract just the one file, and better yet, place it >> elsewhere than its regular destination? > You could also just have renamed your conf file temporarily, > reinstalled, moved the default conf file and renamed back > your conf file...OK. I am set for what I needed. I went to the repo via http and downloaded the rpm. I then used archive manager via nautilus to get to the file(s) I needed. Now to write up the bug report. Minor item, but it bugs me.... ;)
On Thu, 31 Jan 2013, Robert Moskowitz wrote:> > On 01/31/2013 11:36 AM, John Doe wrote: >> From: Robert Moskowitz <rgm at htt-consult.com> >> >>> I want to get the original version of /etc/clamd.d/amavis.conf from the >>> amavisd-new rpm to get the defaults to submit a bug report. I could not >>> figure out how to do this, so I did a reinstall, but it did not replace >>> this file (whatprovides says it comes from this rpm). >>> Is there a way to extract just the one file, and better yet, place it >>> elsewhere than its regular destination? >> You could also just have renamed your conf file temporarily, >> reinstalled, moved the default conf file and renamed back >> your conf file... > > OK. I am set for what I needed. I went to the repo via http and > downloaded the rpm. I then used archive manager via nautilus to get to > the file(s) I needed. Now to write up the bug report. Minor item, but > it bugs me.... ;) >The command line way of getting 1 file out of a rpm is to rpm2cpio. rpm2cpio <rpmfilename> > <filename.cpio> Now you have a cpio archive which you can use to get files out of. -Connie Sieh
Robert Moskowitz
2013-Jan-31 18:29 UTC
[CentOS] How to extract one file from rpm using yum?
On 01/31/2013 11:40 AM, Reindl Harald wrote:> > Am 31.01.2013 16:55, schrieb Robert Moskowitz: >> I want to get the original version of /etc/clamd.d/amavis.conf from the >> amavisd-new rpm to get the defaults to submit a bug report. I could not >> figure out how to do this, so I did a reinstall, but it did not replace >> this file (whatprovides says it comes from this rpm). >> >> Is there a way to extract just the one file, and better yet, place it >> elsewhere than its regular destination? > seems you are very new in the rpm worldActually very old to it. I use to do this stuff 10 years ago and my brain just ain't what it use to be. Use to do my own builds for a number of apps, but doubt I could do a build now!> > THANKFULLY a reinstall does not touch modified config-files > BUT you get a warning from yum that whatever.conf was installed > as watever.conf.rpmnew >
> >> The command line way of getting 1 file out of a rpm is to rpm2cpio. > >> > >> rpm2cpio <rpmfilename> > <filename.cpio> > >> > >> Now you have a cpio archive which you can use to get files out of. > > Or: > > > > rpm2cpio <rpmfilename> | cpio -idv > >And one more: To extract a single file from a package rpm2cpio gnupg-1.2.6-6.src.rpm | cpio -ivd gnupg.spec