From 1afe54dbf84094720299219de56ec2cf9a8aa5d3 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 15 May 2016 12:10:46 +0200 Subject: [PATCH 1/5] install dosfstools on host fixes #300 --- general.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general.sh b/general.sh index 27283c2e4c..2a320e1128 100644 --- a/general.sh +++ b/general.sh @@ -289,7 +289,7 @@ prepare_host() { PAK="ca-certificates device-tree-compiler pv bc lzop zip binfmt-support build-essential ccache debootstrap ntpdate pigz \ gawk gcc-arm-linux-gnueabihf gcc-arm-linux-gnueabi qemu-user-static u-boot-tools uuid-dev zlib1g-dev unzip libusb-1.0-0-dev ntpdate \ parted pkg-config libncurses5-dev whiptail debian-keyring debian-archive-keyring f2fs-tools libfile-fcntllock-perl rsync libssl-dev \ - nfs-kernel-server btrfs-tools gcc-aarch64-linux-gnu ncurses-term p7zip-full dos2unix" + nfs-kernel-server btrfs-tools gcc-aarch64-linux-gnu ncurses-term p7zip-full dos2unix dosfstools" # warning: apt-cacher-ng will fail if installed and used both on host and in container/chroot environment with shared network # set NO_APT_CACHER=yes to prevent installation errors in such case From 8aa7c92ef6c5f5cc633c25de96737169754a9510 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 15 May 2016 13:48:45 +0200 Subject: [PATCH 2/5] fix newlines in config/sources/odroidc2.conf --- config/sources/odroidc2.conf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/config/sources/odroidc2.conf b/config/sources/odroidc2.conf index 573dae2711..78db6837f9 100644 --- a/config/sources/odroidc2.conf +++ b/config/sources/odroidc2.conf @@ -26,14 +26,14 @@ write_uboot_platform() family_tweaks() { - sed -i 's/MODULES=.*/MODULES="meson-ir"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf - sed -i 's/LOAD_MODULES=.*/LOAD_MODULES="true"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf - sed -i 's/DEVICE=.*/DEVICE="\/dev\/lirc0"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf - sed -i 's/LIRCD_ARGS=.*/LIRCD_ARGS="--uinput"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf - cp $SRC/lib/config/lirc.conf.odroidc2 $CACHEDIR/sdcard/etc/lirc/lircd.conf - - install -m 755 $SRC/lib/scripts/c2_init.sh $CACHEDIR/sdcard/etc/ - sed -e 's/exit 0//g' -i $CACHEDIR/sdcard/etc/rc.local - echo "/etc/c2_init.sh" >> $CACHEDIR/sdcard/etc/rc.local - echo "exit 0" >> $CACHEDIR/sdcard/etc/rc.local -} \ No newline at end of file + sed -i 's/MODULES=.*/MODULES="meson-ir"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf + sed -i 's/LOAD_MODULES=.*/LOAD_MODULES="true"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf + sed -i 's/DEVICE=.*/DEVICE="\/dev\/lirc0"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf + sed -i 's/LIRCD_ARGS=.*/LIRCD_ARGS="--uinput"/' $CACHEDIR/sdcard/etc/lirc/hardware.conf + cp $SRC/lib/config/lirc.conf.odroidc2 $CACHEDIR/sdcard/etc/lirc/lircd.conf + + install -m 755 $SRC/lib/scripts/c2_init.sh $CACHEDIR/sdcard/etc/ + sed -e 's/exit 0//g' -i $CACHEDIR/sdcard/etc/rc.local + echo "/etc/c2_init.sh" >> $CACHEDIR/sdcard/etc/rc.local + echo "exit 0" >> $CACHEDIR/sdcard/etc/rc.local +} From c076e8368c4cd2df57914a70683ecdd37081bde5 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 15 May 2016 12:12:18 +0200 Subject: [PATCH 3/5] dont install python-software-properties software-properties-common depends on the right version already: python3-software-properties --- configuration.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.sh b/configuration.sh index 0b012cd7bd..04846bf538 100644 --- a/configuration.sh +++ b/configuration.sh @@ -136,7 +136,7 @@ case $RELEASE in ;; xenial) PACKAGE_LIST_RELEASE="man-db wget iptables nano thin-provisioning-tools libnl-genl-3-dev libpam-systemd \ - software-properties-common python-software-properties libnss-myhostname f2fs-tools" + software-properties-common libnss-myhostname f2fs-tools" PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP libreoffice-writer thunderbird firefox gnome-icon-theme-full tango-icon-theme gvfs-backends \ policykit-1 xserver-xorg-video-fbdev" PACKAGE_LIST_EXCLUDE="" From 04845ffdf776ae60e481f78d52c5c66b19731128 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 15 May 2016 13:46:49 +0200 Subject: [PATCH 4/5] run apt-get install -f to configure all packages in xenial --- debootstrap-ng.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debootstrap-ng.sh b/debootstrap-ng.sh index 86a34f4483..e6851e614c 100644 --- a/debootstrap-ng.sh +++ b/debootstrap-ng.sh @@ -211,6 +211,13 @@ create_rootfs_cache() #[[ ${PIPESTATUS[0]} -ne 0 ]] && exit_with_error "Updating package lists failed" + # debootstrap in trusty fails to configure all packages, run apt-get to fix them + [[ $RELEASE == xenial ]] && eval 'LC_ALL=C LANG=C chroot $CACHEDIR/sdcard /bin/bash -c \ + "DEBIAN_FRONTEND=noninteractive apt-get -y -q $apt_extra $apt_extra_progress install -f"' \ + ${PROGRESS_LOG_TO_FILE:+' | tee -a $DEST/debug/debootstrap.log'} \ + ${OUTPUT_DIALOG:+' | dialog --backtitle "$backtitle" --progressbox "Configure base packages..." $TTY_Y $TTY_X'} \ + ${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'} + # stage: upgrade base packages from xxx-updates and xxx-backports repository branches display_alert "Upgrading base packages" "Armbian" "info" eval 'LC_ALL=C LANG=C chroot $CACHEDIR/sdcard /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get -y -q \ From 700d109af680ca7fc22a3a218f8ceeee65ddf583 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 15 May 2016 14:11:34 +0200 Subject: [PATCH 5/5] port update-motd.d/40-updates to python3 jessie and trusty install python3-apt by default, xenial no longer installes python-apt. --- scripts/update-motd.d/40-updates | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/update-motd.d/40-updates b/scripts/update-motd.d/40-updates index 2e3e4b39e0..b9e34ad298 100644 --- a/scripts/update-motd.d/40-updates +++ b/scripts/update-motd.d/40-updates @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # # 40-updates - create the list of packages for update with caching # Copyright (c) 2015 Igor Pecovnik @@ -59,7 +59,7 @@ def refreshdata (): # open the apt cache try: cache = apt_pkg.Cache(OpNullProgress()) - except SystemError, e: + except SystemError as e: sys.stderr.write("Error: Opening the cache (%s)" % e) sys.exit(-1) @@ -87,7 +87,7 @@ def refreshdata (): # then a standard upgrade depcache.upgrade() - except SystemError, e: + except SystemError as e: sys.stderr.write("Error: Couldn't mark the upgrade (%s)" % e) sys.exit(-1) @@ -146,7 +146,7 @@ else: file = open(myfile, 'r+') updates = int(file.read()) if updates > 0: - print "[ \033[92m%d updates to install\033[0m: apt-get upgrade ]\n" % (updates) + print("[ \033[92m%d updates to install\033[0m: apt-get upgrade ]\n" % (updates))