yum local repo question
Bill Davidsen
davidsen at tmr.com
Mon Oct 13 15:35:36 UTC 2008
can comert wrote:
> Hi,
> I'm using a fedora9 edition on my desktop
> i have a limited internet connection. I want to get the links of updates
> from my fedora installed desktop and download updates from a different
> computer (not fedora installed) and then i will copy *.rpm packeges to
> /var/cache/yum/... (optinal to repo)
> So how can i get the (just) links of needed update packages???
>
You can keep a copy of /var/cache/yum of a server, and NFS mount it, then create
the links. If you do this for multiple machines you can copy anything they
download to the common repository.
Mount the common repository: mount -o ro,soft server:/export/FC9 /mnt/FC9
Now create symbolic links with a script. I have the script, but it's on a
machine down for the holiday, and I don't have "wake on question" so I can't
boot it from here. This is typed by hand, and is a guide only.
CMN=/mnt/FC9
VAR=/var/cache/yum
# cd and create links
cd $CMN
find */packages -type f |
while read pkg; do
if [ ! -x $VAR/$pkg ]; then
# create the directory if missing (for add new repo)
dir=${pkg%/*}
[ -d $VAR/$dir ] || mkdir -p $VAR/$dir
# symbolic link the package
ln -s $CMN/$pkg $VAR/$pkg
fi
done
Hope this is what you are looking for
--
Bill Davidsen <davidsen at tmr.com>
"We have more to fear from the bungling of the incompetent than from
the machinations of the wicked." - from Slashdot
More information about the fedora-list
mailing list