Packaging: irods packages should declare configuration files
Bug Report
The irods-server package contains configuration files that users might want to edit (e.g. server_config.json). It should declare them as conffiles.
iRODS Version, OS and Version
4.2.7, Ubuntu 18.04
Expected behavior
Configuration files that users might plausibly edit should be flagged as such in the packaging system (see https://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles for details), so that upgrading the package will not over-write changes made by the admin.
Observed behavior (including steps to reproduce, if applicable)
In this case, we wanted to edit
/var/lib/irods/configuration_schemas/v3/server_config.json on our -dev zones (to allow the - in the zone name), and we can't do this without the packaging system subsequently writing over this change.
Compare:
mv3@irods-humgen-dev-ies1:/$ dpkg -s openssh-server | sed -ne '/Conffiles/,/Description/p'
Conffiles:
/etc/default/ssh 500e3cf069fe9a7b9936108eb9d9c035
/etc/init.d/ssh aca247a51227a8f8b37a8c2a4a703571
/etc/init/ssh.conf 9e5ed011987e63f8035fb847170dfa3f
/etc/network/if-up.d/openssh-server 27e8d7b929948969ba71bf04fe269b4d
/etc/pam.d/sshd 8b4c7a12b031424b2a9946881da59812
/etc/ufw/applications.d/openssh-server 486b78d54b93cc9fdc950c1d52ff479e
Description: secure shell (SSH) server, for secure access from remote machines
and
mv3@irods-humgen-dev-ies1:/$ dpkg -s irods-server | sed -ne '/Conffiles/,/Description/p'
mv3@irods-humgen-dev-ies1:/$
openssh-server declares a number of conffiles, irods-server declares none.
More discussion definitely welcome...
We have moved to a philosophy of using template files that are moved into place upon setup/configuration. We have actively tried to remove all the files that might be marked as 'conffiles' for the packager - that way, we can't hold them wrong.
The schemas are not intended to be changed by users.
We have dev zones with - in the name, dating back to v3 days (maybe even earlier), so we modify the schema to allow it (since the other options are a very large database edit, or Delete All The Things :tm:). Because these are not marked as configuration files, we have to carry all of them, even though we're only changing 2 lines in configuration_schemas/server_config.json
We could copy or link the files from where the package puts them, but that would lock us in to relying on those files being installed in the same place until the next schema change.
You can have a copy of the configuration files that we ship in a slightly different location - and then point to your version.
I'm struggling to see how
You can have a copy of the configuration files that we ship in a slightly different location - and then point to your version.
is different from
We could copy or link the files from where the package puts them, but that would lock us in to relying on those files being installed in the same place until the next schema change.
I see your point... yes, that's exactly the same thing.
Apologies for my lack of reading comprehension.