← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~tushar5526/launchpad-buildd:add-dirmngr-to-support-repo-overlay-feature-in-rock-builds into launchpad-buildd:master

 

Tushar Gupta has proposed merging ~tushar5526/launchpad-buildd:add-dirmngr-to-support-repo-overlay-feature-in-rock-builds into launchpad-buildd:master.

Commit message:
fix: Install dirmngr during rock builds

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~tushar5526/launchpad-buildd/+git/launchpad-buildd/+merge/474842
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~tushar5526/launchpad-buildd:add-dirmngr-to-support-repo-overlay-feature-in-rock-builds into launchpad-buildd:master.
diff --git a/lpbuildd/target/build_rock.py b/lpbuildd/target/build_rock.py
index ed82adb..03d433b 100644
--- a/lpbuildd/target/build_rock.py
+++ b/lpbuildd/target/build_rock.py
@@ -76,6 +76,9 @@ class BuildRock(
                 "python3-setuptools",
             ]
         )
+        # repo-overlay features requries dirmngr to access OpenPGP keyservers
+        # otherwise the build errors out with unknown GPG key error
+        deps.extend(["dirmngr"])
         self.backend.run(["apt-get", "-y", "install"] + deps)
         if self.backend.supports_snapd:
             self.snap_store_set_proxy()
diff --git a/lpbuildd/target/tests/test_build_rock.py b/lpbuildd/target/tests/test_build_rock.py
index 81e1ebc..4cc1555 100644
--- a/lpbuildd/target/tests/test_build_rock.py
+++ b/lpbuildd/target/tests/test_build_rock.py
@@ -99,7 +99,11 @@ class TestBuildRock(TestCase):
             MatchesListwise(
                 [
                     RanAptGet(
-                        "install", "bzr", "python3-pip", "python3-setuptools"
+                        "install",
+                        "bzr",
+                        "python3-pip",
+                        "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanSnap("install", "--channel=candidate", "core"),
                     RanSnap("install", "--channel=beta", "core18"),
@@ -129,7 +133,11 @@ class TestBuildRock(TestCase):
             MatchesListwise(
                 [
                     RanAptGet(
-                        "install", "bzr", "python3-pip", "python3-setuptools"
+                        "install",
+                        "bzr",
+                        "python3-pip",
+                        "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanSnap("install", "--classic", "rockcraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
@@ -155,7 +163,11 @@ class TestBuildRock(TestCase):
             MatchesListwise(
                 [
                     RanAptGet(
-                        "install", "git", "python3-pip", "python3-setuptools"
+                        "install",
+                        "git",
+                        "python3-pip",
+                        "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanSnap("install", "--classic", "rockcraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
@@ -202,7 +214,11 @@ class TestBuildRock(TestCase):
             MatchesListwise(
                 [
                     RanAptGet(
-                        "install", "git", "python3-pip", "python3-setuptools"
+                        "install",
+                        "git",
+                        "python3-pip",
+                        "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanCommand(
                         ["snap", "ack", "/dev/stdin"],
@@ -249,6 +265,7 @@ class TestBuildRock(TestCase):
                         "git",
                         "python3-pip",
                         "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanSnap("install", "--classic", "rockcraft"),
                     RanCommand(["mkdir", "-p", "/home/buildd"]),
@@ -296,6 +313,7 @@ class TestBuildRock(TestCase):
                         "git",
                         "python3-pip",
                         "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanSnap("install", "--classic", "rockcraft"),
                     RanCommand(["rm", "-rf", "/var/lib/apt/lists"]),
@@ -391,6 +409,7 @@ class TestBuildRock(TestCase):
                         "git",
                         "python3-pip",
                         "python3-setuptools",
+                        "dirmngr",
                     ),
                     RanSnap("install", "--classic", "rockcraft"),
                     RanCommand(["rm", "-rf", "/var/lib/apt/lists"]),
@@ -999,7 +1018,11 @@ class TestBuildRock(TestCase):
             MatchesAll(
                 AnyMatch(
                     RanAptGet(
-                        "install", "bzr", "python3-pip", "python3-setuptools"
+                        "install",
+                        "bzr",
+                        "python3-pip",
+                        "python3-setuptools",
+                        "dirmngr",
                     ),
                 ),
                 AnyMatch(

References