Created attachment 239326 [details] segfault I am trying to set up a fresh install of writefreely 0.13.2 on FreeBSD 13.1 (MySQL backend) and getting a segfault when trying to create an admin user (i selected the multi-user instance option during configuration). The issue was reported to the writefreely developers and they told me to report it here instead.
Upstream bug: https://github.com/writefreely/writefreely/issues/620
This bug is caused by us not specifying the path to various important directories in the configuration file in conjunction with upstream not performing correct error handling. Upstream will fix the error handling in an upcoming version. I will shortly upload a patch avoiding this problem for newly set up instances. For existing instances, please add the following configuration keys to /usr/local/www/writefreely/config.ini: [server] templates_parent_dir = /usr/local/www/writefreely static_parent_dir = /usr/local/www/writefreely pages_parent_dir = /usr/local/www/writefreely keys_parent_dir = /usr/local/www/writefreely If your installation has PREFIX set to a value other than /usr/local, please adjust the paths as needed. OP, please let me know if this work around fixes your problem so I can push the patch.
Created attachment 239745 [details] www/writefreely: make port more robust when binary is run manually The attached patch should work around this problem for new installations and provide better error reporting for existing installations. The same workaround can be added to existing installations by setting in /usr/local/www/writefreely: [server] templates_parent_dir = /usr/local/www/writefreely static_parent_dir = /usr/local/www/writefreely pages_parent_dir = /usr/local/www/writefreely keys_parent_dir = /usr/local/www/writefreely (change /usr/local to your PREFIX as needed).
Committed, Thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=7625d4e4e5dd24a06c7d946d7b4328c8f17410bb commit 7625d4e4e5dd24a06c7d946d7b4328c8f17410bb Author: Robert Clausecker <fuz@fuz.su> AuthorDate: 2023-01-30 08:41:05 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-01-30 09:53:14 +0000 www/writefreely: Pick patch to fix segmentation fault Selectively picking patch from upstream to fix a segmentation fault. Adding sample configuration to workaround the problem. PR: 268809 Reported by: trash@nazileaks.eu www/writefreely/Makefile | 12 ++++++++++-- www/writefreely/distinfo | 4 +++- www/writefreely/files/config.ini.sample.in (new) | 10 ++++++++++ www/writefreely/pkg-plist | 1 + 4 files changed, 24 insertions(+), 3 deletions(-)
(In reply to Fernando Apesteguía from comment #4) Could you please MFH the change as it is a build fix? I was unable to ask for that to be done as I am not permitted to set the flag.
(In reply to Fernando Apesteguía from comment #4) Also I would very much appreciate if you kept the commit text when committing my patches. I spent time making sure the problem is accurately described and to pick a reasonable summary. Your description does not describe the problem in a useful way, making it much harder to find out what this patch is really about. If you use "git am" to apply a patch, the commit text is automatically imported from the patch file.
A commit in branch 2023Q1 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d0e955466184a2dfb141f7f910a042c2189833c6 commit d0e955466184a2dfb141f7f910a042c2189833c6 Author: Robert Clausecker <fuz@fuz.su> AuthorDate: 2023-01-30 08:41:05 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-01-31 10:07:51 +0000 www/writefreely: Pick patch to fix segmentation fault Selectively picking patch from upstream to fix a segmentation fault. Adding sample configuration to workaround the problem. PR: 268809 Reported by: trash@nazileaks.eu (cherry picked from commit 7625d4e4e5dd24a06c7d946d7b4328c8f17410bb) www/writefreely/Makefile | 12 ++++++++++-- www/writefreely/distinfo | 4 +++- www/writefreely/files/config.ini.sample.in (new) | 10 ++++++++++ www/writefreely/pkg-plist | 1 + 4 files changed, 24 insertions(+), 3 deletions(-)
Merged to 2023Q1.