Created attachment 182694 [details] new port shar file Simple MAC framework policy to manage access for setting realtime priorities by selected GID.Running kldload mac_rtprio.ko to load the kernel module. The load action require root permissions. Set GID that should be able to change realtime priorities: sysctl security.mac.rtprio.gid=1001 and enable enforcing: sysctl security.mac.rtprio.enabled=1 WWW: https://github.com/pbiernacki/mac_rtprio
Comment on attachment 182694 [details] new port shar file GH_PROJECT is useless The port should use USES=kmod
Created attachment 182920 [details] mac_rtprio.shar GH_PROJECT is useless-----fixed The port should use USES=kmod-----fixed(the origin has already use this)
Hi Jov Does this module only work with specific kernel versions? I have just built and installed it under TrueOS but when I try loading it, dmesg says: KLD mac_rtprio.ko: depends on kernel - not available or version mismatch linker_load_file: /boot/modules/mac_rtprio.ko - unsupported file type
uname -a FreeBSD true76 12.0-CURRENT FreeBSD 12.0-CURRENT #66 ac2f0aa3b(trueos-stable)-dirty: Wed Jun 21 01:09:23 UTC 2017 root@gauntlet:/usr/obj/usr/src/sys/GENERIC amd64
(In reply to Dan MacDonald from comment #3) This port does not depend on specific kernel version, but you should sync the /usr/src with your running system before building, or there may be problems. Also note, I think 12-current may have some problems because when I try to load the tcpmd5 module,it report similar error: "depends on kernel - not available or version mismatch" This is a test on my FreeBSD-RELEASE11.0: pkg install ./mac_rtprio-kmod-20170417.txz Updating FreeBSD repository catalogue... Fetching meta.txz: 100% 944 B 0.9kB/s 00:01 Fetching packagesite.txz: 100% 6 MiB 201.6kB/s 00:30 Processing entries: 100% FreeBSD repository update completed. 26597 packages processed. All repositories are up to date. Updating database digests format: 100% Checking integrity... done (0 conflicting) The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: mac_rtprio-kmod: 20170417 Number of packages to be installed: 1 Proceed with this action? [y/N]: y [1/1] Installing mac_rtprio-kmod-20170417... Extracting mac_rtprio-kmod-20170417: 100% root@:/usr/ports/sysutils/mac_rtprio # kldload mac_rtprio root@:/usr/ports/sysutils/mac_rtprio # kldstat Id Refs Address Size Name 1 102 0xffffffff80200000 1fa8888 kernel 2 1 0xffffffff821aa000 30aec0 zfs.ko 3 2 0xffffffff824b5000 adc0 opensolaris.ko 4 1 0xffffffff824c0000 21bd0 geom_eli.ko 5 1 0xffffffff824e3000 b3e8 aesni.ko ... 71 1 0xffffffff82b66000 b2f mac_rtprio.ko
Hi Jov TrueOS doesn't seem to offer a kernel source package so I cloned the TrueOS freebsd kernel source from https://github.com/trueos/freebsd into /usr/src before I built your module. Unfortunately re-building the current TrueOS kernel isn't possible right now as I'm told drm-next and bootenvs are broken and the first is the exact reason I'm running TrueOS instead of FreeBSD 12 as it fully supports my Haswell GPU so the kernel source might not align exactly with the kernel I'm running.
A commit references this bug: Author: tobik Date: Mon Mar 12 06:34:18 UTC 2018 New revision: 464219 URL: https://svnweb.freebsd.org/changeset/ports/464219 Log: New port: sysutils/mac_rtprio Simple MAC framework policy to manage access for setting realtime priorities by selected GID.Running kldload mac_rtprio.ko to load the kernel module. The load action require root permissions. Set GID that should be able to change realtime priorities: sysctl security.mac.rtprio.gid=1001 and enable enforcing: sysctl security.mac.rtprio.enabled=1 WWW: https://github.com/pbiernacki/mac_rtprio PR: 219377 Submitted by: amutu@amutu.com Reviewed by: bapt Changes: head/sysutils/Makefile head/sysutils/mac_rtprio/ head/sysutils/mac_rtprio/Makefile head/sysutils/mac_rtprio/distinfo head/sysutils/mac_rtprio/pkg-descr
Committed. Thanks! Sorry that this took so long.
A commit references this bug: Author: tobik Date: Mon Mar 12 06:35:56 UTC 2018 New revision: 464220 URL: https://svnweb.freebsd.org/changeset/ports/464220 Log: sysutils/mac_rtprio: Shorten COMMENT PR: 219377 Changes: head/sysutils/mac_rtprio/Makefile