diff options
-rw-r--r-- | GIDs | 2 | ||||
-rw-r--r-- | UIDs | 2 | ||||
-rw-r--r-- | security/i2pd/Makefile | 15 | ||||
-rw-r--r-- | security/i2pd/files/i2pd.in | 32 | ||||
-rw-r--r-- | security/i2pd/pkg-message | 5 | ||||
-rw-r--r-- | security/i2pd/pkg-plist | 5 |
6 files changed, 56 insertions, 5 deletions
@@ -196,7 +196,7 @@ fcron:*:247: # free: 252 _adsuck:*:253: # free: 254 -# free: 255 +_i2pd:*:255: _tor:*:256: _smtpd:*:257: _smtpq:*:258: @@ -201,7 +201,7 @@ fcron:*:247:247::0:0:fcron pseudo-user:/nonexistent:/usr/sbin/nologin # free: 252 _adsuck:*:253:253::0:0:Adsuck ad blocking user:/nonexistent:/usr/sbin/nologin # free: 254 -# free: 255 +_i2pd:*:255:255::0:0:I2P daemon:/var/db/i2pd:/usr/sbin/nologin _tor:*:256:256::0:0:Tor anonymizing router:/var/db/tor:/usr/sbin/nologin _smtpd:*:257:257::0:0:OpenSMTPD:/var/empty:/usr/sbin/nologin _smtpq:*:258:258::0:0:OpenSMTPD queue user:/var/empty:/usr/sbin/nologin diff --git a/security/i2pd/Makefile b/security/i2pd/Makefile index 7d7be443f945..129365c5acc3 100644 --- a/security/i2pd/Makefile +++ b/security/i2pd/Makefile @@ -3,6 +3,7 @@ PORTNAME= i2pd PORTVERSION= 2.11.0 +PORTREVISION= 1 CATEGORIES= security net-p2p MAINTAINER= amdmi3@FreeBSD.org @@ -21,11 +22,16 @@ GH_ACCOUNT= PurpleI2P USES= cmake compiler:c++11-lib ssl CMAKE_SOURCE_PATH=${WRKSRC}/build +USE_RC_SUBR= ${PORTNAME} -PLIST_FILES= bin/${PORTNAME} \ - man/man1/${PORTNAME}.1.gz PORTDOCS= * +USERS= _i2pd +GROUPS= _i2pd + +PLIST_SUB= USER="${USERS}" GROUP="${GROUPS}" +SUB_LIST= USER="${USERS}" GROUP="${GROUPS}" + OPTIONS_DEFINE= AESNI UPNP DOCS AESNI_DESC= Use AES-NI instructions set @@ -37,12 +43,15 @@ UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc .include <bsd.port.pre.mk> .if ${SSL_DEFAULT:Mlibressl*} -BROKEN= does not build with LibreSSL (unsupported DSA_set0_pqg(), DSA_set0_key()) +BROKEN= does not build with LibreSSL (boost libressl compatibility problems) .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + @${MKDIR} ${STAGEDIR}/var/run/i2pd + @${MKDIR} ${STAGEDIR}/var/log/i2pd + @${MKDIR} ${STAGEDIR}/var/db/i2pd do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/security/i2pd/files/i2pd.in b/security/i2pd/files/i2pd.in new file mode 100644 index 000000000000..6b88777c0d12 --- /dev/null +++ b/security/i2pd/files/i2pd.in @@ -0,0 +1,32 @@ +#!/bin/sh +# +# PROVIDE: i2pd +# REQUIRE: DAEMON NETWORKING FILESYSTEMS +# BEFORE: LOGIN +# KEYWORD: shutdown +# +# Add the following line to /etc/rc.conf to enable i2pd: +# +# i2pd_enable="YES" +# + +. /etc/rc.subr + +name="i2pd" +rcvar=i2pd_enable + +load_rc_config ${name} + +: ${i2pd_enable="NO"} +: ${i2pd_user="%%USER%%"} +: ${i2pd_group="%%GROUP%%"} +: ${i2pd_pidfile="/var/run/${name}/${name}.pid"} +: ${i2pd_datadir="/var/db/${name}"} +: ${i2pd_logfile="/var/log/${name}/${name}.log"} + +required_dirs=${i2pd_datadir} +pidfile=${i2pd_pidfile} +command="%%PREFIX%%/bin/${name}" +command_args="--pidfile ${i2pd_pidfile} --service --datadir ${i2pd_datadir} --log file --logfile ${i2pd_logfile} --daemon" + +run_rc_command "$1" diff --git a/security/i2pd/pkg-message b/security/i2pd/pkg-message new file mode 100644 index 000000000000..f5743d96de4c --- /dev/null +++ b/security/i2pd/pkg-message @@ -0,0 +1,5 @@ +You may want to increase default i2pd bandwidth limit by adding +--bandwidth to i2pd_flags in /etc/rc.conf. Add the following to +allow the highest traffic: + +i2pd_flags="--bandwidth X" diff --git a/security/i2pd/pkg-plist b/security/i2pd/pkg-plist new file mode 100644 index 000000000000..cee74152b5bd --- /dev/null +++ b/security/i2pd/pkg-plist @@ -0,0 +1,5 @@ +bin/i2pd +man/man1/i2pd.1.gz +@dir(%%USER%%,%%GROUP%%,755) /var/run/i2pd +@dir(%%USER%%,%%GROUP%%,755) /var/log/i2pd +@dir(%%USER%%,%%GROUP%%,755) /var/db/i2pd |