From nobody Sun Feb 19 07:58:22 2023 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 4PKHwv3Dyfz3swML; Sun, 19 Feb 2023 07:58:23 +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 4PKHwv0BjYz3rD8; Sun, 19 Feb 2023 07:58:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676793503; 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=fKkFb6efOhnoX1atxJxTrdAEnTh2W30FdDnc2Aq4cuY=; b=l5fqmIuGLls+u5+losvgrU1Y7Ze6iz6HwxbQNPcKNunprgUyWhuP3/wj0HWuF2rFRzpwdO V/tfEyXaIxf4CZEy1qxZNK1AF1/Tg9dcxYjTE5RdVz0Tnwzzch7tpQFzIvEZ0fy4VyWE2g keyaYHo2/pI8sZuM4QVMSUfKOzywguPNBtMjzC8iRgF4VA3g01y565YfBCOV77BQqpVdNy bX17bhMDxauQjVTU4MBYo4cAa9h5e3vp+Sq8S2J6HMj+ozqxjO65R37Zof0mYFTuUhvTfb n6kH9S2L0L8fH9eOimIRcfQfenQ4aJ/GZSFXnsruYMhosbGgohRIaf8fOyrgMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676793503; 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=fKkFb6efOhnoX1atxJxTrdAEnTh2W30FdDnc2Aq4cuY=; b=DRMYwGRMgxw1lWxBSA2FHV3mt7y9z2KIixiIhRoFK8a3QV0nx+8zAzEW2WOpCLX/7uhtXm a0KGs+ZW6qHRYiXYyD3r3Rz/HRuGf2Wps84/Ih6ueY8oOOzWz/wjwsjhuLq49ZRAmz0+W1 vLOAwI2AqxAloi1Ww+e+y2yG/PjPqga8vH3lSox8oUPUZA+0bbSBjC/3RIp3sgNSrg1nzw PqDLUQoWXuA7rRp32bq+12L36kwPArX0NfgMbZaCcdVgbCkZ9KCPlAegqAhQuemxm/NLvT ZSf583n59dtVvD+djG26falud9zpbcoTCyiu904Yhl4IZpPz+0vynoLRpja/Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676793503; a=rsa-sha256; cv=none; b=tgQ5iEKWr3vdOrK8nQ4eykxM5xhl3qjOEkZi/pLTHn08ECBnzU4RqyeSpJGYp7Ltt9jGYl hE8Txg24BLSXBThGM8FwKj+5o5ZOcOqpT3NPrimvI/ZCyqfPCNULbc2qQG/16/e9K0YrdE euERyV/LE1vZFnDnB9+ZCRYH8gCeFN/A3u0Q78nqMS+iymtX+xCzJA1MVNOU47CPFF5Rr9 0fXAi0XbcAU/Je8ro6vsV+Ft6Zsuuvh+wkLfdra3spUD7XAtwlkgPRxJ4X89FCptMUnT6d XIUKrza2YjfT8s+GTw0puRhiVidfUczMVi+Yui8HvMv2m0WFMZ3kYtX1ABVVMA== 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 4PKHwt6PLmztp7; Sun, 19 Feb 2023 07:58:22 +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 31J7wM1l081972; Sun, 19 Feb 2023 07:58:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31J7wMvt081971; Sun, 19 Feb 2023 07:58:22 GMT (envelope-from git) Date: Sun, 19 Feb 2023 07:58:22 GMT Message-Id: <202302190758.31J7wMvt081971@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: 4288cedea458 - main - multimedia/emby-server(-devel): remove redundant PID file operations 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: 4288cedea45865dfb375c1d4deb1ac36739d14a4 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by driesm: URL: https://cgit.FreeBSD.org/ports/commit/?id=4288cedea45865dfb375c1d4deb1ac36739d14a4 commit 4288cedea45865dfb375c1d4deb1ac36739d14a4 Author: Matthew Wener AuthorDate: 2023-02-19 07:44:10 +0000 Commit: Dries Michiels CommitDate: 2023-02-19 07:56:08 +0000 multimedia/emby-server(-devel): remove redundant PID file operations rc.subr automatically creates and removes the PID file. In order for rc.subr to create the PID file, the PID file is moved to a dedicated directory which is owned by the emby user. Pull Request: https://github.com/freebsd/freebsd-ports/pull/161 --- multimedia/emby-server-devel/Makefile | 2 +- multimedia/emby-server-devel/files/emby-server.in | 27 ++++++++++------------- multimedia/emby-server/Makefile | 2 +- multimedia/emby-server/files/emby-server.in | 27 ++++++++++------------- 4 files changed, 26 insertions(+), 32 deletions(-) diff --git a/multimedia/emby-server-devel/Makefile b/multimedia/emby-server-devel/Makefile index 6098d9366032..6cadc2a87711 100644 --- a/multimedia/emby-server-devel/Makefile +++ b/multimedia/emby-server-devel/Makefile @@ -1,6 +1,6 @@ PORTNAME= emby-server DISTVERSION= 4.8.0.21 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= https://github.com/MediaBrowser/Emby.Releases/releases/download/${DISTVERSION}/ \ https://mediabrowser.github.io/embytools/ diff --git a/multimedia/emby-server-devel/files/emby-server.in b/multimedia/emby-server-devel/files/emby-server.in index d5b9bdb4cf97..d753175697b4 100644 --- a/multimedia/emby-server-devel/files/emby-server.in +++ b/multimedia/emby-server-devel/files/emby-server.in @@ -26,8 +26,10 @@ # Default: %%PREFIX%%/lib/emby-server/bin/ffmpeg # %%RC_NAME%%_ffprobe: Path of the ffprobe binary. # Default: %%PREFIX%%/lib/emby-server/bin/ffprobe -# %%RC_NAME%%_pid: Path of the pid file. -# Default: /var/run/%%PORTNAME%%.pid +# %%RC_NAME%%_pid: Name of the pid file. +# Default: %%PORTNAME%%.pid +# %%RC_NAME%%_pid_dir: Path of the pid file. +# Default: /var/run/emby-server . /etc/rc.subr name=%%RC_NAME%% @@ -41,22 +43,23 @@ load_rc_config ${name} : ${%%RC_NAME%%_ffdetect:="%%PREFIX%%/lib/emby-server/bin/ffdetect"} : ${%%RC_NAME%%_ffmpeg:="%%PREFIX%%/lib/emby-server/bin/ffmpeg"} : ${%%RC_NAME%%_ffprobe:="%%PREFIX%%/lib/emby-server/bin/ffprobe"} -: ${%%RC_NAME%%_pid:="/var/run/%%PORTNAME%%.pid"} +: ${%%RC_NAME%%_pid:="%%PORTNAME%%.pid"} +: ${%%RC_NAME%%_pid_dir:="/var/run/emby-server"} -pidfile="${%%RC_NAME%%_pid}" +pidfile="${%%RC_NAME%%_pid_dir}/${%%RC_NAME%%_pid}" command="/usr/sbin/daemon" -command_args="-r -f -P ${%%RC_NAME%%_pid} %%PREFIX%%/lib/emby-server/system/EmbyServer \ +command_args="-r -f -P ${pidfile} %%PREFIX%%/lib/emby-server/system/EmbyServer \ -os freebsd \ -ffdetect ${%%RC_NAME%%_ffdetect} \ -ffmpeg ${%%RC_NAME%%_ffmpeg} \ -ffprobe ${%%RC_NAME%%_ffprobe} \ -programdata ${%%RC_NAME%%_data_dir}" -start_precmd=%%RC_NAME%%_precmd -%%RC_NAME%%_precmd() +start_precmd=%%RC_NAME%%_start_precmd +%%RC_NAME%%_start_precmd() { - [ -f ${%%RC_NAME%%_pid} ] || install -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} -- /dev/null ${%%RC_NAME%%_pid} - [ -d ${%%RC_NAME%%_data_dir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} -- ${%%RC_NAME%%_data_dir} + [ -d ${%%RC_NAME%%_pid_dir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} ${%%RC_NAME%%_pid_dir} + [ -d ${%%RC_NAME%%_data_dir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} ${%%RC_NAME%%_data_dir} # .NET 6+ use dual mode sockets to avoid the separate AF handling. # disable .NET use of V6 if no ipv6 is configured. @@ -69,10 +72,4 @@ start_precmd=%%RC_NAME%%_precmd export LD_LIBRARY_PATH=%%PREFIX%%/lib/emby-server/lib:%%LOCALBASE%%/lib } -stop_postcmd=%%RC_NAME%%_postcmd -%%RC_NAME%%_postcmd() -{ - rm -f ${%%RC_NAME%%_pid} -} - run_rc_command "$1" diff --git a/multimedia/emby-server/Makefile b/multimedia/emby-server/Makefile index c93bd1421dd2..006ec73d3942 100644 --- a/multimedia/emby-server/Makefile +++ b/multimedia/emby-server/Makefile @@ -1,6 +1,6 @@ PORTNAME= emby-server DISTVERSION= 4.7.11.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= https://github.com/MediaBrowser/Emby.Releases/releases/download/${DISTVERSION}/ \ https://mediabrowser.github.io/embytools/ diff --git a/multimedia/emby-server/files/emby-server.in b/multimedia/emby-server/files/emby-server.in index d5b9bdb4cf97..d753175697b4 100644 --- a/multimedia/emby-server/files/emby-server.in +++ b/multimedia/emby-server/files/emby-server.in @@ -26,8 +26,10 @@ # Default: %%PREFIX%%/lib/emby-server/bin/ffmpeg # %%RC_NAME%%_ffprobe: Path of the ffprobe binary. # Default: %%PREFIX%%/lib/emby-server/bin/ffprobe -# %%RC_NAME%%_pid: Path of the pid file. -# Default: /var/run/%%PORTNAME%%.pid +# %%RC_NAME%%_pid: Name of the pid file. +# Default: %%PORTNAME%%.pid +# %%RC_NAME%%_pid_dir: Path of the pid file. +# Default: /var/run/emby-server . /etc/rc.subr name=%%RC_NAME%% @@ -41,22 +43,23 @@ load_rc_config ${name} : ${%%RC_NAME%%_ffdetect:="%%PREFIX%%/lib/emby-server/bin/ffdetect"} : ${%%RC_NAME%%_ffmpeg:="%%PREFIX%%/lib/emby-server/bin/ffmpeg"} : ${%%RC_NAME%%_ffprobe:="%%PREFIX%%/lib/emby-server/bin/ffprobe"} -: ${%%RC_NAME%%_pid:="/var/run/%%PORTNAME%%.pid"} +: ${%%RC_NAME%%_pid:="%%PORTNAME%%.pid"} +: ${%%RC_NAME%%_pid_dir:="/var/run/emby-server"} -pidfile="${%%RC_NAME%%_pid}" +pidfile="${%%RC_NAME%%_pid_dir}/${%%RC_NAME%%_pid}" command="/usr/sbin/daemon" -command_args="-r -f -P ${%%RC_NAME%%_pid} %%PREFIX%%/lib/emby-server/system/EmbyServer \ +command_args="-r -f -P ${pidfile} %%PREFIX%%/lib/emby-server/system/EmbyServer \ -os freebsd \ -ffdetect ${%%RC_NAME%%_ffdetect} \ -ffmpeg ${%%RC_NAME%%_ffmpeg} \ -ffprobe ${%%RC_NAME%%_ffprobe} \ -programdata ${%%RC_NAME%%_data_dir}" -start_precmd=%%RC_NAME%%_precmd -%%RC_NAME%%_precmd() +start_precmd=%%RC_NAME%%_start_precmd +%%RC_NAME%%_start_precmd() { - [ -f ${%%RC_NAME%%_pid} ] || install -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} -- /dev/null ${%%RC_NAME%%_pid} - [ -d ${%%RC_NAME%%_data_dir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} -- ${%%RC_NAME%%_data_dir} + [ -d ${%%RC_NAME%%_pid_dir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} ${%%RC_NAME%%_pid_dir} + [ -d ${%%RC_NAME%%_data_dir} ] || install -d -g ${%%RC_NAME%%_group} -o ${%%RC_NAME%%_user} ${%%RC_NAME%%_data_dir} # .NET 6+ use dual mode sockets to avoid the separate AF handling. # disable .NET use of V6 if no ipv6 is configured. @@ -69,10 +72,4 @@ start_precmd=%%RC_NAME%%_precmd export LD_LIBRARY_PATH=%%PREFIX%%/lib/emby-server/lib:%%LOCALBASE%%/lib } -stop_postcmd=%%RC_NAME%%_postcmd -%%RC_NAME%%_postcmd() -{ - rm -f ${%%RC_NAME%%_pid} -} - run_rc_command "$1"