Re: rsync problem
Lars Ellenberg <[email protected]> Tue, 6 Jan 2004 23:30:47 +0100
| Newsgroups | gmane.linux.suse.fou4s.devel |
|---|---|
| Message-ID | <[email protected]> |
/ 2004-01-06 21:33:34 +0100 \ Markus Gaugusch: > > [2] Do I need to set-up and run rsyncd? > If you want to provide your own mirror, yes. > > Also, I've mirrored a suse ftp-server (including KDE -packages) and > > updated machines by hand/script. I'd like to keep that mirror, but: > > how to set-up fou4s to use that (local) mirror only for base system and > > KDE updates? Is it possible for the workstations to use NFS-shares from > > that mirror instead of external servers via ftp/ rsync? > You can use shared directories (mount to /var/cache/fou4s/packages), but > you must first generate the patch descriptions using a (local) rsync > server. see patchlet below. the interessting part is: - if [[ $SERVERURL == rsync://* ]] ; then + if [[ $SERVERURL == @(rsync://*|*:/[^/]*) ]] ; then this allows in /etc/.fou4s for Server=yourchoice@someserver:/var/SuSE-updates/some/where/%ARCH/update/%VERSION which then is passed to rsync. rsync logs in to "someserver" as user "yourchoice", using $RSYNC_RSH, which could for example be set by "export RSYNC_RSH=ssh" in your /etc/profile.local if you set up key authentication (which you did anyways, no?), this happens to just work. no need for a permanent share, nor for a rsync server. there might be situations where this is "nice to have"... cheers, Lars Ellenberg --- other fixes: . only say "you don't have group fou4s" if this is true. . handle empty lines within one description block, this happend e.g. with suse-8.1 kernel-source-51177 (2003-11-26) --- fou4s.orig-0.10.0 2003-10-14 23:49:18.000000000 +0200 +++ fou4s 2004-01-06 23:09:10.000000000 +0100 @@ -59,6 +59,7 @@ if [ $EUID -eq 0 ] && [[ -n $groups ]] || [[ $groups != *: ]] ; then umask g+rwx sg fou4s -c "$0 --rightsok $*" && exit + grep -q "^fou4s:" /etc/group && exit 1 echo "You don't have group fou4s in your system, please run 'groupadd fou4s'!" fi fi @@ -1029,7 +1030,7 @@ CHECKFOU=0 # disable fou4s check when processing other servers fi # get YOU update descriptions - if [[ $SERVERURL == rsync://* ]] ; then + if [[ $SERVERURL == @(rsync://*|*:/[^/]*) ]] ; then rsync $RSYNCOPTS $rsyncopts "$SERVERURL/$SERVERPATH/patches/*" . ret=$? else @@ -2085,12 +2086,7 @@ # if we are currently reading a package, it is finished with one of # the following strings if [ $readingPkg -eq 1 ] ; then - processpkg=0 - case "$tag" in - Segakcap:|\#*|-----BEGIN\ PGP\ SIGNATURE|"") - processpkg=1 ;; - esac - if [ $processpkg -eq 1 ] ; then + if [[ $tag == @(Segakcap:|#*|-----BEGIN) ]] ; then if [ $LISTAVAILRPMS -eq 1 ] ; then # only show available rpms showRpmSummary else --