FreeBSD Bugzilla – Attachment 257580 Details for
Bug 279003
[NEW PORT] sysutils/kleene-daemon Kleene backend component for managing containers on FreeBSD.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
c37936ff4e616804b7cefecd48d0e7f4a672238e from D49018
kleened.patch (text/plain), 9.14 KB, created by
Dave Cottlehuber
on 2025-02-16 15:09:16 UTC
(
hide
)
Description:
c37936ff4e616804b7cefecd48d0e7f4a672238e from D49018
Filename:
MIME Type:
Creator:
Dave Cottlehuber
Created:
2025-02-16 15:09:16 UTC
Size:
9.14 KB
patch
obsolete
>commit c37936ff4e616804b7cefecd48d0e7f4a672238e >Author: Dave Cottlehuber <dch@FreeBSD.org> >Date: Sat Feb 15 02:08:39 2025 +0000 > > sysutils/kleene-daemon: new port for container management > >diff --git sysutils/Makefile sysutils/Makefile >index 8393f7a14097..a299da15726f 100644 >--- sysutils/Makefile >+++ sysutils/Makefile >@@ -587,6 +587,7 @@ > SUBDIR += kiconvtool > SUBDIR += kldfind > SUBDIR += kldpatch >+ SUBDIR += kleene-daemon > SUBDIR += kopia > SUBDIR += kops > SUBDIR += kpmcore >diff --git sysutils/kleene-daemon/Makefile sysutils/kleene-daemon/Makefile >new file mode 100644 >index 000000000000..7e7e85ec0b68 >--- /dev/null >+++ sysutils/kleene-daemon/Makefile >@@ -0,0 +1,89 @@ >+PORTNAME= kleene-daemon >+DISTVERSIONPREFIX= v >+DISTVERSION= 0.1.0 >+DISTVERSIONSUFFIX= -rc.3 >+CATEGORIES= sysutils >+ >+MASTER_SITES+= https://builds.hex.pm/installs/1.16.0/:hex >+DISTFILES+= hex-${_HEXPM_VERSION}.ez:hex >+ >+MAINTAINER= lasse@philomath.dk >+COMMENT= Kleene backend daemon for managing containers on FreeBSD >+WWW= https://kleene.dev >+ >+LICENSE= APACHE20 BSD2CLAUSE >+LICENSE_COMB= multi >+ >+BUILD_DEPENDS= ca_root_nss>0:security/ca_root_nss \ >+ mix:lang/elixir \ >+ rebar3:devel/rebar3 >+ >+USES= gmake ssl >+USE_GITHUB= yes >+ >+GH_ACCOUNT= kleene-project >+GH_PROJECT= kleened >+USE_RC_SUBR= kleened >+ >+MAKE_ENV+= ERL_LIBS='' \ >+ HEX_HOME=${WRKDIR}/.hex \ >+ HEX_OFFLINE=true \ >+ LANG=en_US_UTF-8 \ >+ LC_ALL=en_US.UTF-8 \ >+ MIX_ARCHIVES=${WRKDIR} \ >+ MIX_ENV=prod \ >+ MIX_HOME=${WRKDIR}/.mix \ >+ MIX_PATH=${WRKDIR}/.mix/archives/hex-${_HEXPM_VERSION}/hex-${_HEXPM_VERSION}/ebin \ >+ MIX_REBAR3=${LOCALBASE}/bin/rebar3 >+ >+ETCDIR= ${PREFIX}/etc/kleened >+SUB_FILES= pkg-message >+PLIST_SUB= DISTVERSION=${DISTVERSION} >+ >+_HEXPM_VERSION= 2.1.1 >+_HEX_DIR= ${WRKDIR}/.mix/archives/hex-${_HEXPM_VERSION} >+_RELEASE_PATH= ${WRKSRC}/_build/prod/rel/kleened >+_RELEASE_BINARIES= escript dialyzer erlexec beam.smp heart dyn_erl to_erl \ >+ erlc epmd run_erl typer inet_gethost erl_child_setup \ >+ ct_run erl_call yielding_c_fun >+ >+.include <bsd.port.pre.mk> >+ >+post-extract: >+ ${MKDIR} ${_HEX_DIR} >+ ${MV} ${WRKDIR}/hex-* \ >+ ${_HEX_DIR}/ >+ >+do-build: >+ (cd ${WRKSRC} && \ >+ env ${MAKE_ENV} ${LOCALBASE}/bin/mix do deps.compile, compile, \ >+ release) >+ >+do-install: >+# sample configs >+ ${MKDIR} ${STAGEDIR}${ETCDIR} >+ ${INSTALL_DATA} ${WRKSRC}/example/kleened_config.yaml \ >+ ${STAGEDIR}${ETCDIR}/config.yaml.sample >+ ${INSTALL_DATA} ${WRKSRC}/example/pf.conf.kleene \ >+ ${STAGEDIR}${ETCDIR}/pf.conf.kleene.sample >+# the release >+ ${CP} -a ${WRKSRC}/_build/prod/rel/kleened ${STAGEDIR}${PREFIX}/libexec/ >+ ${INSTALL_PROGRAM} ${WRKSRC}/priv/bin/kleened_pty \ >+ ${STAGEDIR}${PREFIX}/libexec/kleened/bin/ >+ ${RM} ${STAGEDIR}${PREFIX}/libexec/kleened/bin/*.src >+# strip binaries and objects >+ ${FIND} ${STAGEDIR}${PREFIX}/libexec/kleened/lib -type f -name \ >+ *.so -exec ${STRIP_CMD} {} \; >+.for bin in ${_RELEASE_BINARIES} >+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/kleened/erts-*/bin/${bin} >+.endfor >+ >+post-install: >+ @cd ${STAGEDIR}${PREFIX} && \ >+ ${FIND} libexec/kleened/erts-* -type f -o -type l | \ >+ ${SORT} >> ${TMPPLIST} >+ @cd ${STAGEDIR}${PREFIX} && \ >+ ${FIND} libexec/kleened/lib/* -type f -o -type l | \ >+ ${SORT} >> ${TMPPLIST} >+ >+.include <bsd.port.post.mk> >diff --git sysutils/kleene-daemon/distinfo sysutils/kleene-daemon/distinfo >new file mode 100644 >index 000000000000..ca8d76e92602 >--- /dev/null >+++ sysutils/kleene-daemon/distinfo >@@ -0,0 +1,5 @@ >+TIMESTAMP = 1739714987 >+SHA256 (hex-2.1.1.ez) = 59c163c3e4efe4bdbb7029cd494e30c09b87beebc99359c175960cc4101beada >+SIZE (hex-2.1.1.ez) = 777696 >+SHA256 (kleene-project-kleened-v0.1.0-rc.3_GH0.tar.gz) = 8b4a0fc1707c542bf9025ad74419c09872df38fe0291dc981fb698630f79fa20 >+SIZE (kleene-project-kleened-v0.1.0-rc.3_GH0.tar.gz) = 5079955 >diff --git sysutils/kleene-daemon/files/kleened.in sysutils/kleene-daemon/files/kleened.in >new file mode 100644 >index 000000000000..081380d2f183 >--- /dev/null >+++ sysutils/kleene-daemon/files/kleened.in >@@ -0,0 +1,74 @@ >+#!/bin/sh >+# >+# PROVIDE: kleened >+# REQUIRE: LOGIN >+# KEYWORD: shutdown >+# >+# Add these lines to /etc/rc.conf.local or /etc/rc.conf >+# to enable and configure this service: >+# >+# kleened_enable (bool): Set to NO by default. >+# Set it to YES to enable kleened. >+# kleened_user (str): Set to "root" by default. >+# kleened_config (str): Path to config file. >+# Default: %%PREFIX%%/etc/kleened/config.yaml >+# kleened_shutdown_timeout (int): Seconds to wait for graceful shutdown. >+# Default: 60 >+ >+. /etc/rc.subr >+name=kleened >+rcvar=kleened_enable >+extra_commands="init dryinit" >+# kleened_init: Initialize host configuration >+# kleened_dryinit: Test host configuration without applying changes >+ >+required_files="${kleened_config}" >+ >+command="%%PREFIX%%/libexec/kleened/bin/kleened" >+pidfile="/var/run/kleened.pid" >+procname="$(/usr/bin/find %%PREFIX%%/libexec/kleened -name beam.smp)" >+ >+start_cmd="${command} daemon" >+status_cmd="${command} ping" >+stop_cmd="kleened_stop" >+init_cmd="kleened_init" >+dryinit_cmd="kleened_dryinit" >+ >+load_rc_config $name >+ >+: ${kleened_enable:=no} >+: ${kleened_user:="root"} >+: ${kleened_config:="%%ETCDIR%%/config.yaml"} >+: ${kleened_shutdown_timeout:=60} >+: ${kleened_env="LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 PATH=%%PREFIX%%/libexec/kleened/bin:${PATH}"} >+ >+kleened_stop() >+{ >+ echo "Stopping ${name}." >+ ${command} stop >+ wait_for_pids ${pidfile} ${kleened_shutdown_timeout} >+} >+ >+kleened_init() >+{ >+ echo "Initializing kleened host configuration..." >+ if %%PREFIX%%/libexec/kleened/bin/kleened eval "Kleened.Core.Config.initialize_host(%{dry_run: false})"; then >+ echo "Host initialization completed successfully" >+ else >+ echo "Host initialization failed" >+ return 1 >+ fi >+} >+ >+kleened_dryinit() >+{ >+ echo "Testing kleened host configuration..." >+ if %%PREFIX%%/libexec/kleened/bin/kleened eval "Kleened.Core.Config.initialize_host(%{dry_run: true})"; then >+ echo "Host configuration test completed successfully" >+ else >+ echo "Host configuration test failed" >+ return 1 >+ fi >+} >+ >+run_rc_command "$1" >diff --git sysutils/kleene-daemon/files/pkg-message.in sysutils/kleene-daemon/files/pkg-message.in >new file mode 100644 >index 000000000000..1cbc258054e2 >--- /dev/null >+++ sysutils/kleene-daemon/files/pkg-message.in >@@ -0,0 +1,33 @@ >+[ >+{ type: install >+ message: <<EOM >+Kleene is a new tool and should be used for >+testing and experimentation purposes only. >+ >+To use Kleened, enable it in rc.conf using >+ >+ sysrc kleened_enable=YES >+ >+Kleened requires certain services and kernel modules to be configured in order >+to work properly. Run >+ >+ service kleened init >+ >+to make Kleened automatically try and configure the host for you. >+Alternatively, run >+ >+ service kleened dryinit >+ >+to get an overview of what needs to be configured, without actually changing >+the host. >+ >+NB. The %%ETCDIR%%/config.yaml file should be edited before running >+ 'service kleened init' since some of the parameters are used during host >+ initialization. >+ >+You can then start Kleened by running: >+ >+ service kleened start >+EOM >+} >+] >diff --git sysutils/kleene-daemon/pkg-descr sysutils/kleene-daemon/pkg-descr >new file mode 100644 >index 000000000000..9127525a8c35 >--- /dev/null >+++ sysutils/kleene-daemon/pkg-descr >@@ -0,0 +1,3 @@ >+Backend daemon for Kleene. >+ >+Kleene is a container management tool for FreeBSD. >diff --git sysutils/kleene-daemon/pkg-plist sysutils/kleene-daemon/pkg-plist >new file mode 100644 >index 000000000000..01606c00de05 >--- /dev/null >+++ sysutils/kleene-daemon/pkg-plist >@@ -0,0 +1,27 @@ >+@sample %%ETCDIR%%/config.yaml.sample >+@sample %%ETCDIR%%/pf.conf.kleene.sample >+libexec/kleened/bin/kleened >+libexec/kleened/bin/kleened_pty >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.Collectable.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.DBConnection.Query.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.Enumerable.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.IEx.Info.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.Inspect.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.Jason.Encoder.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.List.Chars.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.OpenApiSpex.Extendable.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.Plug.Exception.beam >+libexec/kleened/releases/%%DISTVERSION%%/consolidated/Elixir.String.Chars.beam >+libexec/kleened/releases/%%DISTVERSION%%/elixir >+libexec/kleened/releases/%%DISTVERSION%%/env.sh >+libexec/kleened/releases/%%DISTVERSION%%/iex >+libexec/kleened/releases/%%DISTVERSION%%/kleened.rel >+libexec/kleened/releases/%%DISTVERSION%%/remote.vm.args >+libexec/kleened/releases/%%DISTVERSION%%/start.boot >+libexec/kleened/releases/%%DISTVERSION%%/start.script >+libexec/kleened/releases/%%DISTVERSION%%/start_clean.boot >+libexec/kleened/releases/%%DISTVERSION%%/start_clean.script >+libexec/kleened/releases/%%DISTVERSION%%/sys.config >+libexec/kleened/releases/%%DISTVERSION%%/vm.args >+libexec/kleened/releases/COOKIE >+libexec/kleened/releases/start_erl.data
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 279003
:
250675
|
251860
|
252919
|
256439
| 257580