Bug#838385: Inappropriate use of update-alternatives for /etc/zookeeper/conf

Simon Ruggier simon80 at gmail.com
Tue Sep 20 18:49:22 UTC 2016


Package: zookeeper
Version: 3.3.5+dfsg1-2+deb7u2

The zookeeper package uses update-alternatives to manage a symlink at
/etc/zookeeper/conf. This seems wrong to me for several reasons:
* There's no apparent value in doing it this way instead of just installing
the default configuration to /etc/zookeeper/conf, and there are no other
packages in the archive that provide other alternative targets for this
symlink
* The use case for alternatives suggested by the DPM clearly doesn't apply
here: https://www.debian.org/doc/debian-policy/ap-pkg-alternatives.html
* Every other alternative on my system, for example, is outside of /etc
* When the user customizes the configuration, they'll have to either
replace the symlink with a real folder, install another alternative with
update-alternatives, or edit files under conf_example. This is very weird
compared to how other packages deal with files under /etc
* If a user makes the mistake of updating the symlink at
/etc/zookeeper/conf outside of update-alternatives, then during the next
upgrade, the package will actually revert back to the example config and
then restart zookeeper, which is a pretty severe outcome if that zookeeper
instance was being used for anything :)

I'd suggest updating the package to migrate away from this, and just
install conf_example as a plain directory at /etc/zookeeper/conf.

Also a note regarding this bug: I had to pick a version, but this problem
exists in all versions of the package.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-java-maintainers/attachments/20160920/28354b6f/attachment.html>


More information about the pkg-java-maintainers mailing list