]> the.earth.li Git - onak.git/commitdiff
Deprecate the .conf configuration file format
authorJonathan McDowell <noodles@earth.li>
Sun, 18 Aug 2019 19:46:39 +0000 (20:46 +0100)
committerJonathan McDowell <noodles@earth.li>
Sun, 18 Aug 2019 19:46:39 +0000 (20:46 +0100)
The old .conf config file was intended to be compatible with the ancient
PKS keyserver. All new features are only supported with the .ini format
and this is going to make the automated tests supporting both more
awkward. So deprecate the old style and stop testing it.

onak-conf.c
runtests
t/test-in.conf [deleted file]

index 8925dbcb6a970d94ae5ab7a12a6865ff182d1c71..7b8a2e3d6b1eb32ddb0bd908c96fbda7244ab756 100644 (file)
@@ -391,6 +391,12 @@ void readconfig(const char *configfile) {
                conffile = fopen(configfile, "r");
        }
 
+       if (oldstyle) {
+               logthing(LOGTHING_CRITICAL, "Reading deprecated old-style "
+                               "configuration file. This will not be "
+                               "supported in the next release.");
+       }
+
        if (conffile != NULL) {
                if (!fgets(curline, 1023, conffile)) {
                        logthing(LOGTHING_CRITICAL,
index b65b6e052b81165d3e58b8a03c16d0ffc68fa4d1..60c02229520714bf4082ec7cff80823888004838 100755 (executable)
--- a/runtests
+++ b/runtests
@@ -33,24 +33,7 @@ for t in libkeydb_*.so; do
        backend=${t##libkeydb_}
        backend=${backend%%.so}
        if [ "`echo ${TESTSDIR}/$backend-*`" != "${TESTSDIR}/$backend-*" ]; then
-               echo "* testing $backend backend [conf]"
-               (sed -e "s;BUILDDIR;${BUILDDIR};" -e "s;WORKDIR;${WORKDIR};" \
-                       ${TESTSDIR}/test-in.conf ; \
-                       echo db_backend $backend) > ${WORKDIR}/test.conf
-               for t in ${TESTSDIR}/$backend-*.t ${TESTSDIR}/all-*.t; do
-                       total=`expr $total + 1`
-                       mkdir ${WORKDIR}/db/
-                       if ! $t ${WORKDIR}/test.conf $backend; then
-                               echo "test $t failed" >&2
-                               fail=`expr $fail + 1`
-                       fi
-                       rm -rf ${WORKDIR}/db/
-               done
-               rm ${WORKDIR}/test.conf
-       fi
-
-       if [ "`echo ${TESTSDIR}/$backend-*`" != "${TESTSDIR}/$backend-*" ]; then
-               echo "* testing $backend backend [ini]"
+               echo "* testing $backend backend"
                sed -e "s;BUILDDIR;${BUILDDIR};" -e "s;WORKDIR;${WORKDIR};" \
                        -e "s;DB;${backend};" \
                        ${TESTSDIR}/test-in.ini > ${WORKDIR}/test.ini
diff --git a/t/test-in.conf b/t/test-in.conf
deleted file mode 100644 (file)
index 329fc4c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-pks_bin_dir BUILDDIR
-backends_dir BUILDDIR
-db_dir WORKDIR/db/
-logfile onak.log
-loglevel 7
-use_keyd false
-this_site pgp-public-keys@localhost
-max_reply_keys 128