summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rwxr-xr-xpkg/osx/installer/Bitmask.pkgproj31
-rwxr-xr-xpkg/osx/installer/post-inst.sh5
-rw-r--r--pkg/osx/installer/se.leap.bitmask-helper.plist (renamed from pkg/osx/se.leap.bitmask-helper.plist)0
-rw-r--r--pkg/pyinst/build.mk13
-rwxr-xr-xsrc/leap/bitmask/vpn/helpers/osx/bitmask-helper8
6 files changed, 39 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index 9b92e41..d4cbc17 100644
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,6 @@ DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/
include pkg/pyinst/build.mk
include pkg/thirdparty/openvpn/build.mk
-clean:
- find . -type f -name "*.py[co]" -delete
- find . -type d -name "__pycache__" -delete
-
dev-mail:
pip install -e '.[mail]'
@@ -64,3 +60,7 @@ bundle_in_docker:
docker_container:
cd pkg/docker_bundle && docker build -t mybundle .
+
+clean:
+ find . -type f -name "*.py[co]" -delete
+ find . -type d -name "__pycache__" -delete
diff --git a/pkg/osx/installer/Bitmask.pkgproj b/pkg/osx/installer/Bitmask.pkgproj
index bf88285..f42ffc8 100755
--- a/pkg/osx/installer/Bitmask.pkgproj
+++ b/pkg/osx/installer/Bitmask.pkgproj
@@ -21,9 +21,9 @@
<key>GID</key>
<integer>80</integer>
<key>PATH</key>
- <string>/Users/user/leap/bitmask_client/dist/Bitmask.app</string>
+ <string>Bitmask.app</string>
<key>PATH_TYPE</key>
- <integer>0</integer>
+ <integer>3</integer>
<key>PERMISSIONS</key>
<integer>493</integer>
<key>TYPE</key>
@@ -489,16 +489,16 @@
<key>POSTINSTALL_PATH</key>
<dict>
<key>PATH</key>
- <string>../pkg/osx/post-inst.sh</string>
+ <string>../../bitmask-dev/pkg/osx/installer/post-inst.sh</string>
<key>PATH_TYPE</key>
<integer>3</integer>
</dict>
<key>PREINSTALL_PATH</key>
<dict>
<key>PATH</key>
- <string>/Users/user/leap/bitmask_client/pkg/osx/pre-inst.sh</string>
+ <string>../pkg/osx/installer/pre-inst.sh</string>
<key>PATH_TYPE</key>
- <integer>0</integer>
+ <integer>3</integer>
</dict>
<key>RESOURCES</key>
<array>
@@ -508,9 +508,9 @@
<key>GID</key>
<integer>0</integer>
<key>PATH</key>
- <string>../pkg/osx/se.leap.bitmask-helper.plist</string>
+ <string>se.leap.bitmask-helper.plist</string>
<key>PATH_TYPE</key>
- <integer>3</integer>
+ <integer>1</integer>
<key>PERMISSIONS</key>
<integer>420</integer>
<key>TYPE</key>
@@ -532,8 +532,10 @@
<false/>
<key>RELOCATABLE</key>
<true/>
+ <key>USE_HFS+_COMPRESSION</key>
+ <true/>
<key>VERSION</key>
- <string>0.9.0rc4</string>
+ <string>0.10a1</string>
</dict>
<key>PROJECT_COMMENTS</key>
<dict>
@@ -548,8 +550,11 @@
dGxlPjwvdGl0bGU+CjxtZXRhIG5hbWU9IkdlbmVyYXRvciIgY29u
dGVudD0iQ29jb2EgSFRNTCBXcml0ZXIiPgo8bWV0YSBuYW1lPSJD
b2NvYVZlcnNpb24iIGNvbnRlbnQ9IjEyNjUuMjEiPgo8c3R5bGUg
- dHlwZT0idGV4dC9jc3MiPgo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5
- Pgo8L2JvZHk+CjwvaHRtbD4K
+ dHlwZT0idGV4dC9jc3MiPgpwLnAxIHttYXJnaW46IDAuMHB4IDAu
+ MHB4IDAuMHB4IDAuMHB4OyBmb250OiAxMi4wcHggSGVsdmV0aWNh
+ fQo8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5Pgo8cCBjbGFzcz0icDEi
+ Pk1heSB0aGUgT1NYIGJ1bmRsZXMgYmUgd2l0aCB5b3U8L3A+Cjwv
+ Ym9keT4KPC9odG1sPgo=
</data>
</dict>
<key>PROJECT_SETTINGS</key>
@@ -557,9 +562,9 @@
<key>BUILD_PATH</key>
<dict>
<key>PATH</key>
- <string>/Users/user/Bitmask/build</string>
+ <string>../../../../../Bitmask/build</string>
<key>PATH_TYPE</key>
- <integer>0</integer>
+ <integer>1</integer>
</dict>
<key>CERTIFICATE</key>
<dict>
@@ -739,7 +744,7 @@
<key>NAME</key>
<string>Bitmask</string>
<key>REFERENCE_FOLDER_PATH</key>
- <string>/Users/user/leap/bitmask_client/dist</string>
+ <string>/Users/user/leap/bitmask-dev/dist</string>
</dict>
</dict>
<key>TYPE</key>
diff --git a/pkg/osx/installer/post-inst.sh b/pkg/osx/installer/post-inst.sh
index f88ea97..0202323 100755
--- a/pkg/osx/installer/post-inst.sh
+++ b/pkg/osx/installer/post-inst.sh
@@ -1,7 +1,4 @@
#!/bin/sh
# Bitmask Post-Instalation script
-
cp se.leap.bitmask-helper.plist /Library/LaunchDaemons/
-launchctl load /Library/LaunchDaemons/se.leap.bitmask-helper.plist
-cp tuntap_20150118.pkg /tmp/
-open /tmp/tuntap_20150118.pkg
+launchctl load /Library/LaunchDaemons/se.leap.bitmask-helper.plist || echo "Already loaded, skipping..."
diff --git a/pkg/osx/se.leap.bitmask-helper.plist b/pkg/osx/installer/se.leap.bitmask-helper.plist
index 4428f13..4428f13 100644
--- a/pkg/osx/se.leap.bitmask-helper.plist
+++ b/pkg/osx/installer/se.leap.bitmask-helper.plist
diff --git a/pkg/pyinst/build.mk b/pkg/pyinst/build.mk
index 86f7c34..448f7e0 100644
--- a/pkg/pyinst/build.mk
+++ b/pkg/pyinst/build.mk
@@ -1,5 +1,8 @@
# This makefile should be called from the topmost bitmask folder
-#
+
+default:
+ echo "enter 'make bundle or make bundle_osx'"
+
bundle: bundle_clean
pyinstaller -y pkg/pyinst/app.spec
cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/_scrypt.so $(DIST)
@@ -37,7 +40,7 @@ bundle_osx_helpers:
mkdir -p $(DIST_VERSION)/apps/helpers
cp src/leap/bitmask/vpn/helpers/osx/bitmask-helper $(DIST_VERSION)/apps/helpers/
cp src/leap/bitmask/vpn/helpers/osx/bitmask.pf.conf $(DIST_VERSION)/apps/helpers/
- cp pkg/osx/se.leap.bitmask-helper.plist $(DIST_VERSION)/apps/helpers/
+ cp pkg/osx/installer/se.leap.bitmask-helper.plist $(DIST_VERSION)/apps/helpers/
cp -r pkg/osx/daemon $(DIST_VERSION)/apps/helpers/
cp -r pkg/osx/openvpn $(DIST_VERSION)/apps/helpers/
@@ -51,6 +54,11 @@ bundle_osx: bundle bundle_osx_helpers
cp -r $(DIST_VERSION)/lib/pixelated_www dist/Bitmask.app/Contents/MacOS/
mv dist/Bitmask.app/Contents/MacOS/bitmask dist/Bitmask.app/Contents/MacOS/bitmask-app
cp pkg/osx/bitmask-wrapper dist/Bitmask.app/Contents/MacOS/bitmask
+ mkdir -p dist/Bitmask.app/Contents/Resources/bitmask-helper
+ cp -r $(DIST_VERSION)/apps/helpers/bitmask-helper dist/Bitmask.app/Contents/Resources/bitmask-helper/
+ cp -r $(DIST_VERSION)/apps/helpers/bitmask.pf.conf dist/Bitmask.app/Contents/Resources/bitmask-helper/
+ cp -r $(DIST_VERSION)/apps/helpers/daemon/daemon.py dist/Bitmask.app/Contents/Resources/
+ cp -r $(DIST_VERSION)/apps/helpers/openvpn/* dist/Bitmask.app/Contents/Resources/
bundle_win:
pyinstaller -y pkg/pyinst/app.spec
@@ -69,4 +77,3 @@ bundle_upload:
bundle_clean:
rm -rf "dist" "build"
-
diff --git a/src/leap/bitmask/vpn/helpers/osx/bitmask-helper b/src/leap/bitmask/vpn/helpers/osx/bitmask-helper
index 74f72f7..7795ba2 100755
--- a/src/leap/bitmask/vpn/helpers/osx/bitmask-helper
+++ b/src/leap/bitmask/vpn/helpers/osx/bitmask-helper
@@ -189,7 +189,7 @@ def handle_command(sock):
}
cmd_call = cmd_dict.get(command, None)
- syslog.syslog(syslog.LOG_WARNING, 'call: %s' % (str(cmd_call)))
+ # syslog.syslog(syslog.LOG_WARNING, 'call: %s' % (str(cmd_call)))
try:
if cmd_call:
syslog.syslog(
@@ -248,11 +248,15 @@ def openvpn_start(*args):
binary = ['/usr/local/sbin/openvpn']
cmd = binary + opts
- # syslog.syslog(syslog.LOG_WARNING, 'LAUNCHING VPN: ' + ' '.join(cmd))
+ syslog.syslog(syslog.LOG_WARNING, 'LAUNCHING VPN: ' + ' '.join(cmd))
global openvpn_proc
# TODO sanitize options
openvpn_proc = subprocess.Popen(cmd, shell=False, bufsize=-1)
+ # try:
+ # result = subprocess.check_output(cmd, shell=False, stderr=subprocess.STDOUT)
+ # except Exception as exc:
+ # syslog.syslog(syslog.LOG_WARNING, exc.output)
def openvpn_stop(sig='TERM'):