From a882fbc1e2eb21687fd0224d7a3bae8d09c941db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Tue, 5 Jul 2016 11:39:13 +0200 Subject: [PATCH] initial ubuntu support, backported over from bunsen --- .travis.yml | 1 + ubuntu/configure_fresh_system | 40 +++++++++++++++++++++++++++++------ ubuntu/test_insider | 19 +++++++++++++++++ ubuntu/test_outsider | 3 +++ 4 files changed, 56 insertions(+), 7 deletions(-) create mode 100755 ubuntu/test_insider create mode 100755 ubuntu/test_outsider diff --git a/.travis.yml b/.travis.yml index 82c8aa76..b20207b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ script: env: - DETECTED_OS=fedora - DETECTED_OS=bunsen + - DETECTED_OS=ubuntu sudo: required diff --git a/ubuntu/configure_fresh_system b/ubuntu/configure_fresh_system index c5fc4939..d1702c7d 100755 --- a/ubuntu/configure_fresh_system +++ b/ubuntu/configure_fresh_system @@ -1,18 +1,44 @@ #!/bin/bash -# detect if building inside a CI system, like Travis -echo "choosing the more interactive installation method" -COMMAND_PREFIX="apt-get -y"; + set -e +set -v sudo apt-get update +sudo apt-get -y upgrade +install_packages="sudo apt-get -y --fix-missing install aptitude meld whois zsh tmux atop aria2 curl pv gajim tor torsocks nodejs thunderbird thunderbird-enigmail thunderbird-ublock-origin gajim lm-sensors freecad python3-pip meld whois curl pv tor torsocks nodejs npm terminator gsmartcontrol python-pip mercurial redshift gtk-redshift cmake intltool gparted wine solaar glances silversearcher-ag dkms linux-kernel-headers golang keepass2 libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev ruby-dev git retext kdiff3 gnupg2 realpath apt-file" -UPGRADE_COMMAND="sudo $COMMAND_PREFIX dist-upgrade" -eval ${UPGRADE_COMMAND} +set +e +for i in `seq 1 3`; do + eval $install_packages +done -INSTALL_COMMAND="sudo $COMMAND_PREFIX install meld whois zsh tmux vim atop aria2 curl pv pixz gajim tor torsocks nodejs npm terminator gsmartcontrol python-pip mesa-utils mesa-utils-extra aptitude p7zip-full p7zip-rar thunderbird mercurial kdiff3 gnupg2 python3-setuptools aircrack-ng macchanger realpath python3-dev python3 python3-pip apt-file" -eval ${INSTALL_COMMAND} +set -e +eval $install_packages + +if [[ -z $DONT_START_TOR ]]; then + sudo systemctl enable tor + sudo systemctl start tor +fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$DIR/../" DIR="$DIR" $DIR/common/configure_fresh_system +# install vim from sources +VIM_BUILD_DIR=/tmp +cd "$VIM_BUILD_DIR" +git clone https://github.com/vim/vim.git +cd vim +./configure --with-features=huge \ + --enable-multibyte \ + --enable-rubyinterp \ + --enable-pythoninterp \ + --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu \ + --enable-perlinterp \ + --enable-luainterp \ + --enable-gui=gtk2 --enable-cscope --prefix=/usr +make -j2 +sudo make install +cd +rm -fvr "$VIM_BUILD_DIR/vim" + diff --git a/ubuntu/test_insider b/ubuntu/test_insider new file mode 100755 index 00000000..55aa9929 --- /dev/null +++ b/ubuntu/test_insider @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e + +export DEBIAN_FRONTEND=noninteractive +export DONT_CHANGE_SHELL=true +export DONT_START_TOR=true + +echo "APT::Acquire::Retries=16;" >> /etc/apt/apt.conf.d/99_retries + +apt-get update +apt-get install sudo +cd $HOME + +mkdir -p dev/ +cp -rv temp/dotfiles dev/ + +./dev/dotfiles/ubuntu/configure_fresh_system + diff --git a/ubuntu/test_outsider b/ubuntu/test_outsider new file mode 100755 index 00000000..8bce97bf --- /dev/null +++ b/ubuntu/test_outsider @@ -0,0 +1,3 @@ +#!/bin/bash + +docker run -v `pwd`:/root/temp/dotfiles/ ubuntu:xenial /root/temp/dotfiles/ubuntu/test_insider