On Sat, 27 Oct 2012 00:09:46 +0200, intrigeri wrote: > According to debian/changelog, this was introduced in 1.4.6-1: > > * munin.postinst: only create link from /etc/munin/apache.conf to > /etc/apache2/conf.d/munin on new installations, not on upgrades. > (Closes: #619399) > > After reading #619399, it seems to me the answer to my question is > a clear "yes", so goto #2.
And then we have the question, when the symlink was removed, and this changed in 1.4.6-3: * munin/postrm: only delete /etc/apache2/conf.d/munin on purge. (Closes: #653596) - Sadly the fix will only be effective the next time munin is upgraded... So, it was removed until 1.4.6-3 and only re-created until 1.4.6-1; and after 1.4.6-3 and before 1.4.6-1 everything should be ok. Which means we need to create the symlink for new installs and for upgrades from this range. Correct so far? Here's an attempt to implement this idea: #v+ diff -u munin-2.0.6/debian/changelog munin-2.0.6/debian/changelog --- munin-2.0.6/debian/changelog +++ munin-2.0.6/debian/changelog @@ -1,3 +1,14 @@ +munin (2.0.6-1.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Fix "/etc/apache2/conf.d/munin removed on upgrade": + - debian/munin.postinst: create symlink for new installs and also for + upgrades from versions where it was still removed (up to 1.4.6-3) but + not re-created (from 1.4.6-1 onwards). + (Closes: #677943) + + -- gregor herrmann <gre...@debian.org> Sun, 21 Oct 2012 16:27:43 +0200 + munin (2.0.6-1) unstable; urgency=high * New upstream release 2.0.6, switching back to cron graphing (as it better diff -u munin-2.0.6/debian/munin.postinst munin-2.0.6/debian/munin.postinst --- munin-2.0.6/debian/munin.postinst +++ munin-2.0.6/debian/munin.postinst @@ -63,8 +63,11 @@ webserver=apache2 webserver_init_script="/etc/init.d/$webserver" if [ -d /etc/$webserver/conf.d ] && [ ! -e /etc/$webserver/conf.d/munin ]; then - if [ -z "$prevver" ] ; then + if [ -z "$prevver" ] || \ + dpkg --compare-versions $prevver ge 1.4.6-1~ && \\ + dpkg --compare-versions $prevver lt 1.4.7~ ; then # only create link on new installs + # or when upgrading from a version where it was removed unconditionally ln -s ../../munin/apache.conf /etc/$webserver/conf.d/munin fi if [ -f $webserver_init_script ];then #v- Please double-check if I got the logic right :) Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Paul Simon: The Obvious Child
signature.asc
Description: Digital signature