[lxc-devel] [lxc-ci/master] images/gentoo: Fix keyserver

monstermunchkin on Github lxc-bot at linuxcontainers.org
Fri Feb 21 11:59:57 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 428 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200221/bf39c8ca/attachment.bin>
-------------- next part --------------
From c4567c9ce7925a4c426dab9a32bde8e4c81be4ff Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 21 Feb 2020 12:58:49 +0100
Subject: [PATCH] images/gentoo: Fix keyserver

This fixes the keyserver when running `distrobuilder pack-lx{c,d}`.

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 images/gentoo.yaml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/images/gentoo.yaml b/images/gentoo.yaml
index 483b878..30df501 100644
--- a/images/gentoo.yaml
+++ b/images/gentoo.yaml
@@ -398,6 +398,23 @@ actions:
          echo pf:12345:powerwait:/sbin/halt >> /etc/inittab
      fi
 
+ - trigger: post-unpack
+   action: |-
+     #!/bin/sh
+     set -eux
+
+     # Workaround GPG issues
+     mv /usr/bin/gpg2 /usr/bin/gpg2.real
+     echo "#!/bin/sh" > /usr/bin/gpg2
+     echo "exec /usr/bin/gpg2.real --keyserver keyserver.ubuntu.com \"\$@\"" >> /usr/bin/gpg2
+     chmod +x /usr/bin/gpg2
+
+     cp /usr/share/portage/config/repos.conf /usr/share/portage/config/repos.conf.orig
+     sed -i "s#hkps://keys.gentoo.org#keyserver.ubuntu.com#g" /usr/share/portage/config/repos.conf
+   types:
+    - containers
+    - vm
+
  - trigger: post-packages
    action: |-
      #!/bin/sh
@@ -411,6 +428,19 @@ actions:
      rm /usr/share/portage/config/repos.conf
      mv /usr/share/portage/config/repos.conf.orig /usr/share/portage/config/repos.conf
 
+ - trigger: post-packages
+   action: |-
+     #!/bin/sh
+     set -eux
+
+     rm /usr/bin/gpg2
+     mv /usr/bin/gpg2.real /usr/bin/gpg2
+     rm /usr/share/portage/config/repos.conf
+     mv /usr/share/portage/config/repos.conf.orig /usr/share/portage/config/repos.conf
+   types:
+    - containers
+    - vm
+
  - trigger: post-packages
    action: |-
      #!/bin/sh


More information about the lxc-devel mailing list