Compare commits

...

8 Commits

Author SHA1 Message Date
Omar Polo df2a1e3bb5
Merge dd0bb74b0f into 5864f3ce3c 2024-04-04 21:31:55 +02:00
Omar Polo 5864f3ce3c set next version 2024-04-04 19:28:14 +00:00
Omar Polo 9536c8ca63 prepare release 2.0.1 2024-04-04 19:16:33 +00:00
Omar Polo 40b71b6861 changelog for 2.0.2 2024-04-04 19:07:04 +00:00
Omar Polo 42235e3fc2 add a test for the config dumping 2024-04-04 13:07:09 +00:00
Omar Polo f53f5e5fe1 fix config dumping (-nn) handling
with the privsep rework the config dumping was unadvertitely broken,
it prints the content of the key itself.
2024-04-04 11:22:06 +00:00
Omar Polo 40ea7b163e use -Werror=implicit-function-declaration for function detection
the previous -Werror triggers too easily: on NixOS for example the
FORTIFY_SOURCE #warning about a missing optimization level breaks all
the checks when using -O0 (which is the default for non-release builds).
2024-04-03 14:03:42 +00:00
Omar Polo be265175c6 fix landlock test
include stddef.h for size_t
2024-04-03 14:01:34 +00:00
9 changed files with 58 additions and 7 deletions

View File

@ -1,3 +1,13 @@
2024-04-03 Omar Polo <op@omarpolo.com>
* configure: improve function checking in the configure
* have/landlock.c: fix landlock test
* gmid.c (main_print_conf): fix config dumping with -nn
2024-03-03 Omar Polo <op@omarpolo.com>
* gmid.c: fix `log access path' with a chroot
2024-01-30 Anna “CyberTailor”
* contrib/vim/indent/gmid.vim: fix indent

4
configure vendored
View File

@ -19,7 +19,7 @@
set -e
RELEASE=no
VERSION=2.0.1-current
VERSION=2.0.2-current
usage()
{
@ -146,7 +146,7 @@ NEED_OPENBSD_SOURCE=0
NEED_LIBBSD_OPENBSD_VIS=0
COMPATS=
COMP="${CC} ${CFLAGS} -Wno-unused -Werror"
COMP="${CC} ${CFLAGS} -Werror=implicit-function-declaration"
# singletest name var extra-cflags extra-libs msg
singletest() {

4
gmid.c
View File

@ -605,8 +605,8 @@ main_print_conf(struct conf *conf)
TAILQ_FOREACH(h, &conf->hosts, vhosts) {
printf("\nserver \"%s\" {\n", h->domain);
printf(" cert \"%s\"\n", h->cert);
printf(" key \"%s\"\n", h->key);
printf(" cert \"%s\"\n", h->cert_path);
printf(" key \"%s\"\n", h->key_path);
/* TODO: print locations... */
printf("}\n");
}

View File

@ -11,7 +11,7 @@
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd January 11, 2024
.Dd April 4, 2024
.Dt GMID.CONF 5
.Os
.Sh NAME
@ -384,7 +384,7 @@ The port the server is listening on.
.Dq GEMINI
.It Ev SERVER_SOFTWARE
The name and version of the server, i.e.
.Dq gmid/2.0.1
.Dq gmid/2.0.2
.It Ev REMOTE_USER
The subject of the client certificate if provided, otherwise unset.
.It Ev TLS_CLIENT_ISSUER

View File

@ -19,6 +19,8 @@
#include <sys/stat.h>
#include <sys/syscall.h>
#include <stddef.h>
#ifndef landlock_create_ruleset
static inline int
landlock_create_ruleset(const struct landlock_ruleset_attr *attr, size_t size,

View File

@ -20,6 +20,9 @@ fi
run_test test_punycode
run_test test_iri
# Run configuration dumping test.
run_test test_dump_config
if [ "${SKIP_RUNTIME_TESTS:-0}" -eq 1 ]; then
echo
echo "======================"

View File

@ -8,6 +8,34 @@ test_iri() {
./iri_test
}
test_dump_config() {
dont_check_server_alive=yes
gen_config '' ''
exp="$(mktemp)"
got="$(mktemp)"
cat <<EOF >$exp
prefork 3
server "localhost" {
cert "$PWD/localhost.pem"
key "$PWD/localhost.key"
}
EOF
$gmid -nn -c reg.conf > $got 2>/dev/null
ret=0
if ! cmp -s "$exp" "$got"; then
echo "config differs!" >&2
diff -u "$exp" "$got" >&2
ret=1
fi
rm "$exp" "$got"
return $ret
}
test_gemexp() {
dont_check_server_alive=yes

View File

@ -21,7 +21,7 @@ REPOLOGY_URL = https://repology.org/project/gmid/versions
SUBST = ./subst GITHUB=https://github.com/omar-polo/gmid \
SITE=https://ftp.omarpolo.com \
VERS=2.0.1 \
VERS=2.0.2 \
PUBKEY=gmid-2.0.pub \
TREE=https://github.com/omar-polo/gmid/blob/master

View File

@ -1,5 +1,13 @@
# change log
## 2024/04/04 - 2.0.2 “Lady Stardust” bugfix release
- fix `log access path' with `chroot' enabled.
- fix config dumping (-nn).
- rework grammar to allow semicolors after top-level statements.
- don't make the log styles reserved keywords.
- contrib/vim: fixed indent, from Anna “CyberTailor”, thanks!
## 2024/01/24 - 2.0.1 “Lady Stardust” bugfix release
* convert gmid to the new imsg API