From b92f11e89aacbe948d4742319cfe408013fbe7ec Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Wed, 17 Apr 2019 21:39:54 +0200 Subject: [PATCH] [ added Debian buster ] Initial commit. It builds, but its not tested nor fine tuned. --- lib/build-all.sh | 2 +- lib/chroot-buildpackages.sh | 5 ++++- lib/configuration.sh | 11 +++++++++++ lib/desktop.sh | 2 +- lib/distributions.sh | 23 +++++++++++++++++++++++ lib/general.sh | 4 ++-- lib/main.sh | 2 ++ lib/makeboarddeb.sh | 9 ++++++++- 8 files changed, 52 insertions(+), 6 deletions(-) diff --git a/lib/build-all.sh b/lib/build-all.sh index 214a5ba7f..2ac3f4695 100644 --- a/lib/build-all.sh +++ b/lib/build-all.sh @@ -15,7 +15,7 @@ FORCEDRELEASE=$RELEASE rm -rf /run/armbian mkdir -p /run/armbian -RELEASE_LIST=("xenial" "jessie" "stretch" "bionic") +RELEASE_LIST=("xenial" "jessie" "stretch" "bionic" "buster" ) BRANCH_LIST=("default" "next" "dev") pack_upload () diff --git a/lib/chroot-buildpackages.sh b/lib/chroot-buildpackages.sh index 05f873dd3..3120e3c6c 100644 --- a/lib/chroot-buildpackages.sh +++ b/lib/chroot-buildpackages.sh @@ -26,10 +26,12 @@ create_chroot() qemu_binary['arm64']='qemu-aarch64-static' apt_mirror['jessie']="$DEBIAN_MIRROR" apt_mirror['stretch']="$DEBIAN_MIRROR" + apt_mirror['buster']="$DEBIAN_MIRROR" apt_mirror['xenial']="$UBUNTU_MIRROR" apt_mirror['bionic']="$UBUNTU_MIRROR" components['jessie']='main,contrib' components['stretch']='main,contrib' + components['buster']='main,contrib' components['xenial']='main,universe,multiverse' components['bionic']='main,universe,multiverse' display_alert "Creating build chroot" "$release/$arch" "info" @@ -83,6 +85,7 @@ chroot_prepare_distccd() declare -A gcc_version gcc_type gcc_version['jessie']='4.9' gcc_version['stretch']='6.3' + gcc_version['buster']='8.3' gcc_version['xenial']='5.4' gcc_version['bionic']='5.4' gcc_type['armhf']='arm-linux-gnueabihf-' @@ -110,7 +113,7 @@ chroot_build_packages() { local built_ok=() local failed=() - for release in jessie xenial stretch bionic; do + for release in jessie xenial stretch bionic buster; do for arch in armhf arm64; do display_alert "Starting package building process" "$release/$arch" "info" diff --git a/lib/configuration.sh b/lib/configuration.sh index 04abee4b9..798392eb4 100644 --- a/lib/configuration.sh +++ b/lib/configuration.sh @@ -204,6 +204,17 @@ case $RELEASE in PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium-browser system-config-printer-common system-config-printer language-selector-gnome" ;; + buster) + DEBOOTSTRAP_COMPONENTS="main" + PACKAGE_LIST_RELEASE="man-db less kbd net-tools netcat-openbsd gnupg2 dirmngr" + PACKAGE_LIST_DESKTOP+=" paman libgcr-3-common gcj-jre-headless paprefs dbus-x11" + PACKAGE_LIST_DESKTOP_RECOMMENDS+=" chromium system-config-printer-common system-config-printer" + + # temp disable + PACKAGE_LIST_ADDITIONAL="${PACKAGE_LIST_ADDITIONAL/armbian-firmware /}" + PACKAGE_LIST_ADDITIONAL="${PACKAGE_LIST_ADDITIONAL/sysbench /}" + ;; + esac diff --git a/lib/desktop.sh b/lib/desktop.sh index 97f63ce31..d7e97775b 100644 --- a/lib/desktop.sh +++ b/lib/desktop.sh @@ -86,7 +86,7 @@ create_desktop_package () # using different icon pack. Workaround due to this bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867779 - if [[ ${RELEASE} == bionic || ${RELEASE} == stretch ]]; then + if [[ ${RELEASE} == bionic || ${RELEASE} == stretch || ${RELEASE} == buster ]]; then sed -i 's//g' \ $destination/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml fi diff --git a/lib/distributions.sh b/lib/distributions.sh index 7f7eaf044..616554299 100644 --- a/lib/distributions.sh +++ b/lib/distributions.sh @@ -369,6 +369,29 @@ install_distribution_specific() # disable conflicting services chroot $SDCARD /bin/bash -c "systemctl --no-reload mask ondemand.service >/dev/null 2>&1" ;; + buster) + # remove doubled uname from motd + [[ -f $SDCARD/etc/update-motd.d/10-uname ]] && rm $SDCARD/etc/update-motd.d/10-uname + # rc.local is not existing in stretch but we might need it + cat <<-EOF > $SDCARD/etc/rc.local + #!/bin/sh -e + # + # rc.local + # + # This script is executed at the end of each multiuser runlevel. + # Make sure that the script will "exit 0" on success or any other + # value on error. + # + # In order to enable or disable this script just change the execution + # bits. + # + # By default this script does nothing. + + exit 0 + EOF + chmod +x $SDCARD/etc/rc.local + ;; + esac } diff --git a/lib/general.sh b/lib/general.sh index 138fb1e47..72ac02b75 100644 --- a/lib/general.sh +++ b/lib/general.sh @@ -130,7 +130,7 @@ create_sources_list() [[ -z $basedir ]] && exit_with_error "No basedir passed to create_sources_list" case $release in - jessie|stretch) + jessie|stretch|buster) cat <<-EOF > $basedir/etc/apt/sources.list deb http://${DEBIAN_MIRROR} $release main contrib non-free #deb-src http://${DEBIAN_MIRROR} $release main contrib non-free @@ -357,7 +357,7 @@ addtorepo() # parameter "delete" remove incoming directory if publishing is succesful # function: cycle trough distributions - local distributions=("jessie" "xenial" "stretch" "bionic") + local distributions=("jessie" "xenial" "stretch" "bionic" "buster") local errors=0 for release in "${distributions[@]}"; do diff --git a/lib/main.sh b/lib/main.sh index a36709776..6fd14b954 100644 --- a/lib/main.sh +++ b/lib/main.sh @@ -202,8 +202,10 @@ if [[ $KERNEL_ONLY != yes && -z $RELEASE ]]; then options=() [[ $EXPERT = yes ]] && options+=("jessie" "Debian 8 Jessie / unsupported") options+=("stretch" "Debian 9 Stretch") + [[ $EXPERT = yes ]] && options+=("buster" "Debian 10 Buster / unsupported") options+=("xenial" "Ubuntu Xenial 16.04 LTS") options+=("bionic" "Ubuntu Bionic 18.04 LTS") + RELEASE=$(dialog --stdout --title "Choose a release" --backtitle "$backtitle" --menu "Select the target OS release" \ $TTY_Y $TTY_X $(($TTY_Y - 8)) "${options[@]}") unset options diff --git a/lib/makeboarddeb.sh b/lib/makeboarddeb.sh index 277fb16a2..d5567338d 100644 --- a/lib/makeboarddeb.sh +++ b/lib/makeboarddeb.sh @@ -294,7 +294,7 @@ create_board_package() EOF # this is required for NFS boot to prevent deconfiguring the network on shutdown - [[ $RELEASE == xenial || $RELEASE == stretch || $RELEASE == bionic ]] && sed -i 's/#no-auto-down/no-auto-down/g' $destination/etc/network/interfaces.default + [[ $RELEASE == xenial || $RELEASE == stretch || $RELEASE == bionic || $RELEASE == buster ]] && sed -i 's/#no-auto-down/no-auto-down/g' $destination/etc/network/interfaces.default if [[ ( $LINUXFAMILY == sun*i || $LINUXFAMILY == pine64 ) && $BRANCH == default ]]; then # add mpv config for vdpau_sunxi @@ -340,6 +340,13 @@ create_board_package() cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/ ;; + buster) + mkdir -p $destination/usr/lib/NetworkManager/conf.d/ + cp $SRC/packages/bsp/zz-override-wifi-powersave-off.conf $destination/usr/lib/NetworkManager/conf.d/ + cp $SRC/packages/bsp/10-override-random-mac.conf $destination/usr/lib/NetworkManager/conf.d/ + ;; + + esac # execute $LINUXFAMILY-specific tweaks