The port should not change the user and group of /var/log/rspamd, /var/run/rspamd and /var/db/rspamd when upgrading. By default, Rspamd uses nobody:nobody on FreeBSD, but the admin might have changed the default (via /etc/rc.conf).
No, just change the default settings if you need to. This behaviour is desired.
Maybe we are talking about something else, but why is resetting the directory ownership on every port upgrade (independent of whatever I've set for rspamd_user and rspamd_group in /etc/rc.conf) a desirable behavior? Or do you mean there is some compile option that could be set via make.conf?
(In reply to Vsevolod Stakhov from comment #1) I may be missing something, but I seem to be unable to pass any CMAKE_ARGS from make.conf or the commandline (adding "CMAKE_ARGS+= -DRSPAMD_USER=rspamd -DRSPAMD_GROUP=rspamd" to the build via make.conf does not change the port's behavior when upgrading). Why not simply leave those directories alone if they already exist? Alternatively, instructions how to change the default user/group without patching the port Makefile itself would be greatly appreciated.
Sorry to re-open this, but I don't see a way to "change the default settings" with the current state of the port. If I missed the proper procedure, please advise.
Either you make a bash that do it for you or you put something like this in /etc/make.conf: .if ${.CURDIR:M*/ports/mail/rspamd} post-clean: ${CHOWN} -R user:group /var/log/rspamd /var/run/rspamd /var/db/rspamd .endif (I think this should do, what you want). Is rejected, so I close here.
Have to correct (needed for deinstall) .if ${.CURDIR:M*/ports/mail/rspamd} post-clean: if [ -e /var/log/rspamd ];then \ ${CHOWN} ngorx:wheel /var/log/rspamd /var/run/rspamd /var/db/rspamd;fi .endif
(In reply to w.schwarzenfeld from comment #6) Thank-you for your suggestions, very helpful.