From 60b258f57c6e0c3f2af71c48bee755ee1bcef285 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sun, 21 Feb 2021 12:58:18 +1300 Subject: [PATCH] repo: Automated local repository builder --- repo/Dockerfile | 5 ++--- repo/README.MD | 4 ++++ repo/make.sh | 12 +++++++++--- 3 files changed, 15 insertions(+), 6 deletions(-) mode change 100644 => 100755 repo/make.sh diff --git a/repo/Dockerfile b/repo/Dockerfile index beeb9d0..d49182e 100644 --- a/repo/Dockerfile +++ b/repo/Dockerfile @@ -1,8 +1,7 @@ FROM alpine:3.13 -RUN apk add --no-cache gnupg jq zlib zlib-dev cmake cmake-doc extra-cmake-modules extra-cmake-modules-doc build-base gcc abuild binutils binutils-doc gcc-doc yq bash coreutils util-linux pciutils usbutils coreutils binutils findutils grep && \ +RUN apk add --no-cache python3 py3-pip gnupg jq zlib zlib-dev cmake cmake-doc extra-cmake-modules extra-cmake-modules-doc build-base gcc abuild binutils binutils-doc gcc-doc yq bash coreutils util-linux pciutils usbutils coreutils binutils findutils grep && \ ln -sf /bin/bash /bin/sh && \ - wget https://github.com/mikefarah/yq/releases/download/2.4.1/yq_linux_amd64 -O /usr/bin/yq &&\ - chmod +x /usr/bin/yq + pip3 install 'yq==2.12.0' CMD [ "bash", "/repo/make.sh" ] \ No newline at end of file diff --git a/repo/README.MD b/repo/README.MD index 43d66dd..28f833f 100644 --- a/repo/README.MD +++ b/repo/README.MD @@ -1,3 +1,7 @@ # Piston Filesystem Repo Builder This is just a simple POC for a repository tool to run locally. + +This only demonstrates building an unsigned python-3.9.1 package, however if it finds an `asc` file it will include it as the signature. + +Mount this whole directory into `/repo` in your API container if you wish to use it. \ No newline at end of file diff --git a/repo/make.sh b/repo/make.sh old mode 100644 new mode 100755 index f380e4f..e89dc1e --- a/repo/make.sh +++ b/repo/make.sh @@ -1,7 +1,13 @@ -#!/bin/bash +#!/bin/bash -e + cd /repo -cat password.key | gpg --batch --import private.key + +# Make packages pushd ../packages/python -cat password.key | make sign VERSIONS=3.9.1 && make cleanup +make build VERSIONS=3.9.1 popd + + +# Make repo index + ./mkindex.sh \ No newline at end of file