git: 28b80775182a - main - sysutils/ucored: add a new port for user core collection

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Fri, 26 Sep 2025 03:47:32 UTC
The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/ports/commit/?id=28b80775182ad175a20389fe5f681415492e0501

commit 28b80775182ad175a20389fe5f681415492e0501
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2025-09-26 03:40:38 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2025-09-26 03:46:31 +0000

    sysutils/ucored: add a new port for user core collection
    
    This utility allows configurable actions to be enacted on user coredumps
    produced on the system.  ucored(8) brings functionality to FreeBSD that
    is similar to the coredump piping that Linux offers, but with the
    flexibility to be scripted with Lua or made conditional on various
    properties of the coredump itself.
---
 sysutils/Makefile         |  1 +
 sysutils/ucored/Makefile  | 32 ++++++++++++++++++++++++++++++++
 sysutils/ucored/distinfo  |  3 +++
 sysutils/ucored/pkg-descr |  7 +++++++
 sysutils/ucored/pkg-plist | 11 +++++++++++
 5 files changed, 54 insertions(+)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index dd9b4a1c148d..4ab4bf090b27 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1502,6 +1502,7 @@
     SUBDIR += u-boot-tools
     SUBDIR += u-boot-wandboard
     SUBDIR += ua
+    SUBDIR += ucored
     SUBDIR += ucspi-ipc
     SUBDIR += ucspi-proxy
     SUBDIR += ucspi-ssl
diff --git a/sysutils/ucored/Makefile b/sysutils/ucored/Makefile
new file mode 100644
index 000000000000..ae0b5b962bbe
--- /dev/null
+++ b/sysutils/ucored/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	ucored
+PORTVERSION=	v0.1
+CATEGORIES=	sysutils
+MASTER_SITES=	https://git.kevans.dev/kevans/${PORTNAME}/archive/${PORTVERSION}.tar.gz?dummy=/
+
+MAINTAINER=	kevans@FreeBSD.org
+COMMENT=	Utility to apply more extensive policies to user cores
+WWW=		https://git.kevans.dev/kevans/ucored
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		lua:54,build uidfix
+
+WRKSRC=		${WRKDIR}/${PORTNAME}
+
+.include <bsd.port.options.mk>
+
+.if ${OSVERSION} >= 1500055
+USES+=		kmod
+PLIST_SUB+=	KMOD=
+.else
+PLIST_SUB+=	KMOD="@comment "
+.endif
+
+post-install:
+	${MV} ${STAGEDIR}${PREFIX}/etc/ucored.conf \
+	    ${STAGEDIR}${PREFIX}/etc/ucored.conf.sample
+	${MV} ${STAGEDIR}${PREFIX}/etc/devd/ucored.conf \
+	    ${STAGEDIR}${PREFIX}/etc/devd/ucored.conf.sample
+
+.include <bsd.port.mk>
diff --git a/sysutils/ucored/distinfo b/sysutils/ucored/distinfo
new file mode 100644
index 000000000000..e521365dcc95
--- /dev/null
+++ b/sysutils/ucored/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1758857884
+SHA256 (ucored-v0.1.tar.gz) = a127ea61788b0fc01d3757cc1da0b4c4306ef23b4e66aeefa5a47ba1a9e4c10b
+SIZE (ucored-v0.1.tar.gz) = 40847
diff --git a/sysutils/ucored/pkg-descr b/sysutils/ucored/pkg-descr
new file mode 100644
index 000000000000..74dbea904764
--- /dev/null
+++ b/sysutils/ucored/pkg-descr
@@ -0,0 +1,7 @@
+u(ser)cored applies policy to user cores being produced on the system
+
+This utility allows configurable actions to be enacted on user coredumps
+produced on the system.  ucored(8) brings functionality to FreeBSD that is
+similar to the coredump piping that Linux offers, but with the flexibility to
+be scripted with Lua or made conditional on various properties of the coredump
+itself.
diff --git a/sysutils/ucored/pkg-plist b/sysutils/ucored/pkg-plist
new file mode 100644
index 000000000000..a3c8b461aa17
--- /dev/null
+++ b/sysutils/ucored/pkg-plist
@@ -0,0 +1,11 @@
+@sample etc/devd/ucored.conf.sample
+etc/rc.d/ucored
+etc/syslog.d/ucored.conf
+@sample etc/ucored.conf.sample
+libexec/ucore-shuttle
+sbin/ucored
+%%DATADIR%%/config.lua
+%%DATADIR%%/ucored.lua
+share/man/man8/ucored.8.gz
+%%KMOD%%share/man/man4/ucoredev.4.gz
+%%KMOD%%/%%KMODDIR%%/ucoredev.ko