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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
simplify gotwebd.conf fcgi_socket
To:
gameoftrees@openbsd.org
Date:
Tue, 30 Aug 2022 11:30:20 +0200

Download raw body.

Thread
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?

diff e4556f5ad27817d84c98b820f3e952b57c4e926c c3fbe256833d18d79f717547c0b136eb53ba6f63
commit - e4556f5ad27817d84c98b820f3e952b57c4e926c
commit + c3fbe256833d18d79f717547c0b136eb53ba6f63
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 - 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);