From a59286f645d039bc300aaa48f707c390bd2acb49 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 19 Nov 2014 17:15:05 -0300 Subject: Use the right files for the version being built. Use the correct root.json file to get TUF working. Install pycrypto and others into the bundle so TUF can verify the data correctly. Move json version specifications to pkg/ Closes #6385, #6378, #6376. --- bitmask-0.7.0rc3.json | 11 ----------- bitmask-nightly.json | 10 ---------- copy-binaries.sh | 11 +++++------ createbundle.sh | 14 +++++++++++++- pkg/bitmask-0.7.0rc3.json | 11 +++++++++++ pkg/bitmask-0.7.0rc5.json | 11 +++++++++++ pkg/bitmask-nightly.json | 10 ++++++++++ 7 files changed, 50 insertions(+), 28 deletions(-) delete mode 100644 bitmask-0.7.0rc3.json delete mode 100644 bitmask-nightly.json create mode 100644 pkg/bitmask-0.7.0rc3.json create mode 100644 pkg/bitmask-0.7.0rc5.json create mode 100644 pkg/bitmask-nightly.json diff --git a/bitmask-0.7.0rc3.json b/bitmask-0.7.0rc3.json deleted file mode 100644 index 70559c8..0000000 --- a/bitmask-0.7.0rc3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.7.0rc3", - "tuf_repo": "unstable", - "bitmask_client": "0.7.0rc3", - "soledad": "0.6.0", - "leap_pycommon": "0.3.9", - "keymanager": "0.3.8", - "leap_mail": "0.3.10", - "bitmask_launcher": "0.3.2", - "leap_assets": "master" -} diff --git a/bitmask-nightly.json b/bitmask-nightly.json deleted file mode 100644 index 563fa5d..0000000 --- a/bitmask-nightly.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": "nightly", - "bitmask_client": "develop", - "soledad": "develop", - "leap_pycommon": "develop", - "keymanager": "develop", - "leap_mail": "develop", - "bitmask_launcher": "develop", - "leap_assets": "master" -} diff --git a/copy-binaries.sh b/copy-binaries.sh index 1d8b809..3ada635 100755 --- a/copy-binaries.sh +++ b/copy-binaries.sh @@ -37,16 +37,15 @@ cp /usr/lib/libpython2.7.so.1.0 . cp /usr/lib/$ARCH/libssl.so.1.0.0 . cp /usr/lib/$ARCH/libstdc++.so.6 . -touch root.json # empty file for TUF +# NOTE: this needs to be always the same root.json file +cp $BASE/root.json mkdir openvpn.files cd openvpn.files cp $BASE/openvpn/src/openvpn/openvpn leap-openvpn -# TODO: to avoid network requests this should be copied from the cloned repositories -# after `bundler gitclone` and before `bundler pythonsetup` -wget https://raw.githubusercontent.com/leapcode/bitmask_client/develop/pkg/linux/bitmask-root -wget https://raw.githubusercontent.com/leapcode/bitmask_client/develop/pkg/linux/leap-install-helper.sh -wget https://raw.githubusercontent.com/leapcode/bitmask_client/develop/pkg/linux/polkit/se.leap.bitmask.bundle.policy +cp $BASE/bundler.output/bitmask_client/pkg/linux/bitmask-root +cp $BASE/bundler.output/bitmask_client/pkg/linux/leap-install-helper.sh +cp $BASE/bundler.output/bitmask_client/pkg/linux/polkit/se.leap.bitmask.bundle.policy chmod +x bitmask-root chmod +x leap-install-helper.sh diff --git a/createbundle.sh b/createbundle.sh index 1336263..d322da7 100755 --- a/createbundle.sh +++ b/createbundle.sh @@ -44,6 +44,7 @@ BASE='/home/leap/bitmask.bundle' SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" VERSIONS_FILE="$SCRIPT_DIR/bitmask.json" BINARY_COPIER="$SCRIPT_DIR/copy-binaries.sh" +ROOT_JSON="$SCRIPT_DIR/root.json" mkdir -p $BASE @@ -125,6 +126,7 @@ set_pyside_environment() { } copy_binaries() { + cp $ROOT_JSON $BASE cd $BASE $BINARY_COPIER } @@ -155,6 +157,11 @@ setup_bundler() { pip install --upgrade pip pip install --allow-external u1db --allow-unverified u1db --allow-external dirspec --allow-unverified dirspec u1db dirspec + # HACK: this is needed so tuf can verify the downloaded data, if we add + # this to the requirements.pip pycrypto is installed as an egg and the + # bundler can't copy its contents (not supported right now) + pip install tuf[tools] pycrypto + git clone https://github.com/chiiph/protobuf-socket-rpc protobuf-socket-rpc.git cd protobuf-socket-rpc.git python setup.py easy_install -Z . @@ -183,6 +190,7 @@ run_bundler() { $bundler --do gitclone $bundler --do gitcheckout + copy_binaries $bundler --do pythonsetup $bundler --skip gitclone gitcheckout pythonsetup @@ -200,13 +208,17 @@ if [[ ! -f $VERSIONS_FILE ]]; then exit 1 fi +if [[ ! -f $ROOT_JSON ]]; then + echo "ERROR: missing $ROOT_JSON file." + exit 1 +fi + if [[ ! -f $REUSE_BINARIES ]]; then install_dependencies build_boost build_launcher build_openvpn build_pyside - copy_binaries create_bundler_paths else echo "Reusing existing binaries, cleaning up before creating a new bundle..." diff --git a/pkg/bitmask-0.7.0rc3.json b/pkg/bitmask-0.7.0rc3.json new file mode 100644 index 0000000..70559c8 --- /dev/null +++ b/pkg/bitmask-0.7.0rc3.json @@ -0,0 +1,11 @@ +{ + "version": "0.7.0rc3", + "tuf_repo": "unstable", + "bitmask_client": "0.7.0rc3", + "soledad": "0.6.0", + "leap_pycommon": "0.3.9", + "keymanager": "0.3.8", + "leap_mail": "0.3.10", + "bitmask_launcher": "0.3.2", + "leap_assets": "master" +} diff --git a/pkg/bitmask-0.7.0rc5.json b/pkg/bitmask-0.7.0rc5.json new file mode 100644 index 0000000..83f653e --- /dev/null +++ b/pkg/bitmask-0.7.0rc5.json @@ -0,0 +1,11 @@ +{ + "version": "0.7.0rc5", + "tuf_repo": "unstable", + "bitmask_client": "0.7.0rc5", + "soledad": "0.6.0", + "leap_pycommon": "0.3.9", + "keymanager": "0.3.8", + "leap_mail": "0.3.10", + "bitmask_launcher": "0.3.3", + "leap_assets": "master" +} diff --git a/pkg/bitmask-nightly.json b/pkg/bitmask-nightly.json new file mode 100644 index 0000000..563fa5d --- /dev/null +++ b/pkg/bitmask-nightly.json @@ -0,0 +1,10 @@ +{ + "version": "nightly", + "bitmask_client": "develop", + "soledad": "develop", + "leap_pycommon": "develop", + "keymanager": "develop", + "leap_mail": "develop", + "bitmask_launcher": "develop", + "leap_assets": "master" +} -- cgit v1.2.3