mirror of
https://git.fsfe.org/fsfe-system-hackers/innernet-playbook.git
synced 2024-11-23 23:23:14 +01:00
change the way in which the .deb packages are built
The build environment must be based on bullseye. This is achieved by using a docker container to build the .deb packages
This commit is contained in:
parent
c234093f4d
commit
926835c2d5
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM rust:slim-bullseye
|
||||||
|
|
||||||
|
RUN cargo install cargo-deb
|
||||||
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y libsqlite3-dev libclang-dev
|
||||||
|
RUN mkdir -p /innernet
|
||||||
|
WORKDIR /innernet
|
@ -1,18 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Go to innernet-src submodule
|
|
||||||
cd innernet-src || exit
|
|
||||||
|
|
||||||
# Checkout correct version
|
|
||||||
git checkout "${INNERNET_VERSION}"
|
|
||||||
|
|
||||||
# Build binaries
|
|
||||||
cargo build --release --bin innernet
|
|
||||||
cargo build --release --bin innernet-server
|
|
||||||
|
|
||||||
# Copy binaries to Ansible roles
|
|
||||||
mkdir -p ./roles/server/files && \
|
|
||||||
cp target/release/innernet ../roles/server/files/innernet-server
|
|
||||||
|
|
||||||
mkdir -p ./roles/client/files && \
|
|
||||||
cp target/release/innernet ../roles/client/files/innernet
|
|
25
build-debs.sh
Executable file
25
build-debs.sh
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# build needed Docker container
|
||||||
|
docker build . -t rust-deb:bullseye
|
||||||
|
|
||||||
|
# Go to innernet-src submodule
|
||||||
|
cd innernet-src || exit
|
||||||
|
|
||||||
|
INNERNET_VERSION="${INNERNET_VERSION:-1.5.1}"
|
||||||
|
|
||||||
|
# Checkout correct version
|
||||||
|
git checkout "v${INNERNET_VERSION}"
|
||||||
|
|
||||||
|
# Build binaries
|
||||||
|
echo "Building binaries"
|
||||||
|
docker run --rm -v $PWD:/innernet rust-deb:bullseye cargo deb -p client
|
||||||
|
docker run --rm -v $PWD:/innernet rust-deb:bullseye cargo deb -p server
|
||||||
|
|
||||||
|
# Copy binaries to Ansible roles
|
||||||
|
echo "Copying binaries"
|
||||||
|
mkdir -p ./roles/server/files && \
|
||||||
|
cp target/debian/innernet-server_"$INNERNET_VERSION"_amd64.deb ../roles/server/files/innernet-server.deb
|
||||||
|
|
||||||
|
mkdir -p ./roles/client/files && \
|
||||||
|
cp target/debian/innernet_"$INNERNET_VERSION"_amd64.deb ../roles/client/files/innernet.deb
|
Loading…
Reference in New Issue
Block a user