From ebb6ea08b039d72683f5a42a3f987e2f097a7173 Mon Sep 17 00:00:00 2001 From: anadahz Date: Fri, 3 Jun 2016 13:36:00 -0300 Subject: [PATCH 1/6] Add Travis CI build test --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6a8aa05 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +language: bash +script: "bash -x scripts/setup.sh" +notifications: + irc: + template: + - "%{repository}#%{build_number} (%{branch} - %{commit} : %{author}): %{message}" + - "Change view : %{compare_url}" + - "Build details : %{build_url}" + channels: + - "irc.oftc.net#test-anadahz-channel" + use_notice: true From 44c9b7b05848fa31ed37c3b4b455d86bbf4cb1c0 Mon Sep 17 00:00:00 2001 From: anadahz Date: Fri, 3 Jun 2016 13:39:34 -0300 Subject: [PATCH 2/6] Add sudo requirement --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 6a8aa05..b633a59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: bash +sudo: required script: "bash -x scripts/setup.sh" notifications: irc: From dbf6bf1d81dfcb7859c860ac71bd7850884ea615 Mon Sep 17 00:00:00 2001 From: anadahz Date: Fri, 3 Jun 2016 13:41:56 -0300 Subject: [PATCH 3/6] Explicitely add sudo to script command execution --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b633a59..4fe8948 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: bash sudo: required -script: "bash -x scripts/setup.sh" +script: "sudo bash -x scripts/setup.sh" notifications: irc: template: From 5cd813eae5b9157b204d86cdd64a28c7ca47d29e Mon Sep 17 00:00:00 2001 From: anadahz Date: Fri, 3 Jun 2016 14:46:32 -0300 Subject: [PATCH 4/6] Add Travis CI built status --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 88c050b..586b0c3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Lepidopter - OONI powered Raspberry Pi image +[![Build Status] +(https://travis-ci.org/TheTorProject/lepidopter.svg?branch=master)](https://travis-ci.org/TheTorProject/lepidopter) + ## Description The generic lepidopter image build script using the vmdebootstap method. The image provides a ready to run From 7d2c52db4449d7c9c00fcf709ee2bca24983f6f8 Mon Sep 17 00:00:00 2001 From: anadahz Date: Fri, 3 Jun 2016 15:16:18 -0300 Subject: [PATCH 5/6] Install backports only in Debian --- scripts/setup.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 3e512bd..7249f54 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -59,12 +59,15 @@ apt-get install -y zip zip --verbose -9 images/${image_file}.zip images/${image_file} } -# Add backports APT repository -echo "deb $APT_MIRROR ${DEB_RELEASE}-backports main" > \ - /etc/apt/sources.list.d/${DEB_RELEASE}-backports.list - -apt-get update -q -apt-get install -t ${DEB_RELEASE}-backports -y vmdebootstrap qemu-utils +if [ "$( lsb_release -is )" == "Debian" ]; then + # Add backports APT repository + echo "deb $APT_MIRROR ${DEB_RELEASE}-backports main" > \ + /etc/apt/sources.list.d/${DEB_RELEASE}-backports.list + apt-get update -q + apt-get install -t ${DEB_RELEASE}-backports -y vmdebootstrap qemu-utils +else + apt-get install -y vmdebootstrap qemu-utils +fi # Copy know working vmdebootstrap version 0.10 from git cd $HOME From df98f51d5e612542077b71e278f847d65fc1f966 Mon Sep 17 00:00:00 2001 From: anadahz Date: Fri, 3 Jun 2016 15:23:23 -0300 Subject: [PATCH 6/6] Run travis on trusty --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 4fe8948..711c6a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty language: bash sudo: required script: "sudo bash -x scripts/setup.sh"