I feel that a checker should be provided that checks the various configuration files -koha-conf.xml is a prime suspect- and notify the library admin of missing stanzas or invalid values. For example, missing information on fonts to be used, or reference to non-existent (or non-accessible) files and/or folders.
We already have some checks in place and the results show on the system information tab on the About Koha page. The fonts section missing could be another to add. Maybe we could change this bug report to cover that.
Closing this one for now since it's too broad. Feel free to re-open and re-name
Like bug 34064, it could be good to have an audit script that compares the current koha-conf.xml against an authoritative version. Comparing the koha-conf.xml file is significantly harder to comparing the database and kohastructure.sql, but it's not impossible. The "authoritative version" we have is a template which contains a lot of placeholders for values, so directly comparing vlaues could be tricky. Analyzing values in a meaningful way would also require a lot more work. But... missing keys are quite easy to find.
Locally, for a few years, when a new version of Koha comes out, I create/refactor a script called something like "fixup_kohaconf_2311.pl", which compares a Koha instance (created via Debian package) against /etc/koha/koha-conf-site.xml.in I think that I mentioned it previously to Jonathan on bug 28911. In fact, it looks like I shared an example script there. It's not a very maintainable script by 1 person. If we were to include a fixup script like that... we'd need to change our development process. But there is a precedent for that. ./etc/koha-conf.xml and ./debian/templates/koha-conf-site.xml.in are comparable to kohastructure.sql We'd want something like ./installer/data/mysql/updatedatabase.pl but for koha-conf.xml. So any dev that added something to koha-conf.xml would need to add an entry into "updateconfig.pl" or equivalent. (Honestly, that could make testing easier for koha-conf.xml changes as well.)
If we use a fixup script in an automated fashion, we'll need to definitely determine the permissions of the koha-conf.xml file. As I mentioned on bug 31059, I've noticed in some cases koha-conf.xml owned by the Koha instance and in some cases owned by root. This is important because if it's owned by root, it means running "koha-shell kohadev -c "perl updateconfig.pl" isn't going to work. Maybe we just assume that we need to use root to update the config files, and keep that in mind for a /usr/sbin/koha-upgrade-config script (which would invoke the real updateconfig.pl script in the right context).
Note one thing about the fixup script I've attached previously on bug 28911 The XML generated by XML::LibXML has slightly different whitespace to what we have. I'd love to change the whitespace in our template files to align with the output of XML::LibXML to make it easier to do diffs using "vimdiff" for instance.