summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rwxr-xr-xpkg/linux/build_bundle.sh107
-rwxr-xr-xpkg/linux/resolv-update6
-rwxr-xr-xpkg/osx/build_bundle.sh123
-rw-r--r--pkg/osx/build_bundle_from_linux.sh84
-rw-r--r--pkg/requirements-docs.pip1
-rw-r--r--pkg/requirements-testing.pip2
-rw-r--r--pkg/requirements.pip8
-rwxr-xr-x[-rw-r--r--]pkg/scripts/bitmask_bootstrap.sh (renamed from pkg/scripts/leap_client_bootstrap.sh)25
8 files changed, 336 insertions, 20 deletions
diff --git a/pkg/linux/build_bundle.sh b/pkg/linux/build_bundle.sh
new file mode 100755
index 00000000..e6a1043f
--- /dev/null
+++ b/pkg/linux/build_bundle.sh
@@ -0,0 +1,107 @@
+REPOS_ROOT=$1
+VERSION=$2
+TEMPLATE_BUNDLE=$3
+JOINT_CHANGELOG=$4
+DEST=$5
+
+# clean template
+
+rm $TEMPLATE_BUNDLE/CHANGELOG
+rm $TEMPLATE_BUNDLE/relnotes.txt
+rm -rf $TEMPLATE_BUNDLE/apps/leap
+rm -rf $TEMPLATE_BUNDLE/lib/leap/{common,keymanager,soledad,mail}
+
+# checkout VERSION in all repos
+
+for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail}
+ do
+ cd $REPOS_ROOT/$i
+ git fetch
+ git checkout $VERSION
+ done
+
+# make ui in client
+
+cd $REPOS_ROOT/leap_client
+make
+
+# cp client
+
+cp -r $REPOS_ROOT/leap_client/src/leap $TEMPLATE_BUNDLE/apps/leap
+
+# setup sdist client
+
+cd $REPOS_ROOT/leap_client
+python setup.py sdist
+
+# extract $VERSION and copy _version.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py
+
+cd dist
+rm -rf leap.bitmask-$VERSION
+tar xzf leap.bitmask-$VERSION.tar.gz
+cp leap.bitmask-$VERSION/src/leap/bitmask/_version.py $TEMPLATE_BUNDLE/apps/leap/bitmask/_version.py
+cp leap.bitmask-$VERSION/src/leap/bitmask/util/reqs.txt $TEMPLATE_BUNDLE/apps/leap/bitmask/util/reqs.txt
+
+# cp common, soledad(client and common), mail and keymanager in TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/
+
+LEAP_LIB=$TEMPLATE_BUNDLE/lib/leap/
+
+cp -r $REPOS_ROOT/leap_pycommon/src/leap/common $LEAP_LIB
+cp -r $REPOS_ROOT/soledad/common/src/leap/soledad $LEAP_LIB
+cp -r $REPOS_ROOT/soledad/client/src/leap/soledad/client $LEAP_LIB/soledad
+cp -r $REPOS_ROOT/leap_mail/src/leap/mail $LEAP_LIB
+cp -r $REPOS_ROOT/keymanager/src/leap/keymanager $LEAP_LIB
+
+# cp leap_client launcher to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/Bitmask
+
+BITMASK_BIN=$TEMPLATE_BUNDLE/bitmask
+
+cd $REPOS_ROOT/leap_client_launcher/build/
+make
+cp src/launcher $BITMASK_BIN
+
+# cp launcher.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/
+
+cd $REPOS_ROOT/leap_client_launcher/src/
+cp launcher.py $TEMPLATE_BUNDLE/apps/
+
+# cp relnotes to TEMPLATE_BUNDLE
+
+cp $REPOS_ROOT/leap_client/relnotes.txt $TEMPLATE_BUNDLE
+
+# cp joint_chglog to TEMPLATE_BUNDLE
+
+cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG
+
+# cp LICENSE to TEMPLATE_BUNDLE
+
+cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE
+
+# clean pyc$
+
+cd $TEMPLATE_BUNDLE
+for i in $(find . | grep pyc$);
+ do
+ rm $i
+ done
+
+# create tarball
+
+ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/')
+BUNDLE_NAME=Bitmask-linux$ARCH-$VERSION
+TMP=/tmp/$BUNDLE_NAME
+
+rm -rf $TMP
+mkdir -p $TMP
+cp -R $TEMPLATE_BUNDLE/* $TMP
+cd /tmp
+tar cjf $DEST/$BUNDLE_NAME.tar.bz2 $BUNDLE_NAME
+cd
+rm -rf $TMP
+
+# go back to develop in all repos
+for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail}
+ do
+ cd $REPOS_ROOT/$i
+ git checkout develop
+ done
diff --git a/pkg/linux/resolv-update b/pkg/linux/resolv-update
index a54802e3..601d3bd2 100755
--- a/pkg/linux/resolv-update
+++ b/pkg/linux/resolv-update
@@ -20,13 +20,13 @@ function up() {
comment=$(
cat <<SETVAR
#
-# This is a temporary resolv.conf set by the LEAP Client in order to
+# This is a temporary resolv.conf set by the Bitmask in order to
# strictly enforce that DNS lookups are secured by the VPN.
#
-# When the LEAP Client quits or the VPN connection it manages is dropped,
+# When Bitmask quits or the VPN connection it manages is dropped,
# this file will be replace with the regularly scheduled /etc/resolv.conf
#
-# If you want custom entries to appear in this file while LEAP is running,
+# If you want custom entries to appear in this file while Bitmask is running,
# put them in /etc/leap/resolv-head or /etc/leap/resolv-tail. These files
# should only be writable by root.
#
diff --git a/pkg/osx/build_bundle.sh b/pkg/osx/build_bundle.sh
new file mode 100755
index 00000000..a13746bf
--- /dev/null
+++ b/pkg/osx/build_bundle.sh
@@ -0,0 +1,123 @@
+REPOS_ROOT=$1
+VERSION=$2
+TEMPLATE_BUNDLE=$3
+JOINT_CHANGELOG=$4
+DEST=$5
+
+# clean template
+
+rm $TEMPLATE_BUNDLE/CHANGELOG.txt
+rm $TEMPLATE_BUNDLE/relnotes.txt
+rm -rf $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/apps/leap
+rm $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/lib/leap/{common,keymanager,soledad,mail}
+
+# checkout VERSION in all repos
+
+for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail}
+ do
+ cd $REPOS_ROOT/$i
+ git checkout $VERSION
+ done
+
+# make ui in client
+
+cd $REPOS_ROOT/leap_client
+make
+
+# cp client
+
+cp -r $REPOS_ROOT/leap_client/src/leap $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap
+
+# setup sdist client
+
+cd $REPOS_ROOT/leap_client
+python setup.py sdist
+
+# extract $VERSION and copy _version.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py
+
+cd dist
+rm -rf leap.bitmask-$VERSION
+tar xzf leap.bitmask-$VERSION.tar.gz
+cp leap.bitmask-$VERSION/src/leap/bitmask/_version.py $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py
+cp leap.bitmask-$VERSION/src/leap/bitmask/util/reqs.txt $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/util/reqs.txt
+
+# cp common, soledad(client and common), mail and keymanager in TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/
+
+LEAP_LIB=$TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/
+
+cp -r $REPOS_ROOT/leap_pycommon/src/leap/common $LEAP_LIB
+cp -r $REPOS_ROOT/soledad/common/src/leap/soledad $LEAP_LIB
+cp -r $REPOS_ROOT/soledad/client/src/leap/soledad/client $LEAP_LIB/soledad
+cp -r $REPOS_ROOT/leap_mail/src/leap/mail $LEAP_LIB
+cp -r $REPOS_ROOT/keymanager/src/leap/keymanager $LEAP_LIB
+
+# cp leap_client launcher to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/Bitmask
+
+BITMASK_BIN=$TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/Bitmask
+
+cd $REPOS_ROOT/leap_client_launcher/build/
+make
+cp src/launcher $BITMASK_BIN
+
+# cp launcher.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/
+
+cd $REPOS_ROOT/leap_client_launcher/src/
+cp launcher.py $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/
+
+# install_name_tool it
+
+install_name_tool -change libboost_python.dylib lib/libboost_python.dylib $BITMASK_BIN
+install_name_tool -change libboost_filesystem.dylib lib/libboost_filesystem.dylib $BITMASK_BIN
+install_name_tool -change libboost_system.dylib lib/libboost_system.dylib $BITMASK_BIN
+
+# cp relnotes to TEMPLATE_BUNDLE
+
+cp $REPOS_ROOT/leap_client/relnotes.txt $TEMPLATE_BUNDLE
+
+# cp joint_chglog to TEMPLATE_BUNDLE
+
+cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG.txt
+
+# cp LICENSE to TEMPLATE_BUNDLE
+
+cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE.txt
+
+# clean pyc$
+
+cd $TEMPLATE_BUNDLE
+for i in $(find . | grep pyc$);
+ do
+ rm $i
+ done
+
+# create dmg
+
+TMP=/tmp/Bitmask
+VOLUME_NAME=Bitmask
+DMG_FILE=Bitmask-OSX-$VERSION.dmg
+
+rm -rf $TMP
+mkdir -p $TMP
+cp -R $TEMPLATE_BUNDLE/* $TMP
+cp $REPOS_ROOT/leap_assets/mac/bitmask.icns $TMP/.VolumeIcon.icns
+SetFile -c icnC $TMP/.VolumeIcon.icns
+hdiutil create -srcfolder $TMP -volname $VOLUME_NAME -format UDRW -ov $DEST/raw-$DMG_FILE
+
+rm -rf $TMP
+mkdir -p $TMP
+hdiutil attach $DEST/raw-$DMG_FILE -mountpoint $TMP
+
+SetFile -a C $TMP
+hdiutil detach $TMP
+
+rm -rf $TMP
+rm -f $DEST/$DMG_FILE
+hdiutil convert $DEST/raw-$DMG_FILE -format UDZO -o $DEST/$DMG_FILE
+rm -f $DEST/raw-$DMG_FILE
+
+# go back to develop in all repos
+for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail}
+ do
+ cd $REPOS_ROOT/$i
+ git checkout develop
+ done
diff --git a/pkg/osx/build_bundle_from_linux.sh b/pkg/osx/build_bundle_from_linux.sh
new file mode 100644
index 00000000..c98e1b7a
--- /dev/null
+++ b/pkg/osx/build_bundle_from_linux.sh
@@ -0,0 +1,84 @@
+REPOS_ROOT=$1
+VERSION=$2
+TEMPLATE_BUNDLE=$3
+JOINT_CHANGELOG=$4
+DEST=$5
+
+# clean template
+
+rm $TEMPLATE_BUNDLE/CHANGELOG.txt
+rm $TEMPLATE_BUNDLE/relnotes.txt
+rm -rf $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/apps/leap
+rm $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/lib/leap/{common,keymanager,soledad,mail}
+
+# checkout VERSION in all repos
+
+for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail}
+ do
+ cd $REPOS_ROOT/$i
+ git checkout $VERSION
+ done
+
+# make ui in client
+
+cd $REPOS_ROOT/leap_client
+make
+
+# cp client
+
+cp -r $REPOS_ROOT/leap_client/src/leap $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap
+
+# setup sdist client
+
+cd $REPOS_ROOT/leap_client
+python setup.py sdist
+
+# extract $VERSION and copy _version.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py
+
+cd dist
+rm -rf leap.bitmask-$VERSION
+tar xzf leap.bitmask-$VERSION.tar.gz
+cp leap.bitmask-$VERSION/src/leap/bitmask/_version.py $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py
+cp leap.bitmask-$VERSION/src/leap/bitmask/util/reqs.txt $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/util/reqs.txt
+
+# cp common, soledad(client and common), mail and keymanager in TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/
+
+LEAP_LIB=$TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/
+
+cp -r $REPOS_ROOT/leap_pycommon/src/leap/common $LEAP_LIB
+cp -r $REPOS_ROOT/soledad/common/src/leap/soledad $LEAP_LIB
+cp -r $REPOS_ROOT/soledad/client/src/leap/soledad/client $LEAP_LIB/soledad
+cp -r $REPOS_ROOT/leap_mail/src/leap/mail $LEAP_LIB
+cp -r $REPOS_ROOT/keymanager/src/leap/keymanager $LEAP_LIB
+
+# cp relnotes to TEMPLATE_BUNDLE
+
+cp $REPOS_ROOT/leap_client/relnotes.txt $TEMPLATE_BUNDLE
+
+# cp joint_chglog to TEMPLATE_BUNDLE
+
+cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG.txt
+
+# cp LICENSE to TEMPLATE_BUNDLE
+
+cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE.txt
+
+# clean pyc$
+
+cd $TEMPLATE_BUNDLE
+for i in $(find . | grep pyc$);
+ do
+ rm $i
+ done
+
+# create dmg
+
+genisoimage -D -V "Bitmask" -no-pad -r -apple -o raw-Bitmask-OSX-$VERSION.dmg $TEMPLATE_BUNDLE
+dmg dmg raw-Bitmask-OSX-$VERSION.dmg Bitmask-OSX-$VERSION.dmg
+
+# go back to develop in all repos
+for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail}
+ do
+ cd $REPOS_ROOT/$i
+ git checkout develop
+ done
diff --git a/pkg/requirements-docs.pip b/pkg/requirements-docs.pip
new file mode 100644
index 00000000..6966869c
--- /dev/null
+++ b/pkg/requirements-docs.pip
@@ -0,0 +1 @@
+sphinx
diff --git a/pkg/requirements-testing.pip b/pkg/requirements-testing.pip
index 2df5fe56..e789664a 100644
--- a/pkg/requirements-testing.pip
+++ b/pkg/requirements-testing.pip
@@ -1,6 +1,7 @@
nose
nose-exclude
nose-progressive
+mock
unittest2 # TODO we should include this dep only for python2.6
@@ -13,6 +14,5 @@ tox
# double reqs
# (the client already includes, which gives some errors)
# -----------
-# mock # re-add XXX
#twisted
#zope.interface
diff --git a/pkg/requirements.pip b/pkg/requirements.pip
index e04127b7..081f3ba9 100644
--- a/pkg/requirements.pip
+++ b/pkg/requirements.pip
@@ -9,18 +9,20 @@ argparse
requests
srp>=1.0.2
pyopenssl
-keyring
python-dateutil
psutil
ipaddr
twisted
qt4reactor
python-gnupg
+python-daemon # this should not be needed for Windows.
-leap.common>=0.3.0
+keyring<=2.9 # See #3759
+
+leap.common>=0.3.2
leap.soledad.client>=0.3.0
leap.keymanager>=0.2.0
-leap.mail>=0.3.0
+leap.mail>=0.3.2
# Remove this when u1db fixes its dependency on oauth
oauth
diff --git a/pkg/scripts/leap_client_bootstrap.sh b/pkg/scripts/bitmask_bootstrap.sh
index dcde64f9..42eb0af9 100644..100755
--- a/pkg/scripts/leap_client_bootstrap.sh
+++ b/pkg/scripts/bitmask_bootstrap.sh
@@ -17,34 +17,33 @@ cc_red="${esc}[0;31m"
cc_normal=`echo -en "${esc}[m\017"`
echo "${cc_yellow}"
-echo "~~~~~~~~~~~~~~~~~~~~~~"
-echo "LEAP "
-echo "client bootstrapping "
-echo "~~~~~~~~~~~~~~~~~~~~~~"
+echo "~~~~~~~~~~~~~~~~~~~~~~~"
+echo " Bitmask bootstrapping "
+echo "~~~~~~~~~~~~~~~~~~~~~~~"
echo ""
echo "${cc_green}Creating virtualenv...${cc_normal}"
-mkdir leap-client-testbuild
-virtualenv leap-client-testbuild
-source leap-client-testbuild/bin/activate
+mkdir bitmask-testbuild
+virtualenv bitmask-testbuild
+source bitmask-testbuild/bin/activate
-echo "${cc_green}Installing leap client...${cc_normal}"
+echo "${cc_green}Installing bitmask...${cc_normal}"
# Clone latest git (develop branch)
# change "develop" for any other branch you want.
-pip install -e 'git://leap.se/leap_client@develop#egg=leap-client'
+pip install -e 'git://leap.se/leap_client@develop#egg=leap.bitmask'
-cd leap-client-testbuild
+cd bitmask-testbuild
# symlink the pyside libraries to the system libs
-./src/leap-client/pkg/postmkvenv.sh
+./src/leap.bitmask/pkg/postmkvenv.sh
-echo "${cc_green}leap-client installed! =)"
+echo "${cc_green}bitmask installed! =)"
echo "${cc_yellow}"
echo "Launch it with: "
echo "~~~~~~~~~~~~~~~~~~~~~~"
-echo "bin/leap-client"
+echo "bin/bitmask"
echo "~~~~~~~~~~~~~~~~~~~~~~"
echo "${cc_normal}"