Commit Briefs

04833bad8b Thomas Adam

gotwebd.conf: unbreak max_repos_display 0

in 1a0c81fb61 I've added a range check too strict for max_repos_display, as zero is allowed and means "show all the repositories".


0b16f49bed Thomas Adam

gotwebd: set chroot path in config_init()

saves a bit fiddling around with ternary operators. sockets_run() will reset the chroot to the default since it calls again config_init(), but at that stage it's not important anymore. ok stsp@


90757f0a7e Thomas Adam

gotwebd.conf: error if chroot is the empty string



ee003af8b9 Thomas Adam

gotwebd.conf: disallow yes/no for booleans

Supporting both "no" and "on" as valid syntax with an opposite meaning could easily result in accidental misconfiguration. Suggested by stsp, tracey agrees. Patch by Josiah Frentsos, thanks!


1fa505c4ad Thomas Adam

gotwebd: disallow 1 for max_commits_display and report range errors

ok stsp


fb0cb7081e Thomas Adam

PF_UNSPEC -> AF_UNSPEC

While they're the same value, it's more correct to use AF_UNSPEC in this case. While here, change SOCK_DGRAM to SOCK_STREAM since it's what we'll be using. ok stsp@


bccb4ec2e9 Thomas Adam

remove host, host_v4 and host_v6; rename host_dns -> host

host_dns() (now just host()) uses getaddrinfo() which knows already how to handle IPv4/IPv6 addresses. Saves a good amount of duplication. ok stsp@


e19f804004 Thomas Adam

gotwebd: drop unused `prefixlen' from struct address

ok stsp@


161663e7eb Thomas Adam

gotwebd: provide gotweb_render_page() entrypoint for all pages

simplify gotweb_process_request more, handling all the pages inside the big switch. There's only one entrypoint for rendering the templates gotweb_render_page() that takes the page' content as argument. The only real difference is that gotweb_render_index() now skips directory entries which fails to handle. ok tracey@


4fccd2fe0f Thomas Adam

portable: configure: split out dependencies

Rather than assume all dependencies are required for all programs, split them out. This will make packaging easier, as well as splitting the code to use subprojects. Note that due to the use of config.h semantics, in most cases the got_compat.h header file is now at the top of the .c file it is included in, so that it can handle the system header inclusion properly.


9efb7226be Thomas Adam

portable: cross-compile pages.c

When building the template files on the host (which is cross-compiled), do so just by handling pages.c appropriately. Based on a patch by op@, and modified by me.


bea82c4f04 Thomas Adam

gotwebd.conf: use `listen on socket' syntax for UNIX sockets too

and drop unix_socket and unix_socket_path in server context. ok stsp@


f0b4ad1586 Thomas Adam

fmt


3991b2a5fc Thomas Adam

add respect_exportok flag, defaulting to off

allows to hide repositories if they have the magic git-daemon-export-ok file ok op@ tracey@ stsp@


cfab183558 Thomas Adam

gotwebd.conf: add syntax for defining macros and document them

macros are already supported by parse.y but can only be defined with the -D flag. This adds the ``usual'' syntax for macros: varname = string. While here, fix the markup of the -D flag in the SYNOPSIS and sync the global `grammar' yacc rule with other parse.y grammars in base: - add the /* empty */ comment - increment file->errors on errors ok stsp@, "sure, go for it" tracey@


43be1edb0a Thomas Adam

gotwebd: fix crash handling -D

Avoid crashing by corrupting the pointer instead of writing to it and fix how sym is generated: it shouldn't include the '=' sign. ok / improvement tb@


b73ef4cf98 Thomas Adam

gotwebd: garbage collect %token FCGI_SOCKET

ok stsp@


e43172795b Thomas Adam

remove fcgi_socket keyword from gotwebd.conf; "listen on" now implies it

ok op@


e4c7e0b01e Thomas Adam

allow multiple "listen on" statements per server in gotwebd.conf

ok tracey


77fb808d38 Thomas Adam

change gotwebd.conf fcgi socket syntax to "listen on 'foo' port 'bar'"

ok op@


c19738c9ed Thomas Adam

fix previous: store port number in host byte order, convert for struct sockaddr

With the previous patch the listen port was correct, but the debug log output was still displaying the swapped port number. Now both listen behaviour and debug log output agree.


1e135a4fe7 Thomas Adam

fix gotwebd default fcgi listen port byte-order (port 10275 -> port 9000)

ok tracey


a90e31174c Thomas Adam

gotwebd: listen on localhost only by default

ok tracey


ae46fc5c45 Thomas Adam

gotwebd: don't listen on FCGI sockets when FCGI is not enabled

ok tracey