Merge lp:~cjwatson/launchpad-buildd/rename-slave-config-section into lp:launchpad-buildd

Proposed by Colin Watson
Status: Rejected
Rejected by: Colin Watson
Proposed branch: lp:~cjwatson/launchpad-buildd/rename-slave-config-section
Merge into: lp:launchpad-buildd
Diff against target: 148 lines (+29/-10)
8 files modified
debian/changelog (+6/-0)
debian/upgrade-config (+14/-1)
lpbuildd/buildd-slave.tac (+2/-2)
lpbuildd/builder.py (+3/-3)
lpbuildd/debian.py (+1/-1)
lpbuildd/tests/buildd-slave-test.conf (+1/-1)
lpbuildd/tests/harness.py (+1/-1)
template-buildd-slave.conf (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/launchpad-buildd/rename-slave-config-section
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+373354@code.launchpad.net

Commit message

Rename [slave] configuration section to [builder].

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Unmerged revisions

392. By Colin Watson

Rename [slave] configuration section to [builder].

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2019-08-23 09:58:21 +0000
+++ debian/changelog 2019-09-27 22:28:16 +0000
@@ -1,3 +1,9 @@
1launchpad-buildd (178) UNRELEASED; urgency=medium
2
3 * Rename [slave] configuration section to [builder].
4
5 -- Colin Watson <cjwatson@ubuntu.com> Fri, 27 Sep 2019 23:26:30 +0100
6
1launchpad-buildd (177) xenial; urgency=medium7launchpad-buildd (177) xenial; urgency=medium
28
3 * Fix recipe building to not rely on /CurrentlyBuilding existing in base9 * Fix recipe building to not rely on /CurrentlyBuilding existing in base
410
=== modified file 'debian/upgrade-config'
--- debian/upgrade-config 2018-06-07 16:23:43 +0000
+++ debian/upgrade-config 2019-09-27 22:28:16 +0000
@@ -1,6 +1,6 @@
1#!/usr/bin/python1#!/usr/bin/python
2#2#
3# Copyright 2009, 2010, 2011 Canonical Ltd. This software is licensed under the3# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
4# GNU Affero General Public License version 3 (see the file LICENSE).4# GNU Affero General Public License version 3 (see the file LICENSE).
55
6"""Upgrade a launchpad-buildd configuration file."""6"""Upgrade a launchpad-buildd configuration file."""
@@ -208,6 +208,17 @@
208 "\n[snapmanager]\n"208 "\n[snapmanager]\n"
209 "proxyport = 8222\n")209 "proxyport = 8222\n")
210210
211def upgrade_to_178():
212 print("Upgrading %s to version 178" % conf_file)
213 os.rename(conf_file, conf_file + "-prev178~")
214
215 with open(conf_file + "-prev178~", "r") as in_file:
216 with open(conf_file, "w") as out_file:
217 for line in in_file:
218 if line.strip() == "[slave]":
219 line = "[builder]\n"
220 out_file.write(line)
221
211if __name__ == "__main__":222if __name__ == "__main__":
212 old_version = re.sub(r'[~-].*', '', old_version)223 old_version = re.sub(r'[~-].*', '', old_version)
213 if apt_pkg.version_compare(old_version, "12") < 0:224 if apt_pkg.version_compare(old_version, "12") < 0:
@@ -236,3 +247,5 @@
236 upgrade_to_127()247 upgrade_to_127()
237 if apt_pkg.version_compare(old_version, "162") < 0:248 if apt_pkg.version_compare(old_version, "162") < 0:
238 upgrade_to_162()249 upgrade_to_162()
250 if apt_pkg.version_compare(old_version, "178") < 0:
251 upgrade_to_178()
239252
=== modified file 'lpbuildd/buildd-slave.tac'
--- lpbuildd/buildd-slave.tac 2019-02-12 10:35:12 +0000
+++ lpbuildd/buildd-slave.tac 2019-09-27 22:28:16 +0000
@@ -54,10 +54,10 @@
5454
55root = resource.Resource()55root = resource.Resource()
56root.putChild('rpc', builder)56root.putChild('rpc', builder)
57root.putChild('filecache', static.File(conf.get('slave', 'filecache')))57root.putChild('filecache', static.File(conf.get('builder', 'filecache')))
58buildersite = server.Site(root)58buildersite = server.Site(root)
5959
60strports.service("tcp:%s" % builder.builder._config.get("slave", "bindport"),60strports.service("tcp:%s" % builder.builder._config.get("builder", "bindport"),
61 buildersite).setServiceParent(builderService)61 buildersite).setServiceParent(builderService)
6262
63# You can interact with a running builder like this:63# You can interact with a running builder like this:
6464
=== modified file 'lpbuildd/builder.py'
--- lpbuildd/builder.py 2019-09-27 22:14:50 +0000
+++ lpbuildd/builder.py 2019-09-27 22:28:16 +0000
@@ -137,7 +137,7 @@
137 if reactor is None:137 if reactor is None:
138 reactor = default_reactor138 reactor = default_reactor
139 self._reactor = reactor139 self._reactor = reactor
140 self._sharepath = builder._config.get("slave", "sharepath")140 self._sharepath = builder._config.get("builder", "sharepath")
141 self._bin = os.path.join(self._sharepath, "bin")141 self._bin = os.path.join(self._sharepath, "bin")
142 self._preppath = os.path.join(self._bin, "builder-prep")142 self._preppath = os.path.join(self._bin, "builder-prep")
143 self._intargetpath = os.path.join(self._bin, "in-target")143 self._intargetpath = os.path.join(self._bin, "in-target")
@@ -382,7 +382,7 @@
382 object.__init__(self)382 object.__init__(self)
383 self._config = config383 self._config = config
384 self.builderstatus = BuilderStatus.IDLE384 self.builderstatus = BuilderStatus.IDLE
385 self._cachepath = self._config.get("slave","filecache")385 self._cachepath = self._config.get("builder", "filecache")
386 self.buildstatus = BuildStatus.OK386 self.buildstatus = BuildStatus.OK
387 self.waitingfiles = {}387 self.waitingfiles = {}
388 self.builddependencies = ""388 self.builddependencies = ""
@@ -394,7 +394,7 @@
394394
395 def getArch(self):395 def getArch(self):
396 """Return the Architecture tag for the builder."""396 """Return the Architecture tag for the builder."""
397 return self._config.get("slave","architecturetag")397 return self._config.get("builder", "architecturetag")
398398
399 def cachePath(self, file):399 def cachePath(self, file):
400 """Return the path in the cache of the file specified."""400 """Return the path in the cache of the file specified."""
401401
=== modified file 'lpbuildd/debian.py'
--- lpbuildd/debian.py 2019-06-10 11:09:51 +0000
+++ lpbuildd/debian.py 2019-09-27 22:28:16 +0000
@@ -41,7 +41,7 @@
4141
42 def __init__(self, builder, buildid, **kwargs):42 def __init__(self, builder, buildid, **kwargs):
43 BuildManager.__init__(self, builder, buildid, **kwargs)43 BuildManager.__init__(self, builder, buildid, **kwargs)
44 self._cachepath = builder._config.get("slave", "filecache")44 self._cachepath = builder._config.get("builder", "filecache")
45 self._state = DebianBuildState.INIT45 self._state = DebianBuildState.INIT
46 builder.emptyLog()46 builder.emptyLog()
47 self.alreadyfailed = False47 self.alreadyfailed = False
4848
=== modified file 'lpbuildd/tests/buildd-slave-test.conf'
--- lpbuildd/tests/buildd-slave-test.conf 2019-09-27 22:14:50 +0000
+++ lpbuildd/tests/buildd-slave-test.conf 2019-09-27 22:28:16 +0000
@@ -1,6 +1,6 @@
1# Test buildd configuration1# Test buildd configuration
22
3[slave]3[builder]
4architecturetag = i3864architecturetag = i386
5filecache = /var/tmp/buildd/filecache5filecache = /var/tmp/buildd/filecache
6bindhost = localhost6bindhost = localhost
77
=== modified file 'lpbuildd/tests/harness.py'
--- lpbuildd/tests/harness.py 2019-09-27 22:14:50 +0000
+++ lpbuildd/tests/harness.py 2019-09-27 22:28:16 +0000
@@ -44,7 +44,7 @@
44 """Setup a Builder using the test config."""44 """Setup a Builder using the test config."""
45 conf = SafeConfigParser()45 conf = SafeConfigParser()
46 conf.read(test_conffile)46 conf.read(test_conffile)
47 conf.set("slave", "filecache", tempfile.mkdtemp())47 conf.set("builder", "filecache", tempfile.mkdtemp())
4848
49 self.slave = Builder(conf)49 self.slave = Builder(conf)
50 self.slave._log = True50 self.slave._log = True
5151
=== modified file 'template-buildd-slave.conf'
--- template-buildd-slave.conf 2019-09-27 22:14:50 +0000
+++ template-buildd-slave.conf 2019-09-27 22:28:16 +0000
@@ -2,7 +2,7 @@
2#2#
3# Configuration for buildd: @NAME@3# Configuration for buildd: @NAME@
44
5[slave]5[builder]
6architecturetag = @ARCHTAG@6architecturetag = @ARCHTAG@
7filecache = /home/buildd/filecache-@NAME@7filecache = /home/buildd/filecache-@NAME@
8bindhost = @BINDHOST@8bindhost = @BINDHOST@

Subscribers

People subscribed via source and target branches

to all changes: