From nobody Thu Jan 18 02:34:58 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TFn030bh8z57PjC; Thu, 18 Jan 2024 02:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TFn03035hz4kVl; Thu, 18 Jan 2024 02:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705545299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+V4zQZZHxU4PSf4AHA+GzxC30rLatv+GYBytAlVYJS8=; b=J9aRdsDWXo2sCssjcluAJMKpLstLm9DFWkCI8fgj6Sz+NbK3N2/qWLvmd392uLv306yh8I k2KnQIC6E42Vp0VhYLQFZLUL67jaSQgSDsEViHbYiAIfIV3ZsWjUIZofueMPWfOatmpLu3 bc6teiA5ebqXRs7/OeoLSXESs+cwfXhay12Hc5KOsgL84+sbW6nMp7jOrTOeNP1qd/H2M9 ho4BZFuy3M6qZA0HiEshlV5WDy8Mrj0LN2H8gjja6EPXf7RjsaSlljvTunymSaWIawYxGv SPt/A2SOKYLdXHVUz2LPdYrhcVW8b5//vButRVOhWPx29dNiv7Nn1z6A2k3Bbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705545299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+V4zQZZHxU4PSf4AHA+GzxC30rLatv+GYBytAlVYJS8=; b=I49kxtQTsIp3EYNRRqWaoRNx/7GLYNMOKP5dP8jInXSpny+QhOfZ2qAsVK11xQu/kKUu0m sIgdEVNd7V1ZZtGxwvOLY8igxrr1CFxIayJPTuSY75Sn2L7+HG3QxSJkPCeMxe83wqqgWp l0aU6uaOyT1iPGUE4EL+PlFmxIJtv+rmTLSdc/p1pbZPHsMdUroZ2kzeWJf7d6NwF6shf2 mGPw09UzXFoewHqvw0yA2AVmoeyfzBzsNcUhVRL7AV7LrpAtjvrk+aiAncsWKR3ZFdgJus nhm1qbE38d/ieXW/n00fmCJaSe/+jzhQwmYhbP4gRhd5rOeKM62FhKVlV6qaDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705545299; a=rsa-sha256; cv=none; b=GxhvPdAMHepU7QEVuc7Ux5TfZ6KT8+rFW8f6dN7MOLtmY4VDk/Dl5JBLVREHeDzE+rhd0t zY4i4yBcW5/cs6Rzij5vL3xlNMKQF6BT0feNBube11IaMbS3yUfoJwCsvZignZHp8SgGdr CrbQsAGEdWKZi+dxRKNuw9UIXZrbk6c9p4vvKo9FcaNXTUQ/GJLnmoQMqRTXURC8GxwObp qrrulRMsvXN4678CJ8KvyB7Em/L+7LKoab2zZsUhWb0YkZJYnkXUSqZOqiRpln06X9bBeW pU0XP5YphvPa41dPsgRGPWsuswgS5QU4oDJv4k79PdUiqMXRe+O/rBu0l8vYsA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TFn026BmszpZS; Thu, 18 Jan 2024 02:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40I2YwAr086573; Thu, 18 Jan 2024 02:34:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40I2YwSY086571; Thu, 18 Jan 2024 02:34:58 GMT (envelope-from git) Date: Thu, 18 Jan 2024 02:34:58 GMT Message-Id: <202401180234.40I2YwSY086571@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kyle Evans Subject: git: c721369988fc - main - sysutils/orch: add a new port for program orchestration List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c721369988fc8a9c959a7dc64fa5060812ee5ebe Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/ports/commit/?id=c721369988fc8a9c959a7dc64fa5060812ee5ebe commit c721369988fc8a9c959a7dc64fa5060812ee5ebe Author: Kyle Evans AuthorDate: 2024-01-18 02:33:24 +0000 Commit: Kyle Evans CommitDate: 2024-01-18 02:33:41 +0000 sysutils/orch: add a new port for program orchestration Inspired by expect(1) but with its own syntax, orch allows program orchestration via a pts(4) pseudo-terminal driven by similar write/match patterns as with it source of inspiration. This is still in relatively early development, but already it has a fair amount of useful features. Feedback is welcome, examples can be found both in the manpage as well as /usr/local/share/orch/examples. Other practical examples can be found at: https://git.kevans.dev/kevans/tty-tests --- sysutils/Makefile | 1 + sysutils/orch/Makefile | 37 +++++++++++++++++++++++++++++++++++++ sysutils/orch/distinfo | 3 +++ sysutils/orch/pkg-descr | 5 +++++ sysutils/orch/pkg-plist | 5 +++++ 5 files changed, 51 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 7c014e8bc4fc..0ce06a27edca 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -860,6 +860,7 @@ SUBDIR += openupsd SUBDIR += openzfs SUBDIR += openzfs-kmod + SUBDIR += orch SUBDIR += osinfo-db-tools SUBDIR += p5-App-Regather SUBDIR += p5-App-RunCron diff --git a/sysutils/orch/Makefile b/sysutils/orch/Makefile new file mode 100644 index 000000000000..34e68d19500b --- /dev/null +++ b/sysutils/orch/Makefile @@ -0,0 +1,37 @@ +PORTNAME= orch +PORTVERSION= 0.1 +CATEGORIES= sysutils +MASTER_SITES= https://git.kevans.dev/kevans/${PORTNAME}/archive/${PORTVERSION}.tar.gz?dummy=/ + +MAINTAINER= kevans@FreeBSD.org +COMMENT= Program orchestration tool scripted with lua +WWW= https://git.kevans.dev/kevans/orch + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= lua:52-54 uidfix + +WRKSRC= ${WRKDIR}/${PORTNAME} + +ORCHLUA_PATH= ${PREFIX}/share/${PORTNAME} + +MAKE_ENV+= BINDIR="${PREFIX}/bin" \ + EXAMPLESDIR="${ORCHLUA_PATH}/examples" \ + MANDIR="${PREFIX}/share/man/man" \ + LUA_INCDIR="${LUA_INCDIR}" \ + LUA_LIB="-L${LUA_LIBDIR} -llua-${LUA_VER}" \ + ORCHLUA_PATH="${ORCHLUA_PATH}" + +.include + +# uidfix won't cover custom directories like this, so we'll hit it ourselves. +.if ${UID} != 0 +MAKE_ENV+= FILESDIR_OWN=${UID} FILESDIR_GRP=${GID} +MAKE_ENV+= EXAMPLESDIR_OWN=${UID} EXAMPLESDIR_GRP=${GID} +.endif + +pre-install: + ${MKDIR} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/share/man/man1 + +.include diff --git a/sysutils/orch/distinfo b/sysutils/orch/distinfo new file mode 100644 index 000000000000..52af1438de94 --- /dev/null +++ b/sysutils/orch/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1705544817 +SHA256 (orch-0.1.tar.gz) = c4c058f73324f883c9b823639664a97380bd041dbc4dfd646be325a99305aa64 +SIZE (orch-0.1.tar.gz) = 20134 diff --git a/sysutils/orch/pkg-descr b/sysutils/orch/pkg-descr new file mode 100644 index 000000000000..19b23204df2e --- /dev/null +++ b/sysutils/orch/pkg-descr @@ -0,0 +1,5 @@ +Orch is a program orchestration tool, inspired by expect(1) but scripted with +lua. This utility allows scripted manipulation of programs for, e.g., testing +or automation purposes. Orch drives spawn processes over a pts(4) +pseudo-terminal, which allows for a broader range of interactions with a program +under orchestration. diff --git a/sysutils/orch/pkg-plist b/sysutils/orch/pkg-plist new file mode 100644 index 000000000000..6fda20d6d435 --- /dev/null +++ b/sysutils/orch/pkg-plist @@ -0,0 +1,5 @@ +bin/orch +share/orch/examples/cat.orch +share/orch/examples/nc.orch +share/orch/orch.lua +share/man/man1/orch.1.gz