Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2022 14:19:03 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: b6471b43913d - main - devel/py-buildbot: Update version 3.5.0=>3.7.0
Message-ID:  <202212141419.2BEEJ3gX063329@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b6471b43913ddd7d12d07bc3bfa2c2ab3a4aac7b

commit b6471b43913ddd7d12d07bc3bfa2c2ab3a4aac7b
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2022-12-14 14:08:22 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-12-14 14:18:51 +0000

    devel/py-buildbot: Update version 3.5.0=>3.7.0
    
    - Use the existing buildbot users and groups
    - Refactor the rc script to run as buildbot user and pointing the
      basedir to the home directory of buildbot user [1]
    
    PR:             248234 [1]
    Reported by:    ari@ish.com.au [1]
---
 devel/py-buildbot/Makefile          |  6 +++++-
 devel/py-buildbot/distinfo          |  6 +++---
 devel/py-buildbot/files/buildbot.in | 16 ++++++++++++----
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/devel/py-buildbot/Makefile b/devel/py-buildbot/Makefile
index 82d27ac9be31..4c3d5c1fcd61 100644
--- a/devel/py-buildbot/Makefile
+++ b/devel/py-buildbot/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	buildbot
-PORTVERSION=	3.5.0
+PORTVERSION=	3.7.0
 CATEGORIES=	devel python
 MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -13,6 +13,7 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}alembic>=1.6.0:databases/py-alembic@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}autobahn>=0.16.0:www/py-autobahn@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}buildbot-www>0:devel/py-buildbot-www@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}dateutil>=1.5:devel/py-dateutil@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}Jinja2>=2.1:devel/py-Jinja2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pyjwt>=0:www/py-pyjwt@${PY_FLAVOR} \
@@ -36,6 +37,9 @@ USES=		cpe python:3.5+
 USE_PYTHON=	autoplist concurrent distutils
 USE_RC_SUBR=	buildbot
 
+USERS=	${PORTNAME}
+GROUPS=	${PORTNAME}
+
 NO_ARCH=	yes
 SUB_LIST=	PYTHON_CMD=${PYTHON_CMD} \
 		PYTHON_VER=${PYTHON_VER}
diff --git a/devel/py-buildbot/distinfo b/devel/py-buildbot/distinfo
index ba27d1e3e8f5..505573d92226 100644
--- a/devel/py-buildbot/distinfo
+++ b/devel/py-buildbot/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1646763989
-SHA256 (buildbot-3.5.0.tar.gz) = c281877426a7e6a4e9d34b6836459af36d4481540cacf2be3965e8a857202034
-SIZE (buildbot-3.5.0.tar.gz) = 2450653
+TIMESTAMP = 1670858091
+SHA256 (buildbot-3.7.0.tar.gz) = 60c2d3d523fa35e9c9214553bebe7c195aed3571f0f9b85f80ca59bb7adebc6e
+SIZE (buildbot-3.7.0.tar.gz) = 2459736
diff --git a/devel/py-buildbot/files/buildbot.in b/devel/py-buildbot/files/buildbot.in
index c8b45f213cf3..74c4ebc47cba 100644
--- a/devel/py-buildbot/files/buildbot.in
+++ b/devel/py-buildbot/files/buildbot.in
@@ -7,20 +7,22 @@
 #
 # Add the following lines to /etc/rc.conf to enable buildbot:
 # buildbot_enable (bool):	Set to "NO" by default
-# buildbot_basedir (path):	Must be set to the path of the buildbot directory
-#				file, e.g. /var/www/buildbot
-# buildbot_user (str):		Set to "root" by default.  Change it to run
-#				buildbot as a different user.
+# buildbot_basedir (path):	Set to "/var/www/buildbot" by default
+# buildbot_user (str):		Set to "buildbot" by default.
 
 . /etc/rc.subr
 
 export PATH=${PATH}:%%PREFIX%%/bin
 
 name="buildbot"
+desc="Buildbot Master"
 rcvar=buildbot_enable
 command="%%PREFIX%%/bin/buildbot-%%PYTHON_VER%%"
 load_rc_config $name
 
+: ${buildbot_user:="buildbot"}
+: ${buildbot_basedir:="/var/db/buildbot"}
+
 check_cmd="${name}_check"
 extra_commands="check reload"
 reload_cmd="${name}_reload"
@@ -39,6 +41,12 @@ buildbot_check()
 
 buildbot_prestart()
 {
+    if [ ! -f "${buildbot_basedir}/${name}.tac" ]; then
+        su -m ${buildbot_user} -c "exec ${command} create-master ${buildbot_basedir}"
+    fi
+    if [ ! -f "${buildbot_basedir}/master.cfg" ]; then
+        install -o ${buildbot_user} -g ${buildbot_user} -m 750 ${buildbot_basedir}/master.cfg.sample ${buildbot_basedir}/master.cfg
+    fi
 	rc_flags="start ${buildbot_basedir} ${rc_flags}"
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212141419.2BEEJ3gX063329>