View | Details | Raw Unified | Return to bug 269748 | Differences between
and this patch

Collapse All | Expand All

(-)b/GIDs (-1 / +1 lines)
Lines 566-572 taskd:*:616: Link Here
566
# free: 622
566
# free: 622
567
# free: 623
567
# free: 623
568
# free: 624
568
# free: 624
569
# free: 625
569
xapsd:*:625:
570
# free: 626
570
# free: 626
571
# free: 627
571
# free: 627
572
# free: 628
572
# free: 628
(-)b/UIDs (-1 / +1 lines)
Lines 571-577 taskd:*:616:616::0:0:taskd user:/nonexistent:/usr/sbin/nologin Link Here
571
# free: 622
571
# free: 622
572
# free: 623
572
# free: 623
573
# free: 624
573
# free: 624
574
# free: 625
574
xapsd:*:625:625::0:0:xapsd:/var/lib/xapsd:/usr/sbin/nologin
575
# free: 626
575
# free: 626
576
# free: 627
576
# free: 627
577
# free: 628
577
# free: 628
(-)b/net/xapsd/Makefile (+50 lines)
Added Link Here
1
PORTNAME=	xapsd
2
PORTVERSION=	202210002
3
CATEGORIES=	net
4
5
MAINTAINER=	PopularMoment@protonmail.com
6
COMMENT=	iOS push notifications daemon for dovecot
7
8
LICENSE=	MIT
9
LICENSE_FILE=	${WRKSRC}/LICENSE
10
11
USES=		go:modules
12
USE_RC_SUBR=	xapsd
13
USE_GITHUB=	yes
14
GH_ACCOUNT=	freswa
15
GH_PROJECT=	dovecot-xaps-daemon
16
GH_TAGNAME=	4d4ce18
17
18
GH_TUPLE=       \
19
                dgrijalva:jwt-go:v3.2.0:dgrijalva_jwt_go/vendor/github.com/dgrijalva/jwt-go \
20
                freswa:go-plist:900e8a7d907d:freswa_go_plist/vendor/github.com/freswa/go-plist \
21
                fsnotify:fsnotify:v1.5.1:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \
22
                go-ini:ini:v1.66.4:go_ini_ini/vendor/gopkg.in/ini.v1 \
23
                go-yaml:yaml:v2.4.0:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \
24
                golang:net:27dd8689420f:golang_net/vendor/golang.org/x/net \
25
                golang:sys:2edf467146b5:golang_sys/vendor/golang.org/x/sys \
26
                golang:text:v0.3.7:golang_text/vendor/golang.org/x/text \
27
                hashicorp:hcl:v1.0.0:hashicorp_hcl/vendor/github.com/hashicorp/hcl \
28
                julienschmidt:httprouter:v1.3.0:julienschmidt_httprouter/vendor/github.com/julienschmidt/httprouter \
29
                magiconair:properties:v1.8.6:magiconair_properties/vendor/github.com/magiconair/properties \
30
                mitchellh:mapstructure:v1.4.3:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
31
                pelletier:go-toml:v1.9.4:pelletier_go_toml/vendor/github.com/pelletier/go-toml \
32
                sideshow:apns2:v0.20.0:sideshow_apns2/vendor/github.com/sideshow/apns2 \
33
                sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
34
                spf13:afero:v1.8.2:spf13_afero/vendor/github.com/spf13/afero \
35
                spf13:cast:v1.4.1:spf13_cast/vendor/github.com/spf13/cast \
36
                spf13:jwalterweatherman:v1.1.0:spf13_jwalterweatherman/vendor/github.com/spf13/jwalterweatherman \
37
                spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag \
38
                spf13:viper:v1.10.1:spf13_viper/vendor/github.com/spf13/viper \
39
                subosito:gotenv:v1.2.0:subosito_gotenv/vendor/github.com/subosito/gotenv
40
41
GO_TARGET=	./cmd/xapsd:${PREFIX}/sbin/xapsd
42
43
USERS=		${PORTNAME}
44
GROUPS=		${PORTNAME}
45
46
post-install:
47
		${MKDIR} ${STAGEDIR}${PREFIX}/etc/xapsd
48
		${INSTALL_DATA} ${WRKSRC}/configs/xapsd/xapsd.yaml ${STAGEDIR}${PREFIX}/etc/xapsd/xapsd.yaml.sample
49
50
.include <bsd.port.mk>
(-)b/net/xapsd/distinfo (+45 lines)
Added Link Here
1
TIMESTAMP = 1664896084
2
SHA256 (freswa-dovecot-xaps-daemon-202210002-4d4ce18_GH0.tar.gz) = 6375abd1ef72c34d4897d4ab5247bedf0bc7e4c8e13b36be4a53a21a9efcf64b
3
SIZE (freswa-dovecot-xaps-daemon-202210002-4d4ce18_GH0.tar.gz) = 62000
4
SHA256 (dgrijalva-jwt-go-v3.2.0_GH0.tar.gz) = 197465ef53219f3aeb1a6940b70e16d288fe4e4108d4831b91ea101118440e63
5
SIZE (dgrijalva-jwt-go-v3.2.0_GH0.tar.gz) = 36960
6
SHA256 (freswa-go-plist-900e8a7d907d_GH0.tar.gz) = 2b4a06b8805bc1436ab8f34d6fd140645a0a01ccaf9f4b3a7dc3e0e35f5a2e88
7
SIZE (freswa-go-plist-900e8a7d907d_GH0.tar.gz) = 47675
8
SHA256 (fsnotify-fsnotify-v1.5.1_GH0.tar.gz) = bf4be597aef95796bec7c7def6701581c5e153376ba5a5aa31c2d04470d84f1d
9
SIZE (fsnotify-fsnotify-v1.5.1_GH0.tar.gz) = 32691
10
SHA256 (go-ini-ini-v1.66.4_GH0.tar.gz) = 6b64578fd951b1654ec09893ba7bf2cb8517c1a6905258aa0e5a85fff3fa3a91
11
SIZE (go-ini-ini-v1.66.4_GH0.tar.gz) = 53337
12
SHA256 (go-yaml-yaml-v2.4.0_GH0.tar.gz) = d8e94679e5fff6bd1a35e10241543929a5f3da44f701755babf99b3daf0faac0
13
SIZE (go-yaml-yaml-v2.4.0_GH0.tar.gz) = 73209
14
SHA256 (golang-net-27dd8689420f_GH0.tar.gz) = e72ae02627807460cd899f85e9043f3b5047f2842b82457f5c7b18466f791eaf
15
SIZE (golang-net-27dd8689420f_GH0.tar.gz) = 1229548
16
SHA256 (golang-sys-2edf467146b5_GH0.tar.gz) = 1b30a2729572b041c744dc191c1ea9fe906aa9a013d92d89d22429a3025fa43d
17
SIZE (golang-sys-2edf467146b5_GH0.tar.gz) = 1288409
18
SHA256 (golang-text-v0.3.7_GH0.tar.gz) = 7cab2f6c3133ac1d422edd952b0dd2082fa55a73c2663fb2defd9bf83d649b26
19
SIZE (golang-text-v0.3.7_GH0.tar.gz) = 8354718
20
SHA256 (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 50632428210503070fd2fde748c88b7414bf84a6a0eadebf9d8e596a033bead2
21
SIZE (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 70658
22
SHA256 (julienschmidt-httprouter-v1.3.0_GH0.tar.gz) = 2999dffc23f8ac3872ea37d108ddec0ba570d2780a42876300bdcdb0744908e2
23
SIZE (julienschmidt-httprouter-v1.3.0_GH0.tar.gz) = 23889
24
SHA256 (magiconair-properties-v1.8.6_GH0.tar.gz) = 59b7e9184d83405c09af4ec23ebd20737cce34fa79244ff1f6314085244b9907
25
SIZE (magiconair-properties-v1.8.6_GH0.tar.gz) = 30241
26
SHA256 (mitchellh-mapstructure-v1.4.3_GH0.tar.gz) = 06198bdaa6782f68990134b88b5f0c1db44757cf81721c619fff5626d97fffc4
27
SIZE (mitchellh-mapstructure-v1.4.3_GH0.tar.gz) = 28418
28
SHA256 (pelletier-go-toml-v1.9.4_GH0.tar.gz) = 2b00521c81b994a72d0f3bd3aa9273cb17fab61a5e9749aff1108117a8d7c397
29
SIZE (pelletier-go-toml-v1.9.4_GH0.tar.gz) = 106507
30
SHA256 (sideshow-apns2-v0.20.0_GH0.tar.gz) = ae2cd6340a91e67ac9e7ef5c53c199591c922d28980c5ed59ae1ead505b3b8dc
31
SIZE (sideshow-apns2-v0.20.0_GH0.tar.gz) = 393110
32
SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
33
SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
34
SHA256 (spf13-afero-v1.8.2_GH0.tar.gz) = a42e97857af6e66fed79ac636daf79c0c083e55b460adee47b580c07dfb3f9b5
35
SIZE (spf13-afero-v1.8.2_GH0.tar.gz) = 91568
36
SHA256 (spf13-cast-v1.4.1_GH0.tar.gz) = 3d099a48b75a66ac52dbb473c93096076dca752af51087b8d163e15e5de721f8
37
SIZE (spf13-cast-v1.4.1_GH0.tar.gz) = 13381
38
SHA256 (spf13-jwalterweatherman-v1.1.0_GH0.tar.gz) = 4fd850a792c5738954c4801cf549d8d0bf53edd17139cd39d179aa5abf7ec68d
39
SIZE (spf13-jwalterweatherman-v1.1.0_GH0.tar.gz) = 6871
40
SHA256 (spf13-pflag-v1.0.5_GH0.tar.gz) = 9a2cae1f8e8ab0d2cc8ebe468e871af28d9ac0962cf0520999e3ba85f0c7b808
41
SIZE (spf13-pflag-v1.0.5_GH0.tar.gz) = 50796
42
SHA256 (spf13-viper-v1.10.1_GH0.tar.gz) = 9d4276ff76799b7e5a4ad39542df3b27e3b24e70356e84ceaa338c782617c275
43
SIZE (spf13-viper-v1.10.1_GH0.tar.gz) = 106638
44
SHA256 (subosito-gotenv-v1.2.0_GH0.tar.gz) = 5f6826992c11981018c77377f33dbc56d0be932e0d38a2f51e795c99725e7ba5
45
SIZE (subosito-gotenv-v1.2.0_GH0.tar.gz) = 7359
(-)b/net/xapsd/files/xapsd.in (+56 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: xapsd
4
# REQUIRE: DAEMON NETWORKING
5
# BEFORE: mail
6
# KEYWORD: shutdown
7
8
# Add the following lines to /etc/rc.conf.local, /etc/rc.conf or
9
# /etc/rc.conf.d/xapsd to enable this service:
10
#
11
#  xapsd_enable (bool):	        Set to NO by default.
12
#                               Set it to "YES" to enable xapsd.
13
#  xapsd_flags (str):		Optional extra flags to pass.
14
#                               Empty by default.
15
#  xapsd_user (string):         User to run xapsd as
16
#                               Set to "xapsd" by default.
17
#  xapsd_group (string):        Group to run xapsd as
18
#                               Set to "xapsd" by default.
19
20
. /etc/rc.subr
21
22
name=xapsd
23
rcvar=xapsd_enable
24
start_precmd="${name}_precmd"
25
26
load_rc_config $name
27
28
: ${xapsd_enable:="NO"}
29
: ${xapsd_flags:=""}
30
: ${xapsd_user:="xapsd"}
31
: ${xapsd_group:="xapsd"}
32
33
pidfile="/var/run/${name}/${name}.pid"
34
procname="%%PREFIX%%/sbin/${name}"
35
command="/usr/sbin/daemon"
36
command_args="-m 3 -t ${name} -T ${name} -p ${pidfile} -c -f -S -u ${xapsd_user} ${procname} -configPath %%PREFIX%%/etc/xapsd ${xapsd_flags}"
37
38
required_files=%%PREFIX%%/etc/xapsd/xapsd.yaml
39
40
start_cmd=xapsd_start
41
42
xapsd_precmd() {
43
	/usr/bin/install -d -m 0755 -o ${xapsd_user} /var/run/${name}
44
	dbdir=$(/usr/bin/dirname `awk '/^databaseFile/ {print $2}' %%PREFIX%%/etc/xapsd/xapsd.yaml`)
45
	if [ ! -d ${dbdir} ]; then
46
		install -d -o ${xapsd_user} -g ${xapsd_group} ${dbdir};
47
	fi
48
}
49
50
xapsd_start() {
51
	echo "Starting xapsd."
52
	umask 007
53
	${command} ${command_args}
54
}
55
56
run_rc_command "$1"
(-)b/net/xapsd/pkg-descr (+3 lines)
Added Link Here
1
iOS push notification daemon for dovecot.
2
3
WWW: https://github.com/freswa/dovecot-xaps-daemon
(-)b/net/xapsd/pkg-message (+14 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
5
1. Create a new apple id account at https://appleid.apple.com/
6
7
2. Use `xapsd -pass` to create the hash of the apple id password
8
9
3. Add account information to xapsd.yaml
10
11
EOM
12
}
13
]
14
(-)b/net/xapsd/pkg-plist (-1 / +2 lines)
Added Link Here
0
- 
1
@sample(root,xapsd,640) etc/xapsd/xapsd.yaml.sample
2
sbin/xapsd

Return to bug 269748