Compare commits

...

4 Commits

Author SHA1 Message Date
Omar Polo ebe2e54900 tweak and update freebsd task 2024-01-26 17:02:08 +00:00
Omar Polo ddb089c157 rework the grammar so that ; is accepted after variables and options
See Codeberg issue #1.
2024-01-26 16:54:58 +00:00
Omar Polo 3524375abe add a test that uses @-style macros
See Codeberg issue #1.
2024-01-26 15:34:46 +00:00
Omar Polo fe37d79200 change the default PUBKEY for the verify-release target
doesn't play well with minor releases such as 2.0.1 since for them
I reuse the 2.0 key.
2024-01-24 15:21:19 +00:00
4 changed files with 17 additions and 20 deletions

View File

@ -19,11 +19,11 @@ linux_arm_task:
- make - make
- make regress REGRESS_HOST="*" - make regress REGRESS_HOST="*"
freebsd_13_task: freebsd_14_task:
freebsd_instance: freebsd_instance:
image_family: freebsd-13-0 image_family: freebsd-14-0
test_script: install_script: pkg install -y libevent libressl pkgconf
- pkg install -y libevent libressl pkgconf script:
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations' -Werror - ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations' -Werror
- make - make
- make regress - make regress

View File

@ -131,7 +131,7 @@ y.tab.c: parse.y
lint: lint:
man -Tlint -Wstyle -l gmid.8 gmid.conf.5 gemexp.1 gg.1 titan.1 man -Tlint -Wstyle -l gmid.8 gmid.conf.5 gemexp.1 gg.1 titan.1
PUBKEY = keys/gmid-${VERSION}.pub PUBKEY = keys/gmid-2.0.pub
PRIVKEY = set-PRIVKEY PRIVKEY = set-PRIVKEY
DISTFILES = .cirrus.yml .dockerignore .gitignore ChangeLog LICENSE \ DISTFILES = .cirrus.yml .dockerignore .gitignore ChangeLog LICENSE \
Makefile README.md config.c configure crypto.c dirs.c fcgi.c \ Makefile README.md config.c configure crypto.c dirs.c fcgi.c \

23
parse.y
View File

@ -150,13 +150,12 @@ typedef struct {
%% %%
conf : /* empty */ conf : /* empty */
| conf include '\n' | conf include nl
| conf '\n' | conf varset nl
| conf varset '\n' | conf option nl
| conf option '\n' | conf vhost nl
| conf vhost '\n' | conf types nl
| conf types '\n' | conf error nl { file->errors++; }
| conf error '\n' { file->errors++; }
; ;
include : INCLUDE STRING { include : INCLUDE STRING {
@ -617,7 +616,7 @@ mediaopts_l : mediaopts_l mediaoptsl nl
mediaoptsl : STRING { mediaoptsl : STRING {
free(current_media); free(current_media);
current_media = $1; current_media = $1;
} medianames_l optsemicolon } medianames_l
| include | include
; ;
@ -633,17 +632,13 @@ medianamesl : numberstring {
; ;
nl : '\n' optnl nl : '\n' optnl
| ';' optnl
; ;
optnl : '\n' optnl /* zero or more newlines */ optnl : nl
| ';' optnl /* semicolons too */
| /*empty*/ | /*empty*/
; ;
optsemicolon : ';'
|
;
%% %%
static const struct keyword { static const struct keyword {

View File

@ -287,6 +287,7 @@ test_fastcgi_deprecated_syntax() {
test_macro_expansion() { test_macro_expansion() {
cat <<EOF > reg.conf cat <<EOF > reg.conf
pwd = "$PWD" pwd = "$PWD"
common_opts = "lang it; auto index on"
server "localhost" { server "localhost" {
# the quoting of \$ is for sh # the quoting of \$ is for sh
@ -294,6 +295,7 @@ server "localhost" {
key \$pwd "/localhost.key" key \$pwd "/localhost.key"
root \$pwd "/testdata" root \$pwd "/testdata"
listen on $REGRESS_HOST port $port listen on $REGRESS_HOST port $port
@common_opts
} }
EOF EOF
@ -305,7 +307,7 @@ EOF
run run
fetch / fetch /
check_reply "20 text/gemini" "# hello world" check_reply "20 text/gemini;lang=it" "# hello world"
} }
test_proxy_relay_to() { test_proxy_relay_to() {