[lxc-devel] [lxc-ci/master] images/gentoo: Make rsync mirror configurable

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


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 357 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200221/a854fa06/attachment.bin>
-------------- next part --------------
From e9bd488ce4e529c5390999a941e424550ea26026 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 21 Feb 2020 17:56:39 +0100
Subject: [PATCH] images/gentoo: Make rsync mirror configurable

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

diff --git a/images/gentoo.yaml b/images/gentoo.yaml
index 30df501..6dc3910 100644
--- a/images/gentoo.yaml
+++ b/images/gentoo.yaml
@@ -390,6 +390,7 @@ actions:
 
      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
+     sed -ri "s#(sync-uri =) .+#\1 ${RSYNC_MIRROR}#" /usr/share/portage/config/repos.conf
 
      # Patch up /etc/inittab
      if [ -e /etc/inittab ]; then
@@ -411,6 +412,7 @@ actions:
 
      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
+     sed -ri "s#(sync-uri =) .+#\1 ${RSYNC_MIRROR}#" /usr/share/portage/config/repos.conf
    types:
     - containers
     - vm
@@ -452,5 +454,10 @@ actions:
    variants:
      - cloud
 
+environment:
+  variables:
+    - key: RSYNC_MIRROR
+      value: rsync://rsync.ca.gentoo.org/gentoo-portage/
+
 mappings:
   architecture_map: gentoo


More information about the lxc-devel mailing list