Bug 280401 - www/freenginx-devel: Invalid root path
Summary: www/freenginx-devel: Invalid root path
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-22 08:23 UTC by Vedran Miletic
Modified: 2024-11-25 18:06 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (joneum)


Attachments
Patch (3.09 KB, patch)
2024-09-03 12:04 UTC, Herbert J. Skuhra
no flags Details | Diff
Previous patch plus update to version 1.27.4 (3.90 KB, patch)
2024-09-03 12:44 UTC, Herbert J. Skuhra
no flags Details | Diff
Update to version 1.27.4 and minor fixes for this PR (4.44 KB, patch)
2024-10-20 08:06 UTC, Herbert J. Skuhra
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vedran Miletic 2024-07-22 08:23:03 UTC
After installation of www/freenginx-devel, the file /usr/local/etc/freenginx/nginx.conf has two root directives

root   /usr/local/www/nginx
root   /usr/local/www/nginx-dist

Directory /usr/local/www contains symlink named freenginx that links to /usr/local/www/freenginx-dist, but only nginx-dist exists in the same directory.

It would be great if nginx-dist can be renamed to freenginx-dist and the default config file paths adjusted accordingly (freenginx instead of nginx and freenginx-dist instead of nginx-dist).
Comment 1 Vedran Miletic 2024-07-25 05:08:17 UTC
FWIW, www/freenginx is not affected by this; the mentioned files are named nginx in it.
Comment 2 Herbert J. Skuhra 2024-09-03 12:04:20 UTC
Created attachment 253294 [details]
Patch

Can you try the attached patch?
Comment 3 Herbert J. Skuhra 2024-09-03 12:44:42 UTC
Created attachment 253295 [details]
Previous patch plus update to version 1.27.4

The 2nd patch additionally updates www/freenginx-devel to version 1.27.4.

https://freenginx.org/en/CHANGES
Comment 4 Herbert J. Skuhra 2024-10-11 07:10:06 UTC
Ping.
Comment 5 Vedran Miletic 2024-10-14 09:39:27 UTC
(In reply to Herbert J. Skuhra from comment #4)
Apologies for the delay, I missed the previous notification. I will try it this week.
Comment 6 Vedran Miletic 2024-10-20 04:59:38 UTC
(In reply to Herbert J. Skuhra from comment #3)
Installation works fine, but starting fails with:

# service nginx onestart
/usr/local/etc/rc.d/nginx: WARNING: /usr/local/etc/nginx/nginx.conf is not readable.
/usr/local/etc/rc.d/nginx: WARNING: failed precmd routine for nginx
Comment 7 Herbert J. Skuhra 2024-10-20 07:40:45 UTC
(In reply to Vedran Miletic from comment #6)
I think this part is missing:

diff --git a/www/freenginx-devel/files/nginx.in b/www/freenginx-devel/files/nginx.in
index 652468a97596..7da8670ba17e 100644
--- a/www/freenginx-devel/files/nginx.in
+++ b/www/freenginx-devel/files/nginx.in
@@ -44,7 +44,7 @@ command="%%PREFIX%%/sbin/nginx"
 _pidprefix="%%NGINX_RUNDIR%%"
 pidfile="${_pidprefix}/${name}.pid"
 _tmpprefix="%%NGINX_TMPDIR%%"
-required_files=%%PREFIX%%/etc/nginx/nginx.conf
+required_files=%%PREFIX%%/etc/freenginx/nginx.conf
 extra_commands="reload configtest upgrade gracefulstop"
 
 [ -z "$nginx_enable" ]         && nginx_enable="NO"
Comment 8 Herbert J. Skuhra 2024-10-20 08:06:37 UTC
Created attachment 254388 [details]
Update to version 1.27.4 and minor fixes for this PR

I've updated the patch to fix rc script. In case anyone here cares. Port maintainer?
Comment 9 Vedran Miletic 2024-10-20 09:12:24 UTC
(In reply to Herbert J. Skuhra from comment #8)
This works.
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-11-25 17:48:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=beaad8dead17d4783644d466e4d3003c0ea0e655

commit beaad8dead17d4783644d466e4d3003c0ea0e655
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2024-11-25 17:45:11 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2024-11-25 17:47:39 +0000

    www/freenginx-devel: Update to 1.27.4

    Update to 1.27.4, fix Invalid root path

    PR:     280401
    Sponsored by:   Netzkommune GmbH

 www/freenginx-devel/Makefile                    | 6 +++---
 www/freenginx-devel/distinfo                    | 2 +-
 www/freenginx-devel/files/nginx.in              | 2 +-
 www/freenginx-devel/files/patch-conf-nginx.conf | 4 ++--
 www/freenginx-devel/files/pkg-message.in        | 2 +-
 www/freenginx-devel/pkg-plist                   | 8 ++++----
 6 files changed, 12 insertions(+), 12 deletions(-)