In fact, while it's clearly a dpkg bug that it's tripping an assertion, the proximate cause is ufw's trigger failing as follows:
Sep 3 08:16:40 in-target: Processing triggers for ufw ...
Sep 3 08:16:51 kernel: [17312.770421] ip_tables: (C) 2000-2006 Netfilter Core Team
Sep 3 08:16:52 in-target: iptables-restore v1.4.0:
Sep 3 08:16:52 in-target: iptables-restore: unable to initialize table 'filter'
Sep 3 08:16:52 in-target:
Sep 3 08:16:52 in-target: Error occurred at line: 1
Sep 3 08:16:52 in-target: Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Sep 3 08:16:52 in-target: ERROR: problem running iptables
Sep 3 08:16:52 in-target:
Sep 3 08:16:53 in-target: dpkg: subprocess post-installation script returned error exit status 1
Sep 3 08:16:54 in-target: E:
Sep 3 08:16:54 in-target: Sub-process /usr/bin/dpkg returned an error code (2)
(I don't suppose that the fix for bug 261323 takes care of this? I don't think so, but wasn't sure.)
ufw needs to be careful not to touch the firewall when running inside a chroot like this. This will also make sure that it doesn't accidentally fire on things like live CD builds, which could have undesirable consequences.
In fact, while it's clearly a dpkg bug that it's tripping an assertion, the proximate cause is ufw's trigger failing as follows:
Sep 3 08:16:40 in-target: Processing triggers for ufw ...
Sep 3 08:16:51 kernel: [17312.770421] ip_tables: (C) 2000-2006 Netfilter Core Team
Sep 3 08:16:52 in-target: iptables-restore v1.4.0:
Sep 3 08:16:52 in-target: iptables-restore: unable to initialize table 'filter'
Sep 3 08:16:52 in-target:
Sep 3 08:16:52 in-target: Error occurred at line: 1
Sep 3 08:16:52 in-target: Try `iptables-restore -h' or 'iptables-restore --help' for more information.
Sep 3 08:16:52 in-target: ERROR: problem running iptables
Sep 3 08:16:52 in-target:
Sep 3 08:16:53 in-target: dpkg: subprocess post-installation script returned error exit status 1
Sep 3 08:16:54 in-target: E:
Sep 3 08:16:54 in-target: Sub-process /usr/bin/dpkg returned an error code (2)
(I don't suppose that the fix for bug 261323 takes care of this? I don't think so, but wasn't sure.)
ufw needs to be careful not to touch the firewall when running inside a chroot like this. This will also make sure that it doesn't accidentally fire on things like live CD builds, which could have undesirable consequences.