Commit Briefs

5abbba2d46 Omar Polo

gotwebd: move log_init() call a bit earlier

Otherwise the log_warnx() call in the -D case logs to syslog.


0c64c2f803 Omar Polo

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@


cdfd248aa7 Omar Polo

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@



89cfaaa7b5 Omar Polo

gotwebd: make get_addrs() take the service name directly

This changes how we handle the port number: bubbles up the local portstr added in previous commit and lets getaddrinfo() deals with port numbers and services name. getservice() can be gc. While here add the missing free() in parse.y. ok stsp@


dfd77022fc Omar Polo

fix typo in previous


c5e111b920 Omar Polo

gotwebd: merge host() and get_addrs(); use * instead of "" for any addr

ok plus tweaks stsp@


af09dd3fec Omar Polo

gotwebd: disable listening on interfaces

ok stsp@



6fe3b58aaa Stefan Sperling

fix gotwebd unveil permissions

The main process doesn't need write access anywhere and /tmp is not needed. The sockets process didn't use unveil at all so far, but is happy with just "x" for libexec helpers and "r" for each server's repository path. Input from op@ Tested by myself and Kyle Ackerman who also reviewed the diffs. Prompted by questions from mlarkin@ ok mlarkin@, op@


b1c090542f Stefan Sperling

allow setting variables in gotd.conf; code from gotwebd/parse.y

ok op@


a3dc2f5de1 Omar Polo

gotwebd: remove dead ipproto handling in host() and host_if()

ipproto is always -1, so delete the dead code. ok stsp@


91f3651eac Omar Polo

use ibuf_fd_set() instead of reaching into the ibuf struct

discussed with tb@


ac4f092c7c Omar Polo

don't redundantly set wbuf->fd to -1

ibuf_dynamic() (called by imsg_create()) already initializes fd to -1.


2161bc2406 Omar Polo

fix some fd leaks in error paths and avoid some double close

Sweep done after a few were spotted by tb@, thanks! ok stsp@


e2766b2cfe Omar Polo

gotwebd TODO: category grouping support


14eb0fefd0 Stefan Sperling

simplify usage of the 'mesg' histedit script command

The 'mesg' script command now requires a commit ID as its argument, rather than being tied to a preceding 'pick' or 'edit' command. The old model was too confusing for new users, in particular for people used to Git's rebase -i squash semantics. The 'mesg' command is now semantically equivalent to the 'pick' command and additionally opens the log message in an editor. The new syntax is simpler to use but also requires that we drop support for one-line log messages inside the histedit script, with a commit ID taking its place in the argument space. We don't believe this feature was used much, and that a simplified usage model is more beneficial overall. Patch by Lorenz (xha) ok jamsek


ad4e3a354f Omar Polo

style


41208069f5 Omar Polo

patch: handle NULs in lines

got patch assumes that lines can be encoded as strings, so embedded NUL bytes truncates what got sees of the line. While here, add some minor semplification to the logic by splitting the type out of the line string and change linecmp into lines_eq (name suggested by stsp@) ok stsp@


23b95dce1c Stefan Sperling

i can't count


87bd0c08f2 Omar Polo

fix gotadmin cleanup -a documentation: it also removes pack files

ok stsp@


39ccd01728 Stefan Sperling

make 'tog diff' release the work tree lock earlier

Avoids 'work tree is already locked' errors from got commands while the 'tog diff' command remains running.



7781b9910f Omar Polo

gotwebd: render all the datetimes in a time tag

fixes an unused variable that should have been dropped in previous commit too. ok stsp@


bf26a63363 Omar Polo

gotwebd: inline the only use of TM_RFC822