/var/log/ircd.log contains an infinite number of these: [2018-05-29T11:28:02+0900] Cannot create temporary database file /var/lib/kline.db.new [2018-05-29T11:28:02+0900] Cannot create temporary database file /var/lib/dline.db.new [2018-05-29T11:28:02+0900] Cannot create temporary database file /var/lib/xline.db.new [2018-05-29T11:28:02+0900] Cannot create temporary database file /var/lib/resv.db.new This is caused by the Makefile containing: --localstatedir=/var and the resulting configure being: $ ./configure --disable-assert --disable-halfops --enable-openssl=/usr --sysconfdir=/usr/local/etc/ircd-hybrid --datarootdir=/usr/local/share/ircd-hybrid-8.2.22 --localstatedir=/var --prefix=/usr/local --mandir=/usr/local/man --disable-silent-rules --infodir=/usr/local/info/ --build=amd64-portbld-freebsd11.1 These 4 files are not configured in the config file for reasons unknown, but handed over on the command line: I think the solution is to modify the start up script to deal with this, but I am puzzled why a port in /usr/local is doing anything in /var, let along /var/lib ... I do not know the official freebsd way to fix this ^^;
Well, that's silly. I'll look at it. Should be very simple fix.
ok looking at this further, I think the best way to handle this is to place the hybrid state files under var/hybrid/ with the ownership changed to match that of the hybrid owner. kline.conf would then be in /usr/local/var/hybrid/kline.conf etc.
That seems to have stopped the errors.
See Comment3. Can we close here?
(In reply to w.schwarzenfeld from comment #4) Assuming the patch was put in the release, yes.
ping!
irc/ircd-hybrid has been updated to 8.2.26. Not sure if the issue still persists in this version, I was not able to replicate it. Will keep this open for a week, if there are no updates, I shall close this ticket.
This is back with 8.2.30
I shall have a look and get back to you.
Created attachment 212937 [details] Sets ownership correctly for /var/ircd-hybrid directory (In reply to Bunny Evans from comment #8) Based on db@'s suggestion above, I have changed the location of --localstatedir from /var to /var/ircd-hybrid and gave the proper permissions to this folder. In my local environment this seems to be working as intended and the databases are now created correctly. The log no longer has permission denied error when creating them. I have attached a patch that addresses this issue, let me know if applying it and rebuilding solves the issue for you.
(In reply to Bunny Evans from comment #8) Were you able to test this patch?
Not exactly good with patches here, but yes. That works.
(In reply to Bunny Evans from comment #12) Apologies, did not realize that, thank you for testing, let me commit it to the ports tree.
A commit references this bug: Author: fox Date: Sat Apr 4 21:49:29 UTC 2020 New revision: 530722 URL: https://svnweb.freebsd.org/changeset/ports/530722 Log: irc/ircd-hybrid: Fixes permissions for localstatedir. Instead of pointing directly to /var, now localstatedir now points to /var/ircd-hybrid with proper permissions so that the databases are correctly created during start up. Also minor formatting fixes. PR: 228582 Reported by: Bunny Evans <bunny.evans@gmail.com> Changes: head/irc/ircd-hybrid/Makefile head/irc/ircd-hybrid/pkg-plist
Committed the changes, closing the ticket. Feel free to report back here in case you face issues again. Thank you.