aboutsummaryrefslogtreecommitdiff
path: root/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen')
-rwxr-xr-xcontrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/Containerfile68
-rwxr-xr-xcontrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/install-fix.patch13
-rwxr-xr-xcontrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh23
-rwxr-xr-xcontrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/version.sh17
4 files changed, 121 insertions, 0 deletions
diff --git a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/Containerfile b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/Containerfile
new file mode 100755
index 000000000..c3bbade45
--- /dev/null
+++ b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/Containerfile
@@ -0,0 +1,68 @@
+FROM docker.io/library/debian:unstable
+
+ENV DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update -yqq && \
+ apt-get install -yqq \
+ autoconf \
+ autopoint \
+ curl \
+ bash \
+ coreutils \
+ git \
+ libcurl4-gnutls-dev \
+ libgcrypt-dev \
+ libidn11-dev \
+ libjansson-dev \
+ libmicrohttpd-dev \
+ libpq-dev \
+ libqrencode-dev \
+ libsodium-dev \
+ libtool \
+ libunistring-dev \
+ make \
+ pkg-config \
+ python3-pip \
+ python3-sphinx \
+ python3-sphinx-rtd-theme \
+ recutils \
+ texinfo \
+ zlib1g-dev \
+ # For mustach testing (optional) \
+ libjson-c-dev \
+ # Debian packaging tools \
+ po-debconf \
+ build-essential \
+ debhelper-compat \
+ devscripts \
+ git-buildpackage \
+ # Documentation dependencies \
+ doxygen \
+ graphviz \
+ pandoc \
+ # Test suite dependencies \
+ jq \
+ postgresql \
+ sudo \
+ wget
+
+# Install Taler (and friends) packages
+RUN curl -sS https://deb.taler.net/apt-nightly/taler-bookworm-ci.sources \
+ | tee /etc/apt/sources.list.d/taler-bookworm-ci.sources
+
+RUN echo '\
+Package: * \n\
+Pin: origin "deb.taler.net" \n\
+Pin-Priority: 999' > /etc/apt/preferences.d/taler
+
+RUN cat /etc/apt/preferences.d/taler && \
+ apt-get update -y && \
+ apt-get install -y \
+ libgnunet-dev \
+ libgnunet \
+ gnunet \
+&& rm -rf /var/lib/apt/lists/*
+
+WORKDIR /workdir
+
+CMD ["bash", "/workdir/ci/ci.sh"]
diff --git a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/install-fix.patch b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/install-fix.patch
new file mode 100755
index 000000000..8334c5a7a
--- /dev/null
+++ b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/install-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/debian/taler-exchange.install b/debian/taler-exchange.install
+index 631c270b..072c6231 100644
+--- a/debian/taler-exchange.install
++++ b/debian/taler-exchange.install
+@@ -36,6 +36,6 @@ usr/share/taler/exchange/templates/*.must
+ debian/etc-taler-exchange/* etc/
+
+ # Terms of service / privacy policy templates
+-usr/share/taler/exchange/*.rst
++#usr/share/taler/exchange/terms/*.rst
+ # Translations of ToS/PP
+-usr/share/taler/exchange/locale/*/LC_MESSAGES/*.po
++#usr/share/taler/exchange/terms/locale/*/LC_MESSAGES/*.po
diff --git a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh
new file mode 100755
index 000000000..922f8bf63
--- /dev/null
+++ b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/job.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -exuo pipefail
+# This file is in the public domain.
+# Helper script to build the latest DEB packages in the container.
+
+
+unset LD_LIBRARY_PATH
+
+# Install build-time dependencies.
+# Update apt cache first
+apt-get update
+apt-get upgrade -y
+mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
+
+export VERSION="$(./contrib/ci/jobs/4-deb-package/version.sh)"
+echo "Building package version ${VERSION}"
+EMAIL=none gbp dch --dch-opt=-b --ignore-branch --debian-tag="%(version)s" --git-author --new-version="${VERSION}"
+./bootstrap
+dpkg-buildpackage -rfakeroot -b -uc -us
+
+ls -alh ../*.deb
+mkdir -p /artifacts/exchange/${CI_COMMIT_REF} # Variable comes from CI environment
+mv ../*.deb /artifacts/exchange/${CI_COMMIT_REF}/
diff --git a/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/version.sh b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/version.sh
new file mode 100755
index 000000000..52031b23a
--- /dev/null
+++ b/contrib/ci/jobs/121-deb-package-debian-unstable-amd64-gen/version.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -ex
+
+BRANCH=$(git name-rev --name-only HEAD)
+if [ -z "${BRANCH}" ]; then
+ exit 1
+else
+ # "Unshallow" our checkout, but only our current branch, and exclude the submodules.
+ git fetch --no-recurse-submodules --tags --depth=1000 origin "${BRANCH}"
+ RECENT_VERSION_TAG=$(git describe --tags --match 'v*.*.*' --exclude '*-dev*' --always --abbrev=0 HEAD || exit 1)
+ commits="$(git rev-list ${RECENT_VERSION_TAG}..HEAD --count)"
+ if [ "${commits}" = "0" ]; then
+ git describe --tag HEAD | sed -r 's/^v//' || exit 1
+ else
+ echo $(echo ${RECENT_VERSION_TAG} | sed -r 's/^v//')-${commits}-$(git rev-parse --short=8 HEAD)
+ fi
+fi