launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00759
[Merge] lp:~abentley/launchpad/no-chroot-builder into lp:launchpad/devel
Aaron Bentley has proposed merging lp:~abentley/launchpad/no-chroot-builder into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
= Summary =
Fix bug #599100: Recipe builds should have debianized tree built previous to
building the source package
== Proposed fix ==
Build the tree using bzr from outside the chroot, so that only the host OS
needs to support bzr-builder.
== Pre-implementation notes ==
Discussed with thumper, rockstar
== Implementation details ==
Since bzr-builder is now run in the host environment, launchpad-buildd now
depends on bzr-builder.
== Tests ==
Only interactive tests are possible for this code.
== Demo and Q/A ==
Create a source package recipe build targetting Jaunty. It should succeed.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/canonical/buildd/buildrecipe
lib/canonical/buildd/debian/control
./lib/canonical/buildd/debian/control
11: Line exceeds 78 characters.
--
https://code.launchpad.net/~abentley/launchpad/no-chroot-builder/+merge/33674
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~abentley/launchpad/no-chroot-builder into lp:launchpad/devel.
=== modified file 'lib/canonical/buildd/buildrecipe'
--- lib/canonical/buildd/buildrecipe 2010-08-20 17:23:15 +0000
+++ lib/canonical/buildd/buildrecipe 2010-08-25 17:12:53 +0000
@@ -55,8 +55,8 @@
"""
# XXX: AaronBentley 2010-07-07 bug=602463: pbuilder uses aptitude but
# does not depend on it.
- return self.chroot(['apt-get', 'install', '-y', 'pbuilder',
- 'bzr-builder', 'sudo', 'aptitude'])
+ return self.chroot([
+ 'apt-get', 'install', '-y', 'pbuilder', 'sudo', 'aptitude'])
def buildTree(self):
"""Build the recipe into a source tree.
@@ -65,11 +65,8 @@
:return: a retcode from `bzr dailydeb`.
"""
assert not os.path.exists(self.tree_path)
- recipe_path_relative = os.path.join(self.work_dir_relative, 'recipe')
- self.tree_path_relative = os.path.join(self.work_dir_relative, 'tree')
- manifest_path_relative = os.path.join(
- self.tree_path_relative, 'manifest')
- recipe_path = os.path.join(self.chroot_path, recipe_path_relative[1:])
+ recipe_path = os.path.join(self.work_dir, 'recipe')
+ manifest_path = os.path.join(self.tree_path, 'manifest')
recipe_file = open(recipe_path, 'rb')
try:
recipe = recipe_file.read()
@@ -82,6 +79,7 @@
print 'Building recipe:'
print recipe
+<<<<<<< TREE
retcode = self.chroot([
'sudo', '-i', '-u', self.username, 'DEBEMAIL=%s' % self.author_email,
'DEBFULLNAME=%s' % self.author_name.encode('utf-8'),
@@ -90,12 +88,23 @@
self.tree_path_relative, '--manifest', manifest_path_relative,
'--append-version', '~%s1' % self.distroseries_name],
echo=True)
+=======
+ sys.stdout.flush()
+ env = {
+ 'DEBEMAIL': self.author_email,
+ 'DEBFULLNAME': self.author_name.encode('utf-8'),
+ 'BZR_EMAIL': os.environ['BZR_EMAIL']}
+ retcode = call([
+ 'bzr', 'dailydeb', '--no-build', recipe_path,
+ self.tree_path, '--manifest', manifest_path,
+ '--append-version', '~%s1' % self.distroseries_name], env=env)
+>>>>>>> MERGE-SOURCE
if retcode != 0:
return retcode
(source,) = [name for name in os.listdir(self.tree_path)
if name != 'manifest']
- self.source_dir_relative = os.path.join(self.tree_path_relative,
- source)
+ self.source_dir_relative = os.path.join(
+ self.work_dir_relative, 'tree', source)
return retcode
def getPackageName(self):
@@ -163,10 +172,10 @@
if __name__ == '__main__':
builder = RecipeBuilder(*sys.argv[1:])
+ if builder.buildTree() != 0:
+ sys.exit(RETCODE_FAILURE_BUILD_TREE)
if builder.install() != 0:
sys.exit(RETCODE_FAILURE_INSTALL)
- if builder.buildTree() != 0:
- sys.exit(RETCODE_FAILURE_BUILD_TREE)
if builder.installBuildDeps() != 0:
sys.exit(RETCODE_FAILURE_INSTALL_BUILD_DEPS)
if builder.buildSourcePackage() != 0:
=== modified file 'lib/canonical/buildd/debian/control'
--- lib/canonical/buildd/debian/control 2010-07-22 16:15:58 +0000
+++ lib/canonical/buildd/debian/control 2010-08-25 17:12:53 +0000
@@ -8,7 +8,7 @@
Package: launchpad-buildd
Section: misc
Architecture: all
-Depends: python-twisted-core, python-twisted-web, debootstrap, dpkg-dev, linux32, file, bzip2, sudo, ntpdate, adduser, apt-transport-https, lsb-release, apache2, ${misc:Depends}
+Depends: python-twisted-core, python-twisted-web, debootstrap, dpkg-dev, linux32, file, bzip2, sudo, ntpdate, adduser, apt-transport-https, lsb-release, apache2, bzr-builder, ${misc:Depends}
Description: Launchpad buildd slave
This is the launchpad buildd slave package. It contains everything needed to
get a launchpad buildd going apart from the database manipulation required to