diff options
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/build_osx_bundle_riseupvpn_with_venv.sh | 3 | ||||
-rw-r--r-- | pkg/bundles/build.mk | 12 | ||||
-rwxr-xr-x | pkg/osx/scripts-riseupvpn/postinstall | 13 | ||||
-rwxr-xr-x | pkg/osx/scripts-riseupvpn/preinstall | 12 | ||||
-rw-r--r-- | pkg/osx/scripts-riseupvpn/se.leap.bitmask-helper.plist | 26 |
5 files changed, 58 insertions, 8 deletions
diff --git a/pkg/build_osx_bundle_riseupvpn_with_venv.sh b/pkg/build_osx_bundle_riseupvpn_with_venv.sh index 7f819849..2e7ec759 100755 --- a/pkg/build_osx_bundle_riseupvpn_with_venv.sh +++ b/pkg/build_osx_bundle_riseupvpn_with_venv.sh @@ -20,8 +20,7 @@ echo "[+] Using venv in" $VIRTUAL_ENV $VIRTUAL_ENV/bin/pip install -U pyinstaller $VIRTUAL_ENV/bin/pip install zope.interface zope.proxy - -$VIRTUAL_ENV/bin/pip install -r pkg/requirements-osx.pip +$VIRTUAL_ENV/bin/pip install -r pkg/requirements-vpn.pip # Get the bundled libzmq $VIRTUAL_ENV/bin/pip install -I pyzmq --install-option="--zmq=bundled" diff --git a/pkg/bundles/build.mk b/pkg/bundles/build.mk index e93199db..aa411239 100644 --- a/pkg/bundles/build.mk +++ b/pkg/bundles/build.mk @@ -169,16 +169,16 @@ bundle_anonvpn_osx_missing: mv $(OSX_ANON_CON)/anonvpn $(OSX_ANON_CON)/bitmask-app cp pkg/osx/bitmask-wrapper $(OSX_ANON_CON)/anonvpn mkdir -p $(OSX_ANON_RES)/bitmask-helper - cp -r pkg/osx/daemon $(OSX_ANON_RES)/bitmask-helper/ - cp -r pkg/osx/openvpn $(OSX_ANON_RES)/bitmask-helper/ + cp -r pkg/osx/openvpn/* $(OSX_ANON_RES)/ + cp -r pkg/osx/daemon/* $(OSX_ANON_RES)/bitmask-helper/ mkdir -p $(OSX_ANON_RES)/../apps/providers cp -r src/leap/bitmask/bonafide/providers/* $(OSX_ANON_RES)/../apps/providers/ cp -r $(ANONVPN_DIST_VERSION)/apps/providers/* $(OSX_ANON_RES)/../apps/providers cp src/leap/bitmask/vpn/helpers/osx/bitmask-helper $(OSX_ANON_RES)/bitmask-helper/ - sed "s/.*Bitmask.app.*/APP_PATH='\/Applications\/RiseupVPN\.app\/'/" $(OSX_ANON_RES)/bitmask-helper/bitmask-helper2 - mv $(OSX_ANON_RES)/bitmask-helper/bitmask-helper2 $(OSX_ANON_RES)/bitmask-helper/bitmask-helper + chmod +x $(OSX_ANON_RES)/bitmask-helper/bitmask-helper + sed "s/.*Bitmask.app.*/APP_PATH='\/Applications\/RiseupVPN\.app\/'/" $(OSX_ANON_RES)/bitmask-helper/bitmask-helper > $(OSX_ANON_RES)/bitmask-helper/bitmask-helper2 && mv $(OSX_ANON_RES)/bitmask-helper/bitmask-helper2 $(OSX_ANON_RES)/bitmask-helper/bitmask-helper cp src/leap/bitmask/vpn/helpers/osx/bitmask.pf.conf $(OSX_ANON_RES)/bitmask-helper/ - cp pkg/osx/scripts/se.leap.bitmask-helper.plist $(OSX_ANON_RES)/bitmask-helper/ + cp pkg/osx/scripts-riseupvpn/se.leap.bitmask-helper.plist $(OSX_ANON_RES)/bitmask-helper/ wget https://downloads.leap.se/thirdparty/osx/openvpn/openvpn -O $(OSX_ANON_RES)/openvpn.leap chmod +x $(OSX_ANON_RES)/openvpn.leap @@ -187,7 +187,7 @@ bundle_anonvpn_osx_pkg: cp ../bitmask-systray/bitmask-systray $(OSX_ANON_CON)/bitmask-systray cp /usr/local/opt/zeromq/lib/libzmq.5.dylib $(OSX_ANON_CON)/libzmq.5.dylib install_name_tool -change /usr/local/opt/zeromq/lib/libzmq.5.dylib "@loader_path/libzmq.5.dylib" $(OSX_ANON_CON)/bitmask-systray - pkg/osx/quickpkg --output dist/RiseupVPN-$(NEXT_VERSION)_pre.pkg --scripts pkg/osx/scripts/ dist/RiseupVPN.app/ + pkg/osx/quickpkg --output dist/RiseupVPN-$(NEXT_VERSION)_pre.pkg --scripts pkg/osx/scripts-riseupvpn/ dist/RiseupVPN.app/ @if [ $(BUILD_RELEASE) = no ]; then\ echo "[!] BUILD_RELEASE=no, skipping signature";\ else\ diff --git a/pkg/osx/scripts-riseupvpn/postinstall b/pkg/osx/scripts-riseupvpn/postinstall new file mode 100755 index 00000000..93430390 --- /dev/null +++ b/pkg/osx/scripts-riseupvpn/postinstall @@ -0,0 +1,13 @@ +#!/bin/sh +# Bitmask Post-Instalation script +# (c) LEAP Encryption access Project +# We copy the bitmask-helper plist to the LaunchDaemons folder, and load the bitmask-helper that runs as root. + +LOG=/tmp/bitmask-install.log + +chmod +x /Applications/RiseupVPN.app/Contents/Resources/bitmask-helper/bitmask-helper +cp se.leap.bitmask-helper.plist /Library/LaunchDaemons/ \ + && echo `date` ":: Bitmask post-install: copied bitmask-helper Plist." >> $LOG +launchctl load /Library/LaunchDaemons/se.leap.bitmask-helper.plist && echo `date` ":: Bitmask post-install: loaded bitmask-helper." >> $LOG +echo `date` ":: Bitmask post-install: ok." >> $LOG +exit 0 diff --git a/pkg/osx/scripts-riseupvpn/preinstall b/pkg/osx/scripts-riseupvpn/preinstall new file mode 100755 index 00000000..1ae68f9c --- /dev/null +++ b/pkg/osx/scripts-riseupvpn/preinstall @@ -0,0 +1,12 @@ +#!/bin/sh +# Bitmask Pre-Instalation script +# (c) LEAP Encryption access Project +# We unload the bitmask-helper if it is running, because we can be installing an upgrade. + +LOG=/tmp/bitmask-install.log + +ps aux | grep [b]itmask-helper \ + && launchctl unload /Library/LaunchDaemons/se.leap.bitmask-helper.plist \ + && echo `date` ":: Bitmask pre-install: unloaded bitmask-helper." >> $LOG +echo `date` ":: Bitmask pre-install: ok." >> $LOG +exit 0 diff --git a/pkg/osx/scripts-riseupvpn/se.leap.bitmask-helper.plist b/pkg/osx/scripts-riseupvpn/se.leap.bitmask-helper.plist new file mode 100644 index 00000000..8ebfb947 --- /dev/null +++ b/pkg/osx/scripts-riseupvpn/se.leap.bitmask-helper.plist @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>WorkingDirectory</key> + <string>/Applications/RiseupVPN.app/Contents/Resources/bitmask-helper/</string> + <key>StandardOutPath</key> + <string>bitmask-helper.log</string> + <key>StandardErrorPath</key> + <string>bitmask-helper-err.log</string> + <key>GroupName</key> + <string>daemon</string> + <key>RunAtLoad</key> + <true/> + <key>SessionCreate</key> + <true/> + <key>KeepAlive</key> + <true/> + <key>ThrottleInterval</key> + <integer>5</integer> + <key>Label</key> + <string>se.leap.BitmaskHelper</string> + <key>Program</key> + <string>/Applications/RiseupVPN.app/Contents/Resources/bitmask-helper/bitmask-helper</string> +</dict> +</plist> |