From dc8d189f01185b976c95ccb54af1ea0cf49f6778 Mon Sep 17 00:00:00 2001 From: kai Date: Tue, 24 Sep 2019 09:41:22 +0000 Subject: [PATCH] [NEW PORT]: sysutils/sysctlinfo-kmod Kernel module to implement the sysctlinfo interface, it explores the sysctl tree to pass the info of the nodes to the userland; a header file with constants and helper macros is provided, too. WWW: https://gitlab.com/alfix/sysctlinfo PR: 240390 Submitted by: Alfonso S. Siciliano --- sysutils/Makefile | 1 + sysutils/sysctlinfo-kmod/Makefile | 56 ++++++++++++++++++++++++++++ sysutils/sysctlinfo-kmod/distinfo | 3 ++ sysutils/sysctlinfo-kmod/pkg-descr | 5 +++ sysutils/sysctlinfo-kmod/pkg-message | 16 ++++++++ 5 files changed, 81 insertions(+) create mode 100644 sysutils/sysctlinfo-kmod/Makefile create mode 100644 sysutils/sysctlinfo-kmod/distinfo create mode 100644 sysutils/sysctlinfo-kmod/pkg-descr create mode 100644 sysutils/sysctlinfo-kmod/pkg-message diff --git a/sysutils/Makefile b/sysutils/Makefile index 9d820795b803..6931170584a2 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1306,6 +1306,7 @@ SUBDIR += synergy-1 SUBDIR += sysadm SUBDIR += sysadm-client + SUBDIR += sysctlinfo-kmod SUBDIR += sysgather SUBDIR += sysinfo SUBDIR += syslinux diff --git a/sysutils/sysctlinfo-kmod/Makefile b/sysutils/sysctlinfo-kmod/Makefile new file mode 100644 index 000000000000..e81e2a452855 --- /dev/null +++ b/sysutils/sysctlinfo-kmod/Makefile @@ -0,0 +1,56 @@ +# $FreeBSD$ + +PORTNAME= sysctlinfo-kmod +DISTVERSION= 20190907 +CATEGORIES= sysutils + +MAINTAINER= alfix86@gmail.com +COMMENT= Interface to visit the sysctl MIB-tree and to get the nodes info + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= kmod +USE_GITLAB= yes +GL_ACCOUNT= alfix +GL_PROJECT= sysctlinfo +GL_COMMIT= 1f1b05e3432ccada8c38cfb5f1987dfceb75524b + +PLIST_FILES= ${KMODDIR}/sysctlinfo.ko \ + include/sysctlinfo.h \ + man/man3/sysctlinfo.3.gz \ + man/man4/sysctlinfo.4.gz + +PORTEXAMPLES= Makefile \ + allinfo.c \ + allinfobyname.c \ + capability.c \ + singleinfo.c + +OPTIONS_DEFINE= EXAMPLES +OPTIONS_DEFAULT= EXAMPLES + +.include + +# Once the sysctlinfo interface (review D21700) lands into the base tree the +# following statement needs to be expanded +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200019 +IGNORE= oid_label was introduced in FreeBSD 1200019 +.endif +.if ${OPSYS} != FreeBSD +IGNORE= not supported on anything but FreeBSD +.endif + +do-install: + ${INSTALL_KLD} ${WRKSRC}/sysctlinfo.ko ${STAGEDIR}${KMODDIR} + ${INSTALL_DATA} ${WRKSRC}/sysctlinfo.h ${STAGEDIR}${PREFIX}/include + ${INSTALL_MAN} ${WRKSRC}/sysctlinfo.3 ${STAGEDIR}${MAN3PREFIX}/man/man3 + ${INSTALL_MAN} ${WRKSRC}/sysctlinfo.4 ${STAGEDIR}${MAN4PREFIX}/man/man4 + +do-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} +.for e in ${PORTEXAMPLES} + ${INSTALL_DATA} ${WRKSRC}/examples/${e} ${STAGEDIR}${EXAMPLESDIR} +.endfor + +.include diff --git a/sysutils/sysctlinfo-kmod/distinfo b/sysutils/sysctlinfo-kmod/distinfo new file mode 100644 index 000000000000..23f24d4d024f --- /dev/null +++ b/sysutils/sysctlinfo-kmod/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1568559895 +SHA256 (alfix-sysctlinfo-1f1b05e3432ccada8c38cfb5f1987dfceb75524b_GL0.tar.gz) = a37e19e50da8132ed18669030e236bd551a547c0fce6b8a560f1d7b336081c3d +SIZE (alfix-sysctlinfo-1f1b05e3432ccada8c38cfb5f1987dfceb75524b_GL0.tar.gz) = 30767 diff --git a/sysutils/sysctlinfo-kmod/pkg-descr b/sysutils/sysctlinfo-kmod/pkg-descr new file mode 100644 index 000000000000..8f6d58f9cdac --- /dev/null +++ b/sysutils/sysctlinfo-kmod/pkg-descr @@ -0,0 +1,5 @@ +Kernel module to implement the sysctlinfo interface, it explores +the sysctl tree to pass the info of the nodes to the userland; +a header file with constants and helper macros is provided, too. + +WWW: https://gitlab.com/alfix/sysctlinfo diff --git a/sysutils/sysctlinfo-kmod/pkg-message b/sysutils/sysctlinfo-kmod/pkg-message new file mode 100644 index 000000000000..3f79fa1e91ad --- /dev/null +++ b/sysutils/sysctlinfo-kmod/pkg-message @@ -0,0 +1,16 @@ +[ +{ type: install + message: <