[lxc-devel] [distrobuilder/master] sources/alpine: Fix edge builds

monstermunchkin on Github lxc-bot at linuxcontainers.org
Mon Nov 25 08:24:40 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 609 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20191125/5fe0df4b/attachment.bin>
-------------- next part --------------
From dc452b5c31cbb875ac02e7acd62d4a9f833c3c06 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Mon, 25 Nov 2019 09:20:54 +0100
Subject: [PATCH] sources/alpine: Fix edge builds

When building the edge release, the same_as field is required for
downloading the source tarball and fixing the repo URLs.
This commit fixes the regex which is used to alter the apk repo file.
It now includes versions like 3.10 and above.

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 sources/alpine-http.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sources/alpine-http.go b/sources/alpine-http.go
index 71ea61a..b32ea1d 100644
--- a/sources/alpine-http.go
+++ b/sources/alpine-http.go
@@ -103,7 +103,7 @@ func (s *AlpineLinuxHTTP) Run(definition shared.Definition, rootfsDir string) er
 			return err
 		}
 
-		err = shared.RunCommand("sed", "-i", "-e", "s/v[[:digit:]]\\.[[:digit:]]/edge/g", "/etc/apk/repositories")
+		err = shared.RunCommand("sed", "-i", "-e", "s/v[[:digit:]]\\.[[:digit:]]+/edge/g", "/etc/apk/repositories")
 		if err != nil {
 			exitChroot()
 			return err


More information about the lxc-devel mailing list