From nobody Mon Feb 27 22:49:40 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PQbKd1Chgz3tGpr; Mon, 27 Feb 2023 22:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PQbKc5jqBz3r1Y; Mon, 27 Feb 2023 22:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677538180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKOF8e1YleKt9hFeLjoWq79yrAeRzgtDcSrgqfYH8Gg=; b=YFyZVPBNl1KNjtSwcGXaXyV/Lzx7l9T2JRJvDM0xAw5LhQlUJuMHBYKtgog/5RRRhnAN3v os/yXldy+GCwgAyc8nSSrWRrU+Cs8E45wSS49OReWYCVCcytVGEgOTGOCNSNCQ7orT4pvZ T0DxPUO4ia4HnfUiDB0bSD7jQOLCAK8qtzMg3fSSqRToUJNSDEQeQblMzQWG8fYPYvIQht 0GRTF3N/SQGbDvlMNfh953xwJfGLD03PJFVrjbXjTkDGheU9/dqYN7zNfMCJlF4nLmjwP+ 6IcidUTEoFXciSKisH9n9/2k08fa4ct3Ovxh8yy81yGmVojw3rVGZ7Gl+bvnqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1677538180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eKOF8e1YleKt9hFeLjoWq79yrAeRzgtDcSrgqfYH8Gg=; b=bqm230l3GTHhmFaAvzq/jcJ6wS16TfFhQHCSQyNQleCFakmknjKOX3u//o3eACU/o7ikY6 Y2JEP45mOLHlUwOTg4EAKaYXEiyXgxt7UNs2Zzt7xUofyQlEA+lvtxkCRwA6WMN6JmBcJo 32FDNWH0xFMbtk4oLYJ6tC8bIJwNXZ2SyQ+6L3FsCa96AJ+iGT5iUlQuMkSFV88fWoqHiV 3PUpGUPgneyC0vqE938XBnTqWcMwcglGGO9Dxa2VU4uPmobNWBnW/qDLDGUIebd/84Zw+V 6w9ONVlwhUk4UCf+pC3uLEuOEnDSHHKe/fDtQKA8PPKng8PXaxBFTOsnmVlBzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1677538180; a=rsa-sha256; cv=none; b=uJumkPE5tQG8XftjzwQ2uaX31B8RUf1uS6briH13j5zShygRs7Zvirk287X7o9eVY4Tok6 18zvETZee8xDDdci1Ji3ScU2UtCRiI/Sh1oc8K1YSNHbtpNVJJVLJHkhtoFLCSinub3X/z gZ3cUqZNM63V+1MnaW1BnVtWsMS0O8uT5cM8EBwaPTPQtrvJlVwBUxdO5TsIQgevPnml55 tr0o3I6s4ZWorVbIsPkWZZG654JOcRfz+PlmRAALl/sdI2CGuyw9wyYlzc+YgU4y7kMNHd CyPwUXk+ZCSWAvfnSxUI2EAXu3Al0JZGNmSFfSy3M0oIBvlkCVmGBtqWKRSL7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PQbKc4m05zkLq; Mon, 27 Feb 2023 22:49:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31RMneT7078216; Mon, 27 Feb 2023 22:49:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31RMneYN078215; Mon, 27 Feb 2023 22:49:40 GMT (envelope-from git) Date: Mon, 27 Feb 2023 22:49:40 GMT Message-Id: <202302272249.31RMneYN078215@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 48a5ea0ff025 - main - net/xapsd: New port: Apple push notifications daemon for dovecot List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48a5ea0ff025ec13a17e6d299829c7e4f9e388ae Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=48a5ea0ff025ec13a17e6d299829c7e4f9e388ae commit 48a5ea0ff025ec13a17e6d299829c7e4f9e388ae Author: Henry AuthorDate: 2023-02-21 18:59:48 +0000 Commit: Robert Clausecker CommitDate: 2023-02-27 22:48:03 +0000 net/xapsd: New port: Apple push notifications daemon for dovecot Apple push notification daemon for dovecot. Together with dovecot-xaps-plugin, this will enable push email for iOS devices that talk to your dovecot IMAP server. WWW: https://github.com/freswa/dovecot-xaps-daemon Submitter becomes maintainer. Is already maintainer of other ports. PR: 269748 Approved by: flo (mentor) Differential Revision: https://reviews.freebsd.org/D38779 --- GIDs | 2 +- UIDs | 2 +- net/Makefile | 1 + net/xapsd/Makefile | 50 ++++++++++++++++++++++++++++++++++++++++++ net/xapsd/distinfo | 45 ++++++++++++++++++++++++++++++++++++++ net/xapsd/files/xapsd.in | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ net/xapsd/pkg-descr | 4 ++++ net/xapsd/pkg-message | 13 +++++++++++ net/xapsd/pkg-plist | 2 ++ 9 files changed, 173 insertions(+), 2 deletions(-) diff --git a/GIDs b/GIDs index c6882f3386e8..6fc638476d57 100644 --- a/GIDs +++ b/GIDs @@ -566,7 +566,7 @@ taskd:*:616: # free: 622 # free: 623 # free: 624 -# free: 625 +xapsd:*:625: # free: 626 # free: 627 # free: 628 diff --git a/UIDs b/UIDs index 7326744a45a4..dc3ac10d4abc 100644 --- a/UIDs +++ b/UIDs @@ -571,7 +571,7 @@ taskd:*:616:616::0:0:taskd user:/nonexistent:/usr/sbin/nologin # free: 622 # free: 623 # free: 624 -# free: 625 +xapsd:*:625:625::0:0:xapsd:/var/lib/xapsd:/usr/sbin/nologin # free: 626 # free: 627 # free: 628 diff --git a/net/Makefile b/net/Makefile index 5e9c23a1be6d..e08636721161 100644 --- a/net/Makefile +++ b/net/Makefile @@ -1600,6 +1600,7 @@ SUBDIR += x11vnc SUBDIR += x2goclient SUBDIR += x2goclient-cli + SUBDIR += xapsd SUBDIR += xisp SUBDIR += xmlrpc-c SUBDIR += xmlrpc-epi diff --git a/net/xapsd/Makefile b/net/xapsd/Makefile new file mode 100644 index 000000000000..510c5b6cbfd1 --- /dev/null +++ b/net/xapsd/Makefile @@ -0,0 +1,50 @@ +PORTNAME= xapsd +DISTVERSION= g20230220 +CATEGORIES= net + +MAINTAINER= PopularMoment@protonmail.com +COMMENT= Apple push notifications daemon for dovecot +WWW= https://github.com/freswa/dovecot-xaps-daemon + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:modules +USE_RC_SUBR= xapsd +USE_GITHUB= yes +GH_ACCOUNT= freswa +GH_PROJECT= dovecot-xaps-daemon +GH_TAGNAME= e579559 + +GH_TUPLE= freswa:go-plist:900e8a7d907d:freswa_go_plist/vendor/github.com/freswa/go-plist \ + fsnotify:fsnotify:v1.6.0:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \ + go-ini:ini:v1.67.0:go_ini_ini/vendor/gopkg.in/ini.v1 \ + go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \ + golang-jwt:jwt:v4.5.0:golang_jwt_jwt_v4/vendor/github.com/golang-jwt/jwt/v4 \ + golang:net:v0.7.0:golang_net/vendor/golang.org/x/net \ + golang:sys:v0.5.0:golang_sys/vendor/golang.org/x/sys \ + golang:text:v0.7.0:golang_text/vendor/golang.org/x/text \ + hashicorp:hcl:v1.0.0:hashicorp_hcl/vendor/github.com/hashicorp/hcl \ + julienschmidt:httprouter:v1.3.0:julienschmidt_httprouter/vendor/github.com/julienschmidt/httprouter \ + magiconair:properties:v1.8.7:magiconair_properties/vendor/github.com/magiconair/properties \ + mitchellh:mapstructure:v1.5.0:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \ + pelletier:go-toml:v2.0.6:pelletier_go_toml_v2/vendor/github.com/pelletier/go-toml/v2 \ + sideshow:apns2:v0.23.0:sideshow_apns2/vendor/github.com/sideshow/apns2 \ + sirupsen:logrus:v1.9.0:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ + spf13:afero:v1.9.3:spf13_afero/vendor/github.com/spf13/afero \ + spf13:cast:v1.5.0:spf13_cast/vendor/github.com/spf13/cast \ + spf13:jwalterweatherman:v1.1.0:spf13_jwalterweatherman/vendor/github.com/spf13/jwalterweatherman \ + spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag \ + spf13:viper:v1.15.0:spf13_viper/vendor/github.com/spf13/viper \ + subosito:gotenv:v1.4.2:subosito_gotenv/vendor/github.com/subosito/gotenv + +GO_TARGET= ./cmd/xapsd:${PREFIX}/sbin/xapsd + +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} + +post-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/xapsd + ${INSTALL_DATA} ${WRKSRC}/configs/xapsd/xapsd.yaml ${STAGEDIR}${PREFIX}/etc/xapsd/xapsd.yaml.sample + +.include diff --git a/net/xapsd/distinfo b/net/xapsd/distinfo new file mode 100644 index 000000000000..85cbe759d4ea --- /dev/null +++ b/net/xapsd/distinfo @@ -0,0 +1,45 @@ +TIMESTAMP = 1677259042 +SHA256 (freswa-dovecot-xaps-daemon-g20230220-e579559_GH0.tar.gz) = 09da26b0a9b3b4f108f5d2f10f490956487b5f5c03cfb35e48a1bbbbf5c0f247 +SIZE (freswa-dovecot-xaps-daemon-g20230220-e579559_GH0.tar.gz) = 81287 +SHA256 (freswa-go-plist-900e8a7d907d_GH0.tar.gz) = 2b4a06b8805bc1436ab8f34d6fd140645a0a01ccaf9f4b3a7dc3e0e35f5a2e88 +SIZE (freswa-go-plist-900e8a7d907d_GH0.tar.gz) = 47675 +SHA256 (fsnotify-fsnotify-v1.6.0_GH0.tar.gz) = 583b2b399709d04807c5c3185e7d4dc0543d532af91fdeb85eeaf803a0b7703b +SIZE (fsnotify-fsnotify-v1.6.0_GH0.tar.gz) = 46044 +SHA256 (go-ini-ini-v1.67.0_GH0.tar.gz) = 06ba51234140118d1b6064f1817aa89cc971c6e7ce04cb9d286e6660d89296c8 +SIZE (go-ini-ini-v1.67.0_GH0.tar.gz) = 53531 +SHA256 (go-yaml-yaml-v3.0.1_GH0.tar.gz) = cf05411540d3e6ef8f1fd88434b34f94cedaceb540329031d80e23b74540c4e5 +SIZE (go-yaml-yaml-v3.0.1_GH0.tar.gz) = 91173 +SHA256 (golang-jwt-jwt-v4.5.0_GH0.tar.gz) = 00b1cc127cba09b4e4ea9efa5c0f18a36bb55e08b5eec0a222b8e1599a938077 +SIZE (golang-jwt-jwt-v4.5.0_GH0.tar.gz) = 53049 +SHA256 (golang-net-v0.7.0_GH0.tar.gz) = 4949a0dbdd3c200c8681c18bebd65c8e8b620470189361dac05c89c714d9a59b +SIZE (golang-net-v0.7.0_GH0.tar.gz) = 1241017 +SHA256 (golang-sys-v0.5.0_GH0.tar.gz) = 810c8f1b7704674971ab6b2b614aba20a5a1765018fd2c639f528dbbcbf88b1f +SIZE (golang-sys-v0.5.0_GH0.tar.gz) = 1429723 +SHA256 (golang-text-v0.7.0_GH0.tar.gz) = a37dfe82c39f84c57a083da9725dd1bdae59cff6a5cbca3ae4443e446b4a70b8 +SIZE (golang-text-v0.7.0_GH0.tar.gz) = 8361947 +SHA256 (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 50632428210503070fd2fde748c88b7414bf84a6a0eadebf9d8e596a033bead2 +SIZE (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 70658 +SHA256 (julienschmidt-httprouter-v1.3.0_GH0.tar.gz) = 2999dffc23f8ac3872ea37d108ddec0ba570d2780a42876300bdcdb0744908e2 +SIZE (julienschmidt-httprouter-v1.3.0_GH0.tar.gz) = 23889 +SHA256 (magiconair-properties-v1.8.7_GH0.tar.gz) = 09e950df1970975400edc7f6c2f9e3edace4e1ea49f823006387d130fb0f4f03 +SIZE (magiconair-properties-v1.8.7_GH0.tar.gz) = 31425 +SHA256 (mitchellh-mapstructure-v1.5.0_GH0.tar.gz) = 81106cbac93000812c194b4a2069dd32913ec18819b1e99e8436595ce4939413 +SIZE (mitchellh-mapstructure-v1.5.0_GH0.tar.gz) = 30123 +SHA256 (pelletier-go-toml-v2.0.6_GH0.tar.gz) = 90c77524503d123f3a6b64b7dce02d7d94769bd9e05e024b622f63533b00dc5f +SIZE (pelletier-go-toml-v2.0.6_GH0.tar.gz) = 891667 +SHA256 (sideshow-apns2-v0.23.0_GH0.tar.gz) = 5ad9b2fb211ac9ae9040e09ba5b3b2c74189826e778f874b99aeb174ad22a1ea +SIZE (sideshow-apns2-v0.23.0_GH0.tar.gz) = 1264203 +SHA256 (sirupsen-logrus-v1.9.0_GH0.tar.gz) = 12446ed9eb96573c2aae4df2db81900a65bfd21d2ce92efde7201614e42134f7 +SIZE (sirupsen-logrus-v1.9.0_GH0.tar.gz) = 49098 +SHA256 (spf13-afero-v1.9.3_GH0.tar.gz) = 3674636a77f5c7c50de561e2b0e9237b3c7fee902ee66cea4adfb5a83da44891 +SIZE (spf13-afero-v1.9.3_GH0.tar.gz) = 93759 +SHA256 (spf13-cast-v1.5.0_GH0.tar.gz) = b5bf72b468a9a9a0509b7d87c984a9b2e653c9b87e9842da385f81c43bd05b9a +SIZE (spf13-cast-v1.5.0_GH0.tar.gz) = 15287 +SHA256 (spf13-jwalterweatherman-v1.1.0_GH0.tar.gz) = 4fd850a792c5738954c4801cf549d8d0bf53edd17139cd39d179aa5abf7ec68d +SIZE (spf13-jwalterweatherman-v1.1.0_GH0.tar.gz) = 6871 +SHA256 (spf13-pflag-v1.0.5_GH0.tar.gz) = 9a2cae1f8e8ab0d2cc8ebe468e871af28d9ac0962cf0520999e3ba85f0c7b808 +SIZE (spf13-pflag-v1.0.5_GH0.tar.gz) = 50796 +SHA256 (spf13-viper-v1.15.0_GH0.tar.gz) = bda7c50e3619ac0524425cfd1b797a1c260fd860147eddeea138437d95d83add +SIZE (spf13-viper-v1.15.0_GH0.tar.gz) = 131720 +SHA256 (subosito-gotenv-v1.4.2_GH0.tar.gz) = b7bafced91bfb64f2f80a78b7c343f0a16099aa0a4049ea6e4d0fa5d62be1741 +SIZE (subosito-gotenv-v1.4.2_GH0.tar.gz) = 10641 diff --git a/net/xapsd/files/xapsd.in b/net/xapsd/files/xapsd.in new file mode 100644 index 000000000000..df8deac4e369 --- /dev/null +++ b/net/xapsd/files/xapsd.in @@ -0,0 +1,56 @@ +#!/bin/sh + +# PROVIDE: xapsd +# REQUIRE: DAEMON NETWORKING +# BEFORE: mail +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf.local, /etc/rc.conf or +# /etc/rc.conf.d/xapsd to enable this service: +# +# xapsd_enable (bool): Set to NO by default. +# Set it to "YES" to enable xapsd. +# xapsd_flags (str): Optional extra flags to pass. +# Empty by default. +# xapsd_user (string): User to run xapsd as +# Set to "xapsd" by default. +# xapsd_group (string): Group to run xapsd as +# Set to "xapsd" by default. + +. /etc/rc.subr + +name=xapsd +rcvar=xapsd_enable +start_precmd="${name}_precmd" + +load_rc_config $name + +: ${xapsd_enable:="NO"} +: ${xapsd_flags:=""} +: ${xapsd_user:="xapsd"} +: ${xapsd_group:="xapsd"} + +pidfile="/var/run/${name}/${name}.pid" +procname="%%PREFIX%%/sbin/${name}" +command="/usr/sbin/daemon" +command_args="-m 3 -t ${name} -T ${name} -p ${pidfile} -c -f -S -u ${xapsd_user} ${procname} -configPath %%PREFIX%%/etc/xapsd ${xapsd_flags}" + +required_files=%%PREFIX%%/etc/xapsd/xapsd.yaml + +start_cmd=xapsd_start + +xapsd_precmd() { + /usr/bin/install -d -m 0755 -o ${xapsd_user} /var/run/${name} + dbdir=$(/usr/bin/dirname `awk '/^databaseFile/ {print $2}' %%PREFIX%%/etc/xapsd/xapsd.yaml`) + if [ ! -d ${dbdir} ]; then + install -d -o ${xapsd_user} -g ${xapsd_group} ${dbdir}; + fi +} + +xapsd_start() { + echo "Starting xapsd." + umask 007 + ${command} ${command_args} +} + +run_rc_command "$1" diff --git a/net/xapsd/pkg-descr b/net/xapsd/pkg-descr new file mode 100644 index 000000000000..c6dc3d513edd --- /dev/null +++ b/net/xapsd/pkg-descr @@ -0,0 +1,4 @@ +Apple push notification daemon for dovecot. + +Together with dovecot-xaps-plugin, this will enable push email +for iOS devices that talk to your dovecot IMAP server. diff --git a/net/xapsd/pkg-message b/net/xapsd/pkg-message new file mode 100644 index 000000000000..ca0440d8d009 --- /dev/null +++ b/net/xapsd/pkg-message @@ -0,0 +1,13 @@ +[ +{ type: install + message: <