Skip to content

Commit

Permalink
Rebrand to porch(1)
Browse files Browse the repository at this point in the history
There's a rust lib named orch(1) that's been released in the time since
I started working on this, so rebrand to porch(1) to deconflict.

porch ~ (p)rogram (orch)estration, and it still uses .orch scripts in the
porch(1) driver mode.
  • Loading branch information
kevans91 committed Aug 16, 2024
1 parent 5c80b25 commit 34ac390
Show file tree
Hide file tree
Showing 37 changed files with 496 additions and 496 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build orch
name: Build porch
on:
push:
branches: ['**']
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
run: |
mkdir build
cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..
- name: build orch(1)
- name: build porch(1)
run: make -C build
- name: Run self-tests
run: make -C build check
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint orch.lua
name: Lint porch.lua
on:
push:
branches: ['**']
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ build
*.full
*.gz
.depend*
orch
porch
ktrace.out
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.18)

project(orch)
project(porch)

find_package("Lua")

Expand All @@ -14,19 +14,19 @@ set(LUA_MODSHAREDIR "share/lua/${LUA_VERSION_MAJOR}.${LUA_VERSION_MINOR}"
CACHE PATH "Path to install lua modules into")
if(IS_ABSOLUTE "${LUA_MODSHAREDIR}")
set(ORCHLUA_PATH "${LUA_MODSHAREDIR}"
CACHE PATH "Path to install orch.lua into")
CACHE PATH "Path to install porch.lua into")
else()
set(ORCHLUA_PATH "${CMAKE_INSTALL_PREFIX}/${LUA_MODSHAREDIR}"
CACHE PATH "Path to install orch.lua into")
CACHE PATH "Path to install porch.lua into")
endif()
set(ORCHLUA_BINDIR "bin"
CACHE PATH "Path to install orch(1) into")
CACHE PATH "Path to install porch(1) into")
set(ORCHLUA_EXAMPLESDIR "share/examples/${CMAKE_PROJECT_NAME}"
CACHE PATH "Path to install .orch examples into")

option(EXAMPLES "Install examples" ON)
option(MANPAGES "Install manpages" ON)
option(BUILD_DRIVER "Build the orch(1) driver" ON)
option(BUILD_DRIVER "Build the porch(1) driver" ON)

set(warnings "-Wall -Wextra -Werror")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# orch
# porch

Orch is a program orchestration tool, inspired by expect(1) but scripted with
Porch 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.

The authoritative source for this software is located at
https://git.kevans.dev/kevans/orch, but it's additionally mirrored to
[GitHub](https://github.com/kevans91/orch) for user-facing interactions. Pull
https://git.kevans.dev/kevans/porch, but it's additionally mirrored to
[GitHub](https://github.com/kevans91/porch) for user-facing interactions. Pull
requests and Issues are open on GitHub.

orch(1) strives to be portable. Currently supported platforms:
porch(1) strives to be portable. Currently supported platforms:
- FreeBSD
- OpenBSD
- NetBSD
Expand All @@ -20,11 +20,11 @@ orch(1) strives to be portable. Currently supported platforms:

## Notes for porting

We build on all of the above platforms. To build and actually use orch, one
We build on all of the above platforms. To build and actually use porch, one
needs:

- cmake
- liblua + headers (orch(1) supports 5.2+)
- liblua + headers (porch(1) supports 5.2+)
- a compiler
- this source tree

Expand Down
2 changes: 1 addition & 1 deletion examples/cat.orch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Executed like `./orch -f cat.orch -- cat` -- this one won't spawn anything
-- Executed like `./porch -f cat.orch -- cat` -- this one won't spawn anything
-- itself, so it must be done on the command line.

-- We get released on first match anyways, so this doesn't need to be called:
Expand Down
2 changes: 1 addition & 1 deletion examples/nc.orch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S orch -f
#!/usr/bin/env -S porch -f

-- On the same machine, open up `nc -l 9999` and play with it.
spawn("nc", "localhost", "9999")
Expand Down
12 changes: 6 additions & 6 deletions include/orch.h → include/porch.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

#include <lua.h>

#define ORCHLUA_MODNAME "orch.core"
#define ORCHTTY_MODNAME "orch.tty"
#define PORCHLUA_MODNAME "porch.core"
#define PORCHTTY_MODNAME "porch.tty"

/* sys/cdefs.h */
#ifndef __unused
Expand All @@ -24,7 +24,7 @@
__attribute__((__format__ (__printf__, fmtarg, firstvararg)))
#endif

/* orch_compat.c */
/* porch_compat.c */
#ifdef __linux__
size_t strlcpy(char * __restrict, const char * __restrict, size_t);
size_t strlcat(char * __restrict, const char * __restrict, size_t);
Expand All @@ -34,6 +34,6 @@ size_t strlcat(char * __restrict, const char * __restrict, size_t);
int tcsetsid(int, int);
#endif

/* orch_lua.c */
int luaopen_orch_core(lua_State *);
int luaopen_orch_tty(lua_State *);
/* porch_lua.c */
int luaopen_porch_core(lua_State *);
int luaopen_porch_tty(lua_State *);
2 changes: 1 addition & 1 deletion lib/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!orch/
!porch/
*.so
*.so.*
*.pico
6 changes: 3 additions & 3 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
add_subdirectory(core)
add_subdirectory(orch)
add_subdirectory(porch)

install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/orch.lua"
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/porch.lua"
DESTINATION "${LUA_MODSHAREDIR}")
file(GLOB lua_SOURCES
"${CMAKE_CURRENT_SOURCE_DIR}/*.lua"
"${CMAKE_CURRENT_SOURCE_DIR}/orch/*.lua")
"${CMAKE_CURRENT_SOURCE_DIR}/porch/*.lua")

add_custom_target(lint
COMMAND echo LINTING FOR LUA 5.3
Expand Down
4 changes: 2 additions & 2 deletions lib/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(core_INCDIRS
"${LUA_INCLUDE_DIR}")

target_include_directories(core PRIVATE ${core_INCDIRS})
# orch(1) will link against the static lib
# porch(1) will link against the static lib
target_include_directories(core_static PRIVATE ${core_INCDIRS})

target_link_libraries(core "${LUA_LIBRARIES}")
Expand All @@ -29,4 +29,4 @@ target_compile_options(core PUBLIC -fno-sanitize=all)
target_link_options(core PUBLIC -fno-sanitize=all)

install(TARGETS core
DESTINATION "${LUA_MODLIBDIR}/orch")
DESTINATION "${LUA_MODLIBDIR}/porch")
2 changes: 1 addition & 1 deletion lib/core/orch_compat.c → lib/core/forch_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <string.h>

#include "orch.h"
#include "porch.h"

#ifdef __linux__
/* $OpenBSD: strlcpy.c,v 1.12 2015/01/15 03:54:12 millert Exp $ */
Expand Down
Loading

0 comments on commit 34ac390

Please sign in to comment.