"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: simplify gotwebd.conf fcgi_socket
To:
Omar Polo <op@omarpolo.com>
Cc:
Stefan Sperling <stsp@stsp.name>, gameoftrees@openbsd.org
Date:
Tue, 30 Aug 2022 16:34:24 +0200

Download raw body.

Thread
On 2022/08/30 15:02:39 +0200, Omar Polo <op@omarpolo.com> wrote:
> On 2022/08/30 13:20:09 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> > On Tue, Aug 30, 2022 at 11:54:15AM +0200, Omar Polo wrote:
> > > On 2022/08/30 11:30:20 +0200, Stefan Sperling <stsp@stsp.name> wrote:
> > > > Simplify gotwebd configuration by setting the fcgi_socket flag when
> > > > a "listen on" statement appears, and remove the fcgi_socket keyword
> > > > from gotwebd.conf.
> > > > 
> > > > ok?
> > > 
> > > love it, ok for me
> > 
> > Slightly better diff, also removing the fcgi_socket member of
> > struct gotwebd declared in gotwebd.h; this flag is now unused.
> 
> ah, right, i missed it.
> 
> after applying this patch there is still a `fcgi_socket' field in the
> struct server which AFAICS it's not set anywhere.  Dropping it is easy
> but config_getserver needs to be fixed as i think now it always prints
> "fcgi_socket=no".

Nah, sorry, I'm blind.  the fcgi_socket in the server struct is set by
parse.y if a `listen on' is used.  It can't go away.

> I think we can also delete the %token FCGI_SOCKET in parse.y?

this one however can go away

so ok for your diff plus this

diff /home/op/w/got
commit - a3f950c5dabc886e7d00edb95db65d2d072821d2
path + /home/op/w/got
blob - 10244c2d15ca0a6e32c4e2eb7eedb45fa47fcc67
file + gotwebd/parse.y
--- gotwebd/parse.y
+++ gotwebd/parse.y
@@ -121,7 +121,7 @@ typedef struct {
 %token	LISTEN WWW_PATH MAX_REPOS SITE_NAME SITE_OWNER SITE_LINK LOGO
 %token	LOGO_URL SHOW_REPO_OWNER SHOW_REPO_AGE SHOW_REPO_DESCRIPTION
 %token	MAX_REPOS_DISPLAY REPOS_PATH MAX_COMMITS_DISPLAY ON ERROR
-%token	SHOW_SITE_OWNER SHOW_REPO_CLONEURL PORT PREFORK FCGI_SOCKET
+%token	SHOW_SITE_OWNER SHOW_REPO_CLONEURL PORT PREFORK
 %token	UNIX_SOCKET UNIX_SOCKET_NAME SERVER CHROOT CUSTOM_CSS
 
 %token	<v.string>	STRING