mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
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:
parent
de2fb1fefd
commit
0d961a157f
5 changed files with 39 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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>
|
||||
|
|
18
sysutils/rubygem-choria-mcorpc-support/files/execution_wrapper.rb
Executable file
18
sysutils/rubygem-choria-mcorpc-support/files/execution_wrapper.rb
Executable 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)
|
|
@ -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_/ }
|
Loading…
Add table
Reference in a new issue