sysutils/rubygem-choria-mcorpc-support: Provide execution_wrapper(1) with choria, deprecate broken ports

The latest boost update broke some components used to run bolt tasks
through choria.  Since these components are legacy ones and have been
archived by their owner, we provide a compatible wrapper directly with
choria, and as these ports are only soft-dependencies for choria and are
broken, we deprecate and set an expiration date on the.

With hat:	puppet
This commit is contained in:
Romain Tartière 2025-03-08 16:35:55 -10:00
parent de2fb1fefd
commit 0d961a157f
No known key found for this signature in database
GPG key ID: BA4D1D955112336F
5 changed files with 39 additions and 1 deletions

View file

@ -11,6 +11,8 @@ LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN= fails to build with Boost>=1.87
DEPRECATED= Project got archived, broken
EXPIRATION_DATE=2025-05-08
LIB_DEPENDS= libboost_filesystem.so:devel/boost-libs \
libleatherman_json_container.so:devel/leatherman

View file

@ -10,6 +10,9 @@ WWW= https://github.com/puppetlabs/pxp-agent
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
DEPRECATED= Project got archived, dependencies are broken
EXPIRATION_DATE=2025-05-08
LIB_DEPENDS= liblibcpp-pcp-client.so:net/cpp-pcp-client \
libboost_thread.so:devel/boost-libs \
liblibcpp-hocon.so:devel/cpp-hocon \

View file

@ -1,5 +1,6 @@
PORTNAME= choria-mcorpc-support
DISTVERSION= 2.26.4
PORTREVISION= 1
CATEGORIES= sysutils rubygems
MASTER_SITES= RG
@ -17,6 +18,10 @@ RUN_DEPENDS= choria>=0.20.1:sysutils/choria \
NO_ARCH= yes
PLIST_FILES= bin/mco
PLIST_FILES= bin/mco \
bin/execution_wrapper
post-install:
${INSTALL_SCRIPT} ${FILESDIR}/execution_wrapper.rb ${STAGEDIR}${PRFIX}/bin
.include <bsd.port.mk>

View file

@ -0,0 +1,18 @@
#!/usr/bin/env ruby
require 'json'
data = JSON.parse(STDIN.read)
in_r, in_w = IO.pipe
in_w.sync = true
pid = Process.spawn({}, data['executable'], *data['arguments'], { in: in_r, out: data['stdout'], err: data['stderr'] })
in_w.write(data['input'])
in_w.close
Process.wait(pid)
exit_code = $?.exitstatus
File.write(data['exitcode'], exit_code)
exit(exit_code)

View file

@ -0,0 +1,10 @@
--- lib/mcollective/util/tasks_support.rb.orig 2025-03-09 01:41:22 UTC
+++ lib/mcollective/util/tasks_support.rb
@@ -294,6 +294,7 @@ module MCollective
pid = Process.fork
if pid.nil?
+ Process.initgroups(run_as, u.gid)
Process.gid = Process.egid = u.gid
Process.uid = Process.euid = u.uid
ENV.delete_if { |name| name !~ /^LC_/ }