Comment 14 for bug 43987

Revision history for this message
Steve Magoun (smagoun) wrote :

I can reproduce when running debootstrap from cron.

Use the attached script to reproduce:
1) Add debootstrap and chroot to sudoers as NOPASSWD:
user host=NOPASSWD: /usr/sbin/chroot
user host=NOPASSWD: /usr/sbin/debootstrap
2) Run attached script via cron
3) Script fails with the following error:
[...]
chgrp: cannot access `/etc/ssl/private/ssl-cert-snakeoil.key': No such
file or directory
chmod: cannot access `/etc/ssl/private/ssl-cert-snakeoil.key': No such
file or directory
dpkg: error processing ssl-cert (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 ssl-cert
E: Sub-process /usr/bin/dpkg returned an error code (1)

(Step 4: Clean up sudoers if desired)

The patch I attached in comment #7 fixes the problem for me.