From nobody Fri Aug 12 13:05:05 2022 X-Original-To: dev-commits-ports-main@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 4M43mx4Rrvz4ZBPm; Fri, 12 Aug 2022 13:05:05 +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 4M43mx4DL4z3d3d; Fri, 12 Aug 2022 13:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660309505; 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=DuET7cTZBG4pLursAxAjUCLbQMNG9A9H/8l3SWddPXY=; b=BcA/KnAXAjGf+rEUGqhgGC5wgHN4HzWMu3ZJtyO4EPJDB1s4QsnxOWVsiAqMWQBbcHrNyR aPasgdYZ6vfGX4VpuLRtVApN37YWSguX1FoYMQhamhBDfmGLj1ZMcg/v88V/hmUJqebZkM 8ZEYu6iKoTVwON+elY4b++O8crp6qb6+bcEt20cYoMCAeIUvxi6buOAAWmEXqCAGuojkpc hw6KWadrL6tF33oB5bTio8rehzozQq6/gN1WOHw8gTqh6Rrq5RPubr2BLdUqfxfNvl5w2O v8F+2Avs2rbRfbh9Ym76Rcat8nuDhLIVFhkAd1/xe+VM0eReMsw9kUFXVStxsQ== 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 4M43mx3HMLzXfr; Fri, 12 Aug 2022 13:05:05 +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 27CD55qM038719; Fri, 12 Aug 2022 13:05:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27CD55aM038718; Fri, 12 Aug 2022 13:05:05 GMT (envelope-from git) Date: Fri, 12 Aug 2022 13:05:05 GMT Message-Id: <202208121305.27CD55aM038718@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Felix Palmen Subject: git: 5454a6062bb0 - main - net-p2p/lidarr: Update to 1.0.2.2592 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zirias X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5454a6062bb001c41954bb407b3203ca34e41003 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660309505; 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=DuET7cTZBG4pLursAxAjUCLbQMNG9A9H/8l3SWddPXY=; b=NKUrHF2tDamRFUfP0ZOsTJoP/yt23yxVhCApyUJn3zDzZHzcrG2c8cfGopZgCARcRyt65j yXZLxJHIETsTl30aWfSLjZs2OYrWRiITM7AFJSYAbs2VUS8xQEDwYr0/OqLrHxOUZEl/5i phc7dIeuswm5swVC59rmENCDw9Iy4IAVNr/Wp5GjxEoHGUvO6PkQmJjYwpi4Q/GS3n+5gm XjJWZLp8nUEUziuggdRpht1EMXoN2m0cH26/TYh8RMMcJuPfQiPS9Y5lWp9LfLmiIPIQqc 17IQoKoccIOzAUBxbWCgESrf5f1OB5OAlyc5mHgK4aPJGNCrqXFAxYpPfF+fYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660309505; a=rsa-sha256; cv=none; b=D0+vU2j2CE59bTLBAM/eoppbEy+jeYL98cpjbVESvdPlQ0DV8T6rahWVko5kiQsc87T6Lr UZUBXksLypgLcq+cFES18GgfJj9CQL8IRXxv5GYSOqVXLK8th5Isf+yPPJthEewcdWlKYl HPsDSIf5wye/6HFeJkXB4aa831/7jpGaadPm6M6qQvFQu/Etovro1eNt7lbV9EjkfMamuS 6C2v7mxAtYkeQISfPdQJKYV67u8Jnf7tiHMYC0HHAOJM1LdjGA7FrBVkXbtQvKsSvH4ytZ Y9477iYZ7LoCVL+1Ydb9Xz50Lp3A3eezmDro33pMg+EvynYxd1PwxWBvSVHpzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zirias: URL: https://cgit.FreeBSD.org/ports/commit/?id=5454a6062bb001c41954bb407b3203ca34e41003 commit 5454a6062bb001c41954bb407b3203ca34e41003 Author: Michiel van Baak Jansen AuthorDate: 2022-05-07 10:41:36 +0000 Commit: Felix Palmen CommitDate: 2022-08-12 13:03:52 +0000 net-p2p/lidarr: Update to 1.0.2.2592 This version released a FreeBSD .NET (core) binary. Setup is the same as net-p2p/radarr and net-p2p/prowlarr While at it, switch to USES=ssl:run so openssl package is not a hard dependency. Tested with base ssl, openssl package and libressl package installed. ARCH Restriction to amd64 discussed on IRC with maintainer. lidarr upstream will stop supporting mono in the next release. The .NET SDK used to build this version only exists for amd64 so far (and isn't public either). There's nothing that can be done about that as long as Microsoft doesn't officially support FreeBSD for .NET. PR: 263840 Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D36172 --- net-p2p/lidarr/Makefile | 37 ++--- net-p2p/lidarr/distinfo | 6 +- net-p2p/lidarr/files/lidarr.in | 69 ++++---- net-p2p/lidarr/files/pkg-message.in | 7 + net-p2p/lidarr/pkg-plist | 313 ++++++++++++++++++++++++++++-------- 5 files changed, 316 insertions(+), 116 deletions(-) diff --git a/net-p2p/lidarr/Makefile b/net-p2p/lidarr/Makefile index 11b98ed46061..a8543c298da0 100644 --- a/net-p2p/lidarr/Makefile +++ b/net-p2p/lidarr/Makefile @@ -1,26 +1,30 @@ PORTNAME= lidarr -PORTVERSION= 0.8.1.2135 +PORTVERSION= 1.0.2.2592 CATEGORIES= net-p2p MASTER_SITES= https://github.com/lidarr/Lidarr/releases/download/v${PORTVERSION}/ -DISTNAME= Lidarr.master.${PORTVERSION}.linux +DISTNAME= Lidarr.master.${PORTVERSION}.freebsd-core-x64 MAINTAINER= michiel@vanbaak.eu COMMENT= Music collection manager for Usenet and BitTorrent users LICENSE= GPLv3 -LIB_DEPENDS= libcurl.so:ftp/curl -RUN_DEPENDS= chromaprint>0:audio/chromaprint \ - mediainfo>0:multimedia/mediainfo \ - mono6.8>0:lang/mono6.8 \ +# See https://github.com/radarr/radarr/issues/6668 for x86 support +ONLY_FOR_ARCHS= amd64 + +RUN_DEPENDS= ca_root_nss>0:security/ca_root_nss \ + icu>0:devel/icu \ + libiconv>0:converters/libiconv \ + libinotify>0:devel/libinotify \ + libunwind>0:devel/libunwind \ + chromaprint>0:audio/chromaprint \ sqlite3>0:databases/sqlite3 -USE_RC_SUBR= lidarr +USES= ssl:run -NO_ARCH= YES -NO_BUILD= YES +USE_RC_SUBR= ${PORTNAME} -WRKSRC= ${WRKDIR}/Lidarr +NO_BUILD= YES SUB_FILES= ${PORTNAME} package_info pkg-message SUB_LIST= DATADIR=${DATADIR} \ @@ -30,13 +34,10 @@ SUB_LIST= DATADIR=${DATADIR} \ PORTNAME=${PORTNAME} \ USERS=${USERS} -USERS= lidarr -GROUPS= lidarr - -OPTIONS_DEFINE= X11 +WRKSRC= ${WRKDIR}/Lidarr -# Permits image resizing -X11_LIB_DEPENDS+=libgdiplus.so:x11-toolkits/libgdiplus +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} .include @@ -45,8 +46,8 @@ post-extract: do-install: ${INSTALL} -d -m 755 ${STAGEDIR}/${DATADIR}/bin/ - cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}/bin/ "! -name Lidarr.exe" - ${INSTALL_SCRIPT} ${WRKSRC}/Lidarr.exe ${STAGEDIR}/${DATADIR}/bin/ + cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${STAGEDIR}/${DATADIR}/bin/ "! -name Lidarr" + ${INSTALL_PROGRAM} ${WRKSRC}/Lidarr ${STAGEDIR}/${DATADIR}/bin/ post-install: ${INSTALL_DATA} ${WRKDIR}/package_info ${STAGEDIR}/${DATADIR}/ diff --git a/net-p2p/lidarr/distinfo b/net-p2p/lidarr/distinfo index ee66992f4191..e0fef5f21594 100644 --- a/net-p2p/lidarr/distinfo +++ b/net-p2p/lidarr/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1643126158 -SHA256 (Lidarr.master.0.8.1.2135.linux.tar.gz) = 7895fab75f43dac957ebc7d748c77f562c775d280257294af9677c547f63b2e2 -SIZE (Lidarr.master.0.8.1.2135.linux.tar.gz) = 21382130 +TIMESTAMP = 1654505379 +SHA256 (Lidarr.master.1.0.2.2592.freebsd-core-x64.tar.gz) = 21c56d4947af22cae56e31a4e21aedb6ded8f02b8dcd769c1976b8901a615f75 +SIZE (Lidarr.master.1.0.2.2592.freebsd-core-x64.tar.gz) = 48728876 diff --git a/net-p2p/lidarr/files/lidarr.in b/net-p2p/lidarr/files/lidarr.in index a8e32e4f916d..db723160de4a 100644 --- a/net-p2p/lidarr/files/lidarr.in +++ b/net-p2p/lidarr/files/lidarr.in @@ -1,43 +1,54 @@ #!/bin/sh -# -# Author: Michiel van Baak -# PROVIDE: lidarr -# REQUIRE: LOGIN +# PROVIDE: %%PORTNAME%% +# REQUIRE: LOGIN network # KEYWORD: shutdown - -# Add the following lines to /etc/rc.conf to enable lidarr: -# lidarr_enable="YES" +# +# Add the following lines to /etc/rc.conf or use sysrc to enable %%PORTNAME%% +# ${%%PORTNAME%%_enable="YES"} +# Optionaly there are some other parameters +# ${%%PORTNAME%%_user="%%USERS%%"} +# ${%%PORTNAME%%_group="%%GROUPS%%"} +# This stores %%PORTNAME%% data (e.g., databases, configs, logs) +# ${%%PORTNAME%%_data_dir="%%PREFIX%%/%%PORTNAME%%"} +# This stores the PID files that daemon will use +# ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"} . /etc/rc.subr - -name="lidarr" -rcvar=lidarr_enable - +name=%%PORTNAME%% +rcvar=%%PORTNAME%%_enable load_rc_config $name -: ${lidarr_enable="NO"} -: ${lidarr_user:="lidarr"} -: ${lidarr_data_dir:="%%PREFIX%%/lidarr"} -: ${lidarr_exec_dir:="%%DATADIR%%/bin"} +: ${%%PORTNAME%%_enable:=NO} +: ${%%PORTNAME%%_user:="%%USERS%%"} +: ${%%PORTNAME%%_group:="%%GROUPS%%"} +: ${%%PORTNAME%%_exec_dir:="%%DATADIR%%/bin"} +: ${%%PORTNAME%%_data_dir:="%%PREFIX%%/%%PORTNAME%%"} +: ${%%PORTNAME%%_pid_dir:="/var/run/%%PORTNAME%%"} -pidfile="${lidarr_data_dir}/lidarr.pid" -procname="%%PREFIX%%/bin/mono" +pidfile="${%%PORTNAME%%_pid_dir}/${name}_daemon.pid" +pidfile_child="${%%PORTNAME%%_pid_dir}/${name}_child.pid" command="/usr/sbin/daemon" -command_args="-f ${procname} --debug ${lidarr_exec_dir}/Lidarr.exe --nobrowser --data=${lidarr_data_dir}" -start_precmd=lidarr_precmd - -lidarr_precmd() -{ - export XDG_CONFIG_HOME=${lidarr_data_dir} - if [ ! -d ${lidarr_data_dir} ]; then - install -d -o ${lidarr_user} ${lidarr_data_dir} - fi - # Unwritable pids allow the service to start, but fails to work - # Rare, but if you are debugging as root and accidentally start the service... - /bin/rm -f ${pidfile} +start_precmd=${name}_precmd +%%PORTNAME%%_precmd() { + if [ ! -d ${%%PORTNAME%%_data_dir} ]; then + install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_data_dir} + fi + if [ ! -d ${%%PORTNAME%%_pid_dir} ]; then + install -d -o ${%%PORTNAME%%_user} -g ${%%PORTNAME%%_group} ${%%PORTNAME%%_pid_dir} + fi + + # .NET 6+ use dual mode sockets to avoid the separate AF handling. + # disable .NET use of V6 if no ipv6 is configured. + # See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259194#c17 + ifconfig | grep -q inet6 + if [ $? == 1 ]; then + export DOTNET_SYSTEM_NET_DISABLEIPV6=1 + fi + + rc_flags="-r -f -p ${pidfile_child} -P ${pidfile} ${%%PORTNAME%%_exec_dir}/Lidarr --data=${%%PORTNAME%%_data_dir} --nobrowser >> /dev/null 2>&1 ${rc_flags}" } run_rc_command "$1" diff --git a/net-p2p/lidarr/files/pkg-message.in b/net-p2p/lidarr/files/pkg-message.in index dcb8d54f86a2..0f27aef1d91a 100644 --- a/net-p2p/lidarr/files/pkg-message.in +++ b/net-p2p/lidarr/files/pkg-message.in @@ -2,6 +2,13 @@ { type: install message: <