Commit Briefs

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@


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.


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.


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@


Thomas Adam

fmt


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@


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@


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@


Thomas Adam

gotwebd: garbage collect %token FCGI_SOCKET

ok stsp@



Thomas Adam

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

ok tracey



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.



Thomas Adam

gotwebd: listen on localhost only by default

ok tracey


Thomas Adam

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

ok tracey


Thomas Adam

gotwebd: do not allocate server/socket list heads separately

ok millert@



Thomas Adam

fix snprintf error handling

follow the "proper secure idiom" described in the CAVEATS section of printf(3). reminded by tb@ and millert@


Thomas Adam

convert gotwebd.conf "bind interface IP/iface" to "listen on IP/iface"

ok kn, tracey


Thomas Adam

make gotwebd start up without a config file

ok tracey


Thomas Adam

move use of sin_len out of gotwebd's parse.y

ok tracey


Thomas Adam

portable: add back sys/queue.h

Now that the handling of including sys/queue.h is better, there's no need to remove those lines from the source. Copy the location of those original sys/queue.h lines from upstream at the same line number, so as to avoid any conflicts in the future.


Thomas Adam

gotwebd: remove tls.h

TLS isn't currently being used within gotwebd, so this include can be removed. Notice by naddy, and OK stsp@


Thomas Adam

portable: gotwebd: first stab at compilation

This is not yet "clean", but does compile. A few things to consider: * See comments beginning with "TA:"