Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
debian: add Dockerfile and docs for building debian package from source
✗ CI failure Sebastian Martinez committed 9 months ago
commit 11e3582ff2034ed67a44364418b16f0cae444829
parent efeefd0daa35682a3ff07bd6c24d73248252149f
2 failed (2 total) View logs
3 files changed +64 -0
added debian/Dockerfile
@@ -0,0 +1,19 @@
+
ARG RUST_VERSION="1.85"
+

+
FROM rust:${RUST_VERSION}-bookworm
+
LABEL maintainer="Radicle Team <team@radicle.xyz>"
+
WORKDIR /src
+

+
RUN apt-get update && apt-get install -y \
+
    asciidoctor \
+
    build-essential \
+
    debhelper \
+
    git \
+
    lintian
+

+
RUN mkdir -p /src/output
+

+
COPY entrypoint.sh /src/
+
RUN chmod +x /src/entrypoint.sh
+

+
ENTRYPOINT ["/src/entrypoint.sh"]
added debian/README.md
@@ -0,0 +1,30 @@
+
# Packaging for Debian
+

+
To build a Debian package for the heartwood binaries from source, you can either make use of the provided Dockerfile, which includes all the necessary dependencies, or make sure to install them manually and run the `./debian/build-deb` script.
+

+
## Docker
+

+
For Docker you need to first build the image, while for running it you should provide a volume mount to output the build artifacts.
+

+
```shell
+
$ docker build -t debian-pkg ./debian
+
$ docker run --rm -v <path for storing build artifacts>:/app/output debian-pkg
+
```
+

+
# Manual installation
+

+
For manually building the Debian package on a Debian machine follow these steps:
+

+
```shell
+
$ sudo apt-get update
+
$ sudo apt-get install asciidoctor build-essential debhelper git lintian
+
$ ./debian/build-deb
+
```
+

+
This will save the Debian package in the parent directory of the `heartwood` repository.
+

+
# APT repository
+

+
To import the build deb packages into our APT repository, make sure to [follow the instructions provided by the repo](import-deb).
+

+
[import-deb]: https://app.radicle.xyz/nodes/seed.rhizoma.dev/rad:z2nDKoCF4hg6xVrv7v93LmWHDJKUr
added debian/entrypoint.sh
@@ -0,0 +1,15 @@
+
#!/bin/bash
+

+
set -euo pipefail
+

+
git clone https://rosa.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git heartwood
+
cd heartwood
+
cargo fetch
+
debian/build-deb
+

+
files=($(find ../ -name "radicle*_*" -type f -maxdepth 1))
+
echo "files to be copied into the output directoy:"
+
printf '%s\n' "${files[@]}"
+
for file in "${files[@]}"; do
+
    cp $file /src/output/
+
done