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 regress REGRESS_HOST="*"
freebsd_13_task:
freebsd_14_task:
freebsd_instance:
image_family: freebsd-13-0
test_script:
- pkg install -y libevent libressl pkgconf
image_family: freebsd-14-0
install_script: pkg install -y libevent libressl pkgconf
script:
- ./configure CFLAGS='-O2 -pipe -Wno-deprecated-declarations' -Werror
- make
- make regress

View File

@ -131,7 +131,7 @@ y.tab.c: parse.y
lint:
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
DISTFILES = .cirrus.yml .dockerignore .gitignore ChangeLog LICENSE \
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 include '\n'
| conf '\n'
| conf varset '\n'
| conf option '\n'
| conf vhost '\n'
| conf types '\n'
| conf error '\n' { file->errors++; }
| conf include nl
| conf varset nl
| conf option nl
| conf vhost nl
| conf types nl
| conf error nl { file->errors++; }
;
include : INCLUDE STRING {
@ -617,7 +616,7 @@ mediaopts_l : mediaopts_l mediaoptsl nl
mediaoptsl : STRING {
free(current_media);
current_media = $1;
} medianames_l optsemicolon
} medianames_l
| include
;
@ -633,17 +632,13 @@ medianamesl : numberstring {
;
nl : '\n' optnl
| ';' optnl
;
optnl : '\n' optnl /* zero or more newlines */
| ';' optnl /* semicolons too */
optnl : nl
| /*empty*/
;
optsemicolon : ';'
|
;
%%
static const struct keyword {

View File

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