From nobody Sun Sep 8 17:29:35 2024 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 4X1xmJ0Cvkz5VW97; Sun, 08 Sep 2024 17:29:36 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X1xmH5XhTz4cDT; Sun, 8 Sep 2024 17:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725816575; 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=97x9va7Jz/rh6soh4yThbBsidSdNqanwuZScVrHwRas=; b=eTD+H6Mjr7uNVbjpsslhjXwzrj1mziStKyUkZpxwUz/eBCwEe0Ll7t8CrdHKRN8b7zg21U HsTE0qa4bH+WiI28jt9pXyLVd0v1kmEl75/aHCdSHewv7WpzK2HDnlFAAnUyTmdxWP0QJJ 5AKzyqPd3X8Yxs31SKy5Sjo+7I3DNKi75RRkePotmZURtTngVstQue4haluALXEd5RHyzH DWotqgWDfeIXqO1NIJJRoScApgim+GEH8ISIkbkjgAclfz/RuVC3ul9WtIHxisL1xsMFKm wJE1QsuKK0rLivwj85VSjDDgVZewLSjPAK5spwybnZCfXCsxNGCsyqGw4PCHtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725816575; a=rsa-sha256; cv=none; b=MF8IY5RIPXWkEuONvqfefuneIOTCodjJPoS/zQWcxoKj1M+B8f+ekYE9MTmYg5SFyKaahT ZlVlJD1ha4skxofBI18zAOQ84agmdI3E9ArRPGjvkcjhAWN9aCOfDIuMXBywhkT6HjTuOS VqYgVxY4FfDIXQLEobHef729tTdj0FB7xcVlSUR21Maj9INKVoKM95XczfwDBW0h/4Yc2w B3KGKaIBkE9TBWvHfRhrvbkABjn+oqnRhNM1Ewy8y1tswyEz7s250qx/wRWBfYnhXTDpxH 4IjEuYjQTLCTVqG11rJRqig42HUf7dZL4v6IoCFq+cmTBIAsgqc+fYgsWx0FWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725816575; 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=97x9va7Jz/rh6soh4yThbBsidSdNqanwuZScVrHwRas=; b=BnAd9De8JU9T+PtW1OHIQU3Z7zYK2fkxOU8a0R1Bw8/DkFtA79YTrWzc/iBEoZaU4idPJc NJyBr4ePKfuq9xO0+N12u63e9fDubtzHTCxeEk/r3iJwbp5NYN2nxh30JK2ju6Trf+k2W+ ruE2GLfdS29ZfolDbLDHg4WLK3cw5YMeFkn7qprkeLHsPj5QGM3mwi7IxNfdU1hPHPVmYn TdAJzevIkUPVD6GB0FJq7/QXXbokQa3+d4T4Ks8k16YWtIk2BguvfVWtNEI9kbt7mCIgkn S9tBAkh9p3kGAm92m73tdU+uw7kuUkqPvRDWIr7Xz3S6pX1F44rYcwB7vSTjsg== 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 4X1xmH58BSzSfT; Sun, 8 Sep 2024 17:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 488HTZWe091698; Sun, 8 Sep 2024 17:29:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 488HTZco091695; Sun, 8 Sep 2024 17:29:35 GMT (envelope-from git) Date: Sun, 8 Sep 2024 17:29:35 GMT Message-Id: <202409081729.488HTZco091695@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 5db79829135c - main - www/py-gunicorn: Record child process 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: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5db79829135c999165db8864f37c2d8b3ba7b4f5 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/ports/commit/?id=5db79829135c999165db8864f37c2d8b3ba7b4f5 commit 5db79829135c999165db8864f37c2d8b3ba7b4f5 Author: Muhammad Moinur Rahman AuthorDate: 2024-09-08 16:10:51 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2024-09-08 17:29:11 +0000 www/py-gunicorn: Record child process add -p to daemon to store child process pid Currently the installed gunicorn rc.d script records the PID of the supervisor process to /var/run/gunicorn. This is done by passing "-P" via daemon(8). Record the primary gunicorn worker process in /var/run as well, this will enable better integration with tools like newsyslog(8). For example gunicorn accepts a SIG1 signal to the main worker process to close and reopen logfiles after rotation to the main worker as well as child process. By also passing "-p" to daemon we can then have newsyslog get the appropriate pid to sent a SIG1 to. Here are the docs on the signals gunicorn accepts, as there are other interesting usecases this would enable as well: https://docs.gunicorn.org/en/stable/signals.html PR: 281005 Reported by: pete@nomadlogic.org --- www/py-gunicorn/Makefile | 1 + www/py-gunicorn/files/gunicorn.in | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/www/py-gunicorn/Makefile b/www/py-gunicorn/Makefile index 2a845194b50f..3fe09753c57d 100644 --- a/www/py-gunicorn/Makefile +++ b/www/py-gunicorn/Makefile @@ -1,5 +1,6 @@ PORTNAME= gunicorn DISTVERSION= 23.0.0 +PORTREVISION= 1 CATEGORIES= www python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/www/py-gunicorn/files/gunicorn.in b/www/py-gunicorn/files/gunicorn.in index 86d3e2d3cad2..62e1fb68f56d 100644 --- a/www/py-gunicorn/files/gunicorn.in +++ b/www/py-gunicorn/files/gunicorn.in @@ -25,14 +25,16 @@ load_rc_config $name : ${gunicorn_group=%%GROUPS%%} pidfile="/var/run/${name}.pid" +cpidfile="/var/run/${name}-worker.pid" command=/usr/sbin/daemon -command_args="-P ${pidfile} -f -ST ${name} %%PREFIX%%/bin/gunicorn -c ${gunicorn_config}" +command_args="-P ${pidfile} -p ${cpidfile} -f -ST ${name} %%PREFIX%%/bin/gunicorn -c ${gunicorn_config}" required_files="${gunicorn_config}" start_precmd="gunicorn_precmd" gunicorn_precmd() { install -o ${gunicorn_user} /dev/null ${pidfile} + install -o ${gunicorn_user} /dev/null ${cpidfile} } run_rc_command "$1"