Mailinglist Archive: opensuse-softwaremgmt (17 mails)

< Previous Next >
[softwaremgmt] Need Help: sync with repositories, such as http://www2.ati.com/suse/10.3/
  • From: "Artyom Loenko" <divenvrsk@xxxxxxxxx>
  • Date: Mon, 18 Feb 2008 12:18:53 +0300
  • Message-id: <7bb2f67f0802180118k644a6f37mdfa75d14b82e528@xxxxxxxxxxxxxx>
hi, all!

I placed the server with partial openSUSE repositories for the
residents of Tomsk Region, Russian Federation (unlimited traffic on
the area of 100 Mb speed). By major repositories problems are solved
there is no set of lines like:

rsync -vaz --partial --stats --no-p --compress-level=9
--exclude-from=/etc/repo/exclude --delay-updates --timeout=1800
--delete --delete-after
"rsync://ftp5.gwdg.de::/pub/opensuse/update/10.3/"
/srv/ftp/pub/opensuse/update/10.3/

but there is a problem with the addition of "not browseable" mirrors,
such as http://www2.ati.com/suse/10.3/
Now, it is way below, but there can be any more correct method? Main
did not pull the entire repository again, and check whether the files.
In fact, in xml all the information is there, but his hands parser
write these fields in xml not managed.

#!/bin/bash

TMP_DIR=/srv/mirror/tmp
LOG_DIR=/srv/mirror-scripts/log
REPO_CURRENT_DIR=/srv/mirror/opensuse/misc/ati/10.3

function update_ati
{
echo " ====================================================== ATI "

REPO_DIR=$REPO_CURRENT_DIR
REPO_URL='http://www2.ati.com/suse/10.3/'
REPO_URL2='http:\/\/www2.ati.com\/suse\/10.3\/'
REPO_URL_CUT=2
REPO_TMP=$TMP_DIR/ati
mkdir -p $REPO_TMP/repodata/
cd $REPO_TMP
wget -nH -x --cut-dirs=$REPO_URL_CUT $REPO_URL/repodata/repomd.xml
wget -nH -x --cut-dirs=$REPO_URL_CUT $REPO_URL/repodata/repomd.xml.asc
wget -nH -x --cut-dirs=$REPO_URL_CUT $REPO_URL/repodata/repomd.xml.key
cat $REPO_TMP/repodata/repomd.xml |sed -e 's/ /\n/g' -e 's/</\n/g'|
grep -E -o 'href=".+"' | sed -e "s/^href=\"//g" -e
's/^/'$REPO_URL2'/' -e 's/"//g' |xargs wget -nH -x --cut-dirs=$REPO_URL_CUT
gzip -d -c $REPO_TMP/repodata/primary.xml.gz | sed -e 's/ /\n/g' -e
's/</\n/g'| grep -E -o 'href=".+"' | sed -e "s/^href=\"//g"
-e 's/^/'$REPO_URL2'/' -e 's/"//g' |xargs wget -nH -x --cut-dirs=$REPO_URL_CUT
rm -fr $REPO_DIR/*
mkdir -p $REPO_DIR
cp -R $REPO_TMP/* $REPO_DIR
rm -fr $REPO_TMP
} >$LOG_DIR/ati.log 2>&1

update_ati;

how to organize the work in such repository version and management tool?

--
with respect,

Artyom Loenko
Jabber: divenvrsk@xxxxxxxxx
Mail: divenvrsk@xxxxxxxxx
Phone: +7 (906) 2583135
--
To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-softwaremgmt+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages