← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad-buildd/snap-build-info into lp:launchpad-buildd

 

Colin Watson has proposed merging lp:~cjwatson/launchpad-buildd/snap-build-info into lp:launchpad-buildd.

Commit message:
Set SNAPCRAFT_BUILD_INFO=1 to tell snapcraft to generate a manifest.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/snap-build-info/+merge/334252

See: https://forum.snapcraft.io/t/snap-updates-and-developer-notifications-on-security-updates/2754
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/snap-build-info into lp:launchpad-buildd.
=== modified file 'debian/changelog'
--- debian/changelog	2017-11-24 13:31:54 +0000
+++ debian/changelog	2017-11-24 16:09:21 +0000
@@ -7,6 +7,7 @@
     top level of a virtualenv.
   * Fall back to the package name from AC_INIT when expanding $(PACKAGE) in
     translation configuration files if no other definition can be found.
+  * Set SNAPCRAFT_BUILD_INFO=1 to tell snapcraft to generate a manifest.
 
   [ William Grant ]
   * Fix inclusion of buildd-slave.tac in MANIFEST.in.

=== modified file 'lpbuildd/target/build_snap.py'
--- lpbuildd/target/build_snap.py	2017-11-13 16:07:55 +0000
+++ lpbuildd/target/build_snap.py	2017-11-24 16:09:21 +0000
@@ -171,6 +171,9 @@
         env = OrderedDict()
         env["SNAPCRAFT_LOCAL_SOURCES"] = "1"
         env["SNAPCRAFT_SETUP_CORE"] = "1"
+        # XXX cjwatson 2017-11-24: Once we support building private snaps,
+        # we'll need to make this optional in some way.
+        env["SNAPCRAFT_BUILD_INFO"] = "1"
         if self.args.proxy_url:
             env["http_proxy"] = self.args.proxy_url
             env["https_proxy"] = self.args.proxy_url
@@ -184,6 +187,9 @@
         """Run all build, stage and snap phases."""
         logger.info("Running build phase...")
         env = OrderedDict()
+        # XXX cjwatson 2017-11-24: Once we support building private snaps,
+        # we'll need to make this optional in some way.
+        env["SNAPCRAFT_BUILD_INFO"] = "1"
         if self.args.proxy_url:
             env["http_proxy"] = self.args.proxy_url
             env["https_proxy"] = self.args.proxy_url

=== modified file 'lpbuildd/target/tests/test_build_snap.py'
--- lpbuildd/target/tests/test_build_snap.py	2017-11-10 20:55:33 +0000
+++ lpbuildd/target/tests/test_build_snap.py	2017-11-24 16:09:21 +0000
@@ -256,6 +256,7 @@
         env = {
             "SNAPCRAFT_LOCAL_SOURCES": "1",
             "SNAPCRAFT_SETUP_CORE": "1",
+            "SNAPCRAFT_BUILD_INFO": "1",
             }
         self.assertThat(build_snap.backend.run.calls, MatchesListwise([
             RanBuildCommand(
@@ -274,6 +275,7 @@
         env = {
             "SNAPCRAFT_LOCAL_SOURCES": "1",
             "SNAPCRAFT_SETUP_CORE": "1",
+            "SNAPCRAFT_BUILD_INFO": "1",
             "http_proxy": "http://proxy.example:3128/";,
             "https_proxy": "http://proxy.example:3128/";,
             "GIT_PROXY_COMMAND": "/usr/local/bin/snap-git-proxy",
@@ -292,7 +294,9 @@
         build_snap = parse_args(args=args).operation
         build_snap.build()
         self.assertThat(build_snap.backend.run.calls, MatchesListwise([
-            RanBuildCommand(["snapcraft"], cwd="/build/test-snap"),
+            RanBuildCommand(
+                ["snapcraft"], cwd="/build/test-snap",
+                SNAPCRAFT_BUILD_INFO="1"),
             ]))
 
     def test_build_proxy(self):
@@ -305,6 +309,7 @@
         build_snap = parse_args(args=args).operation
         build_snap.build()
         env = {
+            "SNAPCRAFT_BUILD_INFO": "1",
             "http_proxy": "http://proxy.example:3128/";,
             "https_proxy": "http://proxy.example:3128/";,
             "GIT_PROXY_COMMAND": "/usr/local/bin/snap-git-proxy",
@@ -332,8 +337,11 @@
                 ["bzr", "branch", "lp:foo", "test-snap"])),
             AnyMatch(RanBuildCommand(
                 ["snapcraft", "pull"], cwd="/build/test-snap",
-                SNAPCRAFT_LOCAL_SOURCES="1", SNAPCRAFT_SETUP_CORE="1")),
-            AnyMatch(RanBuildCommand(["snapcraft"], cwd="/build/test-snap")),
+                SNAPCRAFT_LOCAL_SOURCES="1", SNAPCRAFT_SETUP_CORE="1",
+                SNAPCRAFT_BUILD_INFO="1")),
+            AnyMatch(RanBuildCommand(
+                ["snapcraft"], cwd="/build/test-snap",
+                SNAPCRAFT_BUILD_INFO="1")),
             ))
 
     def test_run_install_fails(self):