FreeBSD Bugzilla – Attachment 239745 Details for
Bug 268809
www/writefreely: segfaults
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
www/writefreely: make port more robust when binary is run manually
0001-www-writefreely-make-port-more-robust-when-binary-is.patch (text/plain), 4.52 KB, created by
Robert Clausecker
on 2023-01-27 16:18:49 UTC
(
hide
)
Description:
www/writefreely: make port more robust when binary is run manually
Filename:
MIME Type:
Creator:
Robert Clausecker
Created:
2023-01-27 16:18:49 UTC
Size:
4.52 KB
patch
obsolete
>From 67e88b270bb4e4643bfe4a07f23c4dc2eaed8e21 Mon Sep 17 00:00:00 2001 >From: Robert Clausecker <fuz@fuz.su> >Date: Fri, 27 Jan 2023 17:07:03 +0100 >Subject: [PATCH] www/writefreely: make port more robust when binary is run > manually > >The writefreely binary by default expects the various files we install >into ${WWWDIR} to be found in its working directory. If they are not >found, it crashes. > >Harden our port against this bug by supplying a config.ini file with the >correct paths already set up. When writefreely is set up through the >interactive setup command, the file is simply amended, keeping the >correct paths. > >Also apply an upstream patch to turn the segfault into a crash with a >proper error message, improving user experience. > >PR: 268809 >Reported by: trash@nazileaks.eu >See also: https://github.com/writefreely/writefreely/commit/99d72881cf833326f02d86a8896bbd2b8156327b >--- > www/writefreely/Makefile | 8 ++++++-- > www/writefreely/distinfo | 4 +++- > www/writefreely/files/config.ini.sample.in | 10 ++++++++++ > www/writefreely/pkg-plist | 1 + > 4 files changed, 20 insertions(+), 3 deletions(-) > create mode 100644 www/writefreely/files/config.ini.sample.in > >diff --git a/www/writefreely/Makefile b/www/writefreely/Makefile >index fa65dee3901d..333aa40c487b 100644 >--- a/www/writefreely/Makefile >+++ b/www/writefreely/Makefile >@@ -1,12 +1,15 @@ > PORTNAME= writefreely > DISTVERSIONPREFIX= v > DISTVERSION= 0.13.2 >-PORTREVISION= 1 >+PORTREVISION= 3 > CATEGORIES= www textproc > MASTER_SITES= https://code.as/core/socks/archive/v1.0.0.tar.gz?dummy=/:core_socks > DISTFILES= core-socks-v1.0.0.tar.gz:core_socks > DIST_SUBDIR= writeas > >+PATCH_SITES= https://github.com/writefreely/writefreely/commit/ >+PATCHFILES= 99d72881cf833326f02d86a8896bbd2b8156327b.diff:-p1 >+ > MAINTAINER= fuz@fuz.su > COMMENT= Clean, Markdown-based publishing platform made for writers > WWW= https://writefreely.org >@@ -96,7 +99,7 @@ GH_TUPLE= aymerick:douceur:v0.2.0:aymerick_douceur/vendor/github.com/aymerick/do > USE_RC_SUBR= writefreely > GO_TARGET= ./cmd/writefreely > >-SUB_FILES= pkg-message >+SUB_FILES= config.ini.sample pkg-message > USERS= writefreely > GROUPS= writefreely > >@@ -149,6 +152,7 @@ do-install-DOCS-on: > > post-install: > ${MKDIR} ${STAGEDIR}${WWWDIR}/keys >+ ${INSTALL_DATA} ${WRKDIR}/config.ini.sample ${STAGEDIR}${WWWDIR} > cd ${WRKSRC} && ${COPYTREE_SHARE} pages ${STAGEDIR}${WWWDIR} > cd ${WRKSRC} && ${COPYTREE_SHARE} static ${STAGEDIR}${WWWDIR} > ${INSTALL_DATA} ${WRKDIR}/css/*.css ${STAGEDIR}${WWWDIR}/static/css/ >diff --git a/www/writefreely/distinfo b/www/writefreely/distinfo >index 4a27251b1193..e445b7794739 100644 >--- a/www/writefreely/distinfo >+++ b/www/writefreely/distinfo >@@ -1,4 +1,4 @@ >-TIMESTAMP = 1668161444 >+TIMESTAMP = 1674562387 > SHA256 (writeas/core-socks-v1.0.0.tar.gz) = 9d199f31b9fcaa97b4c52483f16e226fe7b40a0014b6070788f415cff29f2c32 > SIZE (writeas/core-socks-v1.0.0.tar.gz) = 11604 > SHA256 (writeas/writefreely-css-0.13.2.tar.gz) = 099ad7bb876e9cef2155af71df65825cd8776beb66de523430169c2eb52adf88 >@@ -153,3 +153,5 @@ SHA256 (writeas/writefreely-go-nodeinfo-v1.2.0_GH0.tar.gz) = bcf74cbb4ff56cab570 > SIZE (writeas/writefreely-go-nodeinfo-v1.2.0_GH0.tar.gz) = 3560 > SHA256 (writeas/writefreely-documentation-v0.13.1_GH0.tar.gz) = 071263600c4aeba84f12a5794eb7c59f70b3bee6f1a7d0757ab0f50c3cc25f38 > SIZE (writeas/writefreely-documentation-v0.13.1_GH0.tar.gz) = 19082 >+SHA256 (writeas/99d72881cf833326f02d86a8896bbd2b8156327b.diff) = eaa803e2e34323e8e6ea90ec666b3769330fd8baf0a6f444b2275a8352f58b26 >+SIZE (writeas/99d72881cf833326f02d86a8896bbd2b8156327b.diff) = 2580 >diff --git a/www/writefreely/files/config.ini.sample.in b/www/writefreely/files/config.ini.sample.in >new file mode 100644 >index 000000000000..a154708a2b65 >--- /dev/null >+++ b/www/writefreely/files/config.ini.sample.in >@@ -0,0 +1,10 @@ >+; Preliminary configuration file. Run >+; >+; %%PREFIX%%/etc/rc.d/writefreely setup >+; >+; to set up writefreely. >+[server] >+templates_parent_dir = %%WWWDIR%% >+static_parent_dir = %%WWWDIR%% >+pages_parent_dir = %%WWWDIR%% >+keys_parent_dir = %%WWWDIR%% >diff --git a/www/writefreely/pkg-plist b/www/writefreely/pkg-plist >index ace00809ad18..189cb8349328 100644 >--- a/www/writefreely/pkg-plist >+++ b/www/writefreely/pkg-plist >@@ -21,6 +21,7 @@ bin/writefreely > %%PORTDOCS%%%%DOCSDIR%%/writer/static.md > %%PORTDOCS%%%%DOCSDIR%%/writer/writing.md > @dir(writefreely,writefreely,) %%WWWDIR%% >+@sample(writefreely,writefreely,) %%WWWDIR%%/config.ini.sample > %%WWWDIR%%/pages/404-general.tmpl > %%WWWDIR%%/pages/404.tmpl > %%WWWDIR%%/pages/410.tmpl >-- >2.38.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
fuz
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 268809
:
239326
| 239745