From owner-svn-ports-head@freebsd.org Sat Dec 14 11:06:45 2019 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A16B1C9C2C; Sat, 14 Dec 2019 11:06:45 +0000 (UTC) (envelope-from tcberner@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Zl9072JJz4GLg; Sat, 14 Dec 2019 11:06:44 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EC97723B64; Sat, 14 Dec 2019 11:06:44 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xBEB6iuw022261; Sat, 14 Dec 2019 11:06:44 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xBEB6hWo022256; Sat, 14 Dec 2019 11:06:43 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201912141106.xBEB6hWo022256@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sat, 14 Dec 2019 11:06:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r520107 - in head/sysutils: . sysctlbyname-improved-kmod X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: in head/sysutils: . sysctlbyname-improved-kmod X-SVN-Commit-Revision: 520107 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Dec 2019 11:06:45 -0000 Author: tcberner Date: Sat Dec 14 11:06:43 2019 New Revision: 520107 URL: https://svnweb.freebsd.org/changeset/ports/520107 Log: [NEW PORT] sysutils/sysctlbyname-improved-kmod: sysctl node to implement an improved sysctlbyname(3) clone Kernel module to add the sysctl.entryidinputbyname sysctl node to allow to implement an improved sysctlbyname(3) clone to handle: * a node without a level name, e.g., "security.jail.param.allow.mount." * a CTLTYPE_NODE with a no-NULL handler, e.g., "kern.proc.pid." The sysctlbyname_improved() function and an example are provided, too. WWW: https://gitlab.com/alfix/sysctlbyname-improved/ PR: 242068 Submitted by: Alfonso S. Siciliano Added: head/sysutils/sysctlbyname-improved-kmod/ head/sysutils/sysctlbyname-improved-kmod/Makefile (contents, props changed) head/sysutils/sysctlbyname-improved-kmod/distinfo (contents, props changed) head/sysutils/sysctlbyname-improved-kmod/pkg-descr (contents, props changed) head/sysutils/sysctlbyname-improved-kmod/pkg-message (contents, props changed) Modified: head/sysutils/Makefile Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sat Dec 14 10:57:17 2019 (r520106) +++ head/sysutils/Makefile Sat Dec 14 11:06:43 2019 (r520107) @@ -1261,6 +1261,7 @@ SUBDIR += symon SUBDIR += synergy SUBDIR += synergy-1 + SUBDIR += sysctlbyname-improved-kmod SUBDIR += sysctlinfo-kmod SUBDIR += sysgather SUBDIR += sysinfo Added: head/sysutils/sysctlbyname-improved-kmod/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sysctlbyname-improved-kmod/Makefile Sat Dec 14 11:06:43 2019 (r520107) @@ -0,0 +1,49 @@ +# $FreeBSD$ + +PORTNAME= sysctlbyname-improved-kmod +DISTVERSION= 20191124 +CATEGORIES= sysutils + +MAINTAINER= alfix86@gmail.com +COMMENT= Internal sysctl node to implement an improved sysctlbyname(3) clone + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= kmod +USE_GITLAB= yes +GL_ACCOUNT= alfix +GL_PROJECT= sysctlbyname-improved +GL_COMMIT= 522eb1f40c46a035c563f4f88594db5803ccf462 + +PLIST_FILES= ${KMODDIR}/sysctlbyname_improved.ko + +PORTEXAMPLES= sysctlbyname_improved.h \ + sysctlbyname_improved.c \ + sysctlbyname_improved_example.c + +OPTIONS_DEFINE= EXAMPLES +OPTIONS_DEFAULT= EXAMPLES + +.include + +# Once the sysctlinfo interface (review D21700) lands into the base tree this +# node can be added to the interface and the following statement needs +# to be expanded +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200019 +IGNORE= needs oid_label member of struct sysctl_oid defined in sysctl.h which was first introduced in FreeBSD 12 +.endif +.if ${OPSYS} != FreeBSD +IGNORE= not supported on anything but FreeBSD +.endif + +do-install: + ${INSTALL_KLD} ${WRKSRC}/sysctlbyname_improved.ko ${STAGEDIR}${KMODDIR} + +do-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} +.for e in ${PORTEXAMPLES} + ${INSTALL_DATA} ${WRKSRC}/examples/${e} ${STAGEDIR}${EXAMPLESDIR} +.endfor + +.include Added: head/sysutils/sysctlbyname-improved-kmod/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sysctlbyname-improved-kmod/distinfo Sat Dec 14 11:06:43 2019 (r520107) @@ -0,0 +1,3 @@ +TIMESTAMP = 1574563228 +SHA256 (alfix-sysctlbyname-improved-522eb1f40c46a035c563f4f88594db5803ccf462_GL0.tar.gz) = 6ddf449100ed2012eeef2d770bebd58f739f9997957a073dc59e8a08022520a1 +SIZE (alfix-sysctlbyname-improved-522eb1f40c46a035c563f4f88594db5803ccf462_GL0.tar.gz) = 8680 Added: head/sysutils/sysctlbyname-improved-kmod/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sysctlbyname-improved-kmod/pkg-descr Sat Dec 14 11:06:43 2019 (r520107) @@ -0,0 +1,7 @@ +Kernel module to add the sysctl.entryidinputbyname sysctl node +to allow to implement an improved sysctlbyname(3) clone to handle: + * a node without a level name, e.g., "security.jail.param.allow.mount." + * a CTLTYPE_NODE with a no-NULL handler, e.g., "kern.proc.pid." +The sysctlbyname_improved() function and an example are provided, too. + +WWW: https://gitlab.com/alfix/sysctlbyname-improved Added: head/sysutils/sysctlbyname-improved-kmod/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/sysctlbyname-improved-kmod/pkg-message Sat Dec 14 11:06:43 2019 (r520107) @@ -0,0 +1,17 @@ +[ +{ type: install + message: <