From: Stefan Sperling Subject: Re: simplify gotwebd.conf fcgi_socket To: Omar Polo Cc: gameoftrees@openbsd.org Date: Tue, 30 Aug 2022 13:20:09 +0200 On Tue, Aug 30, 2022 at 11:54:15AM +0200, Omar Polo wrote: > On 2022/08/30 11:30:20 +0200, Stefan Sperling 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. diff e4556f5ad27817d84c98b820f3e952b57c4e926c 00b7cd7d6a0847fdd6a34858aa754c9fffc6ab02 commit - e4556f5ad27817d84c98b820f3e952b57c4e926c commit + 00b7cd7d6a0847fdd6a34858aa754c9fffc6ab02 blob - 5c88297ebe76ed933413a7394782c0530dc5b0f0 blob + 655d5a4af391c379320aa818045226c9f6757c02 --- gotwebd/gotwebd.conf.5 +++ gotwebd/gotwebd.conf.5 @@ -51,8 +51,6 @@ If not specified then will be used. .It Ic prefork Ar number Run the specified number of server processes. -.It Ic fgci_socket Ar on | off -Controls whether the server will listen on FCGI TCP sockets by default. .It Ic unix_socket Ar on | off Controls whether the servers will listen on unix sockets by default. .It Ic unix_socket_name Ar path @@ -86,8 +84,6 @@ The available server configuration directives are as f .It Ic custom_css Ar path Set the path to a custom Cascading Style Sheet (CSS) to be used. If this option is not specified then a default style sheet will be used. -.It Ic fgci_socket Ar on | off -Enable or disable listening on FCGI TCP sockets. .It Ic listen on Ar address Ic port Ar number Configure an address and port for incoming FCGI TCP connections. Valid @@ -193,7 +189,6 @@ server "localhost-unix" { #server "localhost-tcp" { # repos_path "/got/public" # unix_socket off -# fcgi_socket on # listen on 127.0.0.1 port 9000 # listen on ::1 port 9000 #} blob - 5d7373f2b4dc57c21636901682103257c86d3646 blob + 0e4e5d563e08acd3a08ee2114c3cb043cb55d2bd --- gotwebd/gotwebd.h +++ gotwebd/gotwebd.h @@ -334,8 +334,6 @@ struct gotwebd { int unix_socket; char unix_socket_name[PATH_MAX]; - - int fcgi_socket; }; struct querystring { blob - e5dbb389e17efbf6b7055d59bb2268ebbc47807c blob + 10244c2d15ca0a6e32c4e2eb7eedb45fa47fcc67 --- gotwebd/parse.y +++ gotwebd/parse.y @@ -191,9 +191,6 @@ main : PREFORK NUMBER { } free($2); } - | FCGI_SOCKET boolean { - gotwebd->fcgi_socket = $2; - } | UNIX_SOCKET boolean { gotwebd->unix_socket = $2; } @@ -320,6 +317,7 @@ serveropts1 : REPOS_PATH STRING { yyerror("could not get addrs"); YYERROR; } + new_srv->fcgi_socket = 1; } | MAX_REPOS NUMBER { if ($2 > 0) @@ -347,9 +345,6 @@ serveropts1 : REPOS_PATH STRING { if ($2 > 0) new_srv->max_commits_display = $2; } - | FCGI_SOCKET boolean { - new_srv->fcgi_socket = $2; - } | UNIX_SOCKET boolean { new_srv->unix_socket = $2; } @@ -416,7 +411,6 @@ lookup(char *s) static const struct keywords keywords[] = { { "chroot", CHROOT }, { "custom_css", CUSTOM_CSS }, - { "fcgi_socket", FCGI_SOCKET }, { "listen", LISTEN }, { "logo", LOGO }, { "logo_url" , LOGO_URL }, @@ -869,7 +863,7 @@ conf_new_server(const char *name) srv->max_repos = D_MAXREPO; srv->unix_socket = 1; - srv->fcgi_socket = gotwebd->fcgi_socket ? gotwebd->fcgi_socket : 0; + srv->fcgi_socket = 0; TAILQ_INIT(&srv->al); TAILQ_INSERT_TAIL(&gotwebd->servers, srv, entry);