From 7715b6bb4594589e822d0b48176a3b307b94457f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Mon, 4 Nov 2024 18:18:37 -0500 Subject: [PATCH] build-image-distrobuilder: Include umoci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- bin/build-image-distrobuilder | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/build-image-distrobuilder b/bin/build-image-distrobuilder index 992a7258..40db053d 100755 --- a/bin/build-image-distrobuilder +++ b/bin/build-image-distrobuilder @@ -1,6 +1,4 @@ #!/bin/sh -eu -export PATH="/snap/bin/:${PATH}" - cleanup() { set +e incus delete build-distrobuilder-cache -f >/dev/null 2>&1 @@ -110,11 +108,22 @@ GOARCH=\$(dpkg --print-architecture) [ "\${GOARCH}" = "armhf" ] && GOARCH=armv6l curl -sL "https://go.dev/dl/go1.21.3.linux-\${GOARCH}.tar.gz" | tar -zx -C /usr/local/ export PATH=/usr/local/go/bin:\${PATH} + git clone https://github.com/lxc/distrobuilder --depth 1 cd distrobuilder make cp /root/go/bin/distrobuilder /usr/local/bin/ -rm -Rf /root/distrobuilder /root/go /root/.cache +cd - + +# Install umoci +git clone https://github.com/opencontainers/umoci --depth 1 +cd umoci +make +cp umoci /usr/local/bin/ +cd - + +# Cleanup +rm -Rf /root/distrobuilder /root/umoci /root/go /root/.cache # All done exit 0