summaryrefslogtreecommitdiff
path: root/lorry
diff options
context:
space:
mode:
Diffstat (limited to 'lorry')
-rwxr-xr-xlorry32
1 files changed, 22 insertions, 10 deletions
diff --git a/lorry b/lorry
index 2339c9f..853c65d 100755
--- a/lorry
+++ b/lorry
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright (C) 2013 Codethink Limited
+# Copyright (C) 2013-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -299,6 +299,11 @@ class Lorry(cliapp.Application):
return dest
def mirror_git(self, project_name, dirname, gitdir, spec):
+ # Turn off git's SSL/TLS certificate verification, until Baserock
+ # has an CA management infrastructure.
+ env = dict(os.environ)
+ env['GIT_SSL_NO_VERIFY'] = 'true'
+
if not os.path.exists(gitdir):
self.progress('.. initialising git dir')
self.run_program(['git', 'init', '--bare', gitdir])
@@ -317,12 +322,12 @@ class Lorry(cliapp.Application):
'+refs/tags/*:refs/tags/*'], cwd=gitdir)
try:
self.run_program(['git', 'remote', 'update', 'origin', '--prune'],
- cwd=gitdir)
+ cwd=gitdir, env=env)
except:
self.run_program(['git', 'remote', 'prune', 'origin'],
- cwd=gitdir)
+ cwd=gitdir, env=env)
self.run_program(['git', 'remote', 'update', 'origin', '--prune'],
- cwd=gitdir)
+ cwd=gitdir, env=env)
def gitify_bzr(self, project_name, dirname, gitdir, spec):
bzrdir = os.path.join(dirname, 'bzr')
@@ -350,12 +355,15 @@ class Lorry(cliapp.Application):
branchdir = os.path.join(bzrdir, branch)
if not os.path.exists(branchdir):
self.progress('.. doing initial bzr branch')
- self.run_program(['bzr', 'branch', '--quiet', address,
- branchdir])
+ self.run_program(
+ ['bzr', 'branch', '--quiet', '-Ossl.cert_reqs=none',
+ address, branchdir])
else:
self.progress('.. updating bzr branch')
- self.run_program(['bzr', 'pull', '--quiet', address],
- cwd=branchdir)
+ self.run_program(
+ ['bzr', 'pull', '--quiet', '-Ossl.cert_reqs=none',
+ address],
+ cwd=branchdir)
exports = {}
bzrmarks = os.path.join(gitdir, 'marks.bzr')
@@ -424,8 +432,12 @@ class Lorry(cliapp.Application):
def gitify_cvs(self, project_name, dirname, gitdir, spec):
self.needs_aggressive = True
- self.run_program(['git', 'cvsimport', '-a', '-d', spec['url'],
- '-C', gitdir, spec['module']])
+ env = dict(os.environ)
+ env['CVS_RSH'] = 'lorry-ssh-wrapper'
+ self.run_program(
+ ['git', 'cvsimport', '-a', '-d', spec['url'],
+ '-C', gitdir, spec['module']],
+ env=env)
def gitify_hg(self, project_name, dirname, gitdir, spec):
hgdir = os.path.join(dirname, 'hg')