[Bug 219909] Userland dtrace in ports / compiling with poudriere

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jun 10 16:15:42 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219909

--- Comment #1 from Matthew Seaman <matthew at FreeBSD.org> ---
Fixing permissions.  Choosing group 141 as the next available gid from
/usr/ports/GIDs, create a dtrace group and add the userids used by dtrace-able
programs to it.  I shall use postgresql96 as the example:

```
# pw group add -n dtrace -g 141 -M postgres
# cat /etc/devfs.rules
[userdtrace=10]
add path dtrace/helper mode 0660 group dtrace
# sysrc devfs_system_ruleset="userdtrace"
```
Will result in ownership/permissions like so (may need a reboot):

```
# ls -la /dev/dtrace/
total 1
dr-xr-xr-x   2 root  wheel   512 Jun  3 11:42 ./
dr-xr-xr-x  13 root  wheel   512 Jun  3 11:42 ../
crw-------   1 root  wheel   0x9 Jun  3 11:42 dtmalloc
crw-------   1 root  wheel   0x4 Jun  3 11:42 dtrace
crw-------   1 root  wheel   0x7 Jun  3 11:42 fasttrap
crw-------   1 root  wheel   0x8 Jun  3 11:42 fbt
crw-rw----   1 root  dtrace  0x5 Jun  3 11:42 helper
crw-------   1 root  wheel   0x6 Jun  3 11:42 profile
```
Resulting in:

```
# dtrace -l -m postgres | head -10
   ID   PROVIDER            MODULE                          FUNCTION NAME
69078 postgresql79451          postgres                 CheckPointBuffers
buffer-checkpoint-done
69079 postgresql79451          postgres                 CheckPointBuffers
buffer-checkpoint-start
69080 postgresql79451          postgres                 CheckPointBuffers
buffer-checkpoint-sync-start
69081 postgresql79451          postgres                       FlushBuffer
buffer-flush-done
69082 postgresql79451          postgres                       FlushBuffer
buffer-flush-start
69083 postgresql79451          postgres                 ReadBuffer_common
buffer-read-done
69084 postgresql79451          postgres                 ReadBuffer_common
buffer-read-start
69085 postgresql79451          postgres                 CheckPointBuffers
buffer-sync-done
69086 postgresql79451          postgres                 CheckPointBuffers
buffer-sync-start
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-ports-bugs mailing list