From nobody Mon Dec 13 17:54:38 2021 X-Original-To: dev-commits-ports-all@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 E3D2F18E8A6B; Mon, 13 Dec 2021 17:54:38 +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 4JCTfk4d9bz4mWZ; Mon, 13 Dec 2021 17:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7FC6B18EBF; Mon, 13 Dec 2021 17:54:38 +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 1BDHscfo063777; Mon, 13 Dec 2021 17:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BDHscmg063776; Mon, 13 Dec 2021 17:54:38 GMT (envelope-from git) Date: Mon, 13 Dec 2021 17:54:38 GMT Message-Id: <202112131754.1BDHscmg063776@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dries Michiels Subject: git: 074939ea0793 - main - security/i2pd: Update to 2.40.0 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: driesm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 074939ea0793b18c98ab07a0efb18b70dae8b4d4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639418078; 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=EaKVl5w2SpR62EkK26bymN3FPp8yNVgPIkg/7mA8Xx0=; b=UXsUi+DKto1zACSqTjsIRa/JBrQ3o1Cpy3XqE8ue+DtsqkaPvTh+QZRzczUb4FRWKCRMEl hGcK8cV6ULxl+5NaOHiGJ3GeYJYXIg6U6ik3w0r/RqVGNbBpnkqhPM1Hb09S/lI7GMS4V4 YibDZNSDZCKk4G5FdRpSvgsXrnhFd+SsCokWYm+DaHiLmSwpztyNPBuauh1RAAy28tfHCB kai+prPXhJm/oE4Ei4ZtUG4MMmyyGUtSwfWaAeLiCiMdOU1ZnYzJI69FCyaqQLrN/OfubD oyFOH+FTCyuxWLVly5Q5RkC1fOj+hxMI747OAfvw3ytFn/Xp4hq8snjnqYQU8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639418078; a=rsa-sha256; cv=none; b=dDA9JO2n+TfolmTCQ5CVBh66+brijYoeMAXPDmiNObFjnh4wMxRNbZ1b5KRvVI4EpIF+xy bwS5tnwAs+I3WPJ0r03CGs64MwAGK9yrNvc2RQkjHkZJGb+PzK9NlOxfqE43ODZuNNQrOb sI83X9X2eis9jqTi7oYa89fA6BZnidp0YAkYh2kPrKDR+2SZ6sbhOPp/j8O8Rhtgvo94x4 ClhHzDVCsBgjgfwJIDb9jV1eTCfk7QL5j/oigz4pSQYL7QBQpnEjEnmUBXnmPKNN/HsgAC lrhWnKKj6qfENyQ7R7NLPeMkEgwhsCJUmweBRX/J3BGo3rk1iWCopkFeQTdvVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by driesm: URL: https://cgit.FreeBSD.org/ports/commit/?id=074939ea0793b18c98ab07a0efb18b70dae8b4d4 commit 074939ea0793b18c98ab07a0efb18b70dae8b4d4 Author: Dries Michiels AuthorDate: 2021-12-06 19:40:17 +0000 Commit: Dries Michiels CommitDate: 2021-12-13 17:54:29 +0000 security/i2pd: Update to 2.40.0 - Take maintainership - Switch to DISTVERSION - Enable AESNI by default (run time detection if it can be used or not) - Pet portfmt and portclippy - Respect hier(7) for config files and dirs Changes: https://github.com/PurpleI2P/i2pd/releases/tag/2.40.0 PR: 260206 Approved by: 0mp (mentor) Differential Revision: https://reviews.freebsd.org/D33384 --- security/i2pd/Makefile | 53 ++++++++++++++++++---------- security/i2pd/distinfo | 6 ++-- security/i2pd/files/i2pd.in | 32 ++++++++++++----- security/i2pd/files/patch-contrib_i2pd.conf | 24 ++++++++++--- security/i2pd/files/patch-libi2pd_Reseed.cpp | 13 ------- security/i2pd/files/pkg-message.in | 8 +++++ security/i2pd/pkg-plist | 14 +++++--- 7 files changed, 98 insertions(+), 52 deletions(-) diff --git a/security/i2pd/Makefile b/security/i2pd/Makefile index 40d79bd3543e..7887b969fca6 100644 --- a/security/i2pd/Makefile +++ b/security/i2pd/Makefile @@ -1,8 +1,8 @@ PORTNAME= i2pd -PORTVERSION= 2.38.0 +DISTVERSION= 2.40.0 CATEGORIES= security net-p2p -MAINTAINER= ports@FreeBSD.org +MAINTAINER= driesm@FreeBSD.org COMMENT= C++ implementation of I2P client LICENSE= BSD3CLAUSE @@ -11,46 +11,61 @@ LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= boost-libs>=1.72.0_5:devel/boost-libs LIB_DEPENDS= libboost_thread.so:devel/boost-libs +USES= cmake:insource compiler:c++11-lib ssl USE_GITHUB= yes GH_ACCOUNT= PurpleI2P +USE_RC_SUBR= ${PORTNAME} -USES= cmake:insource compiler:c++11-lib ssl -CMAKE_ARGS= -DWITH_GUI=OFF CMAKE_SOURCE_PATH= ${WRKSRC}/build -USE_RC_SUBR= ${PORTNAME} -PORTDOCS= * +SUB_FILES= i2pd.newsyslog.conf pkg-message +SUB_LIST= CERTSDIR=${_CERTSDIR} \ + GROUP="${GROUPS}" \ + USER="${USERS}" \ + WRITEDATADIR=${_WRITEDATADIR} USERS= _i2pd GROUPS= _i2pd -PLIST_SUB= USER="${USERS}" GROUP="${GROUPS}" -SUB_LIST= USER="${USERS}" GROUP="${GROUPS}" -SUB_FILES= i2pd.newsyslog.conf pkg-message +PLIST_SUB= GROUP="${GROUPS}" \ + USER="${USERS}" + +PORTDOCS= README.md + +OPTIONS_DEFINE= AESNI DOCS HARDENING UPNP +OPTIONS_DEFAULT= AESNI -OPTIONS_DEFINE= AESNI UPNP DOCS HARDENING +AESNI_DESC= Use AES-NI instructions set +HARDENING_DESC= Use hardening compiler flags +UPNP_DESC= Include support for UPnP client -AESNI_DESC= Use AES-NI instructions set AESNI_CMAKE_BOOL= WITH_AESNI -UPNP_DESC= Include support for UPnP client -UPNP_CMAKE_BOOL= WITH_UPNP -UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc + HARDENING_CMAKE_BOOL= WITH_HARDENING -HARDENING_DESC= Use hardening compiler flags -post-patch: - @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/libi2pd/Reseed.cpp +UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc +UPNP_CMAKE_BOOL= WITH_UPNP + +_CERTSDIR= ${DATADIR}/certificates +_WRITEDATADIR= /var/db/${PORTNAME} + +post-patch: # fix config file + @${REINPLACE_CMD} -e 's|%%ETCDIR%%|${ETCDIR}|g' ${WRKSRC}/contrib/i2pd.conf + @${REINPLACE_CMD} -e 's|%%CERTSDIR%%|${_CERTSDIR}|g' ${WRKSRC}/contrib/i2pd.conf + @${REINPLACE_CMD} -e 's|/var/lib/${PORTNAME}|${_WRITEDATADIR}|g' ${WRKSRC}/contrib/i2pd.conf post-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 + ${INSTALL_DATA} ${WRKDIR}/i2pd.newsyslog.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/i2pd.conf.sample @${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/contrib/i2pd.conf ${STAGEDIR}${ETCDIR}/i2pd.conf.sample - @(cd ${WRKSRC}/contrib && ${COPYTREE_SHARE} "certificates" ${STAGEDIR}${DATADIR}) + ${INSTALL_DATA} ${WRKSRC}/contrib/tunnels.conf ${STAGEDIR}${ETCDIR}/tunnels.conf.sample + @(cd ${WRKSRC}/contrib/certificates && ${COPYTREE_SHARE} . ${STAGEDIR}${_CERTSDIR}) @${MKDIR} ${STAGEDIR}/var/run/i2pd @${MKDIR} ${STAGEDIR}/var/log/i2pd @${MKDIR} ${STAGEDIR}/var/db/i2pd + @${MKDIR} ${STAGEDIR}${ETCDIR}/tunnels.d post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} diff --git a/security/i2pd/distinfo b/security/i2pd/distinfo index e0ee520c15f1..7a49f86a8310 100644 --- a/security/i2pd/distinfo +++ b/security/i2pd/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1621346486 -SHA256 (PurpleI2P-i2pd-2.38.0_GH0.tar.gz) = 8452f5323795a1846d554096c08fffe5ac35897867b93a5079605df8f80a3089 -SIZE (PurpleI2P-i2pd-2.38.0_GH0.tar.gz) = 555543 +TIMESTAMP = 1638819224 +SHA256 (PurpleI2P-i2pd-2.40.0_GH0.tar.gz) = 4443f484ad40753e892170a26c8ee8126e8338bf416d04eab0c55c1c94a4e193 +SIZE (PurpleI2P-i2pd-2.40.0_GH0.tar.gz) = 587626 diff --git a/security/i2pd/files/i2pd.in b/security/i2pd/files/i2pd.in index 9e77c195564f..af6867cdecc1 100644 --- a/security/i2pd/files/i2pd.in +++ b/security/i2pd/files/i2pd.in @@ -7,26 +7,42 @@ # # Add the following line to /etc/rc.conf to enable i2pd: # -# i2pd_enable="YES" +# i2pd_enable: Set to NO by default. +# Set it to YES to enable i2pd. +# i2pd_certsdir: The directory where the default certificaties are stores. +# Default: %%CERTSDIR%% +# i2pd_config: The config file used to run the daemon. +# Default: %%ETCDIR%%/i2pd.conf +# i2pd_datadir: The datadir used to run the daemon. +# Default: %%WRITEDATADIR%% +# i2pd_group: The group account used to run the daemon. +# Default: %%GROUP%% +# i2pd_user: The user account used to run the daemon. +# Default: %%USER%% # . /etc/rc.subr +desc="i2pd startup script" name="i2pd" -rcvar=i2pd_enable +rcvar="i2pd_enable" load_rc_config ${name} : ${i2pd_enable="NO"} -: ${i2pd_user="%%USER%%"} -: ${i2pd_group="%%GROUP%%"} -: ${i2pd_datadir="/var/db/${name}"} +: ${i2pd_certsdir="%%CERTSDIR%%"} : ${i2pd_config="%%ETCDIR%%/i2pd.conf"} +: ${i2pd_datadir="%%WRITEDATADIR%%"} +: ${i2pd_group="%%GROUP%%"} +: ${i2pd_user="%%USER%%"} + +required_dirs="${i2pd_datadir}" -required_dirs=${i2pd_datadir} -pidfile=/var/run/i2pd/i2pd.pid command="%%PREFIX%%/bin/${name}" -command_args="--conf ${i2pd_config} --service --datadir ${i2pd_datadir} --daemon" +pidfile=/var/run/i2pd/i2pd.pid + +command_args="--certsdir ${i2pd_certsdir} --conf ${i2pd_config} --daemon --datadir ${i2pd_datadir} --service" + extra_commands="reload" reload_cmd="pkill -2 -F ${pidfile} -x i2pd" diff --git a/security/i2pd/files/patch-contrib_i2pd.conf b/security/i2pd/files/patch-contrib_i2pd.conf index 6e17bef32855..cefaa44290d0 100644 --- a/security/i2pd/files/patch-contrib_i2pd.conf +++ b/security/i2pd/files/patch-contrib_i2pd.conf @@ -1,7 +1,23 @@ ---- contrib/i2pd.conf.orig 2020-08-24 16:48:09 UTC +--- contrib/i2pd.conf.orig 2021-11-28 01:26:44 UTC +++ contrib/i2pd.conf -@@ -16,7 +16,7 @@ - # tunnelsdir = /var/lib/i2pd/tunnels.d +@@ -8,19 +8,19 @@ + + ## Tunnels config file + ## Default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf +-# tunconf = /var/lib/i2pd/tunnels.conf ++tunconf = %%ETCDIR%%/tunnels.conf + + ## Tunnels config files path + ## Use that path to store separated tunnels in different config files. + ## Default: ~/.i2pd/tunnels.d or /var/lib/i2pd/tunnels.d +-# tunnelsdir = /var/lib/i2pd/tunnels.d ++tunnelsdir = %%ETCDIR%%/tunnels.d + + ## Path to certificates used for verifying .su3, families +-## Default: ~/.i2pd/certificates or /var/lib/i2pd/certificates +-# certsdir = /var/lib/i2pd/certificates ++## Default: ~/.i2pd/certificates or %%CERTSDIR%% ++# certsdir = %%CERTSDIR%% ## Where to write pidfile (default: i2pd.pid, not used in Windows) -# pidfile = /run/i2pd.pid @@ -9,7 +25,7 @@ ## Logging configuration section ## By default logs go to stdout with level 'info' and higher -@@ -25,9 +25,9 @@ +@@ -30,9 +30,9 @@ ## * stdout - print log entries to stdout ## * file - log entries to a file ## * syslog - use syslog, see man 3 syslog diff --git a/security/i2pd/files/patch-libi2pd_Reseed.cpp b/security/i2pd/files/patch-libi2pd_Reseed.cpp deleted file mode 100644 index 6fb98b810ae9..000000000000 --- a/security/i2pd/files/patch-libi2pd_Reseed.cpp +++ /dev/null @@ -1,13 +0,0 @@ -Static files belong to datadir, not vardir. - ---- libi2pd/Reseed.cpp.orig 2021-02-15 13:21:30 UTC -+++ libi2pd/Reseed.cpp -@@ -497,7 +497,7 @@ namespace data - - void Reseeder::LoadCertificates () - { -- std::string certDir = i2p::fs::DataDirPath("certificates", "reseed"); -+ std::string certDir = "%%DATADIR%%/certificates/reseed"; - std::vector files; - int numCertificates = 0; - diff --git a/security/i2pd/files/pkg-message.in b/security/i2pd/files/pkg-message.in index de7f8b9deb3e..65fa86425363 100644 --- a/security/i2pd/files/pkg-message.in +++ b/security/i2pd/files/pkg-message.in @@ -5,4 +5,12 @@ You may want to increase default i2pd bandwidth limit by adding setting "bandwidth" parameter to "X" in %%ETCDIR%%/i2pd.conf EOM } +{ type: upgrade + message: <