Commit Graph

131 Commits

Author SHA1 Message Date
Omar Polo a14b9f779f prepare 1.8 release 2022-01-30 13:35:45 +00:00
Omar Polo d23cd12c68 sync changelog 2022-01-30 13:05:13 +00:00
Omar Polo e2534fd11f note who requested what 2022-01-06 18:13:14 +00:00
Omar Polo 6effb78141 sync changelog 2022-01-02 16:38:59 +00:00
Omar Polo 5df593f3a6 oops, wrong email address 2022-01-02 16:37:26 +00:00
Omar Polo a9cb709d44 sync changelog 2022-01-01 16:34:37 +00:00
Omar Polo cc1c8f548c sync changelog 2022-01-01 10:54:17 +00:00
Omar Polo fe903d30e7 sync changelog 2021-12-11 09:12:10 +00:00
Omar Polo 52c92ef680 relax the "wont proxy request" check: don't check the port number
Don't refuse to serve the request if the port number doesn't match the
one we're listening on, as initially suggested by Allen Sobot.

Complex setup may have a gmid instance reachable from multiple ports and
the meaning of the check in the first places was to avoid tricking
clients into thinking that we're serving for those domains: the port
number is way less important than the schema or domain name.

In the long run, the best way would probably to add a `listen on'
keyword for the servers blocks, just like OpenBSD' httpd, but gmid can't
listen on multiple ports/interfaces yet
2021-12-09 20:59:05 +00:00
Omar Polo 34c4ca6ebc configure: support --prefix=...
It's like passing PREFIX=... on the command line
2021-12-09 19:24:18 +00:00
Omar Polo aa76c675eb sync changelog 2021-11-16 09:06:01 +00:00
Omar Polo eaa02ac8c7 sync changelog 2021-10-24 16:34:34 +00:00
Omar Polo 818d6aeeb6 sync changelog 2021-10-15 08:28:35 +00:00
Omar Polo 2ae10bb4ee sync 2021-10-13 20:50:37 +00:00
Omar Polo 536026c565 add script to automatically renew self-signed certificates 2021-10-11 14:42:11 +00:00
Omar Polo f0a01fc742 two -n to dump the parsed configuration
This adds a barebone dumping of the parsed configuration.  It is not
complete, but I'm interested in dumping the full path to `cert' and
`key' in order to write some scripts that can inspect the
configuration, extract the certificates and renew them when expired
automatically.

It's not easy to parse gmid configuration otherwise because the syntax
is flexible and users can use macros.  Instead, the idea is to run
gmid and let it dump the configuration once it's been parsed in a
static and predictable format.

Now is possible to parse gmid configuration with, say, awk or perl.
2021-10-09 21:40:55 +00:00
Omar Polo d7e2e22c58 add gencert, a simple script to generate self-signed certs 2021-10-09 14:07:21 +00:00
Omar Polo 2072343d6b sync changelog 2021-10-04 09:35:17 +00:00
Omar Polo c1272f63e4 sync 2021-10-04 09:08:21 +00:00
Omar Polo a49800c86a sync 2021-10-02 17:21:26 +00:00
Omar Polo 2a44a2ab6e sync changelog 2021-09-26 17:00:16 +00:00
Omar Polo 775ef04f82 mention the thanks to cage for the bugfix
Since I was in a hurry, I forgot to mention it in the tag message :/
2021-09-24 14:21:16 +00:00
Omar Polo 0d9a5b7a18 sync release 2021-09-24 11:16:32 +00:00
Omar Polo 36d2d7b4b3 sync changelog 2021-09-19 17:15:24 +00:00
Omar Polo fba809b5c7 tag 1.7.3
bump version number
2021-09-19 14:48:07 +00:00
Omar Polo ca3d8bfde6 retroactively mention the fstat64 fix 2021-09-18 11:15:40 +00:00
Omar Polo 39c5bfd64b fix changelog syntax 2021-09-18 11:09:36 +00:00
Omar Polo b03b7d5bae sync changelog 2021-09-17 16:17:16 +00:00
Omar Polo f2478b332f sync 2021-08-23 22:44:55 +00:00
Omar Polo 03747a6c51 sync 2021-07-29 07:54:41 +00:00
Omar Polo 2887c631ee sync 2021-07-27 09:22:17 +00:00
Omar Polo 735336b21e unbreak configless mode
An un-initialized field in the configless code path leads to a crash
on the first request.
2021-07-19 11:15:44 +00:00
Omar Polo a7da55710e sync 2021-07-13 11:43:07 +00:00
Omar Polo 8068d2ff33 tag v1.7.1
This version includes two bugfixes:

 - use ${MAKE} to recursively call make
 - fix the misleading example in the man page: macros name may not be
 reserved words

Both bugs found and fixed by Anna “CyberTailor”, thanks!
2021-07-11 09:50:26 +02:00
Omar Polo 094bdacd40 sync 2021-07-11 09:48:29 +02:00
Omar Polo b79b2d811b tag v1.7 2021-07-10 09:22:19 +00:00
Omar Polo 9f075bd689 sync 2021-07-09 13:36:22 +00:00
Omar Polo c39be742cf parsing: bring lots of goodies from OpenBSD' parse.y
This allows to solve the problem with the \n in the grammar (before
two following macro declaration were treated as invalid.  This also
brings in a nice `include' keyword.
2021-07-09 11:25:25 +00:00
Omar Polo d19951cf03 rename `mime MIME EXT' to `map MIME to-ext EXT'
With the newish automatic string concatenation, options like `mime'
that accepts two strings as parameter start to become ambiguous: which
strings gets concatenated?  Instead of trying to document in the
manpage which argument(s) is subject to string concatenation, do the
concat always and introduce a separator.  In the case of mime,
`to-ext' now acts as a separator to distinguish.  While there, also
use a new keyword because it sounds better.

It's dead-easy to upgrade to the new configuration, possibly with some
sed magic, but for the moment the old `mime' form is preserved: (with
a warning!)  Will be dropped in the next release.
2021-07-09 08:30:55 +02:00
Omar Polo 321341f6c0 add -T timeout to gg; don't let the regress test hang 2021-07-06 13:09:24 +00:00
Omar Polo 6edcfca97f try to preserve as much as possible CFLAGS and LDFLAGS from env
but still try to autodetect with pkg-config if they aren't provided.

Passing CFLAGS/LDFLAGS from the command line will still override the
guessed ones.
2021-07-06 13:01:11 +00:00
Omar Polo 137def5ff4 reworked seccomp filter
* SECCOMP_AUDIT_ARCH extended to support more architectures
* relax fcntl policy: allow the syscall regardless of the flags
* wrap every syscall in a ifdef, and add some (statx, fcntl64, ...)
  used in x86

Some bits were taken from dhcpcd[0], thanks!

#4 related


[0]: https://roy.marples.name/git/dhcpcd/blob/HEAD:/src/privsep-linux.c
2021-07-02 09:11:40 +00:00
Omar Polo 98f5217822 [config] concat two or more strings next to each others 2021-06-29 16:10:10 +00:00
Omar Polo 6b86655a10 don't require the strict order macro > options > servers 2021-06-29 12:42:44 +00:00
Omar Polo f98e9045ae add -D to define macros from the cmd line 2021-06-29 12:39:34 +00:00
Omar Polo 3b21cca385 allow to define macros in the config file
Macros can be defined at the top of the configuration file:

	dir = "/var/gemini"
	cert = "/etc/keys"

and re-used later, for example

	server "foo" {
		root "$dir/foo"       # -> /var/gemini/foo
		cert "$cert/foo.pem" # -> /etc/keys/foo.pem
	}
2021-06-29 12:17:40 +00:00
Omar Polo 5777923bb0 use getopt_long, add --help as synonym of -h and -V/--version 2021-06-29 10:49:59 +00:00
Omar Polo 2c43dcceb6 document `log' option 2021-06-17 09:27:09 +00:00
Omar Polo 74f0778b9a drop the dependency on lex by implementing yylex by ourselves
The actual implementation is based off doas' parse.y.  This gave us
various benefits, like cleaner code, \ to break long lines, better
handling of quotes etc...
2021-06-16 14:43:16 +00:00
Omar Polo c92b802b6a add `param' keyword 2021-06-11 15:49:46 +00:00