Build scripts: added source archive

This commit is contained in:
SChernykh
2025-07-04 20:09:01 +02:00
parent 325aca29ce
commit 83f8b70c9b
5 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
FROM p2pool_build_ubuntu
ARG P2POOL_VERSION BUILD_TIMESTAMP
ADD p2pool_source.sh /root
RUN /root/p2pool_source.sh ${P2POOL_VERSION} ${BUILD_TIMESTAMP}

13
release_scripts/source/build.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
# Example usage: ./build.sh v4.8.1
cd "$(dirname "$0")"
docker build --build-arg P2POOL_VERSION=$1 --build-arg BUILD_TIMESTAMP="$(git show --no-patch --format=%ct $1)" -t p2pool_source_build .
docker create --name p2pool_source_build_container p2pool_source_build:latest
docker cp p2pool_source_build_container:/root/p2pool_source-$1.tar.xz ../p2pool_source-$1.tar.xz
docker rm p2pool_source_build_container
docker image rm -f p2pool_source_build

View File

@@ -0,0 +1,18 @@
#!/bin/sh
set -e
export TZ=UTC0
CURRENT_DATE=$(date -u -d @$2 +"%Y-%m-%d")
CURRENT_TIME=$(date -u -d @$2 +"%H:%M:%S")
TOUCH_DATE=$(date -u -d @$2 +"%Y%m%d%H%M.%S")
cd /root
git clone --depth=1 --recursive --branch $1 https://github.com/SChernykh/p2pool
tar --format=pax --pax-option='exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime' --sort=name --owner=0 --group=0 --mtime="$CURRENT_DATE $CURRENT_TIME" --exclude=".git" --exclude="release_scripts/*.tar*" -f p2pool_source-$1.tar -c p2pool
touch -t $TOUCH_DATE p2pool_source-$1.tar
xz --version
xz --lzma2=preset=9e,dict=256MiB,pb=0 p2pool_source-$1.tar