From 1be510f9529cb082f802408b472a77d074b394c0 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 14 Apr 2013 13:46:12 +0000 Subject: Add zarb MLs html archives --- zarb-ml/mageia-sysadm/2011-January/002153.html | 138 +++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 zarb-ml/mageia-sysadm/2011-January/002153.html (limited to 'zarb-ml/mageia-sysadm/2011-January/002153.html') diff --git a/zarb-ml/mageia-sysadm/2011-January/002153.html b/zarb-ml/mageia-sysadm/2011-January/002153.html new file mode 100644 index 000000000..2d7d39079 --- /dev/null +++ b/zarb-ml/mageia-sysadm/2011-January/002153.html @@ -0,0 +1,138 @@ + + + + [Mageia-sysadm] [813] add a new class to do a mirror of a svn reporitory ( for display purpose with viewvc or any others ) + + + + + + + + + +

[Mageia-sysadm] [813] add a new class to do a mirror of a svn reporitory ( for display purpose with viewvc or any others )

+ root at mageia.org + root at mageia.org +
+ Mon Jan 17 16:24:09 CET 2011 +

+
+ +
Revision: 813
+Author:   misc
+Date:     2011-01-17 16:24:08 +0100 (Mon, 17 Jan 2011)
+Log Message:
+-----------
+add a new class to do a mirror of a svn reporitory ( for display purpose with viewvc or any others )
+
+Modified Paths:
+--------------
+    puppet/modules/subversion/manifests/init.pp
+
+Added Paths:
+-----------
+    puppet/modules/subversion/templates/create_svn_mirror.sh
+
+Modified: puppet/modules/subversion/manifests/init.pp
+===================================================================
+--- puppet/modules/subversion/manifests/init.pp	2011-01-17 15:24:07 UTC (rev 812)
++++ puppet/modules/subversion/manifests/init.pp	2011-01-17 15:24:08 UTC (rev 813)
+@@ -273,4 +273,30 @@
+            minute => $refresh
+         }   
+     }
++    
++    class mirror { 
++        include subversion::tools
++        file { "/usr/local/bin/create_svn_mirror.sh":
++             ensure => present,
++             owner => root,
++             group => root,
++             mode => 755,
++             content => template('subversion/create_svn_mirror.sh') 
++        }
++    }
++
++    define mirror_repository($source,
++                             $refresh = '*/5') {
++        include subversion::mirror 
++
++        exec { "/usr/local/bin/create_svn_mirror.sh $name $source":
++            creates => $name,           
++            require => Package['subversion-tools']
++        }
++
++        cron { "update $name":
++           command => "/usr/bin/svnsync synchronize file://$name",
++           minute => $refresh,
++        }   
++    } 
+ }
+
+Added: puppet/modules/subversion/templates/create_svn_mirror.sh
+===================================================================
+--- puppet/modules/subversion/templates/create_svn_mirror.sh	                        (rev 0)
++++ puppet/modules/subversion/templates/create_svn_mirror.sh	2011-01-17 15:24:08 UTC (rev 813)
+@@ -0,0 +1,13 @@
++#!/bin/bash
++umask 0002
++LOCAL_REPOS=$1
++REMOTE_REPOS=$2
++svnadmin create $LOCAL_REPOS
++# needed, as svnsync complain otherwise :
++#  svnsync: Repository has not been enabled to accept revision propchanges;
++#  ask the administrator to create a pre-revprop-change hook
++ln -s /bin/true $LOCAL_REPOS/hooks/pre-revprop-change  
++svnsync init  file://$1  $2
++# do not sync now,
++# let cron do it or puppet will complain ( especially for long sync )
++#svnsync synchronize file://$1
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: </pipermail/mageia-sysadm/attachments/20110117/690dd1ec/attachment-0001.html>
+
+ + + + + + + + + + + + + +
+

+ +
+More information about the Mageia-sysadm +mailing list
+ -- cgit v1.2.1