Max (spevack) wrote,
Max
spevack

a personal f10 respin & mirror

On my freshly installed Fedora 10 box (after adding/removing packages to suit my taste), if I run:

rpm -qa --qf "%{name}\n" | sort

then I get something that looks like:

acl
alacarte
alsa-lib
alsa-plugins-pulseaudio
alsa-utils
(with hundreds of lines snipped)

What I would like to do next is run a command that does the following:

(1) Connects to a Fedora mirror, goes to the /releases/$RELEASE/Everything/$ARCH/os/Packages directory (where I specify $RELEASE and $ARCH), and downloads each RPM that is installed on my system that is also in that directory to a local directory.

(2) Does the same thing for the /updates/$RELEASE/$ARCH directory.

In essense, I'm building just enough of a local Fedora mirror so that I can do a respin of my personal package set on any version of Fedora that I choose.

The only part of this which is tricky is the right way to download the packages. I need to be careful just using something like lftp with mget and wildcards, because perl* will get me the main perl package (which I want, and whose complete file name I don't have), but it will also get me every other package that begins with perl, which I don't want. However, I still want the list of packages that represent my input to be free of the versioning metadata, because I want to be able to get all the packages for Fedora 9 just as easily as for Fedora 10.

What's the easiest way to do this?
Tags: redhat
Subscribe
  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic
  • 12 comments