++++ realpath -s /CustomPiOS/build +++ dirname /CustomPiOS/build ++ BUILD_SCRIPT_PATH=/CustomPiOS ++ source /CustomPiOS/common.sh ++ install_cleanup_trap ++ set -e ++ trap cleanup SIGINT SIGTERM ++++ realpath -s /CustomPiOS/build +++ dirname /CustomPiOS/build ++ CUSTOM_OS_PATH=/CustomPiOS ++ pushd /CustomPiOS /CustomPiOS /distro +++ git rev-parse HEAD fatal: not a git repository (or any of the parent directories): .git ++ export OCTOPI_COMMIT= ++ OCTOPI_COMMIT= ++ popd /distro ++ source /CustomPiOS/config +++++ realpath -s /CustomPiOS/config ++++ dirname /CustomPiOS/config +++ CONFIG_DIR=/CustomPiOS +++ export BUILD_VARIANT=default +++ BUILD_VARIANT=default +++ BUILD_FLAVOR=default +++ WORKSPACE_POSTFIX= +++ '[' 0 -gt 0 ']' +++ '[' 0 -gt 1 ']' +++ echo -e '--> Building VARIANT default, FLAVOR default' --> Building VARIANT default, FLAVOR default +++ '[' -f /CustomPiOS/config.local ']' +++ source /distro/config ++++ export DIST_NAME=ZynthianOS ++++ DIST_NAME=ZynthianOS ++++ export DIST_VERSION=1.0.0 ++++ DIST_VERSION=1.0.0 ++++ export 'MODULES=base(network, disable-services(zynthianos))' ++++ MODULES='base(network, disable-services(zynthianos))' ++++ export BASE_OVERRIDE_HOSTNAME=zynthian ++++ BASE_OVERRIDE_HOSTNAME=zynthian ++++ export BASE_IMAGE_ENLARGEROOT=14000 ++++ BASE_IMAGE_ENLARGEROOT=14000 ++++ export BASE_IMAGE_RESIZEROOT=200 ++++ BASE_IMAGE_RESIZEROOT=200 ++++ BASE_APT_CACHE=/distro/aptcache +++ '[' default '!=' default ']' +++ echo Import the variant config if we have one Import the variant config if we have one +++ '[' -n '' ']' +++ '[' -n '' ']' +++ '[' -f /distro/config.local ']' +++ TMP='base,network, disable-services,zynthianos))' +++ TMP='base,network,disable-services,zynthianos))' +++ MODULES_LIST=base,network,disable-services,zynthianos,, ++++ echo base,network,disable-services,zynthianos,, ++++ tr , '\n' +++ for module in $(echo "${MODULES_LIST}" | tr "," "\n") +++ '[' -d /distro/modules/base ']' +++ '[' -d /CustomPiOS/modules/base ']' +++ export MODULE_PATH=/CustomPiOS/modules/base +++ MODULE_PATH=/CustomPiOS/modules/base +++ echo loading base config at /CustomPiOS/modules/base/config loading base config at /CustomPiOS/modules/base/config +++ '[' -f /CustomPiOS/modules/base/config ']' +++ source /CustomPiOS/modules/base/config ++++ BASE_VERSION=1.3.0 ++++ '[' -n '' ']' ++++ BASE_PRESCRIPT= ++++ '[' -n '' ']' ++++ BASE_POSTSCRIPT= ++++ '[' -n '' ']' ++++ BASE_IMAGE_PATH=/distro/image ++++ '[' -n '' ']' ++++ BASE_IMAGE_RASPBIAN=yes ++++ '[' -n '' ']' +++++ ls -t /distro/image/2019-07-10-raspbian-buster-lite.zip +++++ head -n 1 ++++ BASE_ZIP_IMG=/distro/image/2019-07-10-raspbian-buster-lite.zip ++++ '[' -n '' ']' ++++ BASE_WORKSPACE=/distro/workspace ++++ '[' -n '' ']' ++++ BASE_MOUNT_PATH=/distro/workspace/mount ++++ '[' -n '' ']' ++++ BASE_ROOT_PARTITION=2 ++++ '[' -n 14000 ']' ++++ '[' -n 200 ']' ++++ '[' -n /distro/aptcache ']' ++++ '[' -n '' ']' ++++ BASE_APT_PROXY= ++++ '[' -n '' ']' ++++ BASE_PYPI_INDEX= ++++ '[' -n zynthian ']' ++++ '[' -n '' ']' ++++ BASE_BUILD_REPO_MIRROR= ++++ '[' -n '' ']' ++++ BASE_SSH_ENABLE=yes ++++ '[' -n '' ']' +++++ pushd /CustomPiOS +++++ git rev-parse HEAD fatal: not a git repository (or any of the parent directories): .git +++++ popd ++++ BASE_COMMIT= ++++ '[' -n '' ']' ++++ BASE_CONFIG_MEMSPLIT=default ++++ '[' -n '' ']' ++++ BASE_CONFIG_TIMEZONE=default ++++ '[' -n '' ']' ++++ BASE_CONFIG_LOCALE=default ++++ '[' -n '' ']' ++++ BASE_CONFIG_KEYBOARD=default +++ echo ================================================================ ================================================================ +++ echo 'Using the following config:' Using the following config: +++ module_up=BASE +++ module_up=BASE_ +++ IFS= +++ read -r var ++++ compgen -A variable BASE_ +++ export BASE_APT_CACHE +++ echo BASE_APT_CACHE BASE_APT_CACHE +++ IFS= +++ read -r var +++ export BASE_APT_PROXY +++ echo BASE_APT_PROXY BASE_APT_PROXY +++ IFS= +++ read -r var +++ export BASE_BUILD_REPO_MIRROR +++ echo BASE_BUILD_REPO_MIRROR BASE_BUILD_REPO_MIRROR +++ IFS= +++ read -r var +++ export BASE_COMMIT +++ echo BASE_COMMIT BASE_COMMIT +++ IFS= +++ read -r var +++ export BASE_CONFIG_KEYBOARD +++ echo BASE_CONFIG_KEYBOARD BASE_CONFIG_KEYBOARD +++ IFS= +++ read -r var +++ export BASE_CONFIG_LOCALE +++ echo BASE_CONFIG_LOCALE BASE_CONFIG_LOCALE +++ IFS= +++ read -r var +++ export BASE_CONFIG_MEMSPLIT +++ echo BASE_CONFIG_MEMSPLIT BASE_CONFIG_MEMSPLIT +++ IFS= +++ read -r var +++ export BASE_CONFIG_TIMEZONE +++ echo BASE_CONFIG_TIMEZONE BASE_CONFIG_TIMEZONE +++ IFS= +++ read -r var +++ export BASE_IMAGE_ENLARGEROOT +++ echo BASE_IMAGE_ENLARGEROOT BASE_IMAGE_ENLARGEROOT +++ IFS= +++ read -r var +++ export BASE_IMAGE_PATH +++ echo BASE_IMAGE_PATH BASE_IMAGE_PATH +++ IFS= +++ read -r var +++ export BASE_IMAGE_RASPBIAN +++ echo BASE_IMAGE_RASPBIAN BASE_IMAGE_RASPBIAN +++ IFS= +++ read -r var +++ export BASE_IMAGE_RESIZEROOT +++ echo BASE_IMAGE_RESIZEROOT BASE_IMAGE_RESIZEROOT +++ IFS= +++ read -r var +++ export BASE_MOUNT_PATH +++ echo BASE_MOUNT_PATH BASE_MOUNT_PATH +++ IFS= +++ read -r var +++ export BASE_OVERRIDE_HOSTNAME +++ echo BASE_OVERRIDE_HOSTNAME BASE_OVERRIDE_HOSTNAME +++ IFS= +++ read -r var +++ export BASE_POSTSCRIPT +++ echo BASE_POSTSCRIPT BASE_POSTSCRIPT +++ IFS= +++ read -r var +++ export BASE_PRESCRIPT +++ echo BASE_PRESCRIPT BASE_PRESCRIPT +++ IFS= +++ read -r var +++ export BASE_PYPI_INDEX +++ echo BASE_PYPI_INDEX BASE_PYPI_INDEX +++ IFS= +++ read -r var +++ export BASE_ROOT_PARTITION +++ echo BASE_ROOT_PARTITION BASE_ROOT_PARTITION +++ IFS= +++ read -r var +++ export BASE_SSH_ENABLE +++ echo BASE_SSH_ENABLE BASE_SSH_ENABLE +++ IFS= +++ read -r var +++ export BASE_VERSION +++ echo BASE_VERSION BASE_VERSION +++ IFS= +++ read -r var +++ export BASE_WORKSPACE +++ echo BASE_WORKSPACE BASE_WORKSPACE +++ IFS= +++ read -r var +++ export BASE_ZIP_IMG +++ echo BASE_ZIP_IMG BASE_ZIP_IMG +++ IFS= +++ read -r var +++ echo ================================================================ ================================================================ +++ for module in $(echo "${MODULES_LIST}" | tr "," "\n") +++ '[' -d /distro/modules/network ']' +++ '[' -d /CustomPiOS/modules/network ']' +++ export MODULE_PATH=/CustomPiOS/modules/network +++ MODULE_PATH=/CustomPiOS/modules/network +++ echo loading network config at /CustomPiOS/modules/network/config loading network config at /CustomPiOS/modules/network/config +++ '[' -f /CustomPiOS/modules/network/config ']' +++ source /CustomPiOS/modules/network/config +++ echo ================================================================ ================================================================ +++ echo 'Using the following config:' Using the following config: +++ module_up=NETWORK +++ module_up=NETWORK_ +++ IFS= +++ read -r var ++++ compgen -A variable NETWORK_ +++ echo ================================================================ ================================================================ +++ for module in $(echo "${MODULES_LIST}" | tr "," "\n") +++ '[' -d /distro/modules/disable-services ']' +++ '[' -d /CustomPiOS/modules/disable-services ']' +++ export MODULE_PATH=/CustomPiOS/modules/disable-services +++ MODULE_PATH=/CustomPiOS/modules/disable-services +++ echo loading disable-services config at /CustomPiOS/modules/disable-services/config loading disable-services config at /CustomPiOS/modules/disable-services/config +++ '[' -f /CustomPiOS/modules/disable-services/config ']' +++ echo 'WARNING: module disable-services has no config file' WARNING: module disable-services has no config file +++ echo ================================================================ ================================================================ +++ echo 'Using the following config:' Using the following config: +++ module_up=DISABLE-SERVICES +++ module_up=DISABLE_SERVICES_ +++ IFS= +++ read -r var ++++ compgen -A variable DISABLE_SERVICES_ +++ echo ================================================================ ================================================================ +++ for module in $(echo "${MODULES_LIST}" | tr "," "\n") +++ '[' -d /distro/modules/zynthianos ']' +++ export MODULE_PATH=/distro/modules/zynthianos +++ MODULE_PATH=/distro/modules/zynthianos +++ echo loading zynthianos config at /distro/modules/zynthianos/config loading zynthianos config at /distro/modules/zynthianos/config +++ '[' -f /distro/modules/zynthianos/config ']' +++ source /distro/modules/zynthianos/config ++++ '[' -n /distro/image/2019-07-10-raspbian-buster-lite.zip ']' ++++ '[' -n '' ']' ++++ ZYNTHIANOS_SYS_REPO_SHIP=https://github.com/zynthian/zynthian-sys.git ++++ '[' -n '' ']' ++++ ZYNTHIANOS_SYS_REPO_BUILD= ++++ '[' -n '' ']' ++++ ZYNTHIANOS_SYS_REPO_BRANCH=master +++ echo ================================================================ ================================================================ +++ echo 'Using the following config:' Using the following config: +++ module_up=ZYNTHIANOS +++ module_up=ZYNTHIANOS_ +++ IFS= +++ read -r var ++++ compgen -A variable ZYNTHIANOS_ +++ export ZYNTHIANOS_SYS_REPO_BRANCH +++ echo ZYNTHIANOS_SYS_REPO_BRANCH ZYNTHIANOS_SYS_REPO_BRANCH +++ IFS= +++ read -r var +++ export ZYNTHIANOS_SYS_REPO_BUILD +++ echo ZYNTHIANOS_SYS_REPO_BUILD ZYNTHIANOS_SYS_REPO_BUILD +++ IFS= +++ read -r var +++ export ZYNTHIANOS_SYS_REPO_SHIP +++ echo ZYNTHIANOS_SYS_REPO_SHIP ZYNTHIANOS_SYS_REPO_SHIP +++ IFS= +++ read -r var +++ echo ================================================================ ================================================================ ++ /CustomPiOS/config_sanity ++ '[' '' == yes ']' ++ source /CustomPiOS/custompios +++ set -e +++ export LC_ALL=C +++ LC_ALL=C +++ source /CustomPiOS/common.sh +++ mkdir -p /distro/workspace +++ mkdir -p /distro/workspace/mount +++ rm -rf '/distro/workspace/*.tar.gz' +++ install_cleanup_trap +++ set -e +++ trap cleanup SIGINT SIGTERM +++ install_fail_on_error_trap +++ set -e +++ trap 'echo_red "build failed, unmounting image..." && cd $DIST_PATH && ( unmount_image $BASE_MOUNT_PATH force || true ) && echo_red -e "\nBUILD FAILED!\n"' ERR +++ unmount_image /distro/workspace/mount force +++ mount_path=/distro/workspace/mount +++ force= +++ '[' 2 -gt 1 ']' +++ force=force +++ '[' -n force ']' ++++ sudo lsof /distro/workspace/mount ++++ awk '{print $2}' ++++ sudo mount ++++ grep /distro/workspace/mount ++++ awk -F ' on ' '{print $2}' ++++ awk '{print $1}' ++++ sort -r +++ pushd /distro/workspace /distro/workspace /distro +++ '[' -e '*.img' ']' +++ '[' '!' -f /distro/image/2019-07-10-raspbian-buster-lite.zip ']' +++ '[' /distro/image/2019-07-10-raspbian-buster-lite.zip == '' ']' +++ 7za x -aoa /distro/image/2019-07-10-raspbian-buster-lite.zip 7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,64 bits,2 CPUs Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (406E3),ASM,AES-NI) Scanning the drive for archives: 1 file, 426250971 bytes (407 MiB) Extracting archive: /distro/image/2019-07-10-raspbian-buster-lite.zip -- Path = /distro/image/2019-07-10-raspbian-buster-lite.zip Type = zip Physical Size = 426250971 Everything is Ok Size: 2197815296 Compressed: 426250971 ++++ ls ++++ head -n 1 ++++ grep '.img$\|.raw$' +++ BASE_IMG_PATH=2019-07-10-raspbian-buster-lite.img +++ '[' '!' -f 2019-07-10-raspbian-buster-lite.img ']' ++++ basename 2019-07-10-raspbian-buster-lite.img +++ export CUSTOM_PI_OS_BUILDBASE=2019-07-10-raspbian-buster-lite.img +++ CUSTOM_PI_OS_BUILDBASE=2019-07-10-raspbian-buster-lite.img +++ '[' -n 14000 ']' +++ enlarge_ext 2019-07-10-raspbian-buster-lite.img 2 14000 +++ image=2019-07-10-raspbian-buster-lite.img +++ partition=2 +++ size=14000 +++ echo 'Adding 14000 MB to partition 2 of 2019-07-10-raspbian-buster-lite.img' Adding 14000 MB to partition 2 of 2019-07-10-raspbian-buster-lite.img ++++ sfdisk -d 2019-07-10-raspbian-buster-lite.img ++++ grep 2019-07-10-raspbian-buster-lite.img2 ++++ awk '{print $4-0}' +++ start=540672 +++ offset=276824064 +++ dd if=/dev/zero bs=1M count=14000 14000+0 records in 14000+0 records out 14680064000 bytes (15 GB, 14 GiB) copied, 20.1813 s, 727 MB/s +++ fdisk 2019-07-10-raspbian-buster-lite.img Welcome to fdisk (util-linux 2.33.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): Disk 2019-07-10-raspbian-buster-lite.img: 15.7 GiB, 16877879296 bytes, 32964608 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x17869b7d Device Boot Start End Sectors Size Id Type 2019-07-10-raspbian-buster-lite.img1 8192 532480 524289 256M c W95 FAT32 (LBA) 2019-07-10-raspbian-buster-lite.img2 540672 4292607 3751936 1.8G 83 Linux Command (m for help): Partition number (1,2, default 2): Partition 2 has been deleted. Command (m for help): Partition type p primary (1 primary, 0 extended, 3 free) e extended (container for logical partitions) Select (default p): Partition number (2-4, default 2): First sector (2048-32964607, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (540672-32964607, default 32964607): Created a new partition 2 of type 'Linux' and of size 15.5 GiB. Partition #2 contains a ext4 signature. Command (m for help): Disk 2019-07-10-raspbian-buster-lite.img: 15.7 GiB, 16877879296 bytes, 32964608 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x17869b7d Device Boot Start End Sectors Size Id Type 2019-07-10-raspbian-buster-lite.img1 8192 532480 524289 256M c W95 FAT32 (LBA) 2019-07-10-raspbian-buster-lite.img2 540672 32964607 32423936 15.5G 83 Linux Command (m for help): The partition table has been altered. Syncing disks. +++ detach_all_loopback 2019-07-10-raspbian-buster-lite.img ++++ losetup ++++ awk '{ print $1 }' ++++ grep 2019-07-10-raspbian-buster-lite.img +++ for img in $(losetup | grep $1 | awk '{ print $1 }' ) +++ losetup -d /dev/loop8 ++++ losetup -f --show -o 276824064 2019-07-10-raspbian-buster-lite.img +++ LODEV=/dev/loop8 +++ trap 'losetup -d $LODEV' EXIT +++ e2fsck -fy /dev/loop8 e2fsck 1.44.5 (15-Dec-2018) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information rootfs: 42162/117360 files (0.1% non-contiguous), 270342/468992 blocks +++ resize2fs -p /dev/loop8 resize2fs 1.44.5 (15-Dec-2018) Resizing the filesystem on /dev/loop8 to 4052992 (4k) blocks. Begin pass 1 (max = 109) Extending the inode table ----------------------------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX The filesystem on /dev/loop8 is now 4052992 (4k) blocks long. +++ losetup -d /dev/loop8 +++ trap - EXIT +++ echo 'Resized parition 2 of 2019-07-10-raspbian-buster-lite.img to +14000 MB' Resized parition 2 of 2019-07-10-raspbian-buster-lite.img to +14000 MB +++ mount_image 2019-07-10-raspbian-buster-lite.img 2 /distro/workspace/mount +++ image_path=2019-07-10-raspbian-buster-lite.img +++ root_partition=2 +++ mount_path=/distro/workspace/mount +++ echo 2 2 +++ boot_partition=1 ++++ sfdisk -d 2019-07-10-raspbian-buster-lite.img +++ fdisk_output='label: dos label-id: 0x17869b7d device: 2019-07-10-raspbian-buster-lite.img unit: sectors 2019-07-10-raspbian-buster-lite.img1 : start= 8192, size= 524289, type=c 2019-07-10-raspbian-buster-lite.img2 : start= 540672, size= 32423936, type=83' ++++ echo 'label: dos label-id: 0x17869b7d device: 2019-07-10-raspbian-buster-lite.img unit: sectors 2019-07-10-raspbian-buster-lite.img1 : start= 8192, size= 524289, type=c 2019-07-10-raspbian-buster-lite.img2 : start= 540672, size= 32423936, type=83' ++++ grep 2019-07-10-raspbian-buster-lite.img1 ++++ awk '{print $4-0}' +++ boot_offset=4194304 ++++ awk '{print $4-0}' ++++ grep 2019-07-10-raspbian-buster-lite.img2 ++++ echo 'label: dos label-id: 0x17869b7d device: 2019-07-10-raspbian-buster-lite.img unit: sectors 2019-07-10-raspbian-buster-lite.img1 : start= 8192, size= 524289, type=c 2019-07-10-raspbian-buster-lite.img2 : start= 540672, size= 32423936, type=83' +++ root_offset=276824064 +++ echo 'Mounting image 2019-07-10-raspbian-buster-lite.img on /distro/workspace/mount, offset for boot partition is 4194304, offset for root partition is 276824064' Mounting image 2019-07-10-raspbian-buster-lite.img on /distro/workspace/mount, offset for boot partition is 4194304, offset for root partition is 276824064 +++ detach_all_loopback 2019-07-10-raspbian-buster-lite.img ++++ awk '{ print $1 }' ++++ losetup ++++ grep 2019-07-10-raspbian-buster-lite.img +++ sudo losetup -f /dev/loop8 +++ sudo mount -o loop,offset=276824064 2019-07-10-raspbian-buster-lite.img /distro/workspace/mount/ +++ [[ 1 != \2 ]] +++ sudo losetup -f /dev/loop9 ++++ expr 276824064 - 4194304 +++ sudo mount -o loop,offset=4194304,sizelimit=272629760 2019-07-10-raspbian-buster-lite.img /distro/workspace/mount/boot +++ sudo mkdir -p /distro/workspace/mount/dev/pts +++ sudo mount -o bind /dev /distro/workspace/mount/dev +++ sudo mount -o bind /dev/pts /distro/workspace/mount/dev/pts +++ '[' -n /distro/aptcache ']' +++ '[' /distro/aptcache '!=' no ']' +++ mkdir -p /distro/aptcache +++ mount --bind /distro/aptcache /distro/workspace/mount/var/cache/apt +++ pushd /distro/workspace/mount /distro/workspace/mount /distro/workspace /distro +++ '[' yes == yes ']' +++ fixLd +++ sed -i 's@/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so@\#/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so@' etc/ld.so.preload +++ sed -i 's@/usr/lib/arm-linux-gnueabihf/libarmmem.so@\#/usr/lib/arm-linux-gnueabihf/libarmmem.so@' etc/ld.so.preload +++ sed -i 's@/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so@#/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so@' etc/ld.so.preload +++ '[' -n '' ']' +++ '[' -n '' ']' +++ CHROOT_SCRIPT=/distro/workspace/chroot_script +++ python3 /CustomPiOS/execution_order.py 'base(network, disable-services(zynthianos))' /distro/workspace/chroot_script WARNING: No file at - /CustomPiOS/modules/network/end_chroot_script +++ export -f execute_chroot_script +++ /distro/workspace/chroot_script + set -e + execute_chroot_script /CustomPiOS/modules/base /CustomPiOS/modules/base/start_chroot_script + '[' -f /.dockerenv ']' + update-binfmts --enable qemu-arm + mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc mount: /proc/sys/fs/binfmt_misc: binfmt_misc already mounted on /proc/sys/fs/binfmt_misc. + true + '[' -d /CustomPiOS/modules/base/filesystem ']' ++ which qemu-arm-static + cp /usr/bin/qemu-arm-static usr/bin + cp /CustomPiOS/modules/base/start_chroot_script chroot_script + chmod 755 chroot_script + cp /CustomPiOS/common.sh common.sh + chmod 755 common.sh + chroot . usr/bin/qemu-arm-static /bin/bash /chroot_script + set -e + export LC_ALL=C + LC_ALL=C + source /common.sh + install_cleanup_trap + set -e + trap cleanup SIGINT SIGTERM + '[' -n '' ']' + '[' -n '' ']' + '[' yes == yes ']' + touch /boot/ssh + echo 'IPQoS 0x00' + echo 'IPQoS 0x00' + '[' -f /lib/systemd/system/regenerate_ssh_host_keys.service ']' + sed -i 's@ExecStart=/usr/bin/ssh-keygen -A -v@ExecStart=/bin/bash -c '\'' /usr/bin/ssh-keygen -A -v >> /var/log/regenerate_ssh_host_keys.log 2>\&1'\''@g' /lib/systemd/system/regenerate_ssh_host_keys.service + sed -i 's@ExecStartPost=/bin/systemctl disable regenerate_ssh_host_keys@ExecStartPost=/bin/bash -c '\''for i in /etc/ssh/ssh_host_*_key*; do actualsize=$(wc -c <"$i") ;if [ $actualsize -eq 0 ]; then echo size is 0 bytes ; exit 1 ; fi ; done ; /bin/systemctl disable regenerate_ssh_host_keys'\''@g' /lib/systemd/system/regenerate_ssh_host_keys.service + echo 2019-07-10-raspbian-buster-lite.img + echo 1.0.0 + echo default + '[' default '!=' default ']' + '[' default '!=' default ']' + '[' default '!=' default ']' + '[' default '!=' default ']' + '[' -d custompios_export ']' + rm chroot_script + '[' -d filesystem ']' + execute_chroot_script /CustomPiOS/modules/network /CustomPiOS/modules/network/start_chroot_script + '[' -f /.dockerenv ']' + update-binfmts --enable qemu-arm update-binfmts: warning: qemu-arm already enabled in kernel. + mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc mount: /proc/sys/fs/binfmt_misc: binfmt_misc already mounted on /proc/sys/fs/binfmt_misc. + true + '[' -d /CustomPiOS/modules/network/filesystem ']' + cp -vr --preserve=mode,timestamps /CustomPiOS/modules/network/filesystem . '/CustomPiOS/modules/network/filesystem' -> './filesystem' '/CustomPiOS/modules/network/filesystem/boot' -> './filesystem/boot' '/CustomPiOS/modules/network/filesystem/boot/custompios-wpa-supplicant.txt' -> './filesystem/boot/custompios-wpa-supplicant.txt' ++ which qemu-arm-static + cp /usr/bin/qemu-arm-static usr/bin + cp /CustomPiOS/modules/network/start_chroot_script chroot_script + chmod 755 chroot_script + cp /CustomPiOS/common.sh common.sh + chmod 755 common.sh + chroot . usr/bin/qemu-arm-static /bin/bash /chroot_script + set -e + export LC_ALL=C + LC_ALL=C + source /common.sh + install_cleanup_trap + set -e + trap cleanup SIGINT SIGTERM + unpack /filesystem/boot /boot + from=/filesystem/boot + to=/boot + owner= + '[' 2 -gt 2 ']' + cp -v -r --preserve=mode,timestamps /filesystem/boot/. /boot '/filesystem/boot/./custompios-wpa-supplicant.txt' -> '/boot/./custompios-wpa-supplicant.txt' + '[' -n '' ']' + DIST_NETWORK_FILE=/boot/zynthianos-wpa-supplicant.txt + mv /boot/custompios-wpa-supplicant.txt /boot/zynthianos-wpa-supplicant.txt + cat /etc/wpa_supplicant/wpa_supplicant.conf + rm -f /etc/wpa_supplicant/wpa_supplicant.conf + ln -s /boot/zynthianos-wpa-supplicant.txt /etc/wpa_supplicant/wpa_supplicant.conf + '[' -f /etc/ifplugd/action.d/ifupdown ']' + '[' -f /etc/wpa_supplicant/ifupdown.sh ']' + ln -s /etc/wpa_supplicant/ifupdown.sh /etc/ifplugd/action.d/ifupdown + sed -i 's@exit 0@@' /etc/rc.local + echo '/sbin/iptables -t mangle -I POSTROUTING 1 -o wlan0 -p udp --dport 123 -j TOS --set-tos 0x00' + echo 'exit 0' + '[' -d custompios_export ']' + rm chroot_script + '[' -d filesystem ']' + rm -rfv filesystem removed 'filesystem/boot/custompios-wpa-supplicant.txt' removed directory 'filesystem/boot' removed directory 'filesystem' + execute_chroot_script /CustomPiOS/modules/disable-services /CustomPiOS/modules/disable-services/start_chroot_script + '[' -f /.dockerenv ']' + update-binfmts --enable qemu-arm update-binfmts: warning: qemu-arm already enabled in kernel. + mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc mount: /proc/sys/fs/binfmt_misc: binfmt_misc already mounted on /proc/sys/fs/binfmt_misc. + true + '[' -d /CustomPiOS/modules/disable-services/filesystem ']' ++ which qemu-arm-static + cp /usr/bin/qemu-arm-static usr/bin + cp /CustomPiOS/modules/disable-services/start_chroot_script chroot_script + chmod 755 chroot_script + cp /CustomPiOS/common.sh common.sh + chmod 755 common.sh + chroot . usr/bin/qemu-arm-static /bin/bash /chroot_script + source /common.sh + install_cleanup_trap + set -e + trap cleanup SIGINT SIGTERM + apt-get update --allow-releaseinfo-change Err:1 http://archive.raspberrypi.org/debian buster InRelease Temporary failure resolving 'archive.raspberrypi.org' Err:2 http://raspbian.raspberrypi.org/raspbian buster InRelease Temporary failure resolving 'raspbian.raspberrypi.org' Reading package lists... W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease Temporary failure resolving 'raspbian.raspberrypi.org' W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Temporary failure resolving 'archive.raspberrypi.org' W: Some index files failed to download. They have been ignored, or old ones used instead. ++ is_in_apt policykit-1 +++ apt-cache policy policykit-1 +++ wc +++ awk '{print $1}' ++ '[' 7 -gt 0 ']' ++ echo 1 + '[' 1 -eq 1 ']' + sudo apt-get -y install policykit-1 Unknown host QEMU_IFLA type: 50 Unknown host QEMU_IFLA type: 51 Unknown host QEMU_IFLA type: 50 Unknown host QEMU_IFLA type: 51 sudo: unable to resolve host fb1459c1a775: Temporary failure in name resolution Reading package lists... Building dependency tree... Reading state information... policykit-1 is already the newest version (0.105-25). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. + echo exit 101 + chmod +x /usr/sbin/policy-rc.d + '[' -d custompios_export ']' + rm chroot_script + '[' -d filesystem ']' + execute_chroot_script /distro/modules/zynthianos /distro/modules/zynthianos/start_chroot_script + '[' -f /.dockerenv ']' + update-binfmts --enable qemu-arm update-binfmts: warning: qemu-arm already enabled in kernel. + mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc mount: /proc/sys/fs/binfmt_misc: binfmt_misc already mounted on /proc/sys/fs/binfmt_misc. + true + '[' -d /distro/modules/zynthianos/filesystem ']' + cp -vr --preserve=mode,timestamps /distro/modules/zynthianos/filesystem . '/distro/modules/zynthianos/filesystem' -> './filesystem' '/distro/modules/zynthianos/filesystem/boot' -> './filesystem/boot' '/distro/modules/zynthianos/filesystem/boot/README' -> './filesystem/boot/README' '/distro/modules/zynthianos/filesystem/home' -> './filesystem/home' '/distro/modules/zynthianos/filesystem/home/pi' -> './filesystem/home/pi' '/distro/modules/zynthianos/filesystem/home/pi/README' -> './filesystem/home/pi/README' '/distro/modules/zynthianos/filesystem/home/root' -> './filesystem/home/root' '/distro/modules/zynthianos/filesystem/home/root/README' -> './filesystem/home/root/README' '/distro/modules/zynthianos/filesystem/root' -> './filesystem/root' '/distro/modules/zynthianos/filesystem/root/README' -> './filesystem/root/README' ++ which qemu-arm-static + cp /usr/bin/qemu-arm-static usr/bin + cp /distro/modules/zynthianos/start_chroot_script chroot_script + chmod 755 chroot_script + cp /CustomPiOS/common.sh common.sh + chmod 755 common.sh + chroot . usr/bin/qemu-arm-static /bin/bash /chroot_script + alias 'bash=bash -x' + source /common.sh + install_cleanup_trap + set -e + trap cleanup SIGINT SIGTERM + unpack /filesystem/home/pi /home/pi pi + from=/filesystem/home/pi + to=/home/pi + owner= + '[' 3 -gt 2 ']' + owner=pi + cp -v -r --preserve=mode,timestamps /filesystem/home/pi/. /home/pi '/filesystem/home/pi/./README' -> '/home/pi/./README' + '[' -n pi ']' + chown -hR pi:pi /home/pi + unpack /filesystem/home/root /root root + from=/filesystem/home/root + to=/root + owner= + '[' 3 -gt 2 ']' + owner=root + cp -v -r --preserve=mode,timestamps /filesystem/home/root/. /root '/filesystem/home/root/./README' -> '/root/./README' + '[' -n root ']' + chown -hR root:root /root + unpack /filesystem/boot /boot + from=/filesystem/boot + to=/boot + owner= + '[' 2 -gt 2 ']' + cp -v -r --preserve=mode,timestamps /filesystem/boot/. /boot '/filesystem/boot/./README' -> '/boot/./README' + '[' -n '' ']' + unpack /filesystem/root / + from=/filesystem/root + to=/ + owner= + '[' 2 -gt 2 ']' + cp -v -r --preserve=mode,timestamps /filesystem/root/. / '/filesystem/root/./README' -> '/./README' + '[' -n '' ']' + apt -y install git WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: git-man libcurl3-gnutls liberror-perl Suggested packages: git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn The following NEW packages will be installed: git git-man libcurl3-gnutls liberror-perl 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 6144 kB of archives. After this operation, 32.8 MB of additional disk space will be used. Err:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf libcurl3-gnutls armhf 7.64.0-4 Temporary failure resolving 'raspbian.raspberrypi.org' Err:2 http://raspbian.raspberrypi.org/raspbian buster/main armhf liberror-perl all 0.17027-2 Temporary failure resolving 'raspbian.raspberrypi.org' Err:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf git-man all 1:2.20.1-2 Temporary failure resolving 'raspbian.raspberrypi.org' Err:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf git armhf 1:2.20.1-2 Temporary failure resolving 'raspbian.raspberrypi.org' E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/c/curl/libcurl3-gnutls_7.64.0-4_armhf.deb Temporary failure resolving 'raspbian.raspberrypi.org' E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/libe/liberror-perl/liberror-perl_0.17027-2_all.deb Temporary failure resolving 'raspbian.raspberrypi.org' E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/g/git/git-man_2.20.1-2_all.deb Temporary failure resolving 'raspbian.raspberrypi.org' E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/g/git/git_2.20.1-2_armhf.deb Temporary failure resolving 'raspbian.raspberrypi.org' E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? ++++ echo_red 'build failed, unmounting image...' ++++ echo -e -n '\e[91m' ++++ echo build failed, unmounting image... build failed, unmounting image... ++++ echo -e -n '\e[0m' ++++ cd /distro ++++ unmount_image /distro/workspace/mount force ++++ mount_path=/distro/workspace/mount ++++ force= ++++ '[' 2 -gt 1 ']' ++++ force=force ++++ '[' -n force ']' +++++ sudo lsof /distro/workspace/mount +++++ awk '{print $2}' +++++ sudo mount +++++ sort -r +++++ awk '{print $1}' +++++ awk -F ' on ' '{print $2}' +++++ grep /distro/workspace/mount ++++ for m in $(sudo mount | grep $mount_path | awk -F " on " '{print $2}' | awk '{print $1}' | sort -r) ++++ echo 'Unmounting /distro/workspace/mount/var/cache/apt...' Unmounting /distro/workspace/mount/var/cache/apt... ++++ sudo umount /distro/workspace/mount/var/cache/apt ++++ for m in $(sudo mount | grep $mount_path | awk -F " on " '{print $2}' | awk '{print $1}' | sort -r) ++++ echo 'Unmounting /distro/workspace/mount/dev/pts...' Unmounting /distro/workspace/mount/dev/pts... ++++ sudo umount /distro/workspace/mount/dev/pts ++++ for m in $(sudo mount | grep $mount_path | awk -F " on " '{print $2}' | awk '{print $1}' | sort -r) ++++ echo 'Unmounting /distro/workspace/mount/dev...' Unmounting /distro/workspace/mount/dev... ++++ sudo umount /distro/workspace/mount/dev ++++ for m in $(sudo mount | grep $mount_path | awk -F " on " '{print $2}' | awk '{print $1}' | sort -r) ++++ echo 'Unmounting /distro/workspace/mount/boot...' Unmounting /distro/workspace/mount/boot... ++++ sudo umount /distro/workspace/mount/boot ++++ for m in $(sudo mount | grep $mount_path | awk -F " on " '{print $2}' | awk '{print $1}' | sort -r) ++++ echo 'Unmounting /distro/workspace/mount...' Unmounting /distro/workspace/mount... ++++ sudo umount /distro/workspace/mount ++++ echo_red -e '\nBUILD FAILED!\n' ++++ echo -e -n '\e[91m' ++++ echo -e '\nBUILD' 'FAILED!\n' BUILD FAILED! ++++ echo -e -n '\e[0m'