SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,31 @@
COMMENT = platform agnostic command and shell execution tool
MODPY_EGG_VERSION = 1.4.0
GH_ACCOUNT = netinvent
GH_PROJECT = command_runner
GH_TAGNAME = v${MODPY_EGG_VERSION}
DISTNAME = command_runner-${MODPY_EGG_VERSION}
PKGNAME = py-${DISTNAME}
REVISION = 0
CATEGORIES = sysutils
HOMEPAGE = https://github.com/netinvent/command_runner
# BSD
PERMIT_PACKAGE = Yes
MODULES = lang/python
# exists on PyPI but has no tests
#MODPY_PI = Yes
MODPY_PYBUILD = setuptools
MODPY_PYTEST = Yes
FLAVORS = python3
FLAVOR = python3
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (command_runner-1.4.0.tar.gz) = DPw4FCEKWWmT3A8Lb2PcYm4q2gZ6nwVbEZ1iJJ80l7s=
SIZE (command_runner-1.4.0.tar.gz) = 30244

View file

@ -0,0 +1,14 @@
https://github.com/netinvent/command_runner/pull/19
Index: command_runner/__init__.py
--- command_runner/__init__.py.orig
+++ command_runner/__init__.py
@@ -987,7 +987,7 @@ def deferred_command(command, defer_time=300):
if os.name == "nt":
deferrer = "ping 127.0.0.1 -n {} > NUL & ".format(defer_time)
else:
- deferrer = "ping 127.0.0.1 -c {} > /dev/null && ".format(defer_time)
+ deferrer = "sleep {} && ".format(defer_time)
# We'll create a independent shell process that will not be attached to any stdio interface
# Our command shall be a single string since shell=True

View file

@ -0,0 +1,27 @@
From 41df37eb00197567768f9e82ee9c0006f8dbcb1d Mon Sep 17 00:00:00 2001
From: Stuart Henderson <sthen@users.noreply.github.com>
Date: Sat, 20 Aug 2022 10:59:45 +0000
Subject: [PATCH] use standard ping(8) arguments in tests
Change the command line for ping in tests.
Traditional UNIX ping only accepts flags before the address.
Index: tests/test_command_runner.py
--- tests/test_command_runner.py.orig
+++ tests/test_command_runner.py
@@ -54,11 +54,11 @@ if os.name == 'nt':
PRINT_FILE_CMD = 'type {}'.format(test_filename)
else:
ENCODING = 'utf-8'
- PING_CMD = ['ping', '127.0.0.1', '-c', '4']
- PING_CMD_REDIR = 'ping 127.0.0.1 -c 4 1>&2'
- PING_CMD_AND_FAILURE = 'ping 0.0.0.0 -c 2 1>&2; ping 127.0.0.1 -c 2'
+ PING_CMD = ['ping', '-c', '4', '127.0.0.1']
+ PING_CMD_REDIR = 'ping -c 4 127.0.0.1 1>&2'
+ PING_CMD_AND_FAILURE = 'ping -c 2 0.0.0.0 1>&2; ping -c 2 127.0.0.1'
PRINT_FILE_CMD = 'cat {}'.format(test_filename)
- PING_FAILURE = 'ping 0.0.0.0 -c 2 1>&2'
+ PING_FAILURE = 'ping -c 2 0.0.0.0 1>&2'
ELAPSED_TIME = timestamp(datetime.now())

View file

@ -0,0 +1,17 @@
command_runner's purpose is to run external commands from Python, just
like "subprocess" on which it relies, while solving various problems a
developer may face, including:
- Handling of all possible subprocess.popen / subprocess.check_output
scenarios / python versions in one handy function without encoding /
timeout hassle.
- Allow stdout/stderr stream output to be redirected to callback
functions / output queues / files so you get to handle output in your
application while commands are running.
- Callback to optional stop check so we can stop execution from outside
command_runner.
- Callback with optional process information so we get to control the
process from outside command_runner.

View file

@ -0,0 +1,14 @@
lib/python${MODPY_VERSION}/site-packages/command_runner/
lib/python${MODPY_VERSION}/site-packages/command_runner-${MODPY_EGG_VERSION}.dist-info/
lib/python${MODPY_VERSION}/site-packages/command_runner-${MODPY_EGG_VERSION}.dist-info/LICENSE
lib/python${MODPY_VERSION}/site-packages/command_runner-${MODPY_EGG_VERSION}.dist-info/METADATA
lib/python${MODPY_VERSION}/site-packages/command_runner-${MODPY_EGG_VERSION}.dist-info/RECORD
lib/python${MODPY_VERSION}/site-packages/command_runner-${MODPY_EGG_VERSION}.dist-info/WHEEL
lib/python${MODPY_VERSION}/site-packages/command_runner-${MODPY_EGG_VERSION}.dist-info/top_level.txt
lib/python${MODPY_VERSION}/site-packages/command_runner/__init__.py
${MODPY_COMMENT}lib/python${MODPY_VERSION}/site-packages/command_runner/${MODPY_PYCACHE}/
lib/python${MODPY_VERSION}/site-packages/command_runner/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/command_runner/${MODPY_PYCACHE}__init__.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/command_runner/${MODPY_PYCACHE}elevate.${MODPY_PYC_MAGIC_TAG}${MODPY_PYOEXTENSION}
lib/python${MODPY_VERSION}/site-packages/command_runner/${MODPY_PYCACHE}elevate.${MODPY_PYC_MAGIC_TAG}pyc
lib/python${MODPY_VERSION}/site-packages/command_runner/elevate.py