From 114543d50ac95fd49ffb64d524aac61d155be779 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 2 Oct 2022 03:19:50 -0700 Subject: [PATCH] all: use new acquire functionality --- cosmo-kuroko/Dockerfile | 10 ++-------- cosmo-perl/Dockerfile | 12 +++--------- cosmo-yices/Dockerfile | 21 +++++---------------- cosmo/Dockerfile | 10 ++-------- 4 files changed, 12 insertions(+), 41 deletions(-) diff --git a/cosmo-kuroko/Dockerfile b/cosmo-kuroko/Dockerfile index ebb1389..d20f981 100644 --- a/cosmo-kuroko/Dockerfile +++ b/cosmo-kuroko/Dockerfile @@ -8,14 +8,8 @@ ARG KUROKO_SHA256=29ab4ca692f5adf1507d9730888c80c312965d4daa33c7a8cae9d0d480cbb7 RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \ --mount=type=tmpfs,target=/tmp : \ - && cd /media/common \ - && name=kuroko \ - && export remote_fn="$KUROKO_COMMIT.tar.gz" \ - && export local_fn="$name-$remote_fn" \ - && export remote_url="https://github.com/kuroko-lang/$name/archive/$remote_fn" \ - && export dest=/$name \ - && export sha256="$KUROKO_SHA256" \ - && acquire \ + && acquire from=github repo=kuroko-lang/kuroko dest=/kuroko \ + commit="$KUROKO_COMMIT" checksum="$KUROKO_SHA256" \ ; FROM localhost/cosmo AS builder diff --git a/cosmo-perl/Dockerfile b/cosmo-perl/Dockerfile index 29603f4..51617c1 100644 --- a/cosmo-perl/Dockerfile +++ b/cosmo-perl/Dockerfile @@ -11,17 +11,11 @@ ARG PERLTIDY_SHA256=50496a6952904ef28f495919fc0a67801a63c87779c61308ce1ca5b32467 RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \ --mount=type=tmpfs,target=/tmp : \ - && cd /media/common \ - && name=perl \ - && export remote_fn="$PERL_COMMIT.tar.gz" \ - && export local_fn="$name-$remote_fn" \ - && export remote_url="https://github.com/G4Vi/perl5/archive/$remote_fn" \ - && export dest=/$name \ - && export sha256="$PERL_SHA256" \ - && acquire \ + && acquire from=github repo=Perl/perl5 dest=/perl \ + commit="$PERL_COMMIT" checksum="$PERL_SHA256" \ \ && name=perltidy \ - && export remote_fn="Perl-Tidy-$PERLTIDY_VERSION.tar.gz" \ + && remote_fn="Perl-Tidy-$PERLTIDY_VERSION.tar.gz" \ && export local_fn="$name-$PERLTIDY_VERSION.tar.gz" \ && export remote_url="https://cpan.metacpan.org/authors/id/S/SH/SHANCOCK/$remote_fn" \ && export dest=/$name \ diff --git a/cosmo-yices/Dockerfile b/cosmo-yices/Dockerfile index 3df5a5a..7b2e0e8 100644 --- a/cosmo-yices/Dockerfile +++ b/cosmo-yices/Dockerfile @@ -15,30 +15,19 @@ ENV KISSAT_SHA256=031fca7efcb17c6f1921dd056052bd373de724e445fc2ed37bfdd595414811 RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \ --mount=type=tmpfs,target=/tmp : \ - && cd /media/common \ - && name=yices \ - && export remote_fn="$YICES_COMMIT.tar.gz" \ - && export local_fn="$name-$remote_fn" \ - && export remote_url="https://github.com/SRI-CSL/yices2/archive/$remote_fn" \ - && export dest=/$name \ - && export sha256="$YICES_SHA256" \ - && acquire \ + && acquire from=github repo=SRI-CSL/yices2 dest=/yices \ + commit="$YICES_COMMIT" checksum="$YICES_SHA256" \ \ && name=gmp \ - && export remote_fn="$name-$GMP_VERSION.tar.xz" \ + && remote_fn="$name-$GMP_VERSION.tar.xz" \ && export local_fn="$remote_fn" \ && export remote_url="https://gmplib.org/download/gmp/$remote_fn" \ && export dest=/$name \ && export sha256="$GMP_SHA256" \ && acquire \ \ - && name=kissat \ - && export remote_fn="$KISSAT_COMMIT.tar.gz" \ - && export local_fn="$name-$remote_fn" \ - && export remote_url="https://github.com/arminbiere/kissat/archive/$remote_fn" \ - && export dest=/$name \ - && export sha256="$KISSAT_SHA256" \ - && acquire \ + && acquire from=github repo=arminbiere/kissat dest=/kissat \ + commit="$KISSAT_COMMIT" checksum="$KISSAT_SHA256" \ ; FROM localhost/cosmo AS builder diff --git a/cosmo/Dockerfile b/cosmo/Dockerfile index 768d50c..06f6eab 100644 --- a/cosmo/Dockerfile +++ b/cosmo/Dockerfile @@ -10,14 +10,8 @@ ARG COSMO_COMMIT ARG COSMO_SHA256 RUN --mount=type=cache,id=common,target=/media/common,sharing=locked \ --mount=type=tmpfs,target=/tmp : \ - && cd /media/common \ - && name=cosmopolitan \ - && export remote_fn="$COSMO_COMMIT.tar.gz" \ - && export local_fn="$name-$remote_fn" \ - && export remote_url="https://github.com/jart/$name/archive/$remote_fn" \ - && export dest=/$name \ - && export sha256="$COSMO_SHA256" \ - && acquire \ + && acquire from=github repo=jart/cosmopolitan dest=/cosmopolitan \ + commit="$COSMO_COMMIT" checksum="$COSMO_SHA256" \ ; FROM alpine:3.16 AS builder