diff --git a/generate-packaging-dir b/generate-packaging-dir new file mode 100755 index 00000000000..52db61f34e1 --- /dev/null +++ b/generate-packaging-dir @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +ID="$1" +VERSION_ID="$2" + +DST="debian-$ID-$VERSION_ID" +rm -rf $DST +mkdir -p "$DST" + +git ls-tree "$ID"/"$VERSION_ID" debian/ | while read line ; do + file=$(basename $(echo $line | cut -d " " -f4)) + hash=$(echo $line | cut -d " " -f3) + type=$(echo $line | cut -d " " -f2) + # FIXME: deal with subdirs + if [ "$type" = "blob" ]; then + git cat-file -p $hash > "$DST/$file" + fi +done diff --git a/spread.yaml b/spread.yaml index 76926e3c17e..0c78b10a3a2 100644 --- a/spread.yaml +++ b/spread.yaml @@ -19,6 +19,9 @@ environment: TRUST_TEST_KEYS: "true" MANAGED_DEVICE: "false" CORE_CHANNEL: "$(HOST: echo ${SPREAD_CORE_CHANNEL:-edge})" + # slight abuse + GENERATE_14_04: "$(HOST: ./generate-packaging-dir ubuntu 14.04)" + GENERATE_16_04: "$(HOST: ./generate-packaging-dir ubuntu 16.04)" backends: linode: @@ -180,6 +183,23 @@ prepare: | # utilities apt-get install -y curl devscripts expect gdebi-core jq rng-tools git + + # apply the right packaging delta, only 14.04 is special for now + . /etc/os-release + if [ "$ID" = "ubuntu" ]; then + case "$VERSION_ID" in + 14.04) + mv debian-$ID-$VERSION_ID debian + ;; + *) + mv debian-ubuntu-16.04 debian + ;; + esac + else + echo "unknown distro ID $ID, please update the spread tests" + exit 1 + fi + # in 16.04: apt build-dep -y ./ apt-get install -y $(gdebi --quiet --apt-line ./debian/control)