Commits


gotwebd: remove previd and prevset query string parameter They're no longer used.


gotwebd: use less temp files Instead of allocating a whole set of temp fd per `listen' directive, just use a global set per "sockets" process. This is fine since gotwebd doesn't keep multiple connections open at the same time, once it enters gotwebd_process_request() it won't exit until all the page has been processed. (this because we don't have async APIs for got operations.) ok stsp@


gotwebd: allow to change the user ok stsp@


got{,web}d: unify log.c gotd and gotwebd are using almost the same log.c file, so unify. This only slightly changes gotwebd logs to include the process name, like gotd. ok stsp@


gotwebd: remove unix_socket_name Now that `listen' is a top-level, `unix_socket_name' is useless. The default socket remains /var/www/run/gotweb.sock, to listen on an alternate socket now `listen on socket "/some/other/sock" can be used. part of a larger diff that's ok stsp@


gotwebd: make `listen' a top-level statement gotwebd only uses the server name (i.e. the Host HTTP header) to match the server blocks. Since gotwebd by design sits behind an http server which is expected to filter virtual hosts, there's little point in having `listen' per-server. part of a larger diff that's ok stsp@


gotwebd: simplify handling of unix sockets - don't assume an implicit "listen on socket" when another listen was specified in a server block - allow servers to share the sockets they're listening on - fix unix_socket_name; now it's actually used - remove `listen on socket off' and `unix_socket off' options that are now no longer useful - unify the internal handling of the sockets, i.e. don't consider unix socket special. ok tracey@


gotwebd: retire max_repos setting Unlike max_repos_display which limits the number of items per page, max_repos is an hard-limit on the number of repos gotwebd would process. "kill it with fire" tracey@ about the idea ok stsp


gotwebd: add knob for the number of tags and commits in the summary page ok jamsek


gotwebd: remove PAGE handling The page querystring parameter is long gone and currently unused. It was replaced mith the "more" buttons in all the views, except INDEX that uses `index_page'. ok jamsek


gotwebd: use nitems() instead of ACTIONS__MAX I feel safer by using the explicit size of the table rather than an hypothetical maximum value given by the enum. Mostly because in the past I edited a table and forgot to remove the corresponding enum value. ok stsp@


gotwebd: use 'more' for the tag listing too prodded by stsp and jamsek; ok stsp@


gotwebd: render less tags in the summary page suggested / ok stsp


gotwebd: render READMEs in the tree view ok tracey@


gotwebd: add patch action to serve diffs in plain text ok tracey@


gotwebd: inline and remove IMSG_SIZE_CHECK() I always find confusing if IMSG_SIZE_CHECK() takes pointers or not, and we had at least a few instances of wrong usages, so inline (with exact size checks) and remove the macro. ok stsp@


remove the gotwebd repository cache It only had 4 slots so was never quite useful, and sharing of sock->pack_fds across cached repositories seems problematic. with help from + ok op@


gotwebd: define constant instead of using the magic number 3 suggested by stsp@


gotwebd: get rid of proc.[ch] proc.c really shines when there's a network of different types of processes, potentially with a various number of instances each, that needs to exchange messages. Gotwebd instead has a much simpler design, and using proc.c causes more overhead (/headaches) than it solves. So, this attempts to provide the same functionalities but with a much simpler implementation that fits gotwebd better. ok stsp@


gotwebd: improve gotwebd_assign_querystring() This prevents the issues that we just hit with forgetting to remove PREVID: instead of relying on the enum value to yield the size of a table, use nitems(). Also, quit as soon as the matching key was found, no need to iterate further. ok stsp@


gotwebd: garbage-collect PREVID, removed long time ago This leftover kept QSELEM__MAX bigger than the querystring_keys[] table and causes gotweb_assign_querystring to go out of bounds. Spotted on alpine (thanks to -portable.)


gotwebd: clean up sockets_create_socket a bit Instead of hardcoding the flags, keep ai_{family,socktype,protocol} from the getaddrinfo() call and apply them here. ok stsp@


gotadmin: get rid of got_sockaddr.[ch] usage It was added due to gotwebd weird structure sockaddr_storage handling. Instead, save the size reported by getaddrinfo() and not reach into the struct sockaddr_storage at all (except for extracting the port number for diagnostics purposes.) sockets_conf_new_socket_fcgi() gets an hardcoded ipproto to zero (which is the only value it can get in practice, and keeps for the moment the hardcoded SOCK_STREAM. It'll be cleaned in a follow-up. ok stsp@


gotwebd: merge host() and get_addrs(); use * instead of "" for any addr ok plus tweaks stsp@


gotwebd: render all the datetimes in a time tag fixes an unused variable that should have been dropped in previous commit too. ok stsp@