Sun Aug 29 20:00:43 2021 UTC ()
py-octoprint: let the RC script work unprivileged

This takes advantage of the introduction of the SYSCONFBASE variable.
Tested on NetBSD/amd64.

Bumps PKGREVISION.


(khorben)
diff -r1.3 -r1.4 pkgsrc/print/py-octoprint/Makefile
diff -r1.2 -r1.3 pkgsrc/print/py-octoprint/files/octoprint.sh

cvs diff -r1.3 -r1.4 pkgsrc/print/py-octoprint/Makefile (expand / switch to unified diff)

--- pkgsrc/print/py-octoprint/Makefile 2021/08/05 13:08:08 1.3
+++ pkgsrc/print/py-octoprint/Makefile 2021/08/29 20:00:43 1.4
@@ -1,17 +1,18 @@ @@ -1,17 +1,18 @@
1# $NetBSD: Makefile,v 1.3 2021/08/05 13:08:08 adam Exp $ 1# $NetBSD: Makefile,v 1.4 2021/08/29 20:00:43 khorben Exp $
2 2
3DISTNAME= ${GITHUB_PROJECT}-${PKGVERSION_NOREV} 3DISTNAME= ${GITHUB_PROJECT}-${PKGVERSION_NOREV}
4PKGNAME= ${PYPKGPREFIX}-octoprint-1.6.1 4PKGNAME= ${PYPKGPREFIX}-octoprint-1.6.1
 5PKGREVISION= 1
5CATEGORIES= print 6CATEGORIES= print
6MASTER_SITES= ${MASTER_SITE_GITHUB:=OctoPrint/} 7MASTER_SITES= ${MASTER_SITE_GITHUB:=OctoPrint/}
7GITHUB_PROJECT= OctoPrint 8GITHUB_PROJECT= OctoPrint
8GITHUB_TAG= ${PKGVERSION_NOREV} 9GITHUB_TAG= ${PKGVERSION_NOREV}
9 10
10MAINTAINER= khorben@defora.org 11MAINTAINER= khorben@defora.org
11HOMEPAGE= https://github.com/OctoPrint/OctoPrint/ 12HOMEPAGE= https://github.com/OctoPrint/OctoPrint/
12COMMENT= Snappy web interface for 3D printers 13COMMENT= Snappy web interface for 3D printers
13LICENSE= gnu-agpl-v3 14LICENSE= gnu-agpl-v3
14 15
15RCD_SCRIPTS= octoprint 16RCD_SCRIPTS= octoprint
16 17
17PYTHON_VERSIONS_INCOMPATIBLE= 27 18PYTHON_VERSIONS_INCOMPATIBLE= 27

cvs diff -r1.2 -r1.3 pkgsrc/print/py-octoprint/files/octoprint.sh (expand / switch to unified diff)

--- pkgsrc/print/py-octoprint/files/octoprint.sh 2021/05/30 21:53:11 1.2
+++ pkgsrc/print/py-octoprint/files/octoprint.sh 2021/08/29 20:00:43 1.3
@@ -1,25 +1,25 @@ @@ -1,25 +1,25 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: octoprint.sh,v 1.2 2021/05/30 21:53:11 khorben Exp $ 3# $NetBSD: octoprint.sh,v 1.3 2021/08/29 20:00:43 khorben Exp $
4# 4#
5# Startup script for OctoPrint 5# Startup script for OctoPrint
6# 6#
7# PROVIDE: octoprint 7# PROVIDE: octoprint
8# REQUIRE: DAEMON 8# REQUIRE: DAEMON
9# KEYWORD: shutdown 9# KEYWORD: shutdown
10# 10#
11# You will need to set some variables in /etc/rc.conf to start OctoPrint: 11# You will need to set some variables in @SYSCONFBASE@/rc.conf to start OctoPrint:
12# 12#
13# octoprint=YES 13# octoprint=YES
14 14
15$_rc_subr_loaded . /etc/rc.subr 15$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
16 16
17name="octoprint" 17name="octoprint"
18rcvar=${name} 18rcvar=${name}
19command="@PREFIX@/bin/octoprint-@PYVERSSUFFIX@" 19command="@PREFIX@/bin/octoprint-@PYVERSSUFFIX@"
20pidfile="/tmp/$name.pid" 20pidfile="/tmp/$name.pid"
21procname="@PREFIX@/bin/python@PYVERSSUFFIX@" 21procname="@PREFIX@/bin/python@PYVERSSUFFIX@"
22command_args="daemon start" 22command_args="daemon start"
23 23
24load_rc_config $name 24load_rc_config $name
25run_rc_command "$1" 25run_rc_command "$1"