pf-tools/pf-tools: 3 new changesets

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Mon Aug 4 16:12:30 UTC 2014


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/ebf0d9b67364
changeset: 1295:ebf0d9b67364
user:      shad
date:      Mon Aug 04 15:19:55 2014 +0200
description:
workable conf file + typo

details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/b40704a9a476
changeset: 1296:b40704a9a476
user:      shad
date:      Mon Aug 04 15:20:52 2014 +0200
description:
at least subversion is working for deployer now

details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/204545562836
changeset: 1297:204545562836
user:      shad
date:      Mon Aug 04 16:24:33 2014 +0200
description:
remove svn

diffstat:

 conf/pf-tools.conf       |  63 +++++++++++++++++++++++++++++++----------------
 doc/pf-tools.conf-syntax |   2 +-
 doc/pf-tools.conf.sample |   3 ++
 lib/PFTools/VCS/SVN.pm   |  36 ++++++++++++++++++++------
 4 files changed, 72 insertions(+), 32 deletions(-)

diffs (141 lines):

diff -r d28f09b3335a -r 204545562836 conf/pf-tools.conf
--- a/conf/pf-tools.conf	Thu Jul 31 17:51:46 2014 +0200
+++ b/conf/pf-tools.conf	Mon Aug 04 16:24:33 2014 +0200
@@ -1,24 +1,43 @@
-$CVS_USER       = "cvsguest";
-$CVS_RSH        = "/usr/sbin/cvs_rsh";
-$CVS_SERVER     = "cvs.private";
-$CVS_ROOT       = "/var/lib/cvs";
-$CVS_REPOSITORY = $CVS_ROOT . "/repository";
-$CVS_CONFIG     = "config";
+[path]
+    status_dir      = /var/lib/pf-tools
+    distrib_dir     = /distrib
+    tftp_dir        = /distrib/tftpboot
+    pxefiles_dir    = /distrib/tftpboot/pxelinux.cfg
+    global_struct   = /var/lib/pf-tools/global.stor
+    deploy_docroot  = /var/www
+    preseed_dir     = /var/www/preseed
+    checkout_dir    = /var/lib/cvsguest
+    templates_dir   = /usr/share/pf-tools/templates
+    common_config   = update-common
+    start_file      = private-network
 
-if ( $HOSTNAME =~ /^deploy\d+/ ) {
-    $CVS_COMMAND =
-      "/usr/bin/cvs -R -d '"
-      . $CVS_REPOSITORY
-      . "' checkout '"
-      . $CVS_CONFIG . "'";
+[features]
+    ipv4            = 1
+    ipv6            = 0
+    update          = 1
 
-}
-else {
-    $CVS_COMMAND =
-      "/usr/bin/cvs -d ':ext:"
-      . $CVS_USER . "\@"
-      . $CVS_SERVER . ":"
-      . $CVS_REPOSITORY
-      . "' checkout '"
-      . $CVS_CONFIG . "'";
-}
+[vcs]
+#    type            = svn
+#    method          = svn+ssh
+#    vcsroot         = /var/lib/svn/
+#    server          = 10.128.2.5
+#    module          = trunk
+#    rsh             = ssh -i /var/lib/cvsguest/.ssh/id_rsa
+    type            = cvs
+    method          = rsh
+    vcsroot         = /var/lib/cvs/repository
+    server          = 10.128.2.5
+    module          = config
+    rsh             = /usr/sbin/cvs_rsh
+
+[location]
+    site            = pro1
+    zone            = private
+    foo             = bar
+
+[foo]
+    ignored         = 1
+
+[regex]
+#   deploy_hosts = '(deploy|[a-z]{3}\d-(?:rdeploy|spawn))'
+    hostname_model = (?<HOSTTYPE>((?<POPNAME>[a-z]{3}\d{1})-)?([a-z0-9-]+[a-z0-9-]+))%*_*
diff -r d28f09b3335a -r 204545562836 doc/pf-tools.conf-syntax
--- a/doc/pf-tools.conf-syntax	Thu Jul 31 17:51:46 2014 +0200
+++ b/doc/pf-tools.conf-syntax	Mon Aug 04 16:24:33 2014 +0200
@@ -22,7 +22,7 @@
 	user			::= User for remote access to the VCS. Default is cvsguest
 	method			::= Method use for access to VCS system e.g. pserver or rsh for CVS, http or svn+ssh for svn etc. Default is rsh
 	rsh				::= Default rsh use for CVS only and method is rsh. Default is command /usr/sbin/cvs_rsh which is source-tree
-	server			::= VCS system hostname. Definition from pf-tolls configuration is allowed. Default is cvs.private
+	server			::= VCS system hostname. Definition from pf-tools configuration is allowed. Default is cvs.private
 	vcsroot			::= ROOT path for the VCS repository. Default is /var/lib/cvs/repository
 	module			::= Module name on VCS for the configuration repository. Default is config
 	umask			::= UMASK value which is applied when checkout is executed. Default value is 0077
diff -r d28f09b3335a -r 204545562836 doc/pf-tools.conf.sample
--- a/doc/pf-tools.conf.sample	Thu Jul 31 17:51:46 2014 +0200
+++ b/doc/pf-tools.conf.sample	Mon Aug 04 16:24:33 2014 +0200
@@ -15,6 +15,9 @@
 	update	= 1
 
 [vcs]
+	# if you want to connect via ssh restricted keys, you'll have to put in authorized_keys
+	# for cvs:	command="/usr/bin/cvs server"
+	# for svn:	command="/usr/bin/svnserve -t"
 	type	= cvs
 	user	= cvsguest
 	method	= rsh
diff -r d28f09b3335a -r 204545562836 lib/PFTools/VCS/SVN.pm
--- a/lib/PFTools/VCS/SVN.pm	Thu Jul 31 17:51:46 2014 +0200
+++ b/lib/PFTools/VCS/SVN.pm	Mon Aug 04 16:24:33 2014 +0200
@@ -72,16 +72,34 @@
     my $ret;
     my $umask = umask( oct( $pf_config->{'vcs'}->{'umask'} ) );
 
+    if ( $pf_config->{'vcs'}->{'method'} eq 'svn+ssh' ) {
+        $ENV{'SVN_SSH'} = $pf_config->{'vcs'}->{'rsh'};
+    }
+
     if ( !$svn_cmd ) {
-        $svn_cmd
-            = q{svn checkout }
-            . $pf_config->{'vcs'}->{'method'} . q{://}
-            . $pf_config->{'vcs'}->{'server'} . q{/}
-            . $pf_config->{'vcs'}->{'module'}
-            . q{ --username }
-            . $pf_config->{'vcs'}->{'user'}
-            . q{ --password }
-            . $pf_config->{'vcs'}->{'password'};
+        if ( $hostname =~ /^$pf_config->{'regex'}->{'deploy_hosts'}/ ) {
+            $svn_cmd
+                = q{svn checkout file://localhost/}
+                . $pf_config->{'vcs'}->{'vcsroot'} . q{/}
+                . $pf_config->{'vcs'}->{'module'};
+
+            # no need to username here
+        }
+        else {
+            $svn_cmd
+                = q{svn checkout }
+                . $pf_config->{'vcs'}->{'method'} . q{://}
+                . $pf_config->{'vcs'}->{'user'} . q{@}
+                . $pf_config->{'vcs'}->{'server'} . q{/}
+                . $pf_config->{'vcs'}->{'vcsroot'} . q{/}
+                . $pf_config->{'vcs'}->{'module'}
+
+                #. q{ --username }
+                #. $pf_config->{'vcs'}->{'user'}
+                #. q{ --password }
+                #. $pf_config->{'vcs'}->{'password'}
+                ;
+        }
     }
     if ( $options->{'debug'} || $options->{'verbose'} ) {
         print $svn_cmd. "\n";



More information about the pf-tools-commits mailing list