Merged with invirtibuilder fixes
authorSteven Valdez <dvorak42@mit.edu>
Fri, 19 Jul 2013 16:42:13 +0000 (12:42 -0400)
committerSteven Valdez <dvorak42@mit.edu>
Fri, 19 Jul 2013 16:42:13 +0000 (12:42 -0400)
1  2 
debian/changelog
invirtibuilder

diff --combined debian/changelog
@@@ -1,65 -1,31 +1,75 @@@
- invirt-dev (0.1.24~glasgall7adehnert1achernya1) unstable; urgency=low
++invirt-dev (0.1.27) unstable; urgency=low
 +
 +  * Switch to dh7
 +  * Bump standards version
 +
 + -- Alexander Chernyakhovsky <achernya@mit.edu>  Fri, 31 May 2013 03:40:11 -0400
 +
- invirt-dev (0.1.24~glasgall7adehnert1) unstable; urgency=low
-   *  Use opcode "auto" for build zephyrs
-  -- Alex Dehnert <adehnert@mit.edu>  Wed, 24 Apr 2013 23:05:15 -0400
- invirt-dev (0.1.24~glasgall7) precise; urgency=low
++invirt-dev (0.1.26~glasgall7) precise; urgency=low
 +
 +  * Actually invoke sbuild correctly. Oops.
 +
 + -- Adam Glasgall <glasgall@mit.edu>  Thu, 18 Apr 2013 23:21:47 -0400
 +
- invirt-dev (0.1.24~glasgall6) precise; urgency=low
++invirt-dev (0.1.26~glasgall6) precise; urgency=low
 +
 +  * Specify a maintainer when building packages (sbuild behavior changed)
 +
 + -- Adam Glasgall <glasgall@mit.edu>  Thu, 18 Apr 2013 22:19:51 -0400
 +
- invirt-dev (0.1.24~glasgall5) precise; urgency=low
++invirt-dev (0.1.26~glasgall5) precise; urgency=low
 +
 +  * more API updates
 +
 + -- Adam Glasgall <glasgall@mit.edu>  Thu, 18 Apr 2013 18:42:55 -0400
 +
- invirt-dev (0.1.24~glasgall4) precise; urgency=low
++invirt-dev (0.1.26~glasgall4) precise; urgency=low
 +
 +  * Replace calls to session.save_or_update with session.add (removal of
 +    deprecated API use)
 +
 + -- Adam Glasgall <glasgall@mit.edu>  Thu, 18 Apr 2013 18:32:24 -0400
 +
- invirt-dev (0.1.24~glasgall3ubuntu1) precise; urgency=low
++invirt-dev (0.1.26~glasgall3ubuntu1) precise; urgency=low
 +
 +  * Change Depends on emacs21 to emacs, now that emacs22 and up are a thing.
 +
 + -- Adam Glasgall <glasgall@mit.edu>  Tue, 16 Apr 2013 21:51:40 -0400
 +
- invirt-dev (0.1.24~glasgall3) precise; urgency=low
++invirt-dev (0.1.26~glasgall3) precise; urgency=low
 +
 +  * Port packaging to dh_python2
 +
 + -- Adam Glasgall <glasgall@mit.edu>  Tue, 16 Apr 2013 21:46:24 -0400
 +
- invirt-dev (0.1.24~glasgall2) precise; urgency=low
+ invirt-dev (0.1.26) unstable; urgency=low
+   * invirtibuilder creates missing pocket branches in super-repository
+   * invirtibuilder no longer overwrites submodules with .gitmodules blob in
+     tree
+  -- Peter Iannucci <iannucci@mit.edu>  Tue, 16 Jul 2013 17:07:00 -0400
  
-   * No-change rebuild to see if it'll help invirtibuilder pick up the
-     pieces.
+ invirt-dev (0.1.25) unstable; urgency=low
  
-  -- Adam Glasgall <glasgall@mit.edu>  Tue, 16 Apr 2013 20:16:38 -0400
+   * invirt-submit-build allows builds in new pockets
+   * invirtibuilder warns if super-repository does not contain the pocket
+     branch
  
- invirt-dev (0.1.24~glasgall1) precise; urgency=low
+  -- Peter Iannucci <iannucci@mit.edu>  Mon, 15 Jul 2013 14:46:00 -0400
  
-   * Bump version for rebuild for precise
+ invirt-dev (0.1.25~glasgall1) unstable; urgency=low
  
-  -- Adam Glasgall <glasgall@mit.edu>  Mon, 15 Apr 2013 18:35:16 -0400
+   * Build source packages in a chroot as well so that they can take
+     advantage of newer debhelper et al versions.
+  -- Adam Glasgall <glasgall@mit.edu>  Fri, 12 Jul 2013 23:48:06 -0400
+ invirt-dev (0.1.24) unstable; urgency=low
+   *  Use opcode "auto" for build zephyrs
+  -- Alex Dehnert <adehnert@mit.edu>  Wed, 24 Apr 2013 23:05:15 -0400
  
  invirt-dev (0.1.23) unstable; urgency=low
  
diff --combined invirtibuilder
@@@ -133,13 -133,12 +133,13 @@@ def sbuild(package, ref, distro, arch, 
      nmutag = b.distroToSuffix(distro)
      env = os.environ.copy()
      env['NMUTAG'] = nmutag
 -
 +    maintainer = "Invirt Autobuilder <%s>" % (config.contact,)
      # Run sbuild with a hack in place to append arbitrary versions
      args = ['perl', '-I/usr/share/invirt-dev', '-MSbuildHack',
              '/usr/bin/sbuild',
              '--binNMU=171717', '--make-binNMU=Build with sbuild',
 -            '-v', '-d', distro, '--arch', arch]
 +            '-v', '-d', distro, '-m', maintainer, 
 +            '--arch', arch]
      if arch_all:
          args.append('-A')
      args.append(getDscName(package, ref))
@@@ -221,7 -220,31 +221,31 @@@ def updateSuperproject(pocket, package
      pushes to the superproject.
      """
      superproject = os.path.join(b._REPO_DIR, 'invirt/packages.git')
      branch = b.pocketToGit(pocket)
+     if not b.pocketExists(pocket, superproject):
+         gitmodules = "\n"
+         gitmodules_hash = logAndRun(['git', 'hash-object', '-w', '--stdin'],
+                                     cwd=superproject,
+                                     stdin_str=gitmodules).strip()
+         tree_items = {'.gitmodules': "100644 blob "+gitmodules_hash}
+         new_tree = "\n".join("%s\t%s" % (v, k) for (k, v) in tree_items.iteritems())
+         new_tree_id = logAndRun(['git', 'mktree', '--missing'],
+                                 cwd=superproject,
+                                 stdin_str=new_tree).strip()
+         env2 = dict(os.environ)
+         env2['GIT_AUTHOR_NAME'] = config.build.tagger.name
+         env2['GIT_AUTHOR_EMAIL'] = config.build.tagger.email
+         env2['GIT_COMMITTER_NAME'] = config.build.tagger.name
+         env2['GIT_COMMITTER_EMAIL'] = config.build.tagger.email
+         new_commit = logAndRun(['git', 'commit-tree', new_tree_id],
+                                cwd=superproject,
+                                env=env2,
+                                stdin_str="Create new pocket").strip()
+         logAndRun(['git', 'update-ref', 'refs/heads/%s' % branch, new_commit],
+                   cwd=superproject)
      tree = logAndRun(['git', 'ls-tree', branch],
                       cwd=superproject).strip()
  
              gitmodules_hash = logAndRun(['git', 'hash-object', '-w', '--stdin'],
                                          cwd=superproject,
                                          stdin_str=gitmodules).strip()
-             tree_items[package] = "100644 blob "+gitmodules_hash
+             tree_items['.gitmodules'] = "100644 blob "+gitmodules_hash
  
      new_tree = "\n".join("%s\t%s" % (v, k) for (k, v) in tree_items.iteritems())
  
@@@ -331,7 -354,7 +355,7 @@@ def build()
          db.pocket = pocket
          db.commit = commit
          db.principal = principal
 -        database.session.save_or_update(db)
 +        database.session.add(db)
          database.session.commit()
  
          database.session.begin()
              env = dict(os.environ)
              env['GIT_COMMITTER_NAME'] = config.build.tagger.name
              env['GIT_COMMITTER_EMAIL'] = config.build.tagger.email
+             env['GIT_AUTHOR_NAME'] = principal.split('@')[0]
+             env['GIT_AUTHOR_EMAIL'] = principal
  
              # If validateBuild returns something other than True, then
              # it means we should copy from that pocket to our pocket.
                      # If we were, we could use debuild and get nice
                      # environment scrubbing. Since we're not, debuild
                      # complains about not having an orig.tar.gz
-                     logAndRun(['dpkg-buildpackage', '-us', '-uc', '-S'],
+                     logAndRun(['schroot', '-c', 
+                                '%s-amd64-sbuild' % (b.pocketToDistro(pocket),), 
+                                '--', 'dpkg-buildpackage', '-us', '-uc', '-S'],
                                cwd=packagedir)
  
                      db.failed_stage = 'building binary packages'
              if logfile is not None:
                  logfile.close()
  
 -            database.session.save_or_update(db)
 +            database.session.add(db)
              database.session.commit()
  
              # Finally, now that everything is done, remove the