diff options
Diffstat (limited to 'packaging')
101 files changed, 1991 insertions, 0 deletions
diff --git a/packaging/.gitignore b/packaging/.gitignore new file mode 100644 index 0000000..7b3eef0 --- /dev/null +++ b/packaging/.gitignore @@ -0,0 +1,2 @@ +debian-docker/dist +ubuntu-mantic-docker/dist diff --git a/packaging/debian-bookworm/Dockerfile b/packaging/debian-bookworm/Dockerfile new file mode 100644 index 0000000..0d6c739 --- /dev/null +++ b/packaging/debian-bookworm/Dockerfile @@ -0,0 +1,56 @@ +FROM debian:bookworm +# This file is in the public domain. +# +# Docker image to build Debian packages of +# GNUnet, GNU Taler and GNU Anastasis. +# +# We need 'bookworm' for a reasonably recent NodeJS version. + +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get update +RUN apt-get -y dist-upgrade +RUN apt-get update +RUN apt-get -y install build-essential zip jq python3 python3-pip autoconf automake gcc make libtool libltdl-dev libmicrohttpd-dev libpq-dev libsqlite3-dev libunistring-dev libqrencode-dev libgcrypt-dev libsodium-dev libargon2-dev libjansson-dev recutils libgmp-dev texinfo pkgconf zlib1g-dev libopus-dev libextractor-dev libnss3-dev libcurl4-gnutls-dev autopoint linux-libc-dev python3-sphinx python3-sphinxcontrib.httpdomain policykit-1 libzbar-dev default-libmysqlclient-dev mandoc libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libbluetooth-dev iptables miniupnpc libpng-dev python3-jinja2 doxygen libjose-dev iproute2 sudo python3-sphinx-rtd-theme wget zile libogg-dev gettext net-tools po-debconf debhelper-compat dbconfig-pgsql nginx libgtk-3-dev libgladeui-dev libmagic-dev policykit-1 libnfc-dev python3-click python3-requests apt-utils nodejs npm openjdk-17-jdk-headless default-jre-headless pandoc groff +RUN npm install -g node pnpm + +ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache + +COPY libeufin-build.sh /root/ +RUN chmod +x /root/libeufin-build.sh +RUN /root/libeufin-build.sh master + +COPY gnunet-build.sh /root/ +RUN chmod +x /root/gnunet-build.sh +RUN /root/gnunet-build.sh master + +COPY gnunet-gtk-build.sh /root/ +RUN chmod +x /root/gnunet-gtk-build.sh +RUN /root/gnunet-gtk-build.sh master + +COPY libeufin-build.sh /root/ +RUN chmod +x /root/libeufin-build.sh +RUN /root/libeufin-build.sh master + +COPY exchange-build.sh /root/ +RUN chmod +x /root/exchange-build.sh +RUN /root/exchange-build.sh master + +COPY merchant-build.sh /root/ +RUN chmod +x /root/merchant-build.sh +RUN /root/merchant-build.sh master + +COPY sync-build.sh /root/ +RUN chmod +x /root/sync-build.sh +RUN /root/sync-build.sh master + +COPY anastasis-build.sh /root/ +RUN chmod +x /root/anastasis-build.sh +RUN /root/anastasis-build.sh master + +COPY wallet-build.sh /root/ +RUN chmod +x /root/wallet-build.sh +RUN /root/wallet-build.sh master diff --git a/packaging/debian-bookworm/README b/packaging/debian-bookworm/README new file mode 100644 index 0000000..0a092e5 --- /dev/null +++ b/packaging/debian-bookworm/README @@ -0,0 +1,16 @@ +Scripts to build Debian packages from source. + +TODO: +- break up into separate build for GNUnet/Taler/Anastasis + => might be good to not run the entire pipeline only + because something changes in anastasis/wallet, as + that's not a good reason to re-build GNUnet ;-). +- integrate with buildbot (integrationtests?) + to build-on-tag / build nightly and upload resulting + Deb packages to reprepro (fully automated for nightly, + but with explicit password-protected signature for tagged builds) +- support other CPU architectures (by running in VM that emulates + other CPU architectures) +- eventually: try to improve scripts to support older + Debian versions + diff --git a/packaging/debian-bookworm/anastasis-build.sh b/packaging/debian-bookworm/anastasis-build.sh new file mode 100644 index 0000000..24643e1 --- /dev/null +++ b/packaging/debian-bookworm/anastasis-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/anastasis +cd /build/anastasis + +# Fetch source +rm -rf * + +for n in anastasis anastasis-gtk +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/debian-bookworm/exchange-build.sh b/packaging/debian-bookworm/exchange-build.sh new file mode 100644 index 0000000..b4a0115 --- /dev/null +++ b/packaging/debian-bookworm/exchange-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/exchange +cd exchange +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/debian-bookworm/gnunet-build.sh b/packaging/debian-bookworm/gnunet-build.sh new file mode 100644 index 0000000..614c5e6 --- /dev/null +++ b/packaging/debian-bookworm/gnunet-build.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +pip3 install --break-system-packages sphinx-book-theme sphinx-multiversion + +for n in gnunet +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar cvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/debian-bookworm/gnunet-gtk-build.sh b/packaging/debian-bookworm/gnunet-gtk-build.sh new file mode 100644 index 0000000..4414c3f --- /dev/null +++ b/packaging/debian-bookworm/gnunet-gtk-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +for n in gnunet-gtk +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/debian-bookworm/libeufin-build.sh b/packaging/debian-bookworm/libeufin-build.sh new file mode 100644 index 0000000..eb440f2 --- /dev/null +++ b/packaging/debian-bookworm/libeufin-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/libeufin +cd /build/libeufin + +# Fetch source +rm -rf * +git clone git://git.taler.net/libeufin +cd libeufin +git checkout $1 +./bootstrap +export JAVA_HOME=/usr +./configure --prefix=/usr +make install +make deb +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/debian-bookworm/mdb-build.sh b/packaging/debian-bookworm/mdb-build.sh new file mode 100644 index 0000000..d097240 --- /dev/null +++ b/packaging/debian-bookworm/mdb-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +git clone git://git.taler.net/taler-mdb +cd taler-mdb +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/debian-bookworm/merchant-build.sh b/packaging/debian-bookworm/merchant-build.sh new file mode 100644 index 0000000..24f5f9d --- /dev/null +++ b/packaging/debian-bookworm/merchant-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +# pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/merchant +cd merchant +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/debian-bookworm/run.sh b/packaging/debian-bookworm/run.sh new file mode 100755 index 0000000..2689a33 --- /dev/null +++ b/packaging/debian-bookworm/run.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -eu +CONTAINER=$USER/debbuilder:latest + +# If we don't specify the ulimit here, fakeroot is extremely slow. +# See https://github.com/moby/moby/issues/45436 +docker build --ulimit "nofile=1024:1048576" -t $CONTAINER . + +rm -rf dist +mkdir dist +docker run --read-only $CONTAINER sleep 100 & +sleep 1 +docker container ls +ID=$(docker container ls | grep $CONTAINER | head -n1 | awk '{print $1}') +echo "Extracting files from $ID" +docker cp "$ID:/build/packages.tgz" . +echo "Stopping $CONTAINER ($ID)" +docker container stop $ID +echo "Removing $CONTAINER" +docker container rm $ID +docker image rm $USER/debbuilder +cd dist +tar xvf ../packages.tgz +cd .. +rm packages.tgz diff --git a/packaging/debian-bookworm/sync-build.sh b/packaging/debian-bookworm/sync-build.sh new file mode 100644 index 0000000..2f5d9df --- /dev/null +++ b/packaging/debian-bookworm/sync-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +rm -rf /build/sync + +mkdir -p /build/sync +cd /build/sync + +# Fetch source +for n in sync +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/debian-bookworm/wallet-build.sh b/packaging/debian-bookworm/wallet-build.sh new file mode 100644 index 0000000..6d807be --- /dev/null +++ b/packaging/debian-bookworm/wallet-build.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/wallet +cd /build/wallet + +# Fetch source +rm -rf * +git clone git://git.taler.net/wallet-core + +cd wallet-core +git checkout $1 +./bootstrap + +cd packages/taler-wallet-cli + +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../taler-harness +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../ + +tar uvf ../../../packages.tgz *.deb diff --git a/packaging/docker-alpine/.gitignore b/packaging/docker-alpine/.gitignore new file mode 100644 index 0000000..8135b62 --- /dev/null +++ b/packaging/docker-alpine/.gitignore @@ -0,0 +1,3 @@ +.env +anastasis-data +anastasis-config diff --git a/packaging/docker-alpine/Makefile b/packaging/docker-alpine/Makefile new file mode 100644 index 0000000..cbfb75a --- /dev/null +++ b/packaging/docker-alpine/Makefile @@ -0,0 +1,48 @@ +author = nullptrderef + +all: build + +build-builder: + ./contrib/build-image.sh $(author) gnunet-builder builder + +build-libmicrohttpd-builder: + ./contrib/build-image.sh $(author) libmicrohttpd libmicrohttpd-builder builder + +build-libmicrohttpd: build-libmicrohttpd-builder + ./contrib/build-image.sh $(author) libmicrohttpd libmicrohttpd + +build-libgnunet-builder: + ./contrib/build-image.sh $(author) libgnunet libgnunet-builder builder + +build-libgnunet: build-libgnunet-builder + ./contrib/build-image.sh $(author) libgnunet libgnunet + +build-taler-exchange-builder: + ./contrib/build-image.sh $(author) taler-exchange taler-exchange-builder builder + +# TODO: regular non-lib taler exchange image + +build-libtalerexchange: build-taler-exchange-builder + ./contrib/build-image.sh $(author) libtalerexchange libtalerexchange + +build-taler-merchant-builder: + ./contrib/build-image.sh $(author) taler-merchant taler-merchant-builder builder + +build-libtalermerchant: build-taler-merchant-builder + ./contrib/build-image.sh $(author) libtalermerchant libtalermerchant + +# TODO: regular non-lib taler merchant image + +build-anastasis-builder: + ./contrib/build-image.sh $(author) anastasis anastasis-builder builder + +build-anastasis: build-anastasis-builder + ./contrib/build-image.sh $(author) anastasis anastasis + +clean: + ./contrib/clean.sh + +publish: build + ./contrib/publish.sh $(author) + +build: build-builder build-libmicrohttpd build-libgnunet build-libtalerexchange build-libtalermerchant build-anastasis diff --git a/packaging/docker-alpine/README.anastasis.md b/packaging/docker-alpine/README.anastasis.md new file mode 100644 index 0000000..6e01cf7 --- /dev/null +++ b/packaging/docker-alpine/README.anastasis.md @@ -0,0 +1,73 @@ +# nullptrderef/anastasis + +An [Anastasis](https://anastasis.lu) Image + +## Tags + +- [latest](https://hub.docker.com/repository/docker/nullptrderef/anastasis/tags?page=&page_size=&ordering=&name=latest): An image built form [Anastasis Master](https://git.taler.net/anastasis.git) at some point in time, hopefully recently. +- [builder](https://hub.docker.com/repository/docker/nullptrderef/anastasis/tags?page=&page_size=&ordering=&name=builder): The image used to build `latest`'s binaries. + +## Usage + +The Image exposes a `/etc/anastasis` volume, which contains the anastasis configuration. By default, Anastasis listens on port `9977` in the container, however this behaviour can natuarlly be changed. + +### Docker CLI + +An example usage via the docker CLI may look like: + +`docker run -d -v './anastasis-config:/etc/anastasis' -p '127.0.0.1:9977:9977' nullptrderef/anastasis:latest` + +### Docker Compose + +```yml +services: + database: + container_name: anastasis-db + image: postgres:alpine + hostname: database + ports: + - 127.0.0.1:15432:5432 + networks: + anastasis-pg-net: + ipv4_address: 172.168.111.10 + environment: + - POSTGRES_DB=postgres + - POSTGRES_USERNAME=postgres + - POSTGRES_PASSWORD=password + - PGDATA=/var/lib/postgresql/data/ + volumes: + - ./anastasis-data/:/var/lib/postgresql/data/:rw + + anastasis: + container_name: anastasis + image: nullptrderef/anastasis:latest + depends_on: + - database + networks: + - anastasis-pg-net + ports: + - 127.0.0.1:9977:9977 + volumes: + - ./anastasis-config:/etc/anastasis + command: sh -c "while true; do sleep 1; done" + +networks: + anastasis-pg-net: + driver: bridge + ipam: + driver: default + config: + - subnet: "172.168.111.0/24" +``` + +(Change the password ofc) + +### First Execution + +Upon first execution, it will exit before getting anywhere, as you'll need to edit the configuation to specify the correct postgres URL. + +The config file is created on this first execution. + +## Source + +This image was packaged from [deployment.git:packaging/docker-alpine](https://git.taler.net/deployment.git/tree/packaging/docker-alpine). It is licensed under the AGPL-3.0-OR-LATER diff --git a/packaging/docker-alpine/anastasis-builder.Containerfile b/packaging/docker-alpine/anastasis-builder.Containerfile new file mode 100644 index 0000000..7479d61 --- /dev/null +++ b/packaging/docker-alpine/anastasis-builder.Containerfile @@ -0,0 +1,24 @@ +FROM taler-alpine-imaging/taler-merchant:builder + +WORKDIR /builder +RUN git clone https://git.taler.net/anastasis.git anastasis --recursive -j 8 +WORKDIR /builder/anastasis +RUN apk add py3-pip +RUN pip install htmlark --break-system-packages +RUN ./bootstrap +RUN ./configure \ + --prefix=/prefix/usr \ + --sysconfdir=/prefix/etc \ + --mandir=/prefix/usr/share/man \ + --localstatedir=/prefix/var \ + --with-microhttpd=/prefix/usr \ + --with-gnunet=/prefix/usr \ + --enable-logging=verbose + +RUN make -j +RUN make install + +LABEL org.opencontainers.image.title="Anastasis: Builder" +LABEL org.opencontainers.image.description="The image used to compile Anastasis. Please don't directly use this tag, it won't work as expected on it's own without libraries being properly installed." +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/anastasis-builder.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/anastasis-compose.yml b/packaging/docker-alpine/anastasis-compose.yml new file mode 100644 index 0000000..fc90745 --- /dev/null +++ b/packaging/docker-alpine/anastasis-compose.yml @@ -0,0 +1,38 @@ +services: + database: + container_name: anastasis-db + image: postgres:alpine + hostname: database + ports: + - 127.0.0.1:15432:5432 + networks: + anastasis-pg-net: + ipv4_address: 172.168.111.10 + environment: + - POSTGRES_DB=postgres + - POSTGRES_USERNAME=postgres + - POSTGRES_PASSWORD=password + - PGDATA=/var/lib/postgresql/data/ + volumes: + - ./anastasis-data/:/var/lib/postgresql/data/:rw + + anastasis: + container_name: anastasis + image: nullptrderef/anastasis:latest + depends_on: + - database + networks: + - anastasis-pg-net + ports: + - 127.0.0.1:9977:9977 + volumes: + - ./anastasis-config:/etc/anastasis + command: sh -c "while true; do sleep 1; done" + +networks: + anastasis-pg-net: + driver: bridge + ipam: + driver: default + config: + - subnet: "172.168.111.0/24" diff --git a/packaging/docker-alpine/anastasis.Containerfile b/packaging/docker-alpine/anastasis.Containerfile new file mode 100644 index 0000000..b65757e --- /dev/null +++ b/packaging/docker-alpine/anastasis.Containerfile @@ -0,0 +1,16 @@ +FROM taler-alpine-imaging/anastasis:builder AS builder +COPY ./build-files/anastasis-entrypoint.sh /prefix/usr/bin/anastasis-docker-entrypoint + +FROM taler-alpine-imaging/libtalermerchant:latest +COPY --from=builder /prefix/* / + +VOLUME [ "/etc/anastasis" ] +EXPOSE 9977 + +CMD [ "anastasis-docker-entrypoint" ] + +LABEL org.opencontainers.image.title="Anastasis" +LABEL org.opencontainers.image.description="A 'keep-your-own-key' crypto-custody solution with password-less key recovery via multi-factor multi-party authentication." +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/anastasis.Containerfile" +LABEL org.opencontainers.image.documentation="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/README.anastasis.md" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/build-files/anastasis-entrypoint.sh b/packaging/docker-alpine/build-files/anastasis-entrypoint.sh new file mode 100755 index 0000000..ec72716 --- /dev/null +++ b/packaging/docker-alpine/build-files/anastasis-entrypoint.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env sh +set -e + +if ! [ -d "/etc/anastasis" ]; then + echo -e " +\x1b[0;31;1mFATAL\x1b[0m Anastasis-Docker needs /etc/anastasis mounted. + If you're calling docker directly, pass '-v ./anastasis-config:/etc/anastasis' to docker run + If you're using a docker compose, add the below to the service: + volumes: + - ./anastasis-config:/etc/anastasis:rw" 1>&2; + exit 1; +fi; +if ! [ -f "/etc/anastasis/anastasis.conf" ]; then + echo -e "\x1b[0;33;1mWARN\x1b[0m Anastasis-Docker needs /etc/anastasis/anastasis.conf. + If you're seeing this for the first time after setting up a volume binding, simply continue by modifying your config. A config was just created for you! :) + Otherwise, see below for information on adding a volume binding: + If you're calling docker directly, pass '-v ./anastasis-config:/etc/anastasis' to docker run + If you're using a docker compose, add the below to the service: + volumes: + - ./anastasis-config:/etc/anastasis:rw" 1>&2; + echo '[anastasis] +SERVE = tcp +PORT = 9977 +DB = postgres + +[stasis-postgres] +CONFIG = postgres://admin:password@172.168.111.10:5432/postgres +' > /etc/anastasis/anastasis.conf +fi; + +set -ax + +anastasis-dbinit -c /etc/anastasis/anastasis.conf +anastasis-httpd -c /etc/anastasis/anastasis.conf $@ diff --git a/packaging/docker-alpine/builder.Containerfile b/packaging/docker-alpine/builder.Containerfile new file mode 100644 index 0000000..20e8488 --- /dev/null +++ b/packaging/docker-alpine/builder.Containerfile @@ -0,0 +1,17 @@ +FROM alpine:latest + +RUN <<EOT +apk update && \ + apk add --no-cache git make cmake automake autoconf libtool clang texinfo gnutls-dev curl-dev coreutils && \ + mkdir /prefix -p +EOT + +ENV CC=clang +ENV CFLAGS="-Os" + +WORKDIR /builder + +LABEL org.opencontainers.image.title="GNUNet Builder" +LABEL org.opencontainers.image.description="A baseline Alpine builder for LibGNUNet & Taler Alpine Images." +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/builder.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/contrib/build-image.sh b/packaging/docker-alpine/contrib/build-image.sh new file mode 100755 index 0000000..6780587 --- /dev/null +++ b/packaging/docker-alpine/contrib/build-image.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -eax + +docker buildx build -t "taler-alpine-imaging/$2:${4:-latest}" -f "$3".Containerfile . +docker image tag "taler-alpine-imaging/$2:${4:-latest}" "$1/$2":${4:-latest} diff --git a/packaging/docker-alpine/contrib/clean.sh b/packaging/docker-alpine/contrib/clean.sh new file mode 100755 index 0000000..94c8414 --- /dev/null +++ b/packaging/docker-alpine/contrib/clean.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -eax +docker image rm $(docker image ls -a | awk '{print $1 " " $3}' | awk 'NR > 1' | grep taler-alpine-imaging/ | awk '{print $2}') --force diff --git a/packaging/docker-alpine/contrib/publish.sh b/packaging/docker-alpine/contrib/publish.sh new file mode 100755 index 0000000..2e98a0b --- /dev/null +++ b/packaging/docker-alpine/contrib/publish.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +set -e +AUTHOR="$1"; +IMAGES="$(docker image ls -a | grep -v '<none>' | awk '{print $1 ":" $2 " " $3}' | awk 'NR > 1' | grep "$AUTHOR/")" +echo "Pushing Images: +$IMAGES" +while IFS= read -r IMAGE; do + awk '{print "Deploying " $1 " (" $2 ") ..."}' <<< "$IMAGE" + docker push $(awk '{print $1}' <<< "$IMAGE") +done <<< "$IMAGES"
\ No newline at end of file diff --git a/packaging/docker-alpine/libgnunet-builder.Containerfile b/packaging/docker-alpine/libgnunet-builder.Containerfile new file mode 100644 index 0000000..667bffa --- /dev/null +++ b/packaging/docker-alpine/libgnunet-builder.Containerfile @@ -0,0 +1,34 @@ +FROM taler-alpine-imaging/libmicrohttpd:builder + +WORKDIR /builder +RUN git clone https://git.gnunet.org/gnunet.git gnunet --recursive -j 8 +WORKDIR /builder/gnunet +# instead of bootstrap for a more minimal build +RUN git submodule update --init --force --remote + +RUN apk add gettext gettext-dev gettext-static gettext-libs py3-gettext libgcrypt libgcrypt-dev jansson jansson-dev libsodium libsodium-dev libunistring libunistring-dev libpq libpq-dev +ENV AUTOPOINT=autopoint + +RUN mkdir -p doc/handbook/texinfo/ +RUN touch doc/handbook/texinfo/gnunet.texi + +RUN autoreconf -fi +RUN ./configure \ + --prefix=/prefix/usr \ + --with-microhttpd=/prefix/usr \ + --sysconfdir=/prefix/etc \ + --mandir=/prefix/usr/share/man \ + --localstatedir=/prefix/var \ + --disable-poisoning \ + --enable-logging=verbose + +WORKDIR /builder/gnunet/src/include +RUN make install +WORKDIR /builder/gnunet/src/lib +RUN make -j +RUN make install + +LABEL org.opencontainers.image.title="LibGNUNet: Builder" +LABEL org.opencontainers.image.description="The image that was used to build the matching :latest tag" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/libgnunet-builder.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/libgnunet.Containerfile b/packaging/docker-alpine/libgnunet.Containerfile new file mode 100644 index 0000000..8f04b34 --- /dev/null +++ b/packaging/docker-alpine/libgnunet.Containerfile @@ -0,0 +1,10 @@ +FROM taler-alpine-imaging/libgnunet:builder AS builder + +FROM taler-alpine-imaging/libmicrohttpd:latest +RUN apk add --no-cache libgcrypt jansson gettext libsodium libunistring libpq curl gnutls libtool +COPY --from=builder /prefix/* / + +LABEL org.opencontainers.image.title="LibGNUNet" +LABEL org.opencontainers.image.description="An alpine-based image containing LibGNUNet" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/libgnunet.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/libmicrohttpd-builder.Containerfile b/packaging/docker-alpine/libmicrohttpd-builder.Containerfile new file mode 100644 index 0000000..00cb2bf --- /dev/null +++ b/packaging/docker-alpine/libmicrohttpd-builder.Containerfile @@ -0,0 +1,23 @@ +FROM taler-alpine-imaging/gnunet-builder:latest + +WORKDIR /builder/libmicrohttpd +RUN git clone https://git.gnunet.org/libmicrohttpd.git . +RUN ./bootstrap +RUN ./configure \ + --prefix=/prefix/usr \ + --sysconfdir=/prefix/etc \ + --mandir=/prefix/usr/share/man \ + --infodir=/prefix/usr/share/info \ + --disable-thread-names \ + --enable-largefile \ + --enable-curl \ + --enable-https \ + --enable-messages +RUN make -j +RUN make check +RUN make install + +LABEL org.opencontainers.image.title="LibMicroHTTPD: Builder" +LABEL org.opencontainers.image.description="An alpine-based image containing LibMicroHTTPD" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/libmicrohttpd.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/libmicrohttpd.Containerfile b/packaging/docker-alpine/libmicrohttpd.Containerfile new file mode 100644 index 0000000..100e38c --- /dev/null +++ b/packaging/docker-alpine/libmicrohttpd.Containerfile @@ -0,0 +1,9 @@ +FROM taler-alpine-imaging/libmicrohttpd:builder AS builder + +FROM alpine:latest +COPY --from=builder /prefix/* / + +LABEL org.opencontainers.image.title="LibMicroHTTPD" +LABEL org.opencontainers.image.description="An alpine-based image containing LibMicroHTTPD" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/libmicrohttpd.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/libtalerexchange.Containerfile b/packaging/docker-alpine/libtalerexchange.Containerfile new file mode 100644 index 0000000..eb938c3 --- /dev/null +++ b/packaging/docker-alpine/libtalerexchange.Containerfile @@ -0,0 +1,13 @@ +FROM taler-alpine-imaging/taler-exchange:builder AS builder + +FROM alpine AS builder2 +COPY --from=builder /prefix/usr/lib/* /prefix/usr/lib +# RUN rm -rf /prefix/lib/taler_plugin_* + +FROM taler-alpine-imaging/libgnunet:latest +COPY --from=builder2 /prefix/* / + +LABEL org.opencontainers.image.title="LibTalerExchange" +LABEL org.opencontainers.image.description="An alpine-based image containing the libraries from the Taler Exchange" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/libtalerexchange.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/libtalermerchant.Containerfile b/packaging/docker-alpine/libtalermerchant.Containerfile new file mode 100644 index 0000000..bf5dc9f --- /dev/null +++ b/packaging/docker-alpine/libtalermerchant.Containerfile @@ -0,0 +1,12 @@ +FROM taler-alpine-imaging/taler-merchant:builder AS builder + +FROM alpine AS builder2 +COPY --from=builder /prefix/usr/lib/* /prefix/usr/lib + +FROM taler-alpine-imaging/libtalerexchange:latest +COPY --from=builder2 /prefix/* / + +LABEL org.opencontainers.image.title="LibTalerMerchant" +LABEL org.opencontainers.image.description="An alpine-based image containing the libraries from the Taler Merchant" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/libtalermerchant.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/taler-exchange-builder.Containerfile b/packaging/docker-alpine/taler-exchange-builder.Containerfile new file mode 100644 index 0000000..329116f --- /dev/null +++ b/packaging/docker-alpine/taler-exchange-builder.Containerfile @@ -0,0 +1,22 @@ +FROM taler-alpine-imaging/libgnunet:builder + +WORKDIR /builder +RUN git clone https://git.taler.net/exchange.git exchange --recursive -j 8 +WORKDIR /builder/exchange +RUN apk add pandoc recutils py3-jinja2 jq +RUN ./bootstrap +RUN ./configure \ + --prefix=/prefix/usr \ + --sysconfdir=/prefix/etc \ + --mandir=/prefix/usr/share/man \ + --localstatedir=/prefix/var \ + --with-microhttpd=/prefix/usr \ + --enable-logging=verbose + +RUN make -j +RUN make install + +LABEL org.opencontainers.image.title="Taler Exchange: Builder" +LABEL org.opencontainers.image.description="An alpine-based image containing the libraries from the Taler Exchange" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/taler-exchange-builder.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/docker-alpine/taler-merchant-builder.Containerfile b/packaging/docker-alpine/taler-merchant-builder.Containerfile new file mode 100644 index 0000000..9c92bb6 --- /dev/null +++ b/packaging/docker-alpine/taler-merchant-builder.Containerfile @@ -0,0 +1,22 @@ +FROM taler-alpine-imaging/taler-exchange:builder + +WORKDIR /builder +RUN git clone https://git.taler.net/merchant.git merchant --recursive -j 8 +WORKDIR /builder/merchant +RUN apk add libqrencode libqrencode-dev +RUN ./bootstrap +RUN ./configure \ + --prefix=/prefix/usr \ + --sysconfdir=/prefix/etc \ + --mandir=/prefix/usr/share/man \ + --localstatedir=/prefix/var \ + --with-microhttpd=/prefix/usr \ + --enable-logging=verbose + +RUN make -j +RUN make install + +LABEL org.opencontainers.image.title="Taler Merchant: Builder" +LABEL org.opencontainers.image.description="An alpine-based image containing the libraries from the Taler Merchant" +LABEL org.opencontainers.image.source="https://git.taler.net/deployment.git/tree/packaging/docker-alpine/taler-merchant-builder.Containerfile" +LABEL org.opencontainers.image.authors="Nullptrderef <nullptrderef@proton.me>" diff --git a/packaging/ng/.gitignore b/packaging/ng/.gitignore new file mode 100644 index 0000000..681bab4 --- /dev/null +++ b/packaging/ng/.gitignore @@ -0,0 +1,2 @@ +packages/ +cache/ diff --git a/packaging/ng/README.md b/packaging/ng/README.md new file mode 100644 index 0000000..50ec7cb --- /dev/null +++ b/packaging/ng/README.md @@ -0,0 +1,25 @@ +# taler-packaging ng + +This directory contains the improved implementation of container-based +packaging for GNU Taler and associated packages. + +The major improvement is that a component can be built *without* having to +rebuild every single package. + +Instead, all dependencies are managed via apt. Each package is built in a +fresh environment, with build dependencies pulled in via apt. Previously built +packages are available via a file-based apt source. + +Build-time dependencies are automatically installed, making sure that +missing build-time dependencies would be detected. + +The packaging logic is also the same for Debian and Ubuntu. + + +## Structure + +* `packages/$DISTRO-$DISTRO_VERNAME`: Output folder for debian packages. +Also contains a `Packages.gz` metadata file generated by `dpkg-scanpackages` +so that this folder can be directly consumed as a trusted package source. + +* `buildscripts/*`: Build scripts used during the package build steps. diff --git a/packaging/ng/build.sh b/packaging/ng/build.sh new file mode 100755 index 0000000..2523319 --- /dev/null +++ b/packaging/ng/build.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +set -eu + +usage() { + echo Usage: $0 DISTRO >&2 + exit 1 +} + +if [[ $# != 1 ]]; then + usage +fi + +LABEL=$1 +IMAGE_TAG=taler-packaging-$LABEL:latest +DOCKERFILE=distros/Dockerfile.$LABEL +PKGDIR=packages/$LABEL + +if [[ ! -e "$DOCKERFILE" ]]; then + echo Need $DOCKERFILE to build $LABEL >&2 + exit 1 +fi + + +function build_base() { + echo "Building $IMAGE_TAG from $DOCKERFILE" + # Build the base image. Usually fast because it's cached. + podman build -t $IMAGE_TAG -f $DOCKERFILE . +} + +function run() { + SCRIPT=$1 + shift + mkdir -p $PKGDIR + mkdir -p cache + podman run -it --entrypoint=/bin/bash \ + --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly \ + --mount type=bind,source="$(pwd)"/buildconfig,target=/buildconfig,readonly \ + --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir \ + $IMAGE_TAG "/buildscripts/$SCRIPT" "$@" +} + +function debug() { + mkdir -p $PKGDIR + podman run -it --entrypoint=/bin/bash \ + --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly \ + --mount type=bind,source="$(pwd)"/buildconfig,target=/buildconfig,readonly \ + --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir \ + $IMAGE_TAG -i +} + +function build_all() { + run generic.sh gnunet + run generic.sh gnunet-gtk + run generic.sh taler-exchange + run generic.sh taler-merchant + run generic.sh sync + run generic.sh anastasis + run generic.sh anastasis-gtk + run generic.sh libeufin + run generic.sh taler-merchant-demos + run generic.sh taler-wallet-cli packages/taler-wallet-cli + run generic.sh taler-harness packages/taler-harness + run generic.sh libeufin +} + +build_all diff --git a/packaging/ng/buildconfig/README b/packaging/ng/buildconfig/README new file mode 100644 index 0000000..005630f --- /dev/null +++ b/packaging/ng/buildconfig/README @@ -0,0 +1,5 @@ +These files determine the git tag from which the respective components are +built in the base Docker image. + +They are in separate files to make modification checking with +staged Docker builds work nicely. diff --git a/packaging/ng/buildconfig/anastasis-gtk.giturl b/packaging/ng/buildconfig/anastasis-gtk.giturl new file mode 100644 index 0000000..83634d2 --- /dev/null +++ b/packaging/ng/buildconfig/anastasis-gtk.giturl @@ -0,0 +1 @@ +git://git.taler.net/anastasis-gtk.git diff --git a/packaging/ng/buildconfig/anastasis-gtk.tag b/packaging/ng/buildconfig/anastasis-gtk.tag new file mode 100644 index 0000000..5aff472 --- /dev/null +++ b/packaging/ng/buildconfig/anastasis-gtk.tag @@ -0,0 +1 @@ +v0.4.1 diff --git a/packaging/ng/buildconfig/anastasis.giturl b/packaging/ng/buildconfig/anastasis.giturl new file mode 100644 index 0000000..b29317f --- /dev/null +++ b/packaging/ng/buildconfig/anastasis.giturl @@ -0,0 +1 @@ +git://git.taler.net/anastasis.git diff --git a/packaging/ng/buildconfig/anastasis.tag b/packaging/ng/buildconfig/anastasis.tag new file mode 100644 index 0000000..e1be908 --- /dev/null +++ b/packaging/ng/buildconfig/anastasis.tag @@ -0,0 +1 @@ +v0.4.2-dev.1 diff --git a/packaging/ng/buildconfig/gnunet-gtk.giturl b/packaging/ng/buildconfig/gnunet-gtk.giturl new file mode 100644 index 0000000..7610ee3 --- /dev/null +++ b/packaging/ng/buildconfig/gnunet-gtk.giturl @@ -0,0 +1 @@ +git://git.gnunet.org/gnunet-gtk.git diff --git a/packaging/ng/buildconfig/gnunet-gtk.tag b/packaging/ng/buildconfig/gnunet-gtk.tag new file mode 100644 index 0000000..759e855 --- /dev/null +++ b/packaging/ng/buildconfig/gnunet-gtk.tag @@ -0,0 +1 @@ +v0.21.0 diff --git a/packaging/ng/buildconfig/gnunet.giturl b/packaging/ng/buildconfig/gnunet.giturl new file mode 100644 index 0000000..8764364 --- /dev/null +++ b/packaging/ng/buildconfig/gnunet.giturl @@ -0,0 +1 @@ +git://git.gnunet.org/gnunet.git diff --git a/packaging/ng/buildconfig/gnunet.tag b/packaging/ng/buildconfig/gnunet.tag new file mode 100644 index 0000000..40c8500 --- /dev/null +++ b/packaging/ng/buildconfig/gnunet.tag @@ -0,0 +1 @@ +v0.21.1 diff --git a/packaging/ng/buildconfig/libeufin.giturl b/packaging/ng/buildconfig/libeufin.giturl new file mode 100644 index 0000000..b794afb --- /dev/null +++ b/packaging/ng/buildconfig/libeufin.giturl @@ -0,0 +1 @@ +git://git.taler.net/libeufin.git diff --git a/packaging/ng/buildconfig/libeufin.tag b/packaging/ng/buildconfig/libeufin.tag new file mode 100644 index 0000000..c91125d --- /dev/null +++ b/packaging/ng/buildconfig/libeufin.tag @@ -0,0 +1 @@ +v0.10.1 diff --git a/packaging/ng/buildconfig/sync.giturl b/packaging/ng/buildconfig/sync.giturl new file mode 100644 index 0000000..21cb5d7 --- /dev/null +++ b/packaging/ng/buildconfig/sync.giturl @@ -0,0 +1 @@ +git://git.taler.net/sync.git diff --git a/packaging/ng/buildconfig/sync.tag b/packaging/ng/buildconfig/sync.tag new file mode 100644 index 0000000..c91125d --- /dev/null +++ b/packaging/ng/buildconfig/sync.tag @@ -0,0 +1 @@ +v0.10.1 diff --git a/packaging/ng/buildconfig/taler-exchange.giturl b/packaging/ng/buildconfig/taler-exchange.giturl new file mode 100644 index 0000000..19309f9 --- /dev/null +++ b/packaging/ng/buildconfig/taler-exchange.giturl @@ -0,0 +1 @@ +git://git.taler.net/exchange.git diff --git a/packaging/ng/buildconfig/taler-exchange.tag b/packaging/ng/buildconfig/taler-exchange.tag new file mode 100644 index 0000000..0a39b20 --- /dev/null +++ b/packaging/ng/buildconfig/taler-exchange.tag @@ -0,0 +1 @@ +v0.10.3-dev.1 diff --git a/packaging/ng/buildconfig/taler-harness.giturl b/packaging/ng/buildconfig/taler-harness.giturl new file mode 100644 index 0000000..0d713ec --- /dev/null +++ b/packaging/ng/buildconfig/taler-harness.giturl @@ -0,0 +1 @@ +git://git.taler.net/wallet-core.git diff --git a/packaging/ng/buildconfig/taler-harness.tag b/packaging/ng/buildconfig/taler-harness.tag new file mode 100644 index 0000000..129170b --- /dev/null +++ b/packaging/ng/buildconfig/taler-harness.tag @@ -0,0 +1 @@ +v0.10.8-dev.1 diff --git a/packaging/ng/buildconfig/taler-merchant-demos.giturl b/packaging/ng/buildconfig/taler-merchant-demos.giturl new file mode 100644 index 0000000..8fd4286 --- /dev/null +++ b/packaging/ng/buildconfig/taler-merchant-demos.giturl @@ -0,0 +1 @@ +git://git.taler.net/taler-merchant-demos diff --git a/packaging/ng/buildconfig/taler-merchant-demos.tag b/packaging/ng/buildconfig/taler-merchant-demos.tag new file mode 100644 index 0000000..c91125d --- /dev/null +++ b/packaging/ng/buildconfig/taler-merchant-demos.tag @@ -0,0 +1 @@ +v0.10.1 diff --git a/packaging/ng/buildconfig/taler-merchant.giturl b/packaging/ng/buildconfig/taler-merchant.giturl new file mode 100644 index 0000000..cffa220 --- /dev/null +++ b/packaging/ng/buildconfig/taler-merchant.giturl @@ -0,0 +1 @@ +git://git.taler.net/merchant.git diff --git a/packaging/ng/buildconfig/taler-merchant.tag b/packaging/ng/buildconfig/taler-merchant.tag new file mode 100644 index 0000000..3123ff9 --- /dev/null +++ b/packaging/ng/buildconfig/taler-merchant.tag @@ -0,0 +1 @@ +v0.10.2 diff --git a/packaging/ng/buildconfig/taler-wallet-cli.giturl b/packaging/ng/buildconfig/taler-wallet-cli.giturl new file mode 100644 index 0000000..0d713ec --- /dev/null +++ b/packaging/ng/buildconfig/taler-wallet-cli.giturl @@ -0,0 +1 @@ +git://git.taler.net/wallet-core.git diff --git a/packaging/ng/buildconfig/taler-wallet-cli.tag b/packaging/ng/buildconfig/taler-wallet-cli.tag new file mode 100644 index 0000000..b434d4c --- /dev/null +++ b/packaging/ng/buildconfig/taler-wallet-cli.tag @@ -0,0 +1 @@ +v0.10.6 diff --git a/packaging/ng/buildscripts/generic.sh b/packaging/ng/buildscripts/generic.sh new file mode 100644 index 0000000..85235c6 --- /dev/null +++ b/packaging/ng/buildscripts/generic.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +PACKAGE=$1 +# Path of the debian/ folder in the repository +DEBIANPATH=${2:-.} + +echo Building $1 with generic build logic >&2 + +cd /pkgdir +dpkg-scanpackages . | xz - > /pkgdir/Packages.xz +echo "deb [trusted=yes] file:/pkgdir ./" >/etc/apt/sources.list.d/taler-packaging-local.list +apt-get update + +mkdir -p /build +cd /build + +TAG=$(cat /buildconfig/$PACKAGE.tag) +GITURL=$(cat /buildconfig/$PACKAGE.giturl) + +git config --global advice.detachedHead false +git clone --depth=1 --branch=$TAG "$GITURL" "$PACKAGE" + +cd "/build/$PACKAGE/$DEBIANPATH" + +# Get current version from debian/control file. +DEB_VERSION=$(dpkg-parsechangelog -S Version) + +echo "Current version of $PACKAGE/$DEBIANPATH is $DEB_VERSION" + +apt-cache show "$PACKAGE" | grep "Version: $DEB_VERSION" >/dev/null && found=true || found=false +if [ $found = true ]; then + echo "$PACKAGE version $DEB_VERSION already built, skipping" + exit 0 +fi + +cd "/build/$PACKAGE" +./bootstrap + +cd "/build/$PACKAGE/$DEBIANPATH" + +# Install build-time dependencies. +mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control + +# We do a sparse checkout, so we need to hint +# the version to the build system. +echo $DEB_VERSION > .version +dpkg-buildpackage -rfakeroot -b -uc -us + +cp ../*.deb /pkgdir/ diff --git a/packaging/ng/distros/Dockerfile.debian-bookworm b/packaging/ng/distros/Dockerfile.debian-bookworm new file mode 100644 index 0000000..b6aade0 --- /dev/null +++ b/packaging/ng/distros/Dockerfile.debian-bookworm @@ -0,0 +1,37 @@ +FROM debian:bookworm +# This file is in the public domain. +# +# Docker image to build Ubuntu packages of +# GNUnet, GNU Taler and GNU Anastasis. +# +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get -y install build-essential zip jq python3 python3-pip nodejs npm +RUN apt-get -y install autoconf automake gcc make libtool libltdl-dev libmicrohttpd-dev libpq-dev libsqlite3-dev libunistring-dev libqrencode-dev libgcrypt-dev libsodium-dev libargon2-dev libjansson-dev recutils libgmp-dev texinfo pkgconf zlib1g-dev libopus-dev libextractor-dev libnss3-dev libcurl4-gnutls-dev autopoint +RUN apt-get -y install libzbar-dev libmariadb-dev-compat libmariadb-dev mandoc libpulse-dev libgstreamer1.0-dev libbluetooth-dev iptables miniupnpc libpng-dev +RUN apt-get -y install python3-jinja2 doxygen libjose-dev iproute2 sudo +RUN apt-get -y install wget zile +RUN apt-get -y install libogg-dev gettext net-tools po-debconf debhelper-compat dbconfig-pgsql nginx +RUN apt-get -y install libgtk-3-dev libgladeui-dev libmagic-dev policykit-1 +RUN apt-get -y install dbconfig-no-thanks +RUN apt-get -y install devscripts equivs +# For libeufin: +RUN apt-get -y install python3-click python3-requests python3 + +RUN apt-get -y install \ + openjdk-17-jre-headless \ + openjdk-17-jdk-headless \ + default-jre-headless \ + ; + + +RUN pip install sphinx_rtd_theme --break-system-packages +#RUN npm install -g npm +RUN npm install -g pnpm + +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get -y dist-upgrade diff --git a/packaging/ng/distros/Dockerfile.ubuntu-kinetic b/packaging/ng/distros/Dockerfile.ubuntu-kinetic new file mode 100644 index 0000000..0a90fd7 --- /dev/null +++ b/packaging/ng/distros/Dockerfile.ubuntu-kinetic @@ -0,0 +1,32 @@ +FROM ubuntu:kinetic +# This file is in the public domain. +# +# Docker image to build Ubuntu packages of +# GNUnet, GNU Taler and GNU Anastasis. +# +# We need 'kinetic' for a reasonably recent NodeJS version. + +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get -y install build-essential zip jq python3 python3-pip nodejs npm +RUN apt-get -y install autoconf automake gcc make libtool libltdl-dev libmicrohttpd-dev libpq-dev libsqlite3-dev libunistring-dev libqrencode-dev libgcrypt-dev libsodium-dev libargon2-dev libjansson-dev recutils libgmp-dev texinfo pkgconf zlib1g-dev libopus-dev libextractor-dev libnss3-dev libcurl4-gnutls-dev autopoint +RUN apt-get -y install libzbar-dev libmysqlclient-dev mandoc libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libbluetooth-dev iptables miniupnpc libpng-dev +RUN apt-get -y install python3-jinja2 doxygen libjose-dev iproute2 sudo +RUN apt-get -y install wget zile +RUN apt-get -y install libogg-dev gettext net-tools po-debconf debhelper-compat dbconfig-pgsql nginx +RUN apt-get -y install libgtk-3-dev libgladeui-dev libmagic-dev policykit-1 +RUN apt-get -y install dbconfig-no-thanks +RUN apt-get -y install devscripts equivs +# For libeufin: +RUN apt-get -y install openjdk-17-jdk python3-click python3-requests python3 + +RUN pip install sphinx_rtd_theme +RUN npm install -g npm +RUN /usr/local/bin/npm install -g npm pnpm node + +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get -y dist-upgrade diff --git a/packaging/ng/print-latest-versions b/packaging/ng/print-latest-versions new file mode 100755 index 0000000..ff6668e --- /dev/null +++ b/packaging/ng/print-latest-versions @@ -0,0 +1,22 @@ +#!/usr/bin/bash + +function getver() { + ver=$(git -c 'versionsort.suffix=-' \ + ls-remote --exit-code --refs --sort='version:refname' --tags $2 '*.*.*' \ + | tail --lines=1 \ + | cut --delimiter='/' --fields=3) + curr=$(cat buildconfig/$1.tag) + if [[ "$curr" != "$ver" ]]; then + echo -n "[!] " + fi + echo $1 "curr: $curr" latest: $ver +} + +getver exchange git://git.taler.net/exchange +getver merchant git://git.taler.net/merchant +getver merchant-demos git://git.taler.net/taler-merchant-demos +getver libeufin git://git.taler.net/libeufin +getver wallet git://git.taler.net/wallet-core +getver gnunet git://git.gnunet.org/gnunet +getver sync git://git.taler.net/sync +getver libmhd git://git.gnunet.org/libmicrohttpd diff --git a/packaging/ubuntu-lunar/.gitignore b/packaging/ubuntu-lunar/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/packaging/ubuntu-lunar/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/packaging/ubuntu-lunar/Dockerfile b/packaging/ubuntu-lunar/Dockerfile new file mode 100644 index 0000000..f6e39c0 --- /dev/null +++ b/packaging/ubuntu-lunar/Dockerfile @@ -0,0 +1,57 @@ +FROM ubuntu:lunar +# This file is in the public domain. +# +# Docker image to build Ubuntu packages of +# GNUnet, GNU Taler and GNU Anastasis. +# +# We need 'kinetic' for a reasonably recent NodeJS version. + +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get -y install build-essential zip jq python3 python3-pip nodejs npm autoconf automake gcc make libtool libltdl-dev libmicrohttpd-dev libpq-dev libsqlite3-dev libunistring-dev libqrencode-dev libgcrypt-dev libsodium-dev libargon2-dev libjansson-dev recutils libgmp-dev texinfo pkgconf zlib1g-dev libopus-dev libextractor-dev libnss3-dev libcurl4-gnutls-dev autopoint libzbar-dev libmysqlclient-dev mandoc libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libbluetooth-dev iptables miniupnpc libpng-dev python3-jinja2 doxygen libjose-dev iproute2 sudo wget zile libogg-dev gettext net-tools po-debconf debhelper-compat dbconfig-pgsql nginx libgtk-3-dev libgladeui-dev libmagic-dev policykit-1 libnfc-dev python3-click python3-requests python3-sphinx-rtd-theme pandoc groff + +# For libeufin: +RUN apt-get -y install openjdk-17-jdk default-jre-headless +# For wallet-core: +RUN npm install -g node pnpm + +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get -y dist-upgrade + +ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache + +COPY gnunet-build.sh /root/ +RUN chmod +x /root/gnunet-build.sh +RUN /root/gnunet-build.sh master + +COPY gnunet-gtk-build.sh /root/ +RUN chmod +x /root/gnunet-gtk-build.sh +RUN /root/gnunet-gtk-build.sh master + +COPY exchange-build.sh /root/ +RUN chmod +x /root/exchange-build.sh +RUN /root/exchange-build.sh master + +COPY merchant-build.sh /root/ +RUN chmod +x /root/merchant-build.sh +RUN /root/merchant-build.sh master + +COPY sync-build.sh /root/ +RUN chmod +x /root/sync-build.sh +RUN /root/sync-build.sh master + +COPY anastasis-build.sh /root/ +RUN chmod +x /root/anastasis-build.sh +RUN /root/anastasis-build.sh master + +COPY libeufin-build.sh /root/ +RUN chmod +x /root/libeufin-build.sh +RUN /root/libeufin-build.sh master + +COPY wallet-build.sh /root/ +RUN chmod +x /root/wallet-build.sh +RUN /root/wallet-build.sh master diff --git a/packaging/ubuntu-lunar/README b/packaging/ubuntu-lunar/README new file mode 100644 index 0000000..f4a4824 --- /dev/null +++ b/packaging/ubuntu-lunar/README @@ -0,0 +1,19 @@ +Scripts to build Ubuntu packages from source. + + +TODO: +- check build for warnings/missing dependencies + (espcially GNUnet!) +- break up into separate build for GNUnet/Taler/Anastasis + => might be good to not run the entire pipeline only + because something changes in anastasis/wallet, as + that's not a good reason to re-build GNUnet ;-). +- integrate with buildbot (integrationtests?) + to build-on-tag / build nightly and upload resulting + Deb packages to reprepro (fully automated for nightly, + but with explicit password-protected signature for tagged builds) +- support other CPU architectures (by running in VM that emulates + other CPU architectures) +- eventually: try to improve scripts to support older + Debian versions + diff --git a/packaging/ubuntu-lunar/anastasis-build.sh b/packaging/ubuntu-lunar/anastasis-build.sh new file mode 100644 index 0000000..24643e1 --- /dev/null +++ b/packaging/ubuntu-lunar/anastasis-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/anastasis +cd /build/anastasis + +# Fetch source +rm -rf * + +for n in anastasis anastasis-gtk +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-lunar/exchange-build.sh b/packaging/ubuntu-lunar/exchange-build.sh new file mode 100644 index 0000000..b4a0115 --- /dev/null +++ b/packaging/ubuntu-lunar/exchange-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/exchange +cd exchange +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-lunar/gnunet-build.sh b/packaging/ubuntu-lunar/gnunet-build.sh new file mode 100644 index 0000000..614c5e6 --- /dev/null +++ b/packaging/ubuntu-lunar/gnunet-build.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +pip3 install --break-system-packages sphinx-book-theme sphinx-multiversion + +for n in gnunet +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar cvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-lunar/gnunet-gtk-build.sh b/packaging/ubuntu-lunar/gnunet-gtk-build.sh new file mode 100644 index 0000000..4414c3f --- /dev/null +++ b/packaging/ubuntu-lunar/gnunet-gtk-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +for n in gnunet-gtk +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-lunar/libeufin-build.sh b/packaging/ubuntu-lunar/libeufin-build.sh new file mode 100644 index 0000000..75713ab --- /dev/null +++ b/packaging/ubuntu-lunar/libeufin-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/libeufin +cd /build/libeufin + +# Fetch source +rm -rf * +git clone git://git.taler.net/libeufin +cd libeufin +git checkout $1 +./bootstrap +export JAVA_HOME=/usr +./configure --prefix=/usr +make install +make deb +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-lunar/mdb-build.sh b/packaging/ubuntu-lunar/mdb-build.sh new file mode 100644 index 0000000..d097240 --- /dev/null +++ b/packaging/ubuntu-lunar/mdb-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +git clone git://git.taler.net/taler-mdb +cd taler-mdb +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-lunar/merchant-build.sh b/packaging/ubuntu-lunar/merchant-build.sh new file mode 100644 index 0000000..24f5f9d --- /dev/null +++ b/packaging/ubuntu-lunar/merchant-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +# pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/merchant +cd merchant +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-lunar/run.sh b/packaging/ubuntu-lunar/run.sh new file mode 100755 index 0000000..a6df3f0 --- /dev/null +++ b/packaging/ubuntu-lunar/run.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu +CONTAINER=$USER/debbuilder:latest +docker build -t $CONTAINER . +rm -rf dist +mkdir dist +docker run --read-only $CONTAINER sleep 100 & +sleep 1 +docker container ls +ID=`docker container ls | grep $CONTAINER | head -n1 | awk '{print $1}'` +echo "Extracting files from $ID" +docker cp "$ID:/build/packages.tgz" . +echo "Stopping $CONTAINER ($ID)" +docker container stop $ID +echo "Removing $CONTAINER" +docker container rm $ID +docker image rm $USER/debbuilder +cd dist +tar xvf ../packages.tgz +cd .. +rm packages.tgz diff --git a/packaging/ubuntu-lunar/sync-build.sh b/packaging/ubuntu-lunar/sync-build.sh new file mode 100644 index 0000000..e38a0ee --- /dev/null +++ b/packaging/ubuntu-lunar/sync-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/sync +cd /build/sync + +# Fetch source +rm -rf * + +for n in sync +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-lunar/taler.list b/packaging/ubuntu-lunar/taler.list new file mode 100644 index 0000000..29cea42 --- /dev/null +++ b/packaging/ubuntu-lunar/taler.list @@ -0,0 +1 @@ +deb https://deb.taler.net/apt/ubuntu jammy main diff --git a/packaging/ubuntu-lunar/wallet-build.sh b/packaging/ubuntu-lunar/wallet-build.sh new file mode 100644 index 0000000..6d807be --- /dev/null +++ b/packaging/ubuntu-lunar/wallet-build.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/wallet +cd /build/wallet + +# Fetch source +rm -rf * +git clone git://git.taler.net/wallet-core + +cd wallet-core +git checkout $1 +./bootstrap + +cd packages/taler-wallet-cli + +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../taler-harness +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../ + +tar uvf ../../../packages.tgz *.deb diff --git a/packaging/ubuntu-mantic/Dockerfile b/packaging/ubuntu-mantic/Dockerfile new file mode 100644 index 0000000..6967b42 --- /dev/null +++ b/packaging/ubuntu-mantic/Dockerfile @@ -0,0 +1,54 @@ +FROM ubuntu:mantic +# This file is in the public domain. +# +# Docker image to build Ubuntu packages of +# GNUnet, GNU Taler and GNU Anastasis. +# +# We need 'kinetic' for a reasonably recent NodeJS version. + +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get update +RUN apt-get -y dist-upgrade +RUN apt-get update +RUN apt-get -y install build-essential zip jq python3 python3-pip nodejs npm autoconf automake gcc-12 make libtool libltdl-dev libmicrohttpd-dev libpq-dev libsqlite3-dev libunistring-dev libqrencode-dev libgcrypt-dev libsodium-dev libargon2-dev libjansson-dev recutils libgmp-dev texinfo pkgconf zlib1g-dev libopus-dev libextractor-dev libnss3-dev libcurl4-gnutls-dev autopoint libzbar-dev libmysqlclient-dev mandoc libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libbluetooth-dev iptables miniupnpc libpng-dev python3-jinja2 doxygen libjose-dev iproute2 sudo wget zile libogg-dev gettext net-tools po-debconf debhelper-compat dbconfig-pgsql nginx libgtk-3-dev libgladeui-dev libmagic-dev policykit-1 libnfc-dev python3-click python3-requests python3-sphinx-rtd-theme openjdk-17-jdk pandoc groff +RUN npm install -g node pnpm + +RUN pip install --break-system-packages sphinx_multiversion + +# ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache +COPY gnunet-build.sh /root/ +RUN chmod +x /root/gnunet-build.sh +RUN /root/gnunet-build.sh master + +COPY gnunet-gtk-build.sh /root/ +RUN chmod +x /root/gnunet-gtk-build.sh +RUN /root/gnunet-gtk-build.sh master + +COPY exchange-build.sh /root/ +RUN chmod +x /root/exchange-build.sh +RUN /root/exchange-build.sh master + +COPY merchant-build.sh /root/ +RUN chmod +x /root/merchant-build.sh +RUN /root/merchant-build.sh master + +COPY sync-build.sh /root/ +RUN chmod +x /root/sync-build.sh +RUN /root/sync-build.sh master + +COPY anastasis-build.sh /root/ +RUN chmod +x /root/anastasis-build.sh +RUN /root/anastasis-build.sh master + +# No wallet on Jammy +COPY wallet-build.sh /root/ +RUN chmod +x /root/wallet-build.sh +RUN /root/wallet-build.sh master + +COPY libeufin-build.sh /root/ +RUN chmod +x /root/libeufin-build.sh +RUN /root/libeufin-build.sh master diff --git a/packaging/ubuntu-mantic/README b/packaging/ubuntu-mantic/README new file mode 100644 index 0000000..f4a4824 --- /dev/null +++ b/packaging/ubuntu-mantic/README @@ -0,0 +1,19 @@ +Scripts to build Ubuntu packages from source. + + +TODO: +- check build for warnings/missing dependencies + (espcially GNUnet!) +- break up into separate build for GNUnet/Taler/Anastasis + => might be good to not run the entire pipeline only + because something changes in anastasis/wallet, as + that's not a good reason to re-build GNUnet ;-). +- integrate with buildbot (integrationtests?) + to build-on-tag / build nightly and upload resulting + Deb packages to reprepro (fully automated for nightly, + but with explicit password-protected signature for tagged builds) +- support other CPU architectures (by running in VM that emulates + other CPU architectures) +- eventually: try to improve scripts to support older + Debian versions + diff --git a/packaging/ubuntu-mantic/anastasis-build.sh b/packaging/ubuntu-mantic/anastasis-build.sh new file mode 100644 index 0000000..24643e1 --- /dev/null +++ b/packaging/ubuntu-mantic/anastasis-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/anastasis +cd /build/anastasis + +# Fetch source +rm -rf * + +for n in anastasis anastasis-gtk +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-mantic/exchange-build.sh b/packaging/ubuntu-mantic/exchange-build.sh new file mode 100644 index 0000000..a94a003 --- /dev/null +++ b/packaging/ubuntu-mantic/exchange-build.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +export CC=gcc-12 +# Fetch source +rm -rf * + +pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/exchange +cd exchange +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-mantic/gnunet-build.sh b/packaging/ubuntu-mantic/gnunet-build.sh new file mode 100644 index 0000000..614c5e6 --- /dev/null +++ b/packaging/ubuntu-mantic/gnunet-build.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +pip3 install --break-system-packages sphinx-book-theme sphinx-multiversion + +for n in gnunet +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar cvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-mantic/gnunet-gtk-build.sh b/packaging/ubuntu-mantic/gnunet-gtk-build.sh new file mode 100644 index 0000000..4414c3f --- /dev/null +++ b/packaging/ubuntu-mantic/gnunet-gtk-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +for n in gnunet-gtk +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-mantic/libeufin-build.sh b/packaging/ubuntu-mantic/libeufin-build.sh new file mode 100644 index 0000000..7229221 --- /dev/null +++ b/packaging/ubuntu-mantic/libeufin-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/libeufin +cd /build/libeufin + +# Fetch source +rm -rf * +git clone git://git.taler.net/libeufin +cd libeufin +git checkout $1 +./bootstrap +./configure --prefix=/usr/local +make deb +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-mantic/mdb-build.sh b/packaging/ubuntu-mantic/mdb-build.sh new file mode 100644 index 0000000..d097240 --- /dev/null +++ b/packaging/ubuntu-mantic/mdb-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +git clone git://git.taler.net/taler-mdb +cd taler-mdb +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-mantic/merchant-build.sh b/packaging/ubuntu-mantic/merchant-build.sh new file mode 100644 index 0000000..24f5f9d --- /dev/null +++ b/packaging/ubuntu-mantic/merchant-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +# pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/merchant +cd merchant +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-mantic/run.sh b/packaging/ubuntu-mantic/run.sh new file mode 100755 index 0000000..a6df3f0 --- /dev/null +++ b/packaging/ubuntu-mantic/run.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu +CONTAINER=$USER/debbuilder:latest +docker build -t $CONTAINER . +rm -rf dist +mkdir dist +docker run --read-only $CONTAINER sleep 100 & +sleep 1 +docker container ls +ID=`docker container ls | grep $CONTAINER | head -n1 | awk '{print $1}'` +echo "Extracting files from $ID" +docker cp "$ID:/build/packages.tgz" . +echo "Stopping $CONTAINER ($ID)" +docker container stop $ID +echo "Removing $CONTAINER" +docker container rm $ID +docker image rm $USER/debbuilder +cd dist +tar xvf ../packages.tgz +cd .. +rm packages.tgz diff --git a/packaging/ubuntu-mantic/sync-build.sh b/packaging/ubuntu-mantic/sync-build.sh new file mode 100644 index 0000000..e38a0ee --- /dev/null +++ b/packaging/ubuntu-mantic/sync-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/sync +cd /build/sync + +# Fetch source +rm -rf * + +for n in sync +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-mantic/taler.list b/packaging/ubuntu-mantic/taler.list new file mode 100644 index 0000000..29cea42 --- /dev/null +++ b/packaging/ubuntu-mantic/taler.list @@ -0,0 +1 @@ +deb https://deb.taler.net/apt/ubuntu jammy main diff --git a/packaging/ubuntu-mantic/wallet-build.sh b/packaging/ubuntu-mantic/wallet-build.sh new file mode 100644 index 0000000..6d807be --- /dev/null +++ b/packaging/ubuntu-mantic/wallet-build.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/wallet +cd /build/wallet + +# Fetch source +rm -rf * +git clone git://git.taler.net/wallet-core + +cd wallet-core +git checkout $1 +./bootstrap + +cd packages/taler-wallet-cli + +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../taler-harness +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../ + +tar uvf ../../../packages.tgz *.deb diff --git a/packaging/ubuntu-noble/Dockerfile b/packaging/ubuntu-noble/Dockerfile new file mode 100644 index 0000000..41df562 --- /dev/null +++ b/packaging/ubuntu-noble/Dockerfile @@ -0,0 +1,53 @@ +FROM ubuntu:noble +# This file is in the public domain. +# +# Docker image to build Ubuntu packages of +# GNUnet, GNU Taler and GNU Anastasis. +# + +ARG DEBIAN_FRONTEND=noninteractive + +# Install dependencies +RUN apt-get update +RUN apt-get -y upgrade +RUN apt-get update +RUN apt-get -y dist-upgrade +RUN apt-get update +RUN apt-get -y install build-essential zip jq python3 python3-pip nodejs npm autoconf automake gcc-12 make libtool libltdl-dev libmicrohttpd-dev libpq-dev libsqlite3-dev libunistring-dev libqrencode-dev libgcrypt-dev libsodium-dev libargon2-dev libjansson-dev recutils libgmp-dev texinfo pkgconf zlib1g-dev libopus-dev libextractor-dev libnss3-dev libcurl4-gnutls-dev autopoint libzbar-dev libmysqlclient-dev mandoc libpulse-dev libgstreamer1.0-dev libgstreamer-plugins-good1.0-dev libbluetooth-dev iptables miniupnpc libpng-dev python3-jinja2 doxygen libjose-dev iproute2 sudo wget zile libogg-dev gettext net-tools po-debconf debhelper-compat dbconfig-pgsql nginx libgtk-3-dev libgladeui-dev libmagic-dev policykit-1 libnfc-dev python3-click python3-requests python3-sphinx-rtd-theme openjdk-17-jdk pandoc groff +RUN npm install -g node pnpm + +RUN pip install --break-system-packages sphinx_multiversion + +# ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache +COPY gnunet-build.sh /root/ +RUN chmod +x /root/gnunet-build.sh +RUN /root/gnunet-build.sh master + +COPY gnunet-gtk-build.sh /root/ +RUN chmod +x /root/gnunet-gtk-build.sh +RUN /root/gnunet-gtk-build.sh master + +COPY exchange-build.sh /root/ +RUN chmod +x /root/exchange-build.sh +RUN /root/exchange-build.sh master + +COPY merchant-build.sh /root/ +RUN chmod +x /root/merchant-build.sh +RUN /root/merchant-build.sh master + +COPY sync-build.sh /root/ +RUN chmod +x /root/sync-build.sh +RUN /root/sync-build.sh master + +COPY anastasis-build.sh /root/ +RUN chmod +x /root/anastasis-build.sh +RUN /root/anastasis-build.sh master + +# No wallet on Jammy +COPY wallet-build.sh /root/ +RUN chmod +x /root/wallet-build.sh +RUN /root/wallet-build.sh master + +COPY libeufin-build.sh /root/ +RUN chmod +x /root/libeufin-build.sh +RUN /root/libeufin-build.sh master diff --git a/packaging/ubuntu-noble/README b/packaging/ubuntu-noble/README new file mode 100644 index 0000000..0f8c821 --- /dev/null +++ b/packaging/ubuntu-noble/README @@ -0,0 +1,16 @@ +Scripts to build Ubuntu packages from source. + + +TODO: +- check build for warnings/missing dependencies + (espcially GNUnet!) +- break up into separate build for GNUnet/Taler/Anastasis + => might be good to not run the entire pipeline only + because something changes in anastasis/wallet, as + that's not a good reason to re-build GNUnet ;-). +- integrate with buildbot (integrationtests?) + to build-on-tag / build nightly and upload resulting + Deb packages to reprepro (fully automated for nightly, + but with explicit password-protected signature for tagged builds) +- support other CPU architectures (by running in VM that emulates + other CPU architectures) diff --git a/packaging/ubuntu-noble/anastasis-build.sh b/packaging/ubuntu-noble/anastasis-build.sh new file mode 100644 index 0000000..24643e1 --- /dev/null +++ b/packaging/ubuntu-noble/anastasis-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/anastasis +cd /build/anastasis + +# Fetch source +rm -rf * + +for n in anastasis anastasis-gtk +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-noble/exchange-build.sh b/packaging/ubuntu-noble/exchange-build.sh new file mode 100644 index 0000000..a94a003 --- /dev/null +++ b/packaging/ubuntu-noble/exchange-build.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +export CC=gcc-12 +# Fetch source +rm -rf * + +pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/exchange +cd exchange +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-noble/gnunet-build.sh b/packaging/ubuntu-noble/gnunet-build.sh new file mode 100644 index 0000000..614c5e6 --- /dev/null +++ b/packaging/ubuntu-noble/gnunet-build.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +pip3 install --break-system-packages sphinx-book-theme sphinx-multiversion + +for n in gnunet +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar cvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-noble/gnunet-gtk-build.sh b/packaging/ubuntu-noble/gnunet-gtk-build.sh new file mode 100644 index 0000000..4414c3f --- /dev/null +++ b/packaging/ubuntu-noble/gnunet-gtk-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/gnunet +cd /build/gnunet + +# Fetch source +rm -rf * + +for n in gnunet-gtk +do + git clone git://git.gnunet.org/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-noble/libeufin-build.sh b/packaging/ubuntu-noble/libeufin-build.sh new file mode 100644 index 0000000..7229221 --- /dev/null +++ b/packaging/ubuntu-noble/libeufin-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/libeufin +cd /build/libeufin + +# Fetch source +rm -rf * +git clone git://git.taler.net/libeufin +cd libeufin +git checkout $1 +./bootstrap +./configure --prefix=/usr/local +make deb +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-noble/mdb-build.sh b/packaging/ubuntu-noble/mdb-build.sh new file mode 100644 index 0000000..d097240 --- /dev/null +++ b/packaging/ubuntu-noble/mdb-build.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +git clone git://git.taler.net/taler-mdb +cd taler-mdb +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-noble/merchant-build.sh b/packaging/ubuntu-noble/merchant-build.sh new file mode 100644 index 0000000..24f5f9d --- /dev/null +++ b/packaging/ubuntu-noble/merchant-build.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH +mkdir -p /build/taler +cd /build/taler + +# Fetch source +rm -rf * + +# pip3 install --break-system-packages htmlark + +git clone git://git.taler.net/merchant +cd merchant +git checkout $1 +./bootstrap +dpkg-buildpackage -rfakeroot -b -uc -us +cd .. +dpkg -i *.deb + +tar uvf ../packages.tgz *.deb +cd .. diff --git a/packaging/ubuntu-noble/run.sh b/packaging/ubuntu-noble/run.sh new file mode 100755 index 0000000..a6df3f0 --- /dev/null +++ b/packaging/ubuntu-noble/run.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -eu +CONTAINER=$USER/debbuilder:latest +docker build -t $CONTAINER . +rm -rf dist +mkdir dist +docker run --read-only $CONTAINER sleep 100 & +sleep 1 +docker container ls +ID=`docker container ls | grep $CONTAINER | head -n1 | awk '{print $1}'` +echo "Extracting files from $ID" +docker cp "$ID:/build/packages.tgz" . +echo "Stopping $CONTAINER ($ID)" +docker container stop $ID +echo "Removing $CONTAINER" +docker container rm $ID +docker image rm $USER/debbuilder +cd dist +tar xvf ../packages.tgz +cd .. +rm packages.tgz diff --git a/packaging/ubuntu-noble/sync-build.sh b/packaging/ubuntu-noble/sync-build.sh new file mode 100644 index 0000000..e38a0ee --- /dev/null +++ b/packaging/ubuntu-noble/sync-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/sync +cd /build/sync + +# Fetch source +rm -rf * + +for n in sync +do + git clone git://git.taler.net/$n + cd $n + git checkout $1 + ./bootstrap + dpkg-buildpackage -rfakeroot -b -uc -us + cd .. + dpkg -i *.deb +done + +tar uvf ../packages.tgz *.deb + +cd .. diff --git a/packaging/ubuntu-noble/wallet-build.sh b/packaging/ubuntu-noble/wallet-build.sh new file mode 100644 index 0000000..6d807be --- /dev/null +++ b/packaging/ubuntu-noble/wallet-build.sh @@ -0,0 +1,28 @@ +#!/bin/sh +# This file is in the public domain. +# Helper script to build the latest DEB packages in the container. + +set -eu +unset LD_LIBRARY_PATH + +mkdir -p /build/wallet +cd /build/wallet + +# Fetch source +rm -rf * +git clone git://git.taler.net/wallet-core + +cd wallet-core +git checkout $1 +./bootstrap + +cd packages/taler-wallet-cli + +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../taler-harness +dpkg-buildpackage -rfakeroot -b -uc -us + +cd ../ + +tar uvf ../../../packages.tgz *.deb |