From e2a6192327ccb004018f541437d2c9d8abc0d679 Mon Sep 17 00:00:00 2001 From: Karel Balej Date: Thu, 24 Apr 2025 22:29:42 +0200 Subject: [PATCH] maddy: update to 0.8.1. Also create /run/maddy required for maddy to run in the runit service and set CAP_NET_BIND_SERVICE on the binary to allow listening on privileged ports. --- srcpkgs/maddy/INSTALL | 5 +++++ srcpkgs/maddy/files/maddy/run | 2 ++ srcpkgs/maddy/template | 5 +++-- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/maddy/INSTALL diff --git a/srcpkgs/maddy/INSTALL b/srcpkgs/maddy/INSTALL new file mode 100644 index 00000000000..84b9d3eadf1 --- /dev/null +++ b/srcpkgs/maddy/INSTALL @@ -0,0 +1,5 @@ +case "$ACTION" in +post) + setcap 'cap_net_bind_service=+ep' /usr/bin/maddy + ;; +esac diff --git a/srcpkgs/maddy/files/maddy/run b/srcpkgs/maddy/files/maddy/run index ad2233b6694..d9036916b86 100644 --- a/srcpkgs/maddy/files/maddy/run +++ b/srcpkgs/maddy/files/maddy/run @@ -1,4 +1,6 @@ #!/bin/sh umask 0027 exec 2>&1 +mkdir -p /run/maddy +chown _maddy:_maddy /run/maddy exec chpst -u _maddy:_maddy -C /var/lib/maddy -o 131072 -p 512 /usr/bin/maddy run diff --git a/srcpkgs/maddy/template b/srcpkgs/maddy/template index 732a3c14475..87f48f2c3c7 100644 --- a/srcpkgs/maddy/template +++ b/srcpkgs/maddy/template @@ -1,6 +1,6 @@ # Template file for 'maddy' pkgname=maddy -version=0.7.1 +version=0.8.1 revision=1 build_style=go go_import_path="github.com/foxcpp/maddy" @@ -9,12 +9,13 @@ go_package="$go_import_path/cmd/maddy $go_import_path/cmd/maddy-shadow-helper" hostmakedepends="scdoc" makedepends="pam-devel" +depends="libcap-progs" # For setcap(8) short_desc="Composable all-in-one mail server" maintainer="Michael Aldridge " license="GPL-3.0-or-later" homepage="https://maddy.email" distfiles="https://github.com/foxcpp/maddy/archive/refs/tags/v$version.tar.gz" -checksum=541288477afb040a04a5cf17a1c3e3b7a81b287dc3a81c844b2d6ad66688c29e +checksum=e31decff5df3e9f70aba9f27e4cb62d925263aa6e75671685236d08a589dfd8b make_dirs="/var/lib/maddy 0750 _maddy _maddy /etc/maddy 0750 _maddy _maddy" system_accounts="_maddy"