tags 691125 + patch thanks Hello,
On Mon, 22 Oct 2012 13:37:09 +0200 (CEST) Dominik George <n...@naturalnet.de> wrote: > I can not reproduce this, neither on i686 nor on amd64, but that > shouldn't matter anyway. > > The .erlang.cookie file never appears on my system, not during build, > not after install and not after purging. I could reproduce the problem using piuparts /var/cache/apt/archives/ejabberd*deb. To figure out what piuparts was doing, I ran every command manually and checked at which step /root/.erlang.cookie gets created: $ debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-archive-keyring.gpg --include=eatmydata --components=main sid /tmp/manual http://ftp.de.debian.org/debian $ chroot /tmp/manual eatmydata mount -t proc proc /proc $ chroot /tmp/manual eatmydata apt-get update $ chroot /tmp/manual eatmydata apt-get clean $ cp tmpoP0mAP/usr/sbin/policy-rc.d manual/usr/sbin/policy-rc.d $ cp /var/cache/apt/archives/ejabberd_2.1.10-3_amd64.deb /tmp/manual/tmp $ chroot /tmp/manual eatmydata dpkg -i /tmp/ejabberd_2.1.10-3_amd64.deb $ chroot /tmp/manual eatmydata apt-get -yf install $ ls -hltra /tmp/manual/root total 20K -rw-r--r-- 1 root root 140 Nov 19 2007 .profile -rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc drwxr-xr-x 22 root root 4.0K Oct 26 17:33 .. -rw------- 1 root root 1.0K Oct 26 17:38 .rnd drwx------ 2 root root 4.0K Oct 26 17:38 . Up til now, everything is fine. But when removing the packages, the /root/.erlang.cookie gets created: $ chroot /tmp/manual eatmydata apt-get remove ejabberd $ ls -hltra manual/root total 24K -rw-r--r-- 1 root root 140 Nov 19 2007 .profile -rw-r--r-- 1 root root 570 Jan 31 2010 .bashrc -r-------- 1 root root 20 Oct 25 20:00 .erlang.cookie drwxr-xr-x 22 root root 4.0K Oct 26 17:33 .. -rw------- 1 root root 1.0K Oct 26 17:38 .rnd drwx------ 2 root root 4.0K Oct 26 17:39 . Upon closer examination, the .erlang.cookie is created as soon as I run chroot /tmp/manual ejabberdctl status, which is also executed in the prerm script of ejabberd. In /etc/init.d/ejabberd, ejabberdctl is always run as $EJABBERDUSER, not as root. Patching the prerm file in the following way fixes the issue: --- i/debian/prerm +++ w/debian/prerm @@ -17,7 +17,7 @@ set -e case "$1" in remove|upgrade) - if ejabberdctl status >/dev/null ; then + if su ejabberd -c "/usr/sbin/ejabberdctl status" >/dev/null ; then # Use timestamp to make database restoring easier TIME=$(date +%Y-%m-%dT%H:%M:%S) BACKUPDIR=$(mktemp -d -p /var/backups/ ejabberd-$TIME.XXXXXX) -- Best regards, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org