From nobody Tue May 28 15:47:26 2024 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 4VpcMy3Fp0z5MbfD; Tue, 28 May 2024 15:47:26 +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 4VpcMy2nNfz47py; Tue, 28 May 2024 15:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716911246; 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=pF0Ys5zCRt78SGkQxEbvLFHctS27hRJvjd1S+wIDsNI=; b=Hgn4Wj1hXZqsuURIk69LfHekaE7o/1qn+LYqezRVbctegUXMckk0bqD3ReAzSDLQo0lFmG RQ6rJvFSA2nTdxly1uGtHNInKoMQxuHqTnyRIFeG0TIfrU1j7cVRjjALJP2vjISzA88P0r lSXIL3mzcLKI63ZX5X16TIGHSakvVkMeYGQwARTY9Y0B8Bw3kyz0lI8A39bAJtJj43IoW4 M3NRpASaalt3oL18WZcoSPH6fhWeoIkUMQEyANQC6Sy/UU02UC9HKAerKUW3uW5ULPRybz p4+b1LWSjIOA4EcF4BqtOvPJIz0BqWfltDjlrgy85FLZQq0j3d6TRdedlCk4hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716911246; a=rsa-sha256; cv=none; b=Ynxxix6n4cq6pGz9Wjel/2Etik37121klmh0we6QjWLQ57VsRkYKS7ccpCLz+qvcposqqy BdTWVeKA9MYCJbf7PnNQZEU4kx5kP3+UiLa6J9RvzuxdSLgnhQ8Qj9kLSrOt+ekneOiPhh GlfK8uZAuEXKexL66xF0vIsZkbaKz8cWYgU5mGKBx/Rdvs0e3ZBDDcrZ6mNVijVg4cUOpo lhm/xmrP6UYBnUgP43jqLttVunNJuk8A1RLhnBYQimJHpYcIXFeY/fZoJniywV6yuPEBma pvoxu5XegVZZVrqo3ebCwscH98qR5JRretlipkVrU15RDhR2xz+n8D2i//Ea9g== 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=1716911246; 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=pF0Ys5zCRt78SGkQxEbvLFHctS27hRJvjd1S+wIDsNI=; b=OWjBvaKt3MnlaZctmyGsQqF2n4MUayMsmfp94Mlp8QmRpZfld66tOabKuoN12F68xRGtWP iQ9ZSdjLnRZIiMYzJfM0c1PCYJgz+I5W4wf61nCskdQ/vWRR2Ja7ZX9oewMmpK9Shqdbaw lKhz1vJnq4PsTg1kXdGj/ZUdQ4JmgPzbGSGxKN2iIV16vKfJ8Qw4P2n4JyGxUR72FAJKlt KathEmxiteEd/RHTLBoZ/4xZj/XhlReohdGXqEWV7GmYw4t6PkPhA8a4t5k3ZPiwauvJ9i zpSw7QFHRQ3V4yDsVTXA45HVremxKi4FKPlTglIvMNPuEjLftOAd55m6g0P4fA== 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 4VpcMy2JktzJ8D; Tue, 28 May 2024 15:47:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44SFlQSv074310; Tue, 28 May 2024 15:47:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44SFlQoW074307; Tue, 28 May 2024 15:47:26 GMT (envelope-from git) Date: Tue, 28 May 2024 15:47:26 GMT Message-Id: <202405281547.44SFlQoW074307@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Michael Gmelin Subject: git: aed26383cdf5 - main - deskutils/py-paperless-ngx: Fix document classifier hanging (2) 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: grembo X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aed26383cdf5928ed5f7642954123f8099b23920 Auto-Submitted: auto-generated The branch main has been updated by grembo: URL: https://cgit.FreeBSD.org/ports/commit/?id=aed26383cdf5928ed5f7642954123f8099b23920 commit aed26383cdf5928ed5f7642954123f8099b23920 Author: Michael Gmelin AuthorDate: 2024-05-28 15:44:24 +0000 Commit: Michael Gmelin CommitDate: 2024-05-28 15:45:50 +0000 deskutils/py-paperless-ngx: Fix document classifier hanging (2) Turn paperless symlink into wrapper, this way OMP_NUM_THREADS=1 is also set when paperless is called outside rc scripts. PR: 279011 Reported by: freebsd.bugzilla@mail.tinsuke.com --- deskutils/py-paperless-ngx/Makefile | 8 +++----- deskutils/py-paperless-ngx/files/paperless-ngx.7.in | 13 ++++++------- deskutils/py-paperless-ngx/files/paperless.in | 9 +++++++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/deskutils/py-paperless-ngx/Makefile b/deskutils/py-paperless-ngx/Makefile index 59679a6776c3..cc2eff7e80ee 100644 --- a/deskutils/py-paperless-ngx/Makefile +++ b/deskutils/py-paperless-ngx/Makefile @@ -1,7 +1,7 @@ PORTNAME= paperless-ngx PORTVERSION= 2.7.2 DISTVERSIONPREFIX= v -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= deskutils python MASTER_SITES= https://github.com/${PORTNAME}/${PORTNAME}/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/:webui \ GH:gh @@ -83,7 +83,7 @@ CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}*paperless NO_ARCH= yes -SUB_FILES= nginx.conf paperless-ngx.7 pkg-message README sshd_config +SUB_FILES= nginx.conf paperless paperless-ngx.7 pkg-message README sshd_config SUB_LIST= CHOWN=${CHOWN} \ ECHO=${ECHO} \ EGREP=${EGREP} \ @@ -146,9 +146,7 @@ do-install: @cd ${WRKSRC} && ${COPYTREE_SHARE} gunicorn.conf.py \ ${STAGEDIR}${PYTHON_SITELIBDIR}/paperless @${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.orig' -delete - @${RLN} ${STAGEDIR}${PYTHON_SITELIBDIR}/paperless/manage.py \ - ${STAGEDIR}${PREFIX}/bin/paperless - @${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/paperless + @cd ${WRKDIR} && ${INSTALL_SCRIPT} paperless ${STAGEDIR}${PREFIX}/bin @${SED} -e 's|%%WWWDIR%%|${WWWDIR}|g;' \ ${WRKSRC}/paperless.conf.example \ > ${STAGEDIR}${PREFIX}/etc/paperless.conf.sample diff --git a/deskutils/py-paperless-ngx/files/paperless-ngx.7.in b/deskutils/py-paperless-ngx/files/paperless-ngx.7.in index 6f771e4713e3..23bd7b42d9fb 100644 --- a/deskutils/py-paperless-ngx/files/paperless-ngx.7.in +++ b/deskutils/py-paperless-ngx/files/paperless-ngx.7.in @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 24, 2024 +.Dd May 28, 2024 .Dt PAPERLESS-NGX 7 .Os .Sh NAME @@ -59,14 +59,13 @@ For more information about using paperless-ngx, see the official paperless-ngx documentation .Pa ( https://docs.paperless-ngx.com ) . .Pp -The package creates a symlink from -.Pa %%PYTHONPREFIX_SITELIBDIR%%/paperless/manage.py -to +The package creates a wrapper .Pa %%PREFIX%%/bin/paperless -for convenience reasons, so whenever the official -documentation mentions +which in turn calls +.Pa %%PYTHONPREFIX_SITELIBDIR%%/paperless/manage.py , +so whenever the official documentation mentions .Em manage.py -it can be substituted with +it should be substituted with .Pa %%PREFIX%%/bin/paperless or simply .Pa paperless . diff --git a/deskutils/py-paperless-ngx/files/paperless.in b/deskutils/py-paperless-ngx/files/paperless.in new file mode 100644 index 000000000000..5753e5d4e003 --- /dev/null +++ b/deskutils/py-paperless-ngx/files/paperless.in @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +export OMP_NUM_THREADS=1 +exec \ + %%PYTHON_CMD%% \ + %%PYTHONPREFIX_SITELIBDIR%%/paperless/manage.py \ + "$@"