phase1: use single var for rsync_bin_defopts and rsync_src_defopts
[buildbot.git] / phase1 / buildbot.tac
1 import os
2
3 from twisted.application import service
4 from buildbot.master import BuildMaster
5
6 basedir = '.'
7 rotateLength = 10000000
8 maxRotatedFiles = 10
9 configfile = 'master.cfg'
10
11 # Default umask for server
12 umask = None
13
14 # if this is a relocatable tac file, get the directory containing the TAC
15 if basedir == '.':
16 import os
17 basedir = os.path.abspath(os.path.dirname(__file__))
18
19 # note: this line is matched against to check that this is a buildmaster
20 # directory; do not edit it.
21 application = service.Application('buildmaster')
22 from twisted.python.logfile import LogFile
23 from twisted.python.log import ILogObserver, FileLogObserver
24 logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength,
25 maxRotatedFiles=maxRotatedFiles)
26 application.setComponent(ILogObserver, FileLogObserver(logfile).emit)
27
28 m = BuildMaster(basedir, configfile, umask)
29 m.setServiceParent(application)
30 m.log_rotation.rotateLength = rotateLength
31 m.log_rotation.maxRotatedFiles = maxRotatedFiles