repo: Automated local repository builder

This commit is contained in:
Thomas Hobson 2021-02-21 12:58:18 +13:00
parent 816efaff3b
commit 60b258f57c
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
3 changed files with 15 additions and 6 deletions

View File

@ -1,8 +1,7 @@
FROM alpine:3.13 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 && \ ln -sf /bin/bash /bin/sh && \
wget https://github.com/mikefarah/yq/releases/download/2.4.1/yq_linux_amd64 -O /usr/bin/yq &&\ pip3 install 'yq==2.12.0'
chmod +x /usr/bin/yq
CMD [ "bash", "/repo/make.sh" ] CMD [ "bash", "/repo/make.sh" ]

View File

@ -1,3 +1,7 @@
# Piston Filesystem Repo Builder # Piston Filesystem Repo Builder
This is just a simple POC for a repository tool to run locally. 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.

12
repo/make.sh Normal file → Executable file
View File

@ -1,7 +1,13 @@
#!/bin/bash #!/bin/bash -e
cd /repo cd /repo
cat password.key | gpg --batch --import private.key
# Make packages
pushd ../packages/python pushd ../packages/python
cat password.key | make sign VERSIONS=3.9.1 && make cleanup make build VERSIONS=3.9.1
popd popd
# Make repo index
./mkindex.sh ./mkindex.sh