diff --git a/devel/py-buildbot-worker/Makefile b/devel/py-buildbot-worker/Makefile index 8fc5f667f575..040cd0ef29d7 100644 --- a/devel/py-buildbot-worker/Makefile +++ b/devel/py-buildbot-worker/Makefile @@ -1,50 +1,47 @@ PORTNAME= buildbot-worker -DISTVERSION= 3.11.9 -PORTREVISION= 1 +DISTVERSION= 4.3.0 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= buildbot_worker-${DISTVERSION} MAINTAINER= bofh@FreeBSD.org COMMENT= Buildbot Worker Daemon WWW= https://buildbot.net LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}autobahn>=20.12.3:www/py-autobahn@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}future>=0:devel/py-future@${PY_FLAVOR} \ +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}autobahn>=0.16.0:www/py-autobahn@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}msgpack>0.6.0:devel/py-msgpack@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}twisted>=17.9.0:devel/py-twisted@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}twisted>=21.2.0:devel/py-twisted@${PY_FLAVOR} TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} USES= python USE_PYTHON= autoplist concurrent distutils USE_RC_SUBR= buildbot-worker NO_ARCH= yes SUB_LIST+= PYTHON_CMD=${PYTHON_CMD} \ PYTHON_VER=${PYTHON_VER} -BUILDBOT_REMOVE_ME= ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}/buildbot_worker - USERS= buildbot GROUPS= buildbot POST_PLIST+= fix-plist PLIST_FILES= share/man/man1/buildbot-worker.1.gz # XXX fixup plist. see: # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205056 fix-plist: - ${REINPLACE_CMD} -e 's|^${BUILDBOT_REMOVE_ME}$$||' ${TMPPLIST} + ${REINPLACE_CMD} -e '/^buildbot_worker/d' ${TMPPLIST} post-install: ${INSTALL_MAN} ${WRKSRC}/docs/buildbot-worker.1 ${STAGEDIR}${PREFIX}/share/man/man1 + ${RM} -rf ${STAGEDIR}${PREFIX}/buildbot_worker do-test: ${MKDIR} ${WRKDIR}/tmp cd ${WRKDIR}/tmp && PYTHONPATH=${WRKSRC} ${PYTHON_CMD} -m twisted.trial buildbot_worker.test .include diff --git a/devel/py-buildbot-worker/distinfo b/devel/py-buildbot-worker/distinfo index c61f171813f3..0aa80374e85c 100644 --- a/devel/py-buildbot-worker/distinfo +++ b/devel/py-buildbot-worker/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1728972057 -SHA256 (buildbot_worker-3.11.9.tar.gz) = beccbfb63960b3f713f0219e8ce5a8d25f9efc604fc34dc04899729fd3f7e2b0 -SIZE (buildbot_worker-3.11.9.tar.gz) = 133480 +TIMESTAMP = 1751293161 +SHA256 (buildbot_worker-4.3.0.tar.gz) = 14f5e806c32ef9669e58a3398e9d53ca54fa9080cd6f04956fed1e251da9f4dc +SIZE (buildbot_worker-4.3.0.tar.gz) = 135399 diff --git a/devel/py-buildbot-worker/files/buildbot-worker.in b/devel/py-buildbot-worker/files/buildbot-worker.in index d9334140c7cf..18f80be2a626 100644 --- a/devel/py-buildbot-worker/files/buildbot-worker.in +++ b/devel/py-buildbot-worker/files/buildbot-worker.in @@ -1,131 +1,131 @@ #!/bin/sh # PROVIDE: buildbot-worker # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable buildbot-worker: # # buildbot_worker_enable (bool): Set to "YES" to enable buildbot-worker. # Default: "NO" # buildbot_worker_flags (flags): Set extra command flags here. See buildbot-worker(8) # Default: Empty (""). # buildbot_worker_user (user): User to run buildbot-worker as. # Default: "buildbot" # buildbot_worker_basedir (path): Location for buildbot-worker base directory # Default: /usr/local/etc/buildbot-worker # buildbot_worker_profiles (str): Define profiles names. Space-delimited. # Default: Empty ("") # # This rc.d script supports multiple "profiles". When profiles are # specified, the non-profile specific parameters become defaults. # # Example: # # buildbot_worker_profiles="foo bar" # # buildbot_worker_foo_enable="YES" # buildbot_worker_foo_basedir="/var/db/buildbot/workers/foo" # buildbot_worker_foo_user="foo" # # buildbot_worker_bar_enable="YES" # buildbot_worker_bar_basedir="/var/db/buildbot/workers/bar" . /etc/rc.subr export PATH=${PATH}:%%LOCALBASE%%/bin name="buildbot_worker" desc="Buildbot Buildworker" rcvar=buildbot_worker_enable command="/usr/local/bin/buildbot-worker" load_rc_config ${name} # These are just the defaults, they might get overriden for a specific profile. eval ": \${${name}_enable:=\"NO\"}" eval ": \${${name}_flags:=\"\"}" eval ": \${${name}_user:=\"buildbot\"}" eval ": \${${name}_basedir:=\"/var/db/buildbot/workers\"}" reload_cmd="${name}_reload" start_precmd="${name}_prestart" stop_precmd="${name}_prestop" pidfile="${buildbot_worker_basedir}/twistd.pid" procname="%%PYTHON_CMD%%" # A specific profile is specified in the command if [ -n "$2" ]; then profile="$2" # Override defaults with profile-specific values if [ -n "${buildbot_worker_profiles}" ]; then eval buildbot_worker_enable="\${buildbot_worker_${profile}_enable:-${buildbot_worker_enable}}" eval buildbot_worker_flags="\${buildbot_worker_${profile}_flags:-${buildbot_worker_flags}}" eval buildbot_worker_user="\${buildbot_worker_${profile}_user:-${buildbot_worker_user}}" eval buildbot_worker_basedir="\${buildbot_worker_${profile}_basedir:-${buildbot_worker_basedir}/${profile}}" eval pidfile="\${buildbot_worker_${profile}_basedir:-${buildbot_worker_basedir}}/twistd.pid" else echo "$0: extra argument ignored" fi # A specific profile is not in the command else # Check if any profiles are defined if [ -n "$1" -a -n "${buildbot_worker_profiles}" ]; then # Loop through them for profile in ${buildbot_worker_profiles}; do eval _enable="\${buildbot_worker_${profile}_enable}" case "${_enable:-${buildbot_worker_enable}}" in [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) continue ;; [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;; *) if test -z "$_enable"; then _var=buildbot_worker_enable else _var=buildbot_worker_"${profile}"_enable fi warn "Bad value" \ "'${_enable:-${buildbot_worker_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> ${name} profile: ${profile}" - if $0 $1 ${profile}; then + if /usr/sbin/service buildbot-worker $1 ${profile}; then success="${profile} ${success:-}" else failed="${profile} (${retcode}) ${failed:-}" fi done # Exit so that non-profile rc.d is not started when there are profiles exit 0 fi fi buildbot_worker_prestart() { if [ ! -f "${buildbot_worker_basedir}/buildbot.tac" ]; then echo "Worker is not configured." echo "Run the following command to create a new worker:" echo "su -m ${buildbot_worker_user} -c \"exec ${command} create-worker ${buildbot_worker_basedir} \"" exit 1 fi - rc_flags="start ${buildbot_worker_basedir} ${rc_flags}" + rc_flags="start ${rc_flags} ${buildbot_worker_basedir}" } buildbot_worker_prestop() { - rc_flags="stop ${buildbot_worker_basedir} ${rc_flags}" + rc_flags="stop ${rc_flags} ${buildbot_worker_basedir}" } buildbot_worker_reload() { - rc_flags="${buildbot_worker_basedir} ${rc_flags}" + rc_flags="${rc_flags} ${buildbot_worker_basedir}" ${command} sighup ${rc_flags} } run_rc_command "$1" diff --git a/devel/py-buildbot-worker/files/patch-setup.py b/devel/py-buildbot-worker/files/patch-setup.py new file mode 100644 index 000000000000..d9aa0b88b9ae --- /dev/null +++ b/devel/py-buildbot-worker/files/patch-setup.py @@ -0,0 +1,54 @@ +--- setup.py.orig 2025-06-30 14:40:44 UTC ++++ setup.py +@@ -25,23 +25,30 @@ from setuptools.command.sdist import sdist + from setuptools import Command + from setuptools import setup + from setuptools.command.sdist import sdist ++try: ++ from setuptools.command.install_data import install_data ++except ImportError: ++ from distutils.command.install_data import install_data + + from buildbot_worker import version + + BUILDING_WHEEL = bool("bdist_wheel" in sys.argv) + + +-class our_install_data(Command): ++class our_install_data(install_data): + def initialize_options(self): ++ super().initialize_options() + self.install_dir = None + + def finalize_options(self): ++ super().finalize_options() + self.set_undefined_options( + 'install', + ('install_lib', 'install_dir'), + ) + + def run(self): ++ super().run() + # ensure there's a buildbot_worker/VERSION file + fn = os.path.join(self.install_dir, 'buildbot_worker', 'VERSION') + with open(fn, 'w') as f: +@@ -121,8 +128,6 @@ setup_args = { + 'entry_points': { + 'console_scripts': [ + 'buildbot-worker=buildbot_worker.scripts.runner:run', +- # this will also be shipped on non windows :-( +- 'buildbot_worker_windows_service=buildbot_worker.scripts.windows_service:HandleCommandLine', + ] + }, + } +@@ -143,10 +148,6 @@ setup_args['install_requires'] += [ + 'autobahn >= 0.16.0', + 'msgpack >= 0.6.0', + ] +- +-# buildbot_worker_windows_service needs pywin32 +-if sys.platform == "win32": +- setup_args['install_requires'].append('pywin32') + + # Unit test hard dependencies. + test_deps = [