No description
  • Shell 46.6%
  • Makefile 19.4%
  • Dockerfile 12.7%
  • PowerShell 11.4%
  • Inno Setup 9.9%
Find a file
Zamir Amir a825b4573f
All checks were successful
CI / linux (push) Successful in 1m51s
Build the nvb app with the adresregister and pushgateway hostnames
On nvb the adresregister and the pushgateway each have a hostname of
their own; without ADRESREGISTER_URL and PUSHGATEWAY_URL the app sent
them to the hoster and registering failed with 404. Ships the app and
agent commits that read them.
2026-11-25 16:46:47 +01:00
.forgejo/workflows Pass the adresregister key into every installer build 2026-11-24 17:21:58 +01:00
adresregister-sleutel Write the nvb trust files on one line 2026-11-25 16:13:17 +01:00
bin Ship the mailbox-app and its achtergronddienst in one installer per OS 2026-11-24 09:45:19 +01:00
linux Build the nvb app with the adresregister and pushgateway hostnames 2026-11-25 16:46:47 +01:00
macos Build the nvb app with the adresregister and pushgateway hostnames 2026-11-25 16:46:47 +01:00
vertrouwde-afzenders Write the nvb trust files on one line 2026-11-25 16:13:17 +01:00
windows Build the nvb app with the adresregister and pushgateway hostnames 2026-11-25 16:46:47 +01:00
.gitignore Ship the mailbox-app and its achtergronddienst in one installer per OS 2026-11-24 09:45:19 +01:00
CHANGELOG.md Let demo-organization refer to Mijn Betaaloverzicht on Fundament 2026-11-25 11:09:38 +01:00
LICENSE Ship the mailbox-app and its achtergronddienst in one installer per OS 2026-11-24 09:45:19 +01:00
Makefile Build the nvb app with the adresregister and pushgateway hostnames 2026-11-25 16:46:47 +01:00
README.md Build the nvb app with the adresregister and pushgateway hostnames 2026-11-25 16:46:47 +01:00
versions Build the nvb app with the adresregister and pushgateway hostnames 2026-11-25 16:46:47 +01:00

mailbox-app-installer

One installer per operating system with the mailbox-app and its achtergronddienst mailbox-app-push-agent together. The citizen installs once and gets "Er is post" on the desktop, also while the app is closed, without a push service of Apple, Google or Microsoft (ADR 0003 in getting-started).

Part of the Notificatie voor Burgers walking skeleton. Vocabulary follows the shared glossary.

Operating system Installer Status
Linux notificatie-voor-burgers deb and rpm, amd64 and arm64 built and installed in Debian and Fedora containers; not yet on a Linux desktop
macOS Notificatie-voor-Burgers-<version>.pkg, universal built and installed on a Mac; signed ad hoc, so only for that Mac
Windows Inno Setup Notificatie-voor-Burgers-<version>.exe unverified: Flutter builds Windows apps only on Windows, and there is no Windows machine or runner

What goes in

versions pins the commit of the app and of the agent. The installers are built from those commits only, never from a working tree: make sources puts them in .build/sources, from a neighbouring clone when it has the commit, otherwise from the public Forgejo repository. A release of the installer names exactly what it contains; to ship a newer app or agent, change its line in versions.

ENVIRONMENT picks the environment a build is for, and with it the three values below:

ENVIRONMENT Hoster What runs there
fundament (default) https://mijnbo.cluster-a.fieldlab2026.nl the demo deployed from environments in tnt-mbo-voorbeeld--mijnbo
nvb https://nvb-hoster.cluster-a.fieldlab2026.nl the actors of the Fundament plugin in the tnt-mbo-voorbeeld--nvb-* namespaces

On nvb the adresregister and the pushgateway also have a hostname each: ADRESREGISTER_URL=https://nvb-adresregister.cluster-a.fieldlab2026.nl and PUSHGATEWAY_URL=https://nvb-app-uitgever.cluster-a.fieldlab2026.nl, which ENVIRONMENT=nvb sets. On fundament they stay empty and the app uses the hoster's hostname for them.

The files of an environment are vertrouwde-afzenders/<environment>.json and adresregister-sleutel/<environment>.json. For nvb they are the VERTROUWDE_AFZENDERS and ADRESREGISTER_SLEUTEL of the app-configuratie on the app-uitgever's page in the Fundament console (status.appConfiguration of the Party app-uitgever); copy them again when an actor gets new keys or a bronorganisatie is added. Each value can still be set on its own, as below. CI builds the release packages for fundament only.

MAILBOX_HOST_URL is the hoster the native app talks to, the environment's hoster by default. Without it a native build looks for the local cluster, so a local test passes MAILBOX_HOST_URL=http://localhost:8080.

VERTROUWDE_AFZENDERS is a file with the JWK Set of the afzenders the app trusts (docs/encryptie.md in getting-started). Every environment has its own bronorganisatie key, so it belongs with the hoster URL; without it the app trusts no one and shows every signal as "Onbetrouwbaar signaal". Locally make local-secrets in getting-started writes it to .build/vertrouwde-afzenders.json.

ADRESREGISTER_SLEUTEL is a file with the X-Wing JWK of the adresregister (docs/adresregister.md in getting-started), per environment like the trusted afzenders. The app never fetches that key, so it comes with the build; without it the app offers no address registration. The default is adresregister-sleutel/<environment>.json.

Linux

make linux                                  # deb and rpm for amd64 and arm64 into dist/linux, in Docker
make linux LINUX_PLATFORMS=linux/arm64      # one architecture
make linux ENVIRONMENT=nvb                  # for the actors of the Fundament plugin

Docker builds the Flutter app (flutter build linux) and the agent, and nfpm packages them. A Mac builds the other architecture through emulation, which takes a few minutes.

The package installs:

  • the app in /opt/notificatie-voor-burgers, started as /usr/bin/mailbox_app, the command the agent runs when a notification is clicked;
  • /usr/share/applications/nl.overheid.digitaledienst.mailbox_app.desktop and its icon, named after the app's application id so the desktop links windows and notifications to it;
  • the agent as /usr/bin/mailbox-app-push-agent, with a systemd user unit in /usr/lib/systemd/user. The package enables it for every user (systemctl --global enable) and starts it in sessions that are already open; removing the package stops and disables it. Each user's state and the brievenbus in the keyring stay;
  • a dependency on secret-tool, which the app uses to hand the brievenbus to the agent.

Still to verify on a Linux desktop: the notification and its click under GNOME and KDE, the agent starting at login and in an open session after installing, and the keyring handover.

macOS

make macos                                         # dist/macos/Notificatie-voor-Burgers-<version>.pkg
make macos ENVIRONMENT=nvb                         # dist/macos/Notificatie-voor-Burgers-<version>-nvb.pkg
make macos MAILBOX_HOST_URL=http://localhost:8080 \
  VERTROUWDE_AFZENDERS=../getting-started/.build/vertrouwde-afzenders.json  # against the local cluster
make install-macos                                 # for the current user, without administrator rights
make install-macos ENVIRONMENT=nvb                 # the nvb build
make uninstall-macos

make macos builds the agent's universal helper bundle with the agent's own Makefile, builds the app with fvm flutter build macos, puts the helper in the app at Contents/Library/LoginItems/MailboxAppPushAgent.app, signs the app again (keeping its entitlements) and wraps it in a .pkg. The package installs for the current user (~/Applications) or for every user (/Applications). Its postinstall writes a LaunchAgent (~/Library/LaunchAgents or /Library/LaunchAgents) that starts the agent at login, and starts it right away. A per-user install logs to ~/Library/Logs/mailbox-app-push-agent.log.

The app also carries Contents/Library/LaunchAgents/nl.overheid.digitaledienst.mailboxApp.pushAgent.plist for SMAppService.agent(plistName:). Once the app registers the agent itself when "Meldingen op de achtergrond" is switched on, the postinstall LaunchAgent goes away.

On first start macOS asks whether "Notificatie voor Burgers – meldingen", the agent's helper, may show notifications. System Settings > Notifications lists it next to the app's own "Notificatie voor Burgers"; only the helper's entry decides. Until the citizen allows it, the agent receives seintjes but macOS shows nothing, and the app says which entry to switch on.

Signed ad hoc (CODESIGN_IDENTITY, default -), the package only runs on the Mac that built it. For other Macs the app, the helper and the package need a Developer ID signature, and Apple's notarization. Apple sees no berichten for that.

Windows (unverified)

make windows    # on any machine: only cross-compiles the agent

On a Windows machine with fvm, Go, Inno Setup and the Visual Studio C++ workload:

powershell -ExecutionPolicy Bypass -File windows\build.ps1 -Version 0.1.0

windows/installer.iss installs for the current user in %LOCALAPPDATA%\Programs, puts the agent next to the app, gives the Start menu shortcut the AppUserModelID nl.overheid.digitaledienst.mailboxApp (Windows shows toasts only under an ID it knows), and starts the agent at login through the Run key, in the citizen's own session. None of this has run yet.

CI

On every push to main and every pull request, CI builds the amd64 deb and rpm on the vm runner. A tag vX.Y.Z also creates a release of this repository with those packages attached, versioned X.Y.Z. arm64 needs emulation the runners do not have, macOS a Mac and Windows a Windows machine: those installers are built by hand and can be added to the release.

License

EUPL-1.2, see LICENSE.