Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2016 14:27:18 +0000 (UTC)
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r429158 - in head: . security/i2pd security/i2pd/files
Message-ID:  <201612221427.uBMERIWX077711@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: amdmi3
Date: Thu Dec 22 14:27:18 2016
New Revision: 429158
URL: https://svnweb.freebsd.org/changeset/ports/429158

Log:
  - Add rc.d script

Added:
  head/security/i2pd/files/
  head/security/i2pd/files/i2pd.in   (contents, props changed)
  head/security/i2pd/pkg-message   (contents, props changed)
  head/security/i2pd/pkg-plist   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/security/i2pd/Makefile

Modified: head/GIDs
==============================================================================
--- head/GIDs	Thu Dec 22 13:12:30 2016	(r429157)
+++ head/GIDs	Thu Dec 22 14:27:18 2016	(r429158)
@@ -196,7 +196,7 @@ fcron:*:247:
 # free: 252
 _adsuck:*:253:
 # free: 254
-# free: 255
+_i2pd:*:255:
 _tor:*:256:
 _smtpd:*:257:
 _smtpq:*:258:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Thu Dec 22 13:12:30 2016	(r429157)
+++ head/UIDs	Thu Dec 22 14:27:18 2016	(r429158)
@@ -201,7 +201,7 @@ fcron:*:247:247::0:0:fcron pseudo-user:/
 # 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

Modified: head/security/i2pd/Makefile
==============================================================================
--- head/security/i2pd/Makefile	Thu Dec 22 13:12:30 2016	(r429157)
+++ head/security/i2pd/Makefile	Thu Dec 22 14:27:18 2016	(r429158)
@@ -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/mi
 .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}

Added: head/security/i2pd/files/i2pd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/i2pd/files/i2pd.in	Thu Dec 22 14:27:18 2016	(r429158)
@@ -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"

Added: head/security/i2pd/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/i2pd/pkg-message	Thu Dec 22 14:27:18 2016	(r429158)
@@ -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"

Added: head/security/i2pd/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/i2pd/pkg-plist	Thu Dec 22 14:27:18 2016	(r429158)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612221427.uBMERIWX077711>