From 1699a0c9849de6581f1e2c5ee74ea8d3c83d3591 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 28 Mar 2016 12:23:31 -0400 Subject: [pkg] some pyinstaller hacky targets --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1cfeecb4..30e67962 100644 --- a/Makefile +++ b/Makefile @@ -167,6 +167,32 @@ sumo_tarball_latest: checkout_leapdeps_develop pull_leapdeps setup_without_names pyinst: pyinstaller -y pkg/pyinst/bitmask.spec +pyinst-hacks: + cp ../leap_common/src/leap/common/cacert.pem dist/bitmask/ + mkdir -p dist/bitmask/pysqlcipher + cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysqlcipher/_sqlite.so dist/bitmask/pysqlcipher + cp -r $(VIRTUAL_ENV)/lib/python2.7/site-packages/pixelated_www dist/bitmask/ + +pyinst-wrapper: + mv dist/bitmask/bitmask dist/bitmask/bitmask-app + cp pkg/linux/bitmask-launcher dist/bitmask/bitmask + cp pkg/PixelatedWebmail.README dist/bitmask + +pyinst-trim: + rm dist/bitmask/libQtOpenGL.so.4 + rm dist/bitmask/libQtSql.so.4 + rm dist/bitmask/libQt3Support.so.4 + rm dist/bitmask/libnvidia-glcore.so.352.79 + rm dist/bitmask/libgstvideo-1.0.so.0 + rm dist/bitmask/libgstaudio-1.0.so.0 + rm dist/bitmask/libgstreamer-1.0.so.0 + rm dist/bitmask/libnvidia-tls.so.352.79 + rm dist/bitmask/libaudio.so.2 + +pyinst-dist: + rm -rf dist/bitmask/config + cd dist/ && tar cvzf Bitmask.0.9.2.alpha1.tar.gz bitmask + clean_pkg: rm -rf build dist -- cgit v1.2.3 From 746d76c8e6f02ba417b7fb9d47630c4e83b40126 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 31 Mar 2016 10:38:11 -0400 Subject: [bug] workaround for incompatible qt library in ubuntu - Resolves: #7990 --- Makefile | 49 ++++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 30e67962..c3f0e0d2 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,9 @@ PYRCC = pyside-rcc PYLUP = pyside-lupdate LRELE = lrelease +# pyinst dist dir +DIST = dist/bitmask/ + ################################# # DO NOT EDIT FOLLOWING @@ -165,33 +168,41 @@ sumo_tarball_latest: checkout_leapdeps_develop pull_leapdeps setup_without_names git checkout -- setup.py pyinst: + echo "MAKE SURE OF FREEZING VERSION FIRST!" pyinstaller -y pkg/pyinst/bitmask.spec pyinst-hacks: - cp ../leap_common/src/leap/common/cacert.pem dist/bitmask/ - mkdir -p dist/bitmask/pysqlcipher - cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysqlcipher/_sqlite.so dist/bitmask/pysqlcipher - cp -r $(VIRTUAL_ENV)/lib/python2.7/site-packages/pixelated_www dist/bitmask/ + cp ../leap_common/src/leap/common/cacert.pem $(DIST) + mkdir -p $(DIST)pysqlcipher + cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysqlcipher/_sqlite.so $(DIST)pysqlcipher + cp -r $(VIRTUAL_ENV)/lib/python2.7/site-packages/pixelated_www $(DIST) + +pyinst-trim: + rm -f $(DIST)libQtOpenGL.so.4 + rm -f $(DIST)libQtSql.so.4 + rm -f $(DIST)libQt3Support.so.4 + rm -f $(DIST)libaudio.so.2 + rm -f $(DIST)libnvidia-* + #rm -f dist/bitmask/libgstvideo-1.0.so.0 + #rm -f dist/bitmask/libgstaudio0.0.so.0 + #rm -f dist/bitmask/libgstreamer-1.0.so.0 pyinst-wrapper: - mv dist/bitmask/bitmask dist/bitmask/bitmask-app - cp pkg/linux/bitmask-launcher dist/bitmask/bitmask - cp pkg/PixelatedWebmail.README dist/bitmask + mv $(DIST)libQtCore.so.4 $(DIST)libQtCore.so.4.orig + mv $(DIST)libQtGui.so.4 $(DIST)libQtGui.so.4.orig + mv $(DIST)libQtNetwork.so.4 $(DIST)libQtNetwork.so.4.orig + mv $(DIST)libQtSvg.so.4 $(DIST)libQtSvg.so.4.orig + mv $(DIST)libQtWebKit.so.4 $(DIST)libQtWebKit.so.4.orig + mv $(DIST)libQtXmlPatterns.so.4 $(DIST)libQtXmlPatterns.so.4.orig + mv $(DIST)libQtXml.so.4 $(DIST)libQtXml.so.4.orig + mv $(DIST)bitmask $(DIST)bitmask-app + cp pkg/linux/bitmask-launcher $(DIST)bitmask + cp pkg/PixelatedWebmail.README $(DIST) -pyinst-trim: - rm dist/bitmask/libQtOpenGL.so.4 - rm dist/bitmask/libQtSql.so.4 - rm dist/bitmask/libQt3Support.so.4 - rm dist/bitmask/libnvidia-glcore.so.352.79 - rm dist/bitmask/libgstvideo-1.0.so.0 - rm dist/bitmask/libgstaudio-1.0.so.0 - rm dist/bitmask/libgstreamer-1.0.so.0 - rm dist/bitmask/libnvidia-tls.so.352.79 - rm dist/bitmask/libaudio.so.2 pyinst-dist: - rm -rf dist/bitmask/config - cd dist/ && tar cvzf Bitmask.0.9.2.alpha1.tar.gz bitmask + rm -rf $(DIST)config + cd dist/ && tar cvzf Bitmask.0.9.2.alpha2.tar.gz bitmask clean_pkg: rm -rf build dist -- cgit v1.2.3 From b4dde3d5112c95574f85f62daf0c2c75db391f52 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 4 Apr 2016 22:19:52 -0400 Subject: [pkg] modularize main makefile to remove clutter --- Makefile | 67 ++-------------------------------------------------------------- 1 file changed, 2 insertions(+), 65 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index c3f0e0d2..fea03951 100644 --- a/Makefile +++ b/Makefile @@ -141,71 +141,8 @@ checkout_leapdeps_develop: for repo in $(LEAP_REPOS); do cd $(CURDIR)/../$$repo && git checkout develop; done git checkout develop -checkout_leapdeps_release: - pkg/scripts/checkout_leap_versions.sh - -setup_without_namespace: - awk '!/namespace_packages*/' setup.py > file && mv file setup.py - -sumo_tarball_release: checkout_leapdeps_release setup_without_namespace - python setup.py sdist --sumo - git checkout -- src/leap/__init__.py - git checkout -- src/leap/bitmask/_version.py - rm -rf src/leap/soledad - git checkout -- setup.py - -# XXX We need two sets of sumo-tarballs: the one published for a release -# (that will pick the pinned leap deps), and the other which will be used -# for the nightly builds. -# TODO change naming scheme for sumo-latest: should include date (in case -# bitmask is not updated bu the dependencies are) - -sumo_tarball_latest: checkout_leapdeps_develop pull_leapdeps setup_without_namespace - python setup.py sdist --sumo # --latest - git checkout -- src/leap/__init__.py - git checkout -- src/leap/bitmask/_version.py - rm -rf src/leap/soledad - git checkout -- setup.py - -pyinst: - echo "MAKE SURE OF FREEZING VERSION FIRST!" - pyinstaller -y pkg/pyinst/bitmask.spec - -pyinst-hacks: - cp ../leap_common/src/leap/common/cacert.pem $(DIST) - mkdir -p $(DIST)pysqlcipher - cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysqlcipher/_sqlite.so $(DIST)pysqlcipher - cp -r $(VIRTUAL_ENV)/lib/python2.7/site-packages/pixelated_www $(DIST) - -pyinst-trim: - rm -f $(DIST)libQtOpenGL.so.4 - rm -f $(DIST)libQtSql.so.4 - rm -f $(DIST)libQt3Support.so.4 - rm -f $(DIST)libaudio.so.2 - rm -f $(DIST)libnvidia-* - #rm -f dist/bitmask/libgstvideo-1.0.so.0 - #rm -f dist/bitmask/libgstaudio0.0.so.0 - #rm -f dist/bitmask/libgstreamer-1.0.so.0 - -pyinst-wrapper: - mv $(DIST)libQtCore.so.4 $(DIST)libQtCore.so.4.orig - mv $(DIST)libQtGui.so.4 $(DIST)libQtGui.so.4.orig - mv $(DIST)libQtNetwork.so.4 $(DIST)libQtNetwork.so.4.orig - mv $(DIST)libQtSvg.so.4 $(DIST)libQtSvg.so.4.orig - mv $(DIST)libQtWebKit.so.4 $(DIST)libQtWebKit.so.4.orig - mv $(DIST)libQtXmlPatterns.so.4 $(DIST)libQtXmlPatterns.so.4.orig - mv $(DIST)libQtXml.so.4 $(DIST)libQtXml.so.4.orig - mv $(DIST)bitmask $(DIST)bitmask-app - cp pkg/linux/bitmask-launcher $(DIST)bitmask - cp pkg/PixelatedWebmail.README $(DIST) - - -pyinst-dist: - rm -rf $(DIST)config - cd dist/ && tar cvzf Bitmask.0.9.2.alpha2.tar.gz bitmask - -clean_pkg: - rm -rf build dist +include pkg/sumo-tarballs.mk +include pkg/pyinst/pyinst-build.mk clean : $(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc) -- cgit v1.2.3 From c35d9f6338300dcf6f1688ee2df9475dd14b8c94 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 4 Apr 2016 22:49:56 -0400 Subject: [pkg] move the pyinstaller bundle to a child folder --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fea03951..6a8fbecb 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,10 @@ PYLUP = pyside-lupdate LRELE = lrelease # pyinst dist dir + DIST = dist/bitmask/ +NEXT_VERSION = $(shell cat pkg/next-version) +DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/ ################################# -- cgit v1.2.3 From 40604c0b2abe4d51e5e7b41a0e71c78a958b0b87 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 6 Apr 2016 16:02:11 -0400 Subject: [pkg] copy helpers, freeze version --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6a8fbecb..f96d810d 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ LRELE = lrelease DIST = dist/bitmask/ NEXT_VERSION = $(shell cat pkg/next-version) DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/ +GIT_COMMIT = $(shell git rev-parse HEAD) ################################# -- cgit v1.2.3 From 6c91aee9c3a0978a7019f3fdf52f4209977b5f0b Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 13 Apr 2016 12:00:36 -0400 Subject: [feature] make branding-logo: patches pixelated app logo and replaces it with bitmask-logo.svg - Releases: 0.9.2 --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index f96d810d..8e275e93 100644 --- a/Makefile +++ b/Makefile @@ -147,6 +147,7 @@ checkout_leapdeps_develop: include pkg/sumo-tarballs.mk include pkg/pyinst/pyinst-build.mk +include pkg/branding/branding.mk clean : $(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc) -- cgit v1.2.3 From c201029c3070da1bd9c2a7d65ac426e49f3cc241 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 14 Apr 2016 15:40:05 -0400 Subject: [pkg] ship statically built binaries - mention the versions in the next relnotes - add the leap_thirdparty_build to gitignore. the build scripts are supposed to place the binaries here. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8e275e93..7d26a7ae 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ DIST = dist/bitmask/ NEXT_VERSION = $(shell cat pkg/next-version) DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/ GIT_COMMIT = $(shell git rev-parse HEAD) +LEAP_BUILD_DIR = leap_thirdparty_build/ ################################# -- cgit v1.2.3 From 748dea614050dca9d1baf8e6b36900109066b2bb Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 11 Sep 2015 07:44:14 -0700 Subject: [pkg] packaging hacks + update osx bundling notes --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7d26a7ae..7bf5d273 100644 --- a/Makefile +++ b/Makefile @@ -150,5 +150,13 @@ include pkg/sumo-tarballs.mk include pkg/pyinst/pyinst-build.mk include pkg/branding/branding.mk +pyinst_osx: pyinst + 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 + # XXX hack... this contains the gpg binary (brew), but we need to build it from sources. + cp -r src/leap/bitmask/util/apps dist/Bitmask.app/Contents/MacOS/ + # XXX this should be taken care of by pyinstaller data collector + cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/leap/common/cacert.pem dist/Bitmask.app/Contents/MacOS/ + clean : $(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc) -- cgit v1.2.3 From e9e9abc4ec26be29b3a6b09e6a0b67786269183b Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 29 Jan 2016 13:18:36 -0800 Subject: [feature] privileged bitmask helper This is still quite untested, and a bit hacky, but the main idea behind let us have a daemonized bitmask helper, that should be installed by the Bitmask installer. Its responsibilities are to launch the vpn process as a privileged user, and start/stop the firewall. --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7bf5d273..fdfb0381 100644 --- a/Makefile +++ b/Makefile @@ -153,8 +153,18 @@ include pkg/branding/branding.mk pyinst_osx: pyinst 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 pkg/osx/client.up.sh dist/Bitmask.app/Contents/Resources/ + cp pkg/osx/client.down.sh dist/Bitmask.app/Contents/Resources/ + cp pkg/osx/bitmask-helper dist/Bitmask.app/Contents/Resources/bitmask-helper/ + cp pkg/osx/bitmask.pf.conf dist/Bitmask.app/Contents/Resources/bitmask-helper/ + cp pkg/osx/se.leap.bitmask-helper.plist dist/Bitmask.app/Contents/Resources/bitmask-helper/ + cp pkg/osx/post-inst.sh dist/Bitmask.app/Contents/Resources/bitmask-helper/ + cp pkg/osx/daemon.py dist/Bitmask.app/Contents/Resources/bitmask-helper/ # XXX hack... this contains the gpg binary (brew), but we need to build it from sources. cp -r src/leap/bitmask/util/apps dist/Bitmask.app/Contents/MacOS/ + # XXX hack... this contains the openvpn binary (brew), but we need to build it from sources. + cp -r src/leap/bitmask/util/openvpn.leap dist/Bitmask.app/Contents/Resources/ # XXX this should be taken care of by pyinstaller data collector cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/leap/common/cacert.pem dist/Bitmask.app/Contents/MacOS/ -- cgit v1.2.3 From d01772d0a83535bf45fa43786213a9a0fcb232bc Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 11 Feb 2016 13:34:46 -0800 Subject: [refactor] cleanup helper usage to adapt to new one also cleanups build process --- Makefile | 73 ++++------------------------------------------------------------ 1 file changed, 4 insertions(+), 69 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index fdfb0381..84497607 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,8 @@ LRELE = lrelease # pyinst dist dir DIST = dist/bitmask/ +DIST_OSX = dist/Bitmask.app/ +DIST_OSX_RES = dist/Bitmask.app/Contents/Resources/ NEXT_VERSION = $(shell cat pkg/next-version) DIST_VERSION = dist/bitmask-$(NEXT_VERSION)/ GIT_COMMIT = $(shell git rev-parse HEAD) @@ -95,78 +97,11 @@ manpages: apidocs: @sphinx-apidoc -o docs/api src/leap/bitmask -do_cprofile: - python -m cProfile -o bitmask.cprofile src/leap/bitmask/app.py --debug -N - -view_cprofile: - cprofilev bitmask.cprofile - -mailprofile: - gprof2dot -f pstats /tmp/leap_mail_profile.pstats -n 0.2 -e 0.2 | dot -Tpdf -o /tmp/leap_mail_profile.pdf - -do_lineprof: - LEAP_PROFILE_IMAPCMD=1 LEAP_MAIL_MANHOLE=1 kernprof.py -l src/leap/bitmask/app.py --debug - -do_lineprof_offline: - LEAP_PROFILE_IMAPCMD=1 LEAP_MAIL_MANHOLE=1 kernprof.py -l src/leap/bitmask/app.py --offline --debug -N - -view_lineprof: - @python -m line_profiler app.py.lprof | $(EDITOR) - - -resource_graph: - #./pkg/scripts/monitor_resource.zsh `ps aux | grep app.py | head -1 | awk '{print $$2}'` $(RESOURCE_TIME) - ./pkg/scripts/monitor_resource.zsh `pgrep bitmask` $(RESOURCE_TIME) - display bitmask-resources.png - -get_wheels: - pip install --upgrade setuptools - pip install --upgrade pip - pip install wheel - -gather_wheels: - pip wheel --wheel-dir=../wheelhouse pyzmq --build-option "--zmq=bundled" - # because fuck u1db externals, that's why... - pip wheel --wheel-dir=../wheelhouse --allow-external dirspec --allow-unverified dirspec --allow-external u1db --allow-unverified u1db -r pkg/requirements.pip - -install_wheel: - # if it's the first time, you'll need to get_wheels first - pip install --pre --use-wheel --no-index --find-links=../wheelhouse -r pkg/requirements.pip - -gather_deps: - pipdeptree | pkg/scripts/filter-bitmask-deps - -install_base_deps: - for repo in leap_pycommon keymanager leap_mail soledad/common soledad/client; do cd $(CURDIR)/../$$repo && pkg/pip_install_requirements.sh; done - pkg/pip_install_requirements.sh - -pull_leapdeps: - for repo in $(LEAP_REPOS); do cd $(CURDIR)/../$$repo && git pull; done - -checkout_leapdeps_develop: - for repo in $(LEAP_REPOS); do cd $(CURDIR)/../$$repo && git checkout develop; done - git checkout develop - +include pkg/deps.mk +include pkg/tools/profile.mk include pkg/sumo-tarballs.mk include pkg/pyinst/pyinst-build.mk include pkg/branding/branding.mk -pyinst_osx: pyinst - 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 pkg/osx/client.up.sh dist/Bitmask.app/Contents/Resources/ - cp pkg/osx/client.down.sh dist/Bitmask.app/Contents/Resources/ - cp pkg/osx/bitmask-helper dist/Bitmask.app/Contents/Resources/bitmask-helper/ - cp pkg/osx/bitmask.pf.conf dist/Bitmask.app/Contents/Resources/bitmask-helper/ - cp pkg/osx/se.leap.bitmask-helper.plist dist/Bitmask.app/Contents/Resources/bitmask-helper/ - cp pkg/osx/post-inst.sh dist/Bitmask.app/Contents/Resources/bitmask-helper/ - cp pkg/osx/daemon.py dist/Bitmask.app/Contents/Resources/bitmask-helper/ - # XXX hack... this contains the gpg binary (brew), but we need to build it from sources. - cp -r src/leap/bitmask/util/apps dist/Bitmask.app/Contents/MacOS/ - # XXX hack... this contains the openvpn binary (brew), but we need to build it from sources. - cp -r src/leap/bitmask/util/openvpn.leap dist/Bitmask.app/Contents/Resources/ - # XXX this should be taken care of by pyinstaller data collector - cp $(VIRTUAL_ENV)/lib/python2.7/site-packages/leap/common/cacert.pem dist/Bitmask.app/Contents/MacOS/ - clean : $(RM) $(COMPILED_UI) $(COMPILED_RESOURCES) $(COMPILED_UI:.py=.pyc) $(COMPILED_RESOURCES:.py=.pyc) -- cgit v1.2.3