[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Simpler and safer DAV proxy sync script

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Tue, 01 Jul 2008 11:22:13 -0400

Peter Samuelson <peter_at_p12n.org> writes:
> Is there any reason not to recommend this much simpler procedure for
> DAV mirroring? It is not only simpler and faster, but closes a
> security hole in temp file handling on the master.

Looks reasonable to me. (Did you actually test it, though?)

> [[[
> Use a simple pipe for svnadmin dump / load in the WebDAV proxy
> example scripts, instead of temporary files.
>
> * notes/webdav-proxy: Rewrite mirror hook example to use a pipe instead
> of a temp file. Also use -q in svnadmin dump|load, because nobody
> needs to see the verbose output.
>
> * www/svn_1.5_releasenotes.html (webdav-proxy-example): Likewise.
> ]]]
>
> Index: www/svn_1.5_releasenotes.html
> ===================================================================
> --- www/svn_1.5_releasenotes.html (revisione 31895)
> +++ www/svn_1.5_releasenotes.html (copia locale)
> @@ -1164,11 +1164,9 @@
> SLAVE_PATH=/my/local/copy/of/repos
>
> # Ensure svnadmin is in $PATH on both this machine and the remote server!
> - svnadmin dump --incremental -r$2 $1 &gt; /tmp/$2.dump
> - scp /tmp/$2.dump $SLAVE_HOST:$SLAVE_PATH
> - ssh $SLAVE_HOST "svnadmin load $SLAVE_PATH &lt; $SLAVE_PATH/$2.dump"
> - ssh $SLAVE_HOST "rm $SLAVE_PATH/$2.dump"
> - rm /tmp/$2.dump
> +
> + svnadmin dump -q --incremental -r$REV "$REPOS" |
> + ssh $SLAVE_HOST "svnadmin load -q $SLAVE_PATH"
> </code></pre>
>
> </div> <!-- webdav-proxy-example -->
> Index: notes/webdav-proxy
> ===================================================================
> --- notes/webdav-proxy (revisione 31895)
> +++ notes/webdav-proxy (copia locale)
> @@ -62,11 +62,8 @@
> SLAVE_PATH=/my/local/copy/of/repos
>
> # Ensure svnadmin is in your PATH on both this machine and the remote server!
> -svnadmin dump --incremental -r$2 $1 > /tmp/$2.dump
> -scp /tmp/$2.dump $SLAVE_HOST:$SLAVE_PATH
> -ssh $SLAVE_HOST "svnadmin load $SLAVE_PATH < $SLAVE_PATH/$2.dump"
> -ssh $SLAVE_HOST "rm $SLAVE_PATH/$2.dump"
> -rm /tmp/$2.dump
> +svnadmin dump -q --incremental -r$REV "$REPOS" |
> + ssh $SLAVE_HOST "svnadmin load -q $SLAVE_PATH"
> ----
>
> Issues/Thoughts:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-01 17:23:07 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.