svn commit: r561985 - in head/security/i2pd: . files
Dmitry Marakasov
amdmi3 at FreeBSD.org
Mon Jan 18 23:30:24 UTC 2021
Author: amdmi3
Date: Mon Jan 18 23:30:22 2021
New Revision: 561985
URL: https://svnweb.freebsd.org/changeset/ports/561985
Log:
- Use configuration file
PR: 252159
Added:
head/security/i2pd/files/patch-contrib_i2pd.conf (contents, props changed)
head/security/i2pd/files/pkg-message.in
- copied, changed from r561984, head/security/i2pd/pkg-message
Deleted:
head/security/i2pd/pkg-message
Modified:
head/security/i2pd/Makefile
head/security/i2pd/files/i2pd.in
head/security/i2pd/pkg-plist
Modified: head/security/i2pd/Makefile
==============================================================================
--- head/security/i2pd/Makefile Mon Jan 18 23:29:48 2021 (r561984)
+++ head/security/i2pd/Makefile Mon Jan 18 23:30:22 2021 (r561985)
@@ -3,6 +3,7 @@
PORTNAME= i2pd
PORTVERSION= 2.35.0
+PORTREVISION= 1
CATEGORIES= security net-p2p
MAINTAINER= amdmi3 at FreeBSD.org
@@ -28,7 +29,7 @@ GROUPS= _i2pd
PLIST_SUB= USER="${USERS}" GROUP="${GROUPS}"
SUB_LIST= USER="${USERS}" GROUP="${GROUPS}"
-SUB_FILES= i2pd.newsyslog.conf
+SUB_FILES= i2pd.newsyslog.conf pkg-message
OPTIONS_DEFINE= AESNI UPNP DOCS HARDENING
@@ -45,6 +46,8 @@ do-install:
${INSTALL_MAN} ${WRKSRC}/debian/${PORTNAME}.1 ${STAGEDIR}${MAN1PREFIX}/man/man1
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
${INSTALL_DATA} ${WRKDIR}/i2pd.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/i2pd.conf
+ @${MKDIR} ${STAGEDIR}${ETCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/contrib/i2pd.conf ${STAGEDIR}${ETCDIR}/i2pd.conf.sample
@${MKDIR} ${STAGEDIR}/var/run/i2pd
@${MKDIR} ${STAGEDIR}/var/log/i2pd
@${MKDIR} ${STAGEDIR}/var/db/i2pd
Modified: head/security/i2pd/files/i2pd.in
==============================================================================
--- head/security/i2pd/files/i2pd.in Mon Jan 18 23:29:48 2021 (r561984)
+++ head/security/i2pd/files/i2pd.in Mon Jan 18 23:30:22 2021 (r561985)
@@ -20,15 +20,14 @@ 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"}
+: ${i2pd_config="%%ETCDIR%%/i2pd.conf"}
required_dirs=${i2pd_datadir}
-pidfile=${i2pd_pidfile}
+pidfile=/var/run/i2pd/i2pd.pid
command="%%PREFIX%%/bin/${name}"
-command_args="--pidfile ${i2pd_pidfile} --service --datadir ${i2pd_datadir} --log file --logfile ${i2pd_logfile} --daemon"
+command_args="--conf ${i2pd_config} --service --datadir ${i2pd_datadir} --daemon"
extra_commands="reload"
-reload_cmd="pkill -1 -F ${i2pd_pidfile} -x i2pd"
+reload_cmd="pkill -1 -F ${pidfile} -x i2pd"
run_rc_command "$1"
Added: head/security/i2pd/files/patch-contrib_i2pd.conf
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/i2pd/files/patch-contrib_i2pd.conf Mon Jan 18 23:30:22 2021 (r561985)
@@ -0,0 +1,23 @@
+--- contrib/i2pd.conf.orig 2020-08-24 16:48:09 UTC
++++ contrib/i2pd.conf
+@@ -16,7 +16,7 @@
+ # tunnelsdir = /var/lib/i2pd/tunnels.d
+
+ ## Where to write pidfile (default: i2pd.pid, not used in Windows)
+-# pidfile = /run/i2pd.pid
++pidfile = /var/run/i2pd/i2pd.pid
+
+ ## Logging configuration section
+ ## By default logs go to stdout with level 'info' and higher
+@@ -25,9 +25,9 @@
+ ## * stdout - print log entries to stdout
+ ## * file - log entries to a file
+ ## * syslog - use syslog, see man 3 syslog
+-# log = file
++log = file
+ ## Path to logfile (default - autodetect)
+-# logfile = /var/log/i2pd/i2pd.log
++logfile = /var/log/i2pd/i2pd.log
+ ## Log messages above this level (debug, info, *warn, error, none)
+ ## If you set it to none, logging will be disabled
+ # loglevel = warn
Copied and modified: head/security/i2pd/files/pkg-message.in (from r561984, head/security/i2pd/pkg-message)
==============================================================================
--- head/security/i2pd/pkg-message Mon Jan 18 23:29:48 2021 (r561984, copy source)
+++ head/security/i2pd/files/pkg-message.in Mon Jan 18 23:30:22 2021 (r561985)
@@ -2,10 +2,7 @@
{ type: install
message: <<EOM
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"
+setting "bandwidth" parameter to "X" in %%ETCDIR%%/i2pd.conf
EOM
}
]
Modified: head/security/i2pd/pkg-plist
==============================================================================
--- head/security/i2pd/pkg-plist Mon Jan 18 23:29:48 2021 (r561984)
+++ head/security/i2pd/pkg-plist Mon Jan 18 23:30:22 2021 (r561985)
@@ -1,6 +1,7 @@
bin/i2pd
etc/newsyslog.conf.d/i2pd.conf
man/man1/i2pd.1.gz
+ at sample %%ETCDIR%%/i2pd.conf.sample
@dir(%%USER%%,%%GROUP%%,755) /var/run/i2pd
@dir(%%USER%%,%%GROUP%%,755) /var/log/i2pd
@dir(%%USER%%,%%GROUP%%,755) /var/db/i2pd
More information about the svn-ports-all
mailing list