diff options
| author | Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org> | 2026-05-06 05:16:58 +0000 |
|---|---|---|
| committer | Jesús Daniel Colmenares Oviedo <dtxdf@FreeBSD.org> | 2026-05-06 05:18:45 +0000 |
| commit | 3acfcd35b468c9fd7fdbf6d4e56f0f04d3c2a4dd (patch) | |
| tree | 5cf25c2e9c25599e13b78dfb71ba02eb647e2384 | |
| parent | 25ee54fce1d39cc0c5018abaca9e07b8fea269d3 (diff) | |
sysutils/prokshy: New port: Small and lightweight bhyve agent
prokshy is a small and lightweight script that uses unixexec to
exchange data through the special character file (/dev/vtcon/prokshy)
created by virtio_console(4). This script is designed to "standardize"
the way a command is executed from the host into the virtual machine.
The host connects to the unix(4) socket created by bhyve(8) and
then sends a command, a space, and then the data (or the command’s
argument). prokshy doesn’t care about the argument format: you can
use netstring, JSON, base64, or any other format that can be sent
for the command you’ve created. That’s the other advantage of
prokshy: it allows you to implement a "command," making it truly
flexible.
WWW: https://github.com/DtxdF/prokshy
| -rw-r--r-- | sysutils/Makefile | 1 | ||||
| -rw-r--r-- | sysutils/prokshy/Makefile | 63 | ||||
| -rw-r--r-- | sysutils/prokshy/distinfo | 3 | ||||
| -rw-r--r-- | sysutils/prokshy/pkg-descr | 11 |
4 files changed, 78 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index a7154122eff2..177f2a12bdf3 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1017,6 +1017,7 @@ SUBDIR += procmap SUBDIR += procs SUBDIR += progress + SUBDIR += prokshy SUBDIR += pslist SUBDIR += psmisc SUBDIR += pstack diff --git a/sysutils/prokshy/Makefile b/sysutils/prokshy/Makefile new file mode 100644 index 000000000000..17e474b6d37a --- /dev/null +++ b/sysutils/prokshy/Makefile @@ -0,0 +1,63 @@ +PORTNAME= prokshy +DISTVERSIONPREFIX= v +DISTVERSION= 0.1.0 +CATEGORIES= sysutils + +MAINTAINER= dtxdf@FreeBSD.org +COMMENT= Small and lightweight bhyve agent (${FLAVOR}) + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +FLAVORS= rc cli +FLAVOR?= ${FLAVORS:[1]} + +cli_PKGNAMESUFFIX= -cli +cli_CONFLICTS_INSTALL= ${PORTNAME} +rc_RUN_DEPENDS= unixexec:sysutils/unixexec +rc_CONFLICTS_INSTALL= ${PORTNAME}-cli + +.if ${FLAVOR} == cli +USES= python shebangfix +.endif +USE_GITHUB= yes +GH_ACCOUNT= DtxdF + +.if ${FLAVOR} == cli +SHEBANG_FILES= cli.py +.endif + +NO_ARCH= yes +NO_BUILD= yes + +.if ${FLAVOR} == rc +PLIST_FILES= etc/rc.d/${PORTNAME} \ + libexec/${PORTNAME}/main.sh +.elif ${FLAVOR} == cli +PLIST_FILES= bin/${PORTNAME} +.endif +PORTDOCS= README.md + +OPTIONS_DEFINE= DOCS + +post-patch: +.if ${FLAVOR} == rc +.for script in prokshy.rc main.sh + @${REINPLACE_CMD} "s|/usr/local|${PREFIX}|g" ${WRKSRC}/${script} +.endfor +.endif + +do-install: +.if ${FLAVOR} == rc + ${INSTALL_SCRIPT} ${WRKSRC}/prokshy.rc ${STAGEDIR}${PREFIX}/etc/rc.d/${PORTNAME} + @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME} + ${INSTALL_SCRIPT} ${WRKSRC}/main.sh ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/main.sh +.elif ${FLAVOR} == cli + ${INSTALL_SCRIPT} ${WRKSRC}/cli.py ${STAGEDIR}${PREFIX}/bin/${PORTNAME} +.endif + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}/${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}/${DOCSDIR} + +.include <bsd.port.mk> diff --git a/sysutils/prokshy/distinfo b/sysutils/prokshy/distinfo new file mode 100644 index 000000000000..0872aa696fc7 --- /dev/null +++ b/sysutils/prokshy/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1778043174 +SHA256 (DtxdF-prokshy-v0.1.0_GH0.tar.gz) = 0b3f182ad93a6c4a3e709c0ffa3050614b294f7aca1ec76eafe1e0d6216847bb +SIZE (DtxdF-prokshy-v0.1.0_GH0.tar.gz) = 5142 diff --git a/sysutils/prokshy/pkg-descr b/sysutils/prokshy/pkg-descr new file mode 100644 index 000000000000..1cc87a3b2319 --- /dev/null +++ b/sysutils/prokshy/pkg-descr @@ -0,0 +1,11 @@ +prokshy is a small and lightweight script that uses unixexec to +exchange data through the special character file (/dev/vtcon/prokshy) +created by virtio_console(4). This script is designed to "standardize" +the way a command is executed from the host into the virtual machine. +The host connects to the unix(4) socket created by bhyve(8) and +then sends a command, a space, and then the data (or the command’s +argument). prokshy doesn’t care about the argument format: you can +use netstring, JSON, base64, or any other format that can be sent +for the command you’ve created. That’s the other advantage of +prokshy: it allows you to implement a "command," making it truly +flexible. |
