Rust build infrastructure, in-docker preserves-tools and syndicate-server builds, version bumps for a few things

This commit is contained in:
Tony Garnock-Jones 2022-07-22 21:29:20 +02:00
parent 525819291e
commit ad0db362d3
10 changed files with 77 additions and 63 deletions

View File

@ -26,16 +26,3 @@ RUN echo "PACKAGER_PRIVKEY=/home/${BUILD_USER}/.abuild/${KEYFILE}" >> /home/${BU
USER ${BUILD_USER}
WORKDIR /data
# When (if?) I switch to in-docker Rust builds, the following will be useful.
#
# # Running without proxy for now, to ensure reasonable freshness and consistency:
# # RUN http_proxy=${http_proxy} https_proxy=${http_proxy} rustup-init -y --default-toolchain nightly
# #
# RUN rustup-init -y --default-toolchain nightly
# ENV PATH=/home/${BUILD_USER}/.cargo/bin:$PATH
# # Prime the crates.io index
# RUN cargo search --limit 0
#
# # Hack to workaround https://github.com/rust-lang/rust/issues/89626
# ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Zgcc-ld=lld"

View File

@ -2,19 +2,20 @@ ARG ALPINE_ARCH
ARG DOCKER_ARCH
FROM --platform=linux/${DOCKER_ARCH} synit-build:${ALPINE_ARCH}
USER root
ARG http_proxy
RUN http_proxy=${http_proxy} https_proxy=${http_proxy} apk add rustup openssl-dev
ARG BUILD_USER
USER ${BUILD_USER}
# Running without proxy for now, to ensure reasonable freshness and consistency:
# RUN http_proxy=${http_proxy} https_proxy=${http_proxy} rustup-init -y --default-toolchain nightly
#
RUN rustup-init -y --default-toolchain nightly
ARG BUILD_USER
ENV PATH=/home/${BUILD_USER}/.cargo/bin:$PATH
# Prime the crates.io index
RUN cargo search --limit 0
# Hack to workaround https://github.com/rust-lang/rust/issues/89626
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Zgcc-ld=lld"

View File

@ -32,7 +32,7 @@ DOCKER_CMD=\
-v `pwd`:/data \
-v `pwd`/$(KEYFILE):/home/$(BUILD_USER)/.abuild/$(KEYFILE) \
-v $(CURDIR)/distfiles:/var/cache/distfiles \
synit-build:$(ARCH)
synit-build-rust:$(ARCH)
DOCKER_BUILD_ARGS=\
--build-arg http_proxy=$(HTTP_PROXY) \
@ -57,11 +57,14 @@ clean:
-docker rmi synit-build:aarch64
-docker rmi synit-build:x86_64
-docker rmi synit-build:armv7
-docker rmi synit-build-rust:aarch64
-docker rmi synit-build-rust:x86_64
-docker rmi synit-build-rust:armv7
veryclean: clean
rm -rf target
build-image: check-tools .build-image.$(ARCH)
build-image: check-tools .build-image.rust.$(ARCH)
.build-image.$(ARCH): $(KEYFILE)
docker buildx build \
@ -71,8 +74,6 @@ build-image: check-tools .build-image.$(ARCH)
-t synit-build:$(ARCH) .
touch $@
build-image.rust: .build-image.rust.$(ARCH)
.build-image.rust.$(ARCH): .build-image.$(ARCH)
docker buildx build \
--progress plain \

View File

@ -1,6 +1,6 @@
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=preserves-schemas
pkgver=0.6.0-r20220114
pkgver=0.6.3-r20220619
pkgrel=0
pkgdesc="Shared Preserves Schema definitions"
url="https://preserves.dev/"
@ -20,5 +20,5 @@ package() {
}
sha512sums="
62363962bc6849f026fe03faf1b41b4880f41cd2cacb26bb6e716f5c0d3b68f025aa306e0caa367bea32292694729f5e47069624b7395bb755b306a54532e288 preserves-0.6.0-r20220114.zip
9fde41df7ca69252924da758eb7e7129fb83edb6a2dd9ec2d7115b17a8e390b9f30335393cdd4d06219a1b002fb04b4bd867a0bd8d80d18e1be85f857d5da3b0 preserves-0.6.3-r20220619.zip
"

View File

@ -8,7 +8,7 @@ url="https://preserves.dev/"
arch="all"
license="GPLv3"
depends=""
makedepends="cargo"
makedepends=""
source="$pkgname-$pkgver.tar.gz::https://gitlab.com/preserves/preserves/-/archive/rust-preserves-tools@$pkgver/preserves-rust-preserves-tools@$pkgver.tar.gz"
builddir="$srcdir/preserves-rust-preserves-tools@$pkgver/implementations/rust/"
options="!check"

View File

@ -1,7 +1,7 @@
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=py3-preserves
_pyname=preserves
pkgver=0.11.0
pkgver=0.16.1
pkgrel=0
pkgdesc="Preserves serialization format"
url="https://preserves.dev/"
@ -12,19 +12,16 @@ makedepends="py3-setuptools py3-pip py3-wheel"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
options="!check"
build() {
python3 setup.py build
}
check() {
python3 setup.py test
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="
96c889f733e3a4910af5c785735730b6b5894551b97eac24fc228fa173a0ea0c2e539f6c4f5f03bebb2d56c3f8125e054ce648102dde19740656f66bc9646fb4 preserves-0.11.0.tar.gz
4091fbdcff4c6a276248267d7af288aec035c88b0fd8295e48c3ee6fd1caca9071184ec8467bcc9e2685810e78db8151baabaaba4b5c0562d533af7039dd003e preserves-0.16.1.tar.gz
"

View File

@ -1,7 +1,7 @@
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=py3-syndicate
_pyname=syndicate-py
pkgver=0.8.4
pkgver=0.8.5
pkgrel=0
pkgdesc="Syndicated Actor model for Python"
url="https://syndicate-lang.org/"
@ -12,19 +12,16 @@ makedepends="py3-setuptools py3-pip py3-wheel"
_pypiprefix="${_pyname%${_pyname#?}}"
source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
options="!check"
build() {
python3 setup.py build
}
check() {
python3 setup.py test
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="
ce0d1337756a1b1f538d1fe73efe8c442c6e932b4eb40daa805bf51490d7f7be2fb8ca5b6d1c74da58fdc2877c2944dd395ab6f0679bcd993647b21467dd0873 syndicate-py-0.8.4.tar.gz
34de54a53d6a8197b534a2b3982b501439f7a1b4e9befd19b60a01516a36ce0b8bf61681d4b4b798e6a17d8ece3ffcff0017c1858e5f5f8b43f8677e19b78d88 syndicate-py-0.8.5.tar.gz
"

View File

@ -1,27 +0,0 @@
# Contributor: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=syndicate-server
pkgver=0.0.0
pkgrel=$(date '+%Y%m%d%H%M%S')
pkgdesc="Syndicate server"
url="https://syndicate-lang.org/"
arch="all"
license="GPLv3"
depends=""
makedepends=""
source=""
builddir="$srcdir/"
options="!check"
build() {
:
}
package() {
mkdir -p "$pkgdir/usr/bin"
cp -p ../syndicate-server.${CARCH} "$pkgdir/usr/bin/syndicate-server"
mkdir -p "$pkgdir/usr/share/syndicate-server/schemas"
cp ../protocols/schema-bundle.bin "$pkgdir/usr/share/syndicate-server/schemas/schema-bundle.prb"
cp ../protocols/schemas/*.prs "$pkgdir/usr/share/syndicate-server/schemas/."
}

View File

@ -0,0 +1 @@
APKBUILD.released

View File

@ -0,0 +1,27 @@
# Contributor: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=syndicate-server
pkgver=0.0.0
pkgrel=$(date '+%Y%m%d%H%M%S')
pkgdesc="Syndicate server"
url="https://syndicate-lang.org/"
arch="all"
license="GPLv3"
depends=""
makedepends=""
source=""
builddir="$srcdir/"
options="!check"
build() {
:
}
package() {
mkdir -p "$pkgdir/usr/bin"
cp -p ../syndicate-server.${CARCH} "$pkgdir/usr/bin/syndicate-server"
mkdir -p "$pkgdir/usr/share/syndicate-server/schemas"
cp ../protocols/schema-bundle.bin "$pkgdir/usr/share/syndicate-server/schemas/schema-bundle.prb"
cp ../protocols/schemas/*.prs "$pkgdir/usr/share/syndicate-server/schemas/."
}

View File

@ -0,0 +1,30 @@
# Contributor: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
# Maintainer: Tony Garnock-Jones <tonyg@leastfixedpoint.com>
pkgname=syndicate-server
pkgver=0.26.0
pkgrel=0
pkgdesc="Syndicate server"
url="https://syndicate-lang.org/"
arch="all"
license="GPLv3"
depends=""
makedepends="openssl-dev"
source="$pkgname-$pkgver.tar.gz::https://git.syndicate-lang.org/syndicate-lang/syndicate-rs/archive/syndicate-server-v$pkgver.tar.gz"
builddir="$srcdir/syndicate-rs/syndicate-server"
options="!check"
build() {
cargo build --release
}
package() {
install -Dm755 "../target/release/syndicate-server" "$pkgdir/usr/bin/syndicate-server"
mkdir -p "$pkgdir/usr/share/syndicate-server/schemas"
cp protocols/schema-bundle.bin "$pkgdir/usr/share/syndicate-server/schemas/schema-bundle.prb"
cp protocols/schemas/*.prs "$pkgdir/usr/share/syndicate-server/schemas/."
}
sha512sums="
dcbaf2d964f3d32341b500cd4fb63a04b7990c4409b7c5be79d5510bcc15878cb4e34cfc2b279272e10db328f0187ac81aa3e1a752e1bf88d58d8aaf00862f17 syndicate-server-0.26.0.tar.gz
"