Remove Wheezy and trusty targets support part 1

This commit is contained in:
zador-blood-stained 2017-01-12 15:31:53 +03:00
parent fce8d23218
commit 75e538f130
14 changed files with 18 additions and 125 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -29,7 +29,7 @@ from=0
rm -rf /run/armbian
mkdir -p /run/armbian
RELEASE_LIST=("trusty" "xenial" "wheezy" "jessie")
RELEASE_LIST=("xenial" "jessie")
BRANCH_LIST=("default" "next" "dev")

View File

@ -105,7 +105,7 @@ fi
[[ -z $LINUXCONFIG ]] && LINUXCONFIG="linux-${LINUXFAMILY}-${BRANCH}"
# naming to distro
if [[ $RELEASE == trusty || $RELEASE == xenial ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
if [[ $RELEASE == xenial ]]; then DISTRIBUTION="Ubuntu"; else DISTRIBUTION="Debian"; fi
# temporary hacks/overrides
case $LINUXFAMILY in
@ -145,17 +145,10 @@ PACKAGE_LIST_EXCLUDE="xfce4-mixer"
# Release specific packages
case $RELEASE in
wheezy)
PACKAGE_LIST_RELEASE="less makedev kbd acpid acpi-support-base iperf libudev1"
;;
jessie)
PACKAGE_LIST_RELEASE="less makedev kbd libpam-systemd iperf3 software-properties-common libnss-myhostname f2fs-tools"
PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP mozo pluma iceweasel libreoffice-writer libreoffice-style-tango libreoffice-gtk policykit-1 policykit-1-gnome eject"
;;
trusty)
PACKAGE_LIST_RELEASE="man-db wget nano software-properties-common iperf f2fs-tools acpid"
PACKAGE_LIST_EXCLUDE="$PACKAGE_LIST_EXCLUDE ureadahead plymouth"
;;
xenial)
PACKAGE_LIST_RELEASE="man-db wget nano libpam-systemd software-properties-common libnss-myhostname f2fs-tools iperf3"
PACKAGE_LIST_DESKTOP="$PACKAGE_LIST_DESKTOP libreoffice-writer libreoffice-style-tango libreoffice-gtk thunderbird firefox gnome-icon-theme-full tango-icon-theme \

View File

@ -134,8 +134,8 @@ create_rootfs_cache()
local apt_mirror="http://$APT_MIRROR"
fi
# fancy progress bars (except for Wheezy target)
[[ -z $OUTPUT_DIALOG && $RELEASE != wheezy ]] && local apt_extra_progress="--show-progress -o DPKG::Progress-Fancy=1"
# fancy progress bars
[[ -z $OUTPUT_DIALOG ]] && local apt_extra_progress="--show-progress -o DPKG::Progress-Fancy=1"
display_alert "Installing base system" "Stage 1/2" "info"
eval 'debootstrap --include=locales ${PACKAGE_LIST_EXCLUDE:+ --exclude=${PACKAGE_LIST_EXCLUDE// /,}} \
@ -189,14 +189,8 @@ create_rootfs_cache()
create_sources_list "$RELEASE" "$CACHEDIR/$SDCARD/"
# stage: add armbian repository and install key
case $RELEASE in
wheezy|trusty)
echo "deb http://apt.armbian.com $RELEASE main" > $CACHEDIR/$SDCARD/etc/apt/sources.list.d/armbian.list
;;
jessie|xenial)
echo "deb http://apt.armbian.com $RELEASE main utils ${RELEASE}-desktop" > $CACHEDIR/$SDCARD/etc/apt/sources.list.d/armbian.list
;;
esac
echo "deb http://apt.armbian.com $RELEASE main utils ${RELEASE}-desktop" > $CACHEDIR/$SDCARD/etc/apt/sources.list.d/armbian.list
cp $SRC/lib/bin/armbian.key $CACHEDIR/$SDCARD
eval 'chroot $CACHEDIR/$SDCARD /bin/bash -c "cat armbian.key | apt-key add -"' \
${OUTPUT_VERYSILENT:+' >/dev/null 2>/dev/null'}

View File

@ -21,24 +21,10 @@ install_desktop ()
chroot $CACHEDIR/$SDCARD /bin/bash -c "tar xfz /tmp/bin/$RELEASE-desktop.tgz -C /root/"
# install wallpapers
case $RELEASE in
wheezy)
d=$CACHEDIR/$SDCARD/usr/share/xfce4/backdrops/
test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/wallpapers/armbian*.jpg "$d"
;;
jessie|xenial)
d=$CACHEDIR/$SDCARD/usr/share/backgrounds/xfce/
test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/wallpapers/armbian*.jpg "$d"
mkdir -p $CACHEDIR/$SDCARD/etc/polkit-1/localauthority/50-local.d
cp $SRC/lib/config/polkit-jessie/*.pkla $CACHEDIR/$SDCARD/etc/polkit-1/localauthority/50-local.d/
;;
trusty)
d=$CACHEDIR/$SDCARD/usr/share/backgrounds/xfce/
test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/wallpapers/armbian*.jpg "$d"
;;
esac
d=$CACHEDIR/$SDCARD/usr/share/backgrounds/xfce/
test -d "$d" || mkdir -p "$d" && cp $SRC/lib/bin/wallpapers/armbian*.jpg "$d"
mkdir -p $CACHEDIR/$SDCARD/etc/polkit-1/localauthority/50-local.d
cp $SRC/lib/config/polkit-jessie/*.pkla $CACHEDIR/$SDCARD/etc/polkit-1/localauthority/50-local.d/
# set default wallpaper
sed -i 's/\(backgrounds\/xfce\/*\)[^ ]*/\1armbian06-1430-very-dark-3840x2160.jpg\"\/>/' $CACHEDIR/$SDCARD/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
@ -67,11 +53,8 @@ install_desktop ()
# Compile Turbo Frame buffer for sunxi
if [[ $LINUXFAMILY == sun* && $BRANCH == default ]]; then
if [[ $RELEASE == jessie || $RELEASE == xenial ]]; then
# Disable compositing by default
sed 's/name="use_compositing" type="bool" value="true"/name="use_compositing" type="bool" value="false"/' -i $CACHEDIR/$SDCARD/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
sed 's/name="use_compositing" type="bool" value="true"/name="use_compositing" type="bool" value="false"/' -i $CACHEDIR/$SDCARD/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
fi
sed 's/name="use_compositing" type="bool" value="true"/name="use_compositing" type="bool" value="false"/' -i $CACHEDIR/$SDCARD/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
sed 's/name="use_compositing" type="bool" value="true"/name="use_compositing" type="bool" value="false"/' -i $CACHEDIR/$SDCARD/root/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
# Set default audio-output to HDMI for desktop-images
cat <<-EOF >> $CACHEDIR/$SDCARD/etc/asound.conf

View File

@ -55,16 +55,6 @@ install_common()
# force change root password at first login
chroot $CACHEDIR/$SDCARD /bin/bash -c "chage -d 0 root"
# tmpfs configuration
# Takes effect only in Wheezy and Trusty
if [[ -f $CACHEDIR/$SDCARD/etc/default/tmpfs ]]; then
sed -e 's/#RAMTMP=no/RAMTMP=yes/g' -i $CACHEDIR/$SDCARD/etc/default/tmpfs
sed -e 's/#RUN_SIZE=10%/RUN_SIZE=128M/g' -i $CACHEDIR/$SDCARD/etc/default/tmpfs
sed -e 's/#LOCK_SIZE=/LOCK_SIZE=/g' -i $CACHEDIR/$SDCARD/etc/default/tmpfs
sed -e 's/#SHM_SIZE=/SHM_SIZE=128M/g' -i $CACHEDIR/$SDCARD/etc/default/tmpfs
sed -e 's/#TMP_SIZE=/TMP_SIZE=1G/g' -i $CACHEDIR/$SDCARD/etc/default/tmpfs
fi
# add custom bashrc loading
cat <<-EOF >> $CACHEDIR/$SDCARD/etc/bash.bashrc
if [[ -f /etc/bash.bashrc.custom ]]; then
@ -170,28 +160,6 @@ install_distribution_specific()
case $RELEASE in
wheezy)
# add serial console
echo T0:2345:respawn:/sbin/getty -L $SERIALCON 115200 vt100 >> $CACHEDIR/$SDCARD/etc/inittab
# don't clear screen on boot console
sed -e 's/getty 38400 tty1/getty --noclear 38400 tty1/g' -i $CACHEDIR/$SDCARD/etc/inittab
# disable some getties
sed -e 's/5:23:respawn/#5:23:respawn/g' -i $CACHEDIR/$SDCARD/etc/inittab
sed -e 's/6:23:respawn/#6:23:respawn/g' -i $CACHEDIR/$SDCARD/etc/inittab
# install ramlog
cp $SRC/lib/bin/ramlog_2.0.0_all.deb $CACHEDIR/$SDCARD/tmp
chroot $CACHEDIR/$SDCARD /bin/bash -c "dpkg -i /tmp/ramlog_2.0.0_all.deb >/dev/null 2>&1"
# enabled back at first run. To remove errors
chroot $CACHEDIR/$SDCARD /bin/bash -c "service ramlog disable >/dev/null 2>&1"
rm $CACHEDIR/$SDCARD/tmp/ramlog_2.0.0_all.deb
sed -e 's/TMPFS_RAMFS_SIZE=/TMPFS_RAMFS_SIZE=512m/g' -i $CACHEDIR/$SDCARD/etc/default/ramlog
sed -e 's/$remote_fs $time/$remote_fs $time ramlog/g' -i $CACHEDIR/$SDCARD/etc/init.d/rsyslog
sed -e 's/umountnfs $time/umountnfs $time ramlog/g' -i $CACHEDIR/$SDCARD/etc/init.d/rsyslog
;;
jessie)
# enable root login for latest ssh on jessie
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' $CACHEDIR/$SDCARD/etc/ssh/sshd_config
@ -226,40 +194,6 @@ install_distribution_specific()
chmod 755 $CACHEDIR/$SDCARD/etc/NetworkManager/dispatcher.d/99disable-power-management
;;
trusty)
# add serial console
cat <<-EOF > $CACHEDIR/$SDCARD/etc/init/$SERIALCON.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty --noclear 115200 $SERIALCON
EOF
# don't clear screen tty1
sed -e s,"exec /sbin/getty","exec /sbin/getty --noclear",g -i $CACHEDIR/$SDCARD/etc/init/tty1.conf
# disable some getties
rm -f $CACHEDIR/$SDCARD/etc/init/tty5.conf
rm -f $CACHEDIR/$SDCARD/etc/init/tty6.conf
# enable root login for latest ssh on trusty
sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' $CACHEDIR/$SDCARD/etc/ssh/sshd_config
# remove legal info from Ubuntu
[[ -f $CACHEDIR/$SDCARD/etc/legal ]] && rm $CACHEDIR/$SDCARD/etc/legal
# that my custom motd works well
if [[ -d $CACHEDIR/$SDCARD/etc/update-motd.d ]]; then
mv $CACHEDIR/$SDCARD/etc/update-motd.d $CACHEDIR/$SDCARD/etc/update-motd.d-backup
fi
# remove what's anyway not working
#chroot $CACHEDIR/$SDCARD /bin/bash -c "apt-get remove --auto-remove ureadahead"
rm $CACHEDIR/$SDCARD/etc/init/ureadahead*
rm $CACHEDIR/$SDCARD/etc/init/plymouth*
;;
xenial)
# enable root login for latest ssh on jessie
sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' $CACHEDIR/$SDCARD/etc/ssh/sshd_config

View File

@ -110,7 +110,7 @@ get_package_list_hash()
# create_sources_list <release> <basedir>
#
# <release>: wheezy|jessie|trusty|xenial
# <release>: jessie|xenial
# <basedir>: path to root directory
#
create_sources_list()
@ -120,7 +120,7 @@ create_sources_list()
[[ -z $basedir ]] && exit_with_error "No basedir passed to create_sources_list"
case $release in
wheezy|jessie)
jessie)
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
@ -136,7 +136,7 @@ create_sources_list()
EOF
;;
trusty|xenial)
xenial)
cat <<-EOF > $basedir/etc/apt/sources.list
deb http://${UBUNTU_MIRROR} $release main restricted universe multiverse
#deb-src http://${UBUNTU_MIRROR} $release main restricted universe multiverse
@ -353,7 +353,7 @@ addtorepo()
# add all deb files to repository
# parameter "remove" dumps all and creates new
# function: cycle trough distributions
local distributions=("wheezy" "jessie" "trusty" "xenial")
local distributions=("jessie" "xenial")
for release in "${distributions[@]}"; do

View File

@ -170,13 +170,9 @@ else
[[ $KERNEL_TARGET != *$BRANCH* ]] && exit_with_error "Kernel branch not defined for this board" "$BRANCH"
fi
# wheezy and trusty targets are obsolete, but still accessible via command line arguments
# or custom configuration files
if [[ $KERNEL_ONLY != yes && -z $RELEASE ]]; then
options=()
#options+=("wheezy" "Debian 7 Wheezy")
options+=("jessie" "Debian 8 Jessie")
#options+=("trusty" "Ubuntu Trusty 14.04 LTS")
options+=("xenial" "Ubuntu Xenial 16.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[@]}")

View File

@ -185,7 +185,6 @@ create_board_package()
# network interfaces configuration
mkdir -p $destination/etc/network/
cp $SRC/lib/config/network/interfaces.* $destination/etc/network/
[[ $RELEASE = wheezy ]] && sed -i 's/allow-hotplug/auto/g' $destination/etc/network/interfaces.default
[[ $RELEASE = xenial ]] && sed -i 's/#no-auto-down/no-auto-down/g' $destination/etc/network/interfaces.default
# apt configuration

View File

@ -14,7 +14,7 @@
# load functions
source general.sh
DISTROS=("wheezy" "jessie" "trusty" "xenial")
DISTROS=("jessie" "xenial")
showall()
{

View File

@ -11,7 +11,7 @@
# This script recreates deb repository from files in directory POT
#
# each file is added three times! wheezy-jessie-trusty
# each file is added 2 times! jessie-xenial
#
# We are using this only for kernel, firmware, root changes, headers

View File

@ -14,15 +14,9 @@ BOARD=$3
BUILD_DESKTOP=$4
case $RELEASE in
wheezy)
# your code here
;;
jessie)
# your code here
;;
trusty)
# your code here
;;
xenial)
# your code here
;;