diff options
116 files changed, 669 insertions, 347 deletions
diff --git a/buildbot/master.cfg b/buildbot/master.cfg index 7d5ff7a..e6f2e78 100644 --- a/buildbot/master.cfg +++ b/buildbot/master.cfg @@ -788,7 +788,7 @@ c["buildbotURL"] = "https://buildbot.taler.net/" # -- formerly commented out as not packaged properly in Debian and others, see # https://bugzilla.redhat.com/show_bug.cgi?id=1557687 c["www"] = { - "port": 8010, + "port": "tcp:8010:interface=127.0.0.1", "default_page": 'waterfall', "plugins": { "waterfall_view": True, diff --git a/netzbon/generate-letter.sh b/netzbon/generate-letter.sh index 991a547..272463c 100755 --- a/netzbon/generate-letter.sh +++ b/netzbon/generate-letter.sh @@ -26,7 +26,7 @@ do jq ".[$INDEX]" < $1 | jq '.domain="'"${DOMAIN}"'"' > "tmp/${ID}.json" cd tmp - ../render.py "${ID}.json" < ../template.tex.j2 > "${ID}.tex" + ../render.py "${ID}.json" < ../template_de.tex.j2 > "${ID}.tex" pdflatex "${ID}.tex" < /dev/null &> /dev/null || true pdflatex "${ID}.tex" < /dev/null &> /dev/null || true pdflatex "${ID}.tex" < /dev/null diff --git a/netzbon/template.tex.j2 b/netzbon/template.tex.j2 index 60546cd..81ec978 100644 --- a/netzbon/template.tex.j2 +++ b/netzbon/template.tex.j2 @@ -48,35 +48,31 @@ If you want to use a GNU Taler wallet (from {\url{https://wallet.taler.net/}}) you need to add eNetzBon as a payment service provider before you can use it to invoice your customers. To do so, please scan the following QR code with your Taler wallet: \begin{center} -{\qrcode[hyperlink,level=M,height=3cm]\\ -\\ -{\tt taler://exchange/exchange.{{data.domain}}/}} -% Deprecated output because of redundancy: -%{\tt taler://exchange/exchange.{{data.domain}}/} +{\qrcode[hyperlink,level=M,height=3cm]{\tt taler://exchange/exchange.{{data.domain}}/}} + +{\tt taler://exchange/exchange.{{data.domain}}/} \end{center} -This welcome package includes five identical stickers with a QR code which is -pre-configured to link all your customers' payments into your eNetzBon bank account. Your +This welcome package includes five identical stickers with a QR code which is +pre-configured to link all your customers' payments into your eNetzBon bank account. Your specific QR code looks like this: \begin{center} -{\qrcode[hyperlink,level=M,height=3cm]\\ -\\ -{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default}} -% Deprecated output because of redundancy: -%{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default} +{\qrcode[hyperlink,level=M,height=3cm]{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default}} + +{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default} \end{center} You are free to create additional QR codes or change the contents for this QR code in the merchant backend. -Please sign the included Terms of service on the attached paper slip and return it to us. -If you want us to set up the Taler Point-of-sale app, please complete the form in the +Please sign the included Terms of service on the attached paper slip and return it to us. +If you want us to set up the Taler Point-of-sale app, please complete the form in the introduction brochure and return that form to us as well. We hope your customers enjoy paying you with eNetzBon! \closing{Best regards} -\encl{Five similar QR code stickers, \\ Introduction to GNU Taler for merchants, \\ +\encl{Five similar QR code stickers, \\ Introduction to GNU Taler for merchants, \\ eNetzBon Terms of service (to sign), \\ Return envelope} \end{letter} diff --git a/netzbon/template_de.tex.j2 b/netzbon/template_de.tex.j2 index 3aba580..2ee1c31 100644 --- a/netzbon/template_de.tex.j2 +++ b/netzbon/template_de.tex.j2 @@ -9,100 +9,101 @@ left=2.5cm, right=2cm, footskip=1cm]{geometry} \usepackage{url} +\usepackage{graphicx} \usepackage[colorlinks=true, allcolors=black]{hyperref} +\usepackage{enumitem} \IfFileExists{lmodern.sty}{\usepackage{lmodern}}{} \date{\today} % \selectlanguage{german} -\address{Verein Soziale \"Okonomie \\Klybeckstrasse 95 \\4057 Basel} -\signature{Isidor} +\address{Verein Soziale \"Okonomie \\Klybeckstrasse 95 \\4057 Basel \\ enetzbon@netzbon.ch } +\signature{ + \vspace{-1cm} + \includegraphics[height=1cm]{../wallimann.jpg} \\ + Isidor Wallimann im Namen des Vorstandes Soziale \"Okonomie} \begin{document} % \begin{letter}{An \\ {{data.name}}} -\opening{Liebe(r) {{data.name}},} +\opening{Lieber NetzBon-Betrieb,} -Wir freuen uns, dir heute die digitale NetzBon-Variante {\bf eNetzBon} vorstellen zu -d\"urfen. Der Verein Soziale \"Okonomie betreibt dieses Bezahlsystem basierend auf der -Technik von {\bf GNU Taler} und l\"adt dich ein, es gleich einmal praktisch kennenzulernen. +Unser Projekt eines digitalen Netzbon - der {\bf eNetzBon} - ist in der Testphase. Daf\"ur brauchen wir eure +Unterst\"utzung. Wir m\"ochten euch hier eine erste Anleitung geben, wie ihr als Betrieb den {\bf eNetzBon} nutzen +k\"onnt. Der Verein Soziale \"Okonomie betreibt dieses Bezahlsystem basierend auf der Technik von {\bf GNU Taler} und +l\"adt dich ein, es praktisch kennenzulernen. -Die beiliegende Brosch\"ure erkl\"art, wie du die Software ausprobierst und so einstellst, -dass dein Betrieb Zahlungen von Kunden und anderen Betrieben in eNetzBon auf deinem -internen Konto beim Verein empfangen kann. Die {\bf pers\"onlichen Zugangsdaten} gelten -sowohl f\"ur das {\bf eNetzBon-Konto} als auch f\"ur das {\bf Verwaltungsprogramm GNU Taler -Merchant}, mit dem du deine Artikelstammdaten anlegen und Buchungen in eNetzBon verwalten -kannst. +Die beiliegende Brosch\"ure erkl\"art, wie du die Software ausprobierst und so einstellst, dass dein Betrieb Zahlungen +von Kundinnen und Kunden in eNetzBon auf deinem internen Konto beim Verein gratis empfangen kann. -Um Zugang zu deinem {\bf eNetzBon-Konto} zu erhalten, rufst du in deinem Browser die Seite +%Du erh\"alst heute Zugangslinks zu +%\begin{enumerate}[noitemsep] +%\item eNetzBon-Konto, +%\item Verwaltungsprogramm (GNU Taler Merchant) und +%\item Elektronische Geldb\"orse (Taler wallet). +%\end{enumerate} + +Die {\bf pers\"onlichen Zugangsdaten} gelten sowohl f\"ur das {\bf eNetzBon-Konto} als auch f\"ur das {\bf +Verwaltungsprogramm GNU Taler Merchant}, mit dem du deine Buchungen in eNetzBon verwalten kannst. + +{\bf 1.} Um Zugang zu deinem eNetzBon-Konto zu erhalten, rufst du in deinem Browser die Seite \begin{center} -{\url{https://bank.{{data.domain}}/}} -\end{center} +{\url{https://bank.{{data.domain}}/}} +\end{center} auf und gibst den Benutzernamen {\tt {{data.id}}} und das Passwort {\bf {{data.pass}}} ein. - -Dein Passwort musst du nach dem ersten Besuch \"andern und es dauerhaft vor dem Zugriff -Unbefugter sch\"utzen, weil diese sonst Kontrolle \"uber die eNetzBon erlangen k\"onnten! -Wir empfehlen daf\"ur eine Zwei-Faktor-Authentifizierung (mittels SMS oder E-Mail), bevor +Dein Passwort musst du nach dem ersten Besuch \"andern und es dauerhaft vor dem Zugriff +Unbefugter sch\"utzen, weil diese sonst Kontrolle \"uber die eNetzBon erlangen k\"onnten! +Wir empfehlen daf\"ur eine Zwei-Faktor-Authentifizierung (mittels SMS oder E-Mail), bevor das System in Betrieb genommen wird. -Das {\bf Verwaltungsprogramm GNU Taler Merchant} ist zug\"anglich unter +{\bf 2.} Das Verwaltungsprogramm {\bf GNU Taler Merchant} ist zug\"anglich unter \begin{center} -{\url{https://backend.{{data.domain}}/instances/{{data.id}}/}}. -\end{center} -Es ist bereits mit deinem eNetzBon-Konto verbunden und verwendet {\bf dasselbe +{\url{https://backend.{{data.domain}}/instances/{{data.id}}/}}. +\end{center} +Es ist bereits mit deinem eNetzBon-Konto verbunden und verwendet {\bf dasselbe Passwort}. -Wir empfehlen zugunsten h\"oherer Sicherheit die beiden Passw\"orter unabh\"angig +Wir empfehlen zugunsten h\"oherer Sicherheit die beiden Passw\"orter unabh\"angig voneinander in beiden Systemen zu \"andern. -Wenn du die {\bf elektronische Geldb\"orse GNU Taler Wallet} verwenden willst, um von -deinen Kunden eNetzBon an dieses gezahlt zu bekommen bzw. um selbst mit eNetzBon zu -bezahlen, besuchst du -\begin{center} -{\url{https://wallet.taler.net/}} -\end{center} -und installierst das passende Wallet f\"ur dein Smartphone (Android oder iOS). -\newpage +{\bf 3.} Wenn du die {\bf elektronische Geldb\"orse GNU Taler Wallet} verwenden willst, um von +deiner Kundschaft eNetzBon an dieses gezahlt zu bekommen bzw. um selbst mit eNetzBon zu +bezahlen, besuchst du {\url{https://wallet.taler.net/}} +und installierst das passende Wallet f\"ur dein Smartphone (Android oder iOS). -Bevor du {\bf Rechnungen an deine Kunden stellen} kannst, musst du im Wallet zuerst -eNetzBon als Zahlungsdienst hinzuf\"ugen. Um dies zu tun, aktiviere bitte dein GNU Taler +Bevor du {\bf Rechnungen an deine Kundschaft stellen} kannst, musst du im Wallet zuerst +eNetzBon als Zahlungsdienst hinzuf\"ugen. Um dies zu tun, aktiviere bitte dein GNU Taler Wallet und scanne folgenden QR-Code: \begin{center} -{\qrcode[hyperlink,level=M,height=3cm] -\newline -\newline -{\tt taler://exchange/exchange.{{data.domain}}/}} -% Deprecated output because of redundancy: -%{\tt taler://exchange/exchange.{{data.domain}}/} +{\qrcode[hyperlink,level=M,height=3cm]{taler://exchange/exchange.{{data.domain}}/}} + +{\tt taler://exchange/exchange.{{data.domain}}/} \end{center} -Anbei erh\"altst du {\bf f\"unf gleichartige Aufkleber mit einem QR-Code}, der den Verweis -auf dein eNetzBon-Konto enth\"alt bzw. deinen Betrieb eindeutig bezeichnet. Die Kunden -m\"ussen diesen QR-Code beim Bezahlen mit ihren GNU Taler Wallets scannen, damit ihre +Anbei erh\"altst du {\bf f\"unf gleichartige Aufkleber mit einem QR-Code}, der den Verweis +auf dein eNetzBon-Konto enth\"alt bzw. deinen Betrieb eindeutig bezeichnet. Die Kundinnen und Kunden +m\"ussen diesen QR-Code beim Bezahlen mit ihren GNU Taler Wallets scannen, damit ihre Zahlungen auf dein eNetzBon-Konto gelenkt werden. So sieht dein QR-Code aus: \begin{center} -{\qrcode[hyperlink,level=M,height=3cm] -\newline -\newline -{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default}} -% Deprecated output because of redundancy: -%{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default} -\end{center} -Im Verwaltungsprogramm GNU Taler Merchant besteht die M\"oglichkeit, weitere QR-Codes zu -erzeugen und zus\"atzliche Daten des QR-Codes festzulegen, z.B. QR-Codes mit festen -oder variablen Preisen f\"ur deine angebotenen Waren oder Dienstleistungen. +{\qrcode[hyperlink,level=M,height=3cm]{taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default}} -Eine Bitte haben wir noch, bevor es losgehen kann: +{\tt taler://pay-template/backend.{{data.domain}}/instances/{{data.id}}/default} +\end{center} +Im Verwaltungsprogramm GNU Taler Merchant besteht die M\"oglichkeit, weitere QR-Codes zu +erzeugen und zus\"atzliche Daten des QR-Codes festzulegen, z.B. QR-Codes mit festen +oder variablen Preisen f\"ur deine angebotenen Waren oder Dienstleistungen. -Wir ben\"otigen die {\bf Allgemeinen Geschäftsbedingungen (AGB)} zur eNetzBon-Nutzung +Eine Bitte haben wir noch, bevor es losgehen kann: +Wir ben\"otigen die {\bf Allgemeinen Ge\-schäfts\-be\-ding\-ungen (AGB)} zur eNetzBon-Nutzung unterschrieben an den Verein Soziale \"Okonomie zur\"uckgesendet. -F\"ur den Fall deines Interesses, dass wir dir die Anwendung {\bf Taler -Point-of-sale App} aufsetzen und in Betrieb nehmen sollen, f\"ulle bitte den Antrag in der -Anleitungsbrosch\"ure aus und sende auch diesen an uns zur\"uck. +F\"ur den Fall deines Interesses, dass wir dir die Anwendung {\bf GNU Taler +Point-of-sale App} (Download unter \url{https://pos.taler.net/}) aufsetzen und in Betrieb +nehmen sollen, f\"ulle bitte den Antrag in der Anleitungsbrosch\"ure aus und +sende auch diesen an uns zur\"uck. Und nun w\"unschen wir dir gutes Gelingen und viel Freude beim Entdecken des eNetzBon! \closing{Herzliche Gr\"usse} -\encl{F\"unf identische Aufkleber mit dem QR-Code deines eNetzBon-Kontos, \\ -Anleitungsbrosch\"ure GNU Taler f\"ur NetzBon-Betriebe, \\ +\encl{F\"unf identische Aufkleber mit dem QR-Code deines eNetzBon-Kontos, \\ +Anleitungsbrosch\"ure GNU Taler f\"ur NetzBon-Betriebe, \\ eNetzBon-AGB (bitte mit Unterschrift zur\"ucksenden), \\ Antwortcouvert} \end{letter} diff --git a/packaging/debian-docker/Dockerfile b/packaging/debian-bookworm/Dockerfile index 0d6c739..0d6c739 100644 --- a/packaging/debian-docker/Dockerfile +++ b/packaging/debian-bookworm/Dockerfile diff --git a/packaging/debian-docker/README b/packaging/debian-bookworm/README index 0a092e5..0a092e5 100644 --- a/packaging/debian-docker/README +++ b/packaging/debian-bookworm/README diff --git a/packaging/debian-docker/anastasis-build.sh b/packaging/debian-bookworm/anastasis-build.sh index 24643e1..24643e1 100644 --- a/packaging/debian-docker/anastasis-build.sh +++ b/packaging/debian-bookworm/anastasis-build.sh diff --git a/packaging/debian-docker/exchange-build.sh b/packaging/debian-bookworm/exchange-build.sh index b4a0115..b4a0115 100644 --- a/packaging/debian-docker/exchange-build.sh +++ b/packaging/debian-bookworm/exchange-build.sh diff --git a/packaging/debian-docker/gnunet-build.sh b/packaging/debian-bookworm/gnunet-build.sh index 614c5e6..614c5e6 100644 --- a/packaging/debian-docker/gnunet-build.sh +++ b/packaging/debian-bookworm/gnunet-build.sh diff --git a/packaging/debian-docker/gnunet-gtk-build.sh b/packaging/debian-bookworm/gnunet-gtk-build.sh index 4414c3f..4414c3f 100644 --- a/packaging/debian-docker/gnunet-gtk-build.sh +++ b/packaging/debian-bookworm/gnunet-gtk-build.sh diff --git a/packaging/debian-docker/libeufin-build.sh b/packaging/debian-bookworm/libeufin-build.sh index eb440f2..eb440f2 100644 --- a/packaging/debian-docker/libeufin-build.sh +++ b/packaging/debian-bookworm/libeufin-build.sh diff --git a/packaging/debian-docker/mdb-build.sh b/packaging/debian-bookworm/mdb-build.sh index d097240..d097240 100644 --- a/packaging/debian-docker/mdb-build.sh +++ b/packaging/debian-bookworm/mdb-build.sh diff --git a/packaging/debian-docker/merchant-build.sh b/packaging/debian-bookworm/merchant-build.sh index 24f5f9d..24f5f9d 100644 --- a/packaging/debian-docker/merchant-build.sh +++ b/packaging/debian-bookworm/merchant-build.sh diff --git a/packaging/debian-docker/run.sh b/packaging/debian-bookworm/run.sh index 2689a33..2689a33 100755 --- a/packaging/debian-docker/run.sh +++ b/packaging/debian-bookworm/run.sh diff --git a/packaging/debian-docker/sync-build.sh b/packaging/debian-bookworm/sync-build.sh index 2f5d9df..2f5d9df 100644 --- a/packaging/debian-docker/sync-build.sh +++ b/packaging/debian-bookworm/sync-build.sh diff --git a/packaging/debian-docker/wallet-build.sh b/packaging/debian-bookworm/wallet-build.sh index 6d807be..6d807be 100644 --- a/packaging/debian-docker/wallet-build.sh +++ b/packaging/debian-bookworm/wallet-build.sh 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 index 23053de..681bab4 100644 --- a/packaging/ng/.gitignore +++ b/packaging/ng/.gitignore @@ -1 +1,2 @@ packages/ +cache/ diff --git a/packaging/ng/README.md b/packaging/ng/README.md index f51745f..50ec7cb 100644 --- a/packaging/ng/README.md +++ b/packaging/ng/README.md @@ -6,10 +6,13 @@ 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, dependencies are only built on-demand. Each package is built in a +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. diff --git a/packaging/ng/build-debian-bookworm.sh b/packaging/ng/build-debian-bookworm.sh deleted file mode 100755 index c259fe7..0000000 --- a/packaging/ng/build-debian-bookworm.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env bash - -# Build debian packages. - -set -eu - -DISTRO=debian -DISTRO_VERNAME=bookworm -LABEL=$DISTRO-$DISTRO_VERNAME - -IMAGE_TAG=taler-packaging-$LABEL:latest -DOCKERFILE=Dockerfile.$LABEL -PKGDIR=packages/$LABEL - -echo "Building $IMAGE_TAG from $DOCKERFILE" - -# Build the base image. Usually fast because it's cached. -docker build -t $IMAGE_TAG -f $DOCKERFILE . - -mkdir -p $PKGDIR - -# echo docker run -it --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir $IMAGE_TAG /bin/bash -#docker run -it --entrypoint=/bin/bash --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir $IMAGE_TAG /buildscripts/build-gnunet.sh -docker run -it --entrypoint=/bin/bash --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir $IMAGE_TAG /buildscripts/libeufin-build.sh master -docker run -it --entrypoint=/bin/bash --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir $IMAGE_TAG /buildscripts/wallet-build.sh master diff --git a/packaging/ng/build-ubuntu-kinetic.sh b/packaging/ng/build-ubuntu-kinetic.sh deleted file mode 100755 index a27bcac..0000000 --- a/packaging/ng/build-ubuntu-kinetic.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash - -# Build debian packages. - -set -eu - -DISTRO=ubuntu -DISTRO_VERNAME=kinetic -LABEL=$DISTRO-$DISTRO_VERNAME - -IMAGE_TAG=taler-packaging-$LABEL:latest -DOCKERFILE=Dockerfile.$LABEL -PKGDIR=packages/$LABEL - -echo "Building $IMAGE_TAG from $DOCKERFILE" - -# Build the base image. Usually fast because it's cached. -docker build -t $IMAGE_TAG -f $DOCKERFILE . - -mkdir -p $PKGDIR - -# echo docker run -it --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir $IMAGE_TAG /bin/bash -#docker run -it --entrypoint=/bin/bash --mount type=bind,source="$(pwd)"/buildscripts,target=/buildscripts,readonly --mount type=bind,source="$(pwd)"/$PKGDIR,target=/pkgdir $IMAGE_TAG /buildscripts/build-gnunet.sh 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/build-gnunet-gtk.sh b/packaging/ng/buildscripts/build-gnunet-gtk.sh deleted file mode 100644 index 924c638..0000000 --- a/packaging/ng/buildscripts/build-gnunet-gtk.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/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 - -dpkg-scanpackages /pkgdir /dev/null | gzip -9c > /pkgdir/Packages.gz - -echo "deb [trusted=yes] file:/pkgdir ./" >/etc/apt/sources.list.d/taler-packaging-local.list - -rm -rf /build/gnunet -mkdir -p /build/gnunet -cd /build/gnunet - -TAG=${1:-master} - -for n in gnunet gnunet-gtk -do - git clone --depth=1 git://git.gnunet.org/$n - cd $n - git checkout $TAG - - # 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. - dpkg-parsechangelog -S Version > .version - ./bootstrap - dpkg-buildpackage -rfakeroot -b -uc -us - cd .. -done - -ls /build/gnunet - -cp /build/gnunet/*.deb /pkgdir/ diff --git a/packaging/ng/buildscripts/exchange-build.sh b/packaging/ng/buildscripts/exchange-build.sh deleted file mode 100644 index 36b9ede..0000000 --- a/packaging/ng/buildscripts/exchange-build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 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/ng/buildscripts/build-gnunet.sh b/packaging/ng/buildscripts/generic.sh index 70fb1a8..85235c6 100644 --- a/packaging/ng/buildscripts/build-gnunet.sh +++ b/packaging/ng/buildscripts/generic.sh @@ -5,37 +5,50 @@ 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 . /dev/null | gzip -9c > /pkgdir/Packages.gz +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=${1:-master} +TAG=$(cat /buildconfig/$PACKAGE.tag) +GITURL=$(cat /buildconfig/$PACKAGE.giturl) -git clone --depth=1 git://git.gnunet.org/gnunet -cd gnunet -git checkout $TAG +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) -apt-cache show gnunet | grep "Version: $DEB_VERSION" >/dev/null && found=true || found=false +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 "gnunet version $DEB_VERSION already built, skipping" + 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 -./bootstrap dpkg-buildpackage -rfakeroot -b -uc -us -cp /build/*.deb /pkgdir/ +cp ../*.deb /pkgdir/ diff --git a/packaging/ng/buildscripts/libeufin-build.sh b/packaging/ng/buildscripts/libeufin-build.sh deleted file mode 100644 index f355add..0000000 --- a/packaging/ng/buildscripts/libeufin-build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 -cd /build - -# Fetch source -rm -rf * -git clone git://git.taler.net/libeufin -cd libeufin -git checkout $1 -./bootstrap -./configure --prefix=/usr/local -make deb - -cp /build/*.deb /pkgdir/ - -dpkg -i /build/*.deb - - diff --git a/packaging/ng/buildscripts/merchant-build.sh b/packaging/ng/buildscripts/merchant-build.sh deleted file mode 100644 index 5625198..0000000 --- a/packaging/ng/buildscripts/merchant-build.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 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/ng/buildscripts/wallet-build.sh b/packaging/ng/buildscripts/wallet-build.sh deleted file mode 100644 index 029d90a..0000000 --- a/packaging/ng/buildscripts/wallet-build.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 -cd /build - -# Fetch source -rm -rf * -git clone git://git.taler.net/wallet-core - -cd wallet-core -git checkout $1 -./bootstrap -./configure --prefix=/usr -make -cd packages/taler-wallet-cli -./configure --prefix=/usr -make install -dpkg-buildpackage -rfakeroot -b -uc -us -cd ../taler-harness -./configure --prefix=/usr -make install -dpkg-buildpackage -rfakeroot -b -uc -us -cd .. - - -cp /build/wallet-core/packages/*.deb /pkgdir/ diff --git a/packaging/ng/Dockerfile.debian-bookworm b/packaging/ng/distros/Dockerfile.debian-bookworm index b6aade0..b6aade0 100644 --- a/packaging/ng/Dockerfile.debian-bookworm +++ b/packaging/ng/distros/Dockerfile.debian-bookworm diff --git a/packaging/ng/Dockerfile.ubuntu-kinetic b/packaging/ng/distros/Dockerfile.ubuntu-kinetic index 0a90fd7..0a90fd7 100644 --- a/packaging/ng/Dockerfile.ubuntu-kinetic +++ b/packaging/ng/distros/Dockerfile.ubuntu-kinetic 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-docker/.gitignore b/packaging/ubuntu-lunar/.gitignore index 849ddff..849ddff 100644 --- a/packaging/ubuntu-docker/.gitignore +++ b/packaging/ubuntu-lunar/.gitignore diff --git a/packaging/ubuntu-docker/Dockerfile b/packaging/ubuntu-lunar/Dockerfile index f6e39c0..f6e39c0 100644 --- a/packaging/ubuntu-docker/Dockerfile +++ b/packaging/ubuntu-lunar/Dockerfile diff --git a/packaging/ubuntu-docker/README b/packaging/ubuntu-lunar/README index f4a4824..f4a4824 100644 --- a/packaging/ubuntu-docker/README +++ b/packaging/ubuntu-lunar/README diff --git a/packaging/ng/buildscripts/anastasis-build.sh b/packaging/ubuntu-lunar/anastasis-build.sh index 24643e1..24643e1 100644 --- a/packaging/ng/buildscripts/anastasis-build.sh +++ b/packaging/ubuntu-lunar/anastasis-build.sh diff --git a/packaging/ubuntu-docker/exchange-build.sh b/packaging/ubuntu-lunar/exchange-build.sh index b4a0115..b4a0115 100644 --- a/packaging/ubuntu-docker/exchange-build.sh +++ b/packaging/ubuntu-lunar/exchange-build.sh diff --git a/packaging/ubuntu-docker/gnunet-build.sh b/packaging/ubuntu-lunar/gnunet-build.sh index 614c5e6..614c5e6 100644 --- a/packaging/ubuntu-docker/gnunet-build.sh +++ b/packaging/ubuntu-lunar/gnunet-build.sh diff --git a/packaging/ubuntu-docker/gnunet-gtk-build.sh b/packaging/ubuntu-lunar/gnunet-gtk-build.sh index 4414c3f..4414c3f 100644 --- a/packaging/ubuntu-docker/gnunet-gtk-build.sh +++ b/packaging/ubuntu-lunar/gnunet-gtk-build.sh diff --git a/packaging/ubuntu-docker/libeufin-build.sh b/packaging/ubuntu-lunar/libeufin-build.sh index 75713ab..75713ab 100644 --- a/packaging/ubuntu-docker/libeufin-build.sh +++ b/packaging/ubuntu-lunar/libeufin-build.sh diff --git a/packaging/ubuntu-docker/mdb-build.sh b/packaging/ubuntu-lunar/mdb-build.sh index d097240..d097240 100644 --- a/packaging/ubuntu-docker/mdb-build.sh +++ b/packaging/ubuntu-lunar/mdb-build.sh diff --git a/packaging/ubuntu-docker/merchant-build.sh b/packaging/ubuntu-lunar/merchant-build.sh index 24f5f9d..24f5f9d 100644 --- a/packaging/ubuntu-docker/merchant-build.sh +++ b/packaging/ubuntu-lunar/merchant-build.sh diff --git a/packaging/ubuntu-docker/run.sh b/packaging/ubuntu-lunar/run.sh index a6df3f0..a6df3f0 100755 --- a/packaging/ubuntu-docker/run.sh +++ b/packaging/ubuntu-lunar/run.sh diff --git a/packaging/ng/buildscripts/sync-build.sh b/packaging/ubuntu-lunar/sync-build.sh index e38a0ee..e38a0ee 100644 --- a/packaging/ng/buildscripts/sync-build.sh +++ b/packaging/ubuntu-lunar/sync-build.sh diff --git a/packaging/ubuntu-docker/taler.list b/packaging/ubuntu-lunar/taler.list index 29cea42..29cea42 100644 --- a/packaging/ubuntu-docker/taler.list +++ b/packaging/ubuntu-lunar/taler.list diff --git a/packaging/ubuntu-docker/wallet-build.sh b/packaging/ubuntu-lunar/wallet-build.sh index 6d807be..6d807be 100644 --- a/packaging/ubuntu-docker/wallet-build.sh +++ b/packaging/ubuntu-lunar/wallet-build.sh diff --git a/packaging/ubuntu-mantic-docker/Dockerfile b/packaging/ubuntu-mantic/Dockerfile index 6967b42..6967b42 100644 --- a/packaging/ubuntu-mantic-docker/Dockerfile +++ b/packaging/ubuntu-mantic/Dockerfile diff --git a/packaging/ubuntu-mantic-docker/README b/packaging/ubuntu-mantic/README index f4a4824..f4a4824 100644 --- a/packaging/ubuntu-mantic-docker/README +++ b/packaging/ubuntu-mantic/README diff --git a/packaging/ubuntu-docker/anastasis-build.sh b/packaging/ubuntu-mantic/anastasis-build.sh index 24643e1..24643e1 100644 --- a/packaging/ubuntu-docker/anastasis-build.sh +++ b/packaging/ubuntu-mantic/anastasis-build.sh diff --git a/packaging/ubuntu-mantic-docker/exchange-build.sh b/packaging/ubuntu-mantic/exchange-build.sh index a94a003..a94a003 100644 --- a/packaging/ubuntu-mantic-docker/exchange-build.sh +++ b/packaging/ubuntu-mantic/exchange-build.sh diff --git a/packaging/ubuntu-mantic-docker/gnunet-build.sh b/packaging/ubuntu-mantic/gnunet-build.sh index 614c5e6..614c5e6 100644 --- a/packaging/ubuntu-mantic-docker/gnunet-build.sh +++ b/packaging/ubuntu-mantic/gnunet-build.sh diff --git a/packaging/ubuntu-mantic-docker/gnunet-gtk-build.sh b/packaging/ubuntu-mantic/gnunet-gtk-build.sh index 4414c3f..4414c3f 100644 --- a/packaging/ubuntu-mantic-docker/gnunet-gtk-build.sh +++ b/packaging/ubuntu-mantic/gnunet-gtk-build.sh diff --git a/packaging/ubuntu-mantic-docker/libeufin-build.sh b/packaging/ubuntu-mantic/libeufin-build.sh index 7229221..7229221 100644 --- a/packaging/ubuntu-mantic-docker/libeufin-build.sh +++ b/packaging/ubuntu-mantic/libeufin-build.sh diff --git a/packaging/ubuntu-mantic-docker/mdb-build.sh b/packaging/ubuntu-mantic/mdb-build.sh index d097240..d097240 100644 --- a/packaging/ubuntu-mantic-docker/mdb-build.sh +++ b/packaging/ubuntu-mantic/mdb-build.sh diff --git a/packaging/ubuntu-mantic-docker/merchant-build.sh b/packaging/ubuntu-mantic/merchant-build.sh index 24f5f9d..24f5f9d 100644 --- a/packaging/ubuntu-mantic-docker/merchant-build.sh +++ b/packaging/ubuntu-mantic/merchant-build.sh diff --git a/packaging/ubuntu-mantic-docker/run.sh b/packaging/ubuntu-mantic/run.sh index a6df3f0..a6df3f0 100755 --- a/packaging/ubuntu-mantic-docker/run.sh +++ b/packaging/ubuntu-mantic/run.sh diff --git a/packaging/ubuntu-docker/sync-build.sh b/packaging/ubuntu-mantic/sync-build.sh index e38a0ee..e38a0ee 100644 --- a/packaging/ubuntu-docker/sync-build.sh +++ b/packaging/ubuntu-mantic/sync-build.sh diff --git a/packaging/ubuntu-mantic-docker/taler.list b/packaging/ubuntu-mantic/taler.list index 29cea42..29cea42 100644 --- a/packaging/ubuntu-mantic-docker/taler.list +++ b/packaging/ubuntu-mantic/taler.list diff --git a/packaging/ubuntu-mantic-docker/wallet-build.sh b/packaging/ubuntu-mantic/wallet-build.sh index 6d807be..6d807be 100644 --- a/packaging/ubuntu-mantic-docker/wallet-build.sh +++ b/packaging/ubuntu-mantic/wallet-build.sh diff --git a/packaging/ubuntu-numbat-docker/Dockerfile b/packaging/ubuntu-noble/Dockerfile index d59d238..41df562 100644 --- a/packaging/ubuntu-numbat-docker/Dockerfile +++ b/packaging/ubuntu-noble/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:numbat +FROM ubuntu:noble # This file is in the public domain. # # Docker image to build Ubuntu packages of diff --git a/packaging/ubuntu-numbat-docker/README b/packaging/ubuntu-noble/README index 0f8c821..0f8c821 100644 --- a/packaging/ubuntu-numbat-docker/README +++ b/packaging/ubuntu-noble/README diff --git a/packaging/ubuntu-mantic-docker/anastasis-build.sh b/packaging/ubuntu-noble/anastasis-build.sh index 24643e1..24643e1 100644 --- a/packaging/ubuntu-mantic-docker/anastasis-build.sh +++ b/packaging/ubuntu-noble/anastasis-build.sh diff --git a/packaging/ubuntu-numbat-docker/exchange-build.sh b/packaging/ubuntu-noble/exchange-build.sh index a94a003..a94a003 100644 --- a/packaging/ubuntu-numbat-docker/exchange-build.sh +++ b/packaging/ubuntu-noble/exchange-build.sh diff --git a/packaging/ubuntu-numbat-docker/gnunet-build.sh b/packaging/ubuntu-noble/gnunet-build.sh index 614c5e6..614c5e6 100644 --- a/packaging/ubuntu-numbat-docker/gnunet-build.sh +++ b/packaging/ubuntu-noble/gnunet-build.sh diff --git a/packaging/ubuntu-numbat-docker/gnunet-gtk-build.sh b/packaging/ubuntu-noble/gnunet-gtk-build.sh index 4414c3f..4414c3f 100644 --- a/packaging/ubuntu-numbat-docker/gnunet-gtk-build.sh +++ b/packaging/ubuntu-noble/gnunet-gtk-build.sh diff --git a/packaging/ubuntu-numbat-docker/libeufin-build.sh b/packaging/ubuntu-noble/libeufin-build.sh index 7229221..7229221 100644 --- a/packaging/ubuntu-numbat-docker/libeufin-build.sh +++ b/packaging/ubuntu-noble/libeufin-build.sh diff --git a/packaging/ubuntu-numbat-docker/mdb-build.sh b/packaging/ubuntu-noble/mdb-build.sh index d097240..d097240 100644 --- a/packaging/ubuntu-numbat-docker/mdb-build.sh +++ b/packaging/ubuntu-noble/mdb-build.sh diff --git a/packaging/ubuntu-numbat-docker/merchant-build.sh b/packaging/ubuntu-noble/merchant-build.sh index 24f5f9d..24f5f9d 100644 --- a/packaging/ubuntu-numbat-docker/merchant-build.sh +++ b/packaging/ubuntu-noble/merchant-build.sh diff --git a/packaging/ubuntu-numbat-docker/run.sh b/packaging/ubuntu-noble/run.sh index a6df3f0..a6df3f0 100755 --- a/packaging/ubuntu-numbat-docker/run.sh +++ b/packaging/ubuntu-noble/run.sh diff --git a/packaging/ubuntu-mantic-docker/sync-build.sh b/packaging/ubuntu-noble/sync-build.sh index e38a0ee..e38a0ee 100644 --- a/packaging/ubuntu-mantic-docker/sync-build.sh +++ b/packaging/ubuntu-noble/sync-build.sh diff --git a/packaging/ubuntu-numbat-docker/wallet-build.sh b/packaging/ubuntu-noble/wallet-build.sh index 6d807be..6d807be 100644 --- a/packaging/ubuntu-numbat-docker/wallet-build.sh +++ b/packaging/ubuntu-noble/wallet-build.sh diff --git a/packaging/ubuntu-numbat-docker/anastasis-build.sh b/packaging/ubuntu-numbat-docker/anastasis-build.sh deleted file mode 100644 index 24643e1..0000000 --- a/packaging/ubuntu-numbat-docker/anastasis-build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/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-numbat-docker/sync-build.sh b/packaging/ubuntu-numbat-docker/sync-build.sh deleted file mode 100644 index e38a0ee..0000000 --- a/packaging/ubuntu-numbat-docker/sync-build.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/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/regional-currency/config.py b/regional-currency/config.py index 107e535..e382927 100755 --- a/regional-currency/config.py +++ b/regional-currency/config.py @@ -7,6 +7,7 @@ import re import subprocess import urllib.parse import uuid +import getpass from base64 import b64decode, b64encode from typing import Callable, Dict, TypeVar @@ -45,18 +46,20 @@ def load_conf() -> Dict[str, str]: conf = load_conf() result_conf = {**conf, "CONFIG_LOADED": "y"} - -def add_conf(name: str, value: str): - """Update a user configuration value and update the configuration file""" - conf[name] = value - result_conf[name] = value +def store_conf(): + """Update the configuration file""" content = "" for key, value in conf.items(): escaped = value.replace("'", "'\\''") - content += f"export {key}='{escaped}'\n" + content += f"{key}='{escaped}'\n" with open(CONFIG_FILE, "w") as f: f.write(content) +def add_conf(name: str, value: str): + """Update a user configuration value and update the configuration file""" + conf[name] = value + result_conf[name] = value + store_conf() def run_cmd( cmd: list[str], input: str | None = None, env: Dict[str, str] | None = None @@ -132,14 +135,16 @@ def ask( default: T | None = None, check: Callable[[str], T | None] = lambda it: it, fmt: Callable[[T], str] = lambda it: str(it), + secret: bool = False ) -> T: """ - Prompt the user to configurea value + Prompt the user to configure a value :param name: if present will try to fetch the current value and will store the new value :param msg: the message to prompt the user with :param default: default value to use if no value is obtained :param check: check and normalize the value :param fmt: format value for storage + :param secret: hide the input content :return: the configuration value """ @@ -147,7 +152,10 @@ def ask( # Log the prompt log.write(msg.encode() + "\n".encode()) # Actual prompt - raw = input(msg).strip() + if secret: + raw = getpass.getpass(msg).strip() + else: + raw = input(msg).strip() if raw == "": if default is None: print("You must enter a value") @@ -157,9 +165,9 @@ def ask( return conf_value(name, do_ask, default, check, fmt) -def ask_str(name: str | None, msg: str, default: str | None = None) -> str: +def ask_str(name: str | None, msg: str, default: str | None = None, secret: bool = False) -> str: "Prompt the user to configure a string" - return ask(name, msg, default) + return ask(name, msg, default, secret=secret) def ask_bic(name: str | None, msg: str, default: str | None = None) -> str: @@ -272,14 +280,14 @@ def ask_config_password() -> str: passwd = None if hash is not None: while True: - passwd = ask_str(None, "Enter the config password : ") + passwd = ask_str(None, "Enter the config password : ", secret=True) try: ph.verify(hash, passwd) break except argon2.exceptions.VerifyMismatchError: print("invalid password") else: - passwd = ask_str(None, "1.1 Choose a config password : ") + passwd = ask_str(None, "1.1 Choose a config password : ", secret=True) if hash is None or ph.check_needs_rehash(hash): add_conf("CONFIG_PASSWORD", ph.hash(passwd)) @@ -317,7 +325,7 @@ def ask_secret( f"$pbkdf2_sha512_chacha20_poly1305$1000000${base64.b64encode(salt).decode()}${base64.b64encode(cipher.nonce).decode()}${base64.b64encode(tag).decode()}${base64.b64encode(ciphertext).decode()}", ) else: - plaintext = ask_str(None, msg, default) + plaintext = ask_str(None, msg, default, True) salt = get_random_bytes(16) key = PBKDF2(passwd, salt, 32, count=1000000, hmac_hash_module=SHA512) cipher = ChaCha20_Poly1305.new(key=key) @@ -439,12 +447,14 @@ if ask_yes_no( return auth_token conf_value("TELESIGN_AUTH_TOKEN", ask_telesign) -ask_secret( +generated_password= str(uuid.uuid4()) +admin_password = ask_secret( "BANK_ADMIN_PASSWORD", "8. Enter the admin password for the bank (or press enter to autogenerate password): ", config_passwd, - str(uuid.uuid4()), + generated_password, ) +add_conf("BANK_ADMIN_PASSWORD_GENERATED", "y" if generated_password==admin_password else "n") if ask_yes_no( "DO_EXCHANGE_TERMS", @@ -468,6 +478,9 @@ if ask_yes_no( "-pp-", ) +# Update on disk format even if nothing have changed +store_conf() + # ----- Return conf ----- # content = "" diff --git a/regional-currency/install_packages.sh b/regional-currency/install_packages.sh index 44e4377..3c3f2a5 100755 --- a/regional-currency/install_packages.sh +++ b/regional-currency/install_packages.sh @@ -26,6 +26,7 @@ apt install \ jq \ wget \ nginx \ + gettext-base \ postgresql-${PG_VERSION} \ postgresql-client-${PG_VERSION} \ dbconfig-pgsql \ diff --git a/regional-currency/main.sh b/regional-currency/main.sh index 1655c7d..a88ac3d 100755 --- a/regional-currency/main.sh +++ b/regional-currency/main.sh @@ -83,11 +83,14 @@ say "Setting up merchant (step 6 of 6)" ./setup-merchant.sh # Final message to the user -source config/user.conf say "" say "Congratulations, you have successfully installed GNU Taler" say "Your bank is at ${PROTO}://bank.${DOMAIN_NAME}/" -say "You can connect to the bank web UI as 'admin' using '${BANK_ADMIN_PASSWORD}'" +if test ${BANK_ADMIN_PASSWORD_GENERATED} == y; then + say "You can connect to the bank web UI as 'admin' using '${BANK_ADMIN_PASSWORD}'" +else + say "You can connect to the bank web UI as 'admin' using the password you entered earlier" +fi say "A merchant is at ${PROTO}://backend.${DOMAIN_NAME}/" say "You should set credentials for the merchant soon." say "The exchange withdraw URI is taler://withdraw-exchange/exchange.${DOMAIN_NAME}/" |