[cont-init.d] 10-cjk-font.sh: executing...
[cont-init.d] 10-cjk-font.sh: installing CJK font...
[cont-init.d] 10-cjk-font.sh: Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
[cont-init.d] 10-cjk-font.sh: Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
[cont-init.d] 10-cjk-font.sh: Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
[cont-init.d] 10-cjk-font.sh: Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [267 kB]
[cont-init.d] 10-cjk-font.sh: Get:5 http://dist.jriver.com/latest/mediacenter buster InRelease [3612 B]
[cont-init.d] 10-cjk-font.sh: Get:6 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
[cont-init.d] 10-cjk-font.sh: Get:7 http://deb.nodesource.com/node_12.x buster InRelease [4584 B]
[cont-init.d] 10-cjk-font.sh: Get:8 http://dist.jriver.com/latest/mediacenter buster/main armhf Packages [683 B]
[cont-init.d] 10-cjk-font.sh: Get:9 http://dist.jriver.com/latest/mediacenter buster/main i386 Packages [707 B]
[cont-init.d] 10-cjk-font.sh: Get:10 http://dist.jriver.com/latest/mediacenter buster/main amd64 Packages [677 B]
[cont-init.d] 10-cjk-font.sh: Get:11 http://dist.jriver.com/latest/mediacenter buster/main arm64 Packages [644 B]
[cont-init.d] 10-cjk-font.sh: Get:12 http://deb.debian.org/debian buster-updates/main amd64 Packages [9504 B]
[cont-init.d] 10-cjk-font.sh: Get:13 http://deb.nodesource.com/node_12.x buster/main amd64 Packages [767 B]
[cont-init.d] 10-cjk-font.sh: Fetched 8434 kB in 2s (4919 kB/s)
[cont-init.d] 10-cjk-font.sh: Reading package lists...
[cont-init.d] 10-cjk-font.sh: Reading package lists...
[cont-init.d] 10-cjk-font.sh: Building dependency tree...
[cont-init.d] 10-cjk-font.sh: Reading state information...
[cont-init.d] 10-cjk-font.sh: The following NEW packages will be installed:
[cont-init.d] 10-cjk-font.sh: fonts-wqy-zenhei
[cont-init.d] 10-cjk-font.sh: 0 upgraded, 1 newly installed, 0 to remove and 40 not upgraded.
[cont-init.d] 10-cjk-font.sh: Need to get 7472 kB of archives.
[cont-init.d] 10-cjk-font.sh: After this operation, 16.8 MB of additional disk space will be used.
[cont-init.d] 10-cjk-font.sh: Get:1 http://deb.debian.org/debian buster/main amd64 fonts-wqy-zenhei all 0.9.45-7 [7472 kB]
[cont-init.d] 10-cjk-font.sh: debconf: delaying package configuration, since apt-utils is not installed
[cont-init.d] 10-cjk-font.sh: Fetched 7472 kB in 1s (11.1 MB/s)
[cont-init.d] 10-cjk-font.sh: dpkg: unrecoverable fatal error, aborting:
[cont-init.d] 10-cjk-font.sh: unknown system group 'messagebus' in statoverride file; the system group got removed
[cont-init.d] 10-cjk-font.sh: before the override, which is most probably a packaging bug, to recover you
[cont-init.d] 10-cjk-font.sh: can remove the override manually with dpkg-statoverride
[cont-init.d] 10-cjk-font.sh: E: Sub-process /usr/bin/dpkg returned an error code (2)
[cont-init.d] 10-cjk-font.sh: exited 0.
Removing this line root messagebus 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper in /var/lib/dpkg/statoverride fixes this.
Modified 10-cjk-font.sh
#!/usr/bin/with-contenv sh
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
log() {
echo "[cont-init.d] $(basename $0): $*"
}
if [ "${ENABLE_CJK_FONT:-0}" -eq 1 ]; then
if fc-list | grep -q "WenQuanYi Zen Hei"; then
log "CJK font already installed."
else
log "installing CJK font..."
if [ -n "$(which apk)" ]; then
add-pkg wqy-zenhei --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing 2>&1 | sed "s/^/[cont-init.d] $(basename $0): /"
else
sed -i /messagebus/d /var/lib/dpkg/statoverride
add-pkg fonts-wqy-zenhei 2>&1 | sed "s/^/[cont-init.d] $(basename $0): /"
fi
fi
fi
# vim: set ft=sh :
On Debian this script fails https://raw.githubusercontent.com/jlesage/docker-baseimage-gui/master/rootfs/etc/cont-init.d/10-cjk-font.sh with the following error
Removing this line
root messagebus 4754 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
in/var/lib/dpkg/statoverride
fixes this.Modified
10-cjk-font.sh