From eb94eab34a0893fb5b8f78652f338df85f492a9b Mon Sep 17 00:00:00 2001 From: Jonathan McDowell Date: Sun, 18 Aug 2019 20:46:39 +0100 Subject: [PATCH] Deprecate the .conf configuration file format 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 | 6 ++++++ runtests | 19 +------------------ t/test-in.conf | 8 -------- 3 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 t/test-in.conf diff --git a/onak-conf.c b/onak-conf.c index 8925dbc..7b8a2e3 100644 --- a/onak-conf.c +++ b/onak-conf.c @@ -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, diff --git a/runtests b/runtests index b65b6e0..60c0222 100755 --- 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 index 329fc4c..0000000 --- a/t/test-in.conf +++ /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 -- 2.39.5