Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • meskio/riseup_vpn
  • mbowcutt/riseup_vpn
  • micah/riseup_vpn
3 results
Select Git revision
Show changes
Commits on Source (39)
Showing with 221 additions and 56 deletions
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*.pyc *.pyc
staging/* staging/*
dist/* dist/*
build/*
__pycache__ __pycache__
win/*-installer.nsi win/*-installer.nsi
......
Changelog for Bitmask Lite/RiseupVPN Changelog for Bitmask Lite/RiseupVPN
==================================== ====================================
0.19.1 - `master`_ 0.19.2 - `master`_
------------------- -------------------
.. note:: This version is not yet released and is under active development. .. note:: This version is not yet released and is under active development.
0.19.1
-------------------
- Use firewall status to check if the vpn is in failed status
- Create a tarball for packaging. - Create a tarball for packaging.
- Reload firewall with SIGUSR1
- Reorganize code
- Move provider configuration into a set of constants
- Vendorize deps
- Wait until the systray is initalized to start the systray loop
- Allow tls 1.0 as a workaround for buster/sid
- Rename the systray reconnection on fail-close
0.18.12 0.18.12
------- -------
......
APPNAME := riseup-vpn
SYSTRAY := 0xacab.org/leap/bitmask-vpn SYSTRAY := 0xacab.org/leap/bitmask-vpn
STAGING := staging STAGING := staging
SYSTRAY_BIN := bitmask-vpn SYSTRAY_BIN := bitmask-vpn
HELPER_BIN := bitmask_helper HELPER_BIN := bitmask_helper
APP_NAME := RiseupVPN APP_NAME := RiseupVPN
BUILD_RELEASE?=no BUILD_RELEASE?=no
WIN_CERT_PATH?=z:\leap\LEAP.pfx
WIN_CERT_PASS?=
OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project" OSX_CERT = "Developer ID Installer: LEAP Encryption Access Project"
VERSION = $(shell git -C `go env GOPATH`/src/$(SYSTRAY) describe --tags --always) VERSION = $(shell git -C `go env GOPATH`/src/$(SYSTRAY) describe --tags --always)
TGZ_PATH = $(shell pwd)/dist/riseup-vpn-$(VERSION) TGZ_PATH = $(shell pwd)/dist/$(APPNAME)-$(VERSION)
tgz: tgz:
# XXX not needed anymore
mkdir -p $(TGZ_PATH) mkdir -p $(TGZ_PATH)
git -C `go env GOPATH`/src/$(SYSTRAY) archive HEAD | tar -x -C $(TGZ_PATH) git -C `go env GOPATH`/src/$(SYSTRAY) archive HEAD | tar -x -C $(TGZ_PATH)
mkdir $(TGZ_PATH)/helpers mkdir -p $(TGZ_PATH)/helpers
wget -O $(TGZ_PATH)/helpers/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root wget -O $(TGZ_PATH)/helpers/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root
chmod +x $(TGZ_PATH)/helpers/bitmask-root chmod +x $(TGZ_PATH)/helpers/bitmask-root
wget -O $(TGZ_PATH)/helpers/se.leap.bitmask.policy https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy wget -O $(TGZ_PATH)/helpers/se.leap.bitmask.policy https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/se.leap.bitmask.policy
cd dist; tar cvzf riseup-vpn-$(VERSION).tgz riseup-vpn-$(VERSION) cd dist; tar cvzf $(APPNAME)-$(VERSION).tgz $(APPNAME)-$(VERSION)
rm -r $(TGZ_PATH) rm -r $(TGZ_PATH)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -46,7 +50,7 @@ openvpn_cross_win: ...@@ -46,7 +50,7 @@ openvpn_cross_win:
helper_win: helper_win:
go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN).exe $(SYSTRAY)/cmd/bitmask-helper go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN).exe $(SYSTRAY)/cmd/bitmask-helper
systray_win: systray_win:
go get -u $(SYSTRAY) go get -u $(SYSTRAY)/cmd/bitmask-vpn
powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; go build -ldflags "-H windowsgui -s -w -X main.version=$$version" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn' powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; go build -ldflags "-H windowsgui -s -w -X main.version=$$version" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn'
build_win: staging\nssm.exe helper_win systray_win build_win: staging\nssm.exe helper_win systray_win
# since it's tedious, I assume you did bootstrap openvpn_win manually already. # since it's tedious, I assume you did bootstrap openvpn_win manually already.
...@@ -54,8 +58,13 @@ build_win: staging\nssm.exe helper_win systray_win ...@@ -54,8 +58,13 @@ build_win: staging\nssm.exe helper_win systray_win
if not exist dist mkdir dist if not exist dist mkdir dist
powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; $(MAKE) -C win VERSION=$$version' powershell '$$gopath=go env GOPATH;$$version=git -C $$gopath/src/$(SYSTRAY) describe --tags; $(MAKE) -C win VERSION=$$version'
"C:\Program Files (x86)\NSIS\makensis.exe" win/RiseupVPN-installer.nsi "C:\Program Files (x86)\NSIS\makensis.exe" win/RiseupVPN-installer.nsi
sign_win:
echo "[+] signing windows build"
python win/sign.py $(WIN_CERT_PATH) $(WIN_CERT_PASS)
build_cross_win: staging/nssm.exe build_cross_win: staging/nssm.exe
echo "!define VERSION $(VERSION)" > $(STAGING)/version.nsh echo "!define VERSION $(VERSION)" > $(STAGING)/version.nsh
go get 0xacab.org/leap/bitmask-vpn/cmd/bitmask-helper
go get 0xacab.org/leap/bitmask-vpn/cmd/bitmask-vpn
$(CROSS_FLAGS) $(MAKE) helper_win $(CROSS_FLAGS) $(MAKE) helper_win
$(CROSS_FLAGS) go get $(SYSTRAY)/cmd/bitmask-vpn $(CROSS_FLAGS) go get $(SYSTRAY)/cmd/bitmask-vpn
$(CROSS_FLAGS) go build -ldflags "-H windowsgui -s -w -X main.version=$(VERSION)" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn $(CROSS_FLAGS) go build -ldflags "-H windowsgui -s -w -X main.version=$(VERSION)" -o $(STAGING)/$(SYSTRAY_BIN).exe $(SYSTRAY)/cmd/bitmask-vpn
...@@ -78,7 +87,7 @@ helper_osx: ...@@ -78,7 +87,7 @@ helper_osx:
go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN) $(SYSTRAY)/cmd/bitmask-helper go build -ldflags "-s -w" -o $(STAGING)/$(HELPER_BIN) $(SYSTRAY)/cmd/bitmask-helper
upx $(STAGING)/$(HELPER_BIN) upx $(STAGING)/$(HELPER_BIN)
systray_osx: systray_osx:
go get -u $(SYSTRAY) go get -u $(SYSTRAY)/cmd/bitmask-vpn
go build -ldflags "-X main.version=$(VERSION)" -o $(STAGING)/$(SYSTRAY_BIN) $(SYSTRAY)/cmd/bitmask-vpn go build -ldflags "-X main.version=$(VERSION)" -o $(STAGING)/$(SYSTRAY_BIN) $(SYSTRAY)/cmd/bitmask-vpn
upx $(STAGING)/$(SYSTRAY_BIN) upx $(STAGING)/$(SYSTRAY_BIN)
bundle_osx: bundle_osx:
...@@ -92,7 +101,7 @@ pkg_osx: ...@@ -92,7 +101,7 @@ pkg_osx:
echo "[+] Signing the bundle";\ echo "[+] Signing the bundle";\
productsign --sign $(OSX_CERT) dist/$(APP_NAME)-$(VERSION)_unsigned.pkg dist/$(APP_NAME)-$(VERSION).pkg;\ productsign --sign $(OSX_CERT) dist/$(APP_NAME)-$(VERSION)_unsigned.pkg dist/$(APP_NAME)-$(VERSION).pkg;\
fi fi
build_osx: helper_osx systray_osx bundle_osx pkg_osx build_osx: openvpn_osx helper_osx systray_osx bundle_osx pkg_osx
echo "[+] building osx..." echo "[+] building osx..."
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -104,14 +113,32 @@ build_snap: ...@@ -104,14 +113,32 @@ build_snap:
snapcraft build snapcraft build
snapcraft snap snapcraft snap
mkdir -p dist mkdir -p dist
mv riseup-vpn* dist/ mv $(APPNAME)* dist/
testfoo:
dch -v $(VERSION) -M "debian package generated from the git repository";\
build_deb: tgz
echo "[+] building deb..."
@if [ $(BUILD_RELEASE) = no ]; then\
dch -v $(VERSION) -M "debian package generated from the git repository" && echo "[!] BUILD_RELEASE=no, incrementing changelog";\
else\
echo "[!] BUILD_RELEASE";\
fi
mkdir -p build
cp dist/$(APPNAME)-$(VERSION).tgz build/$(APPNAME)_$(shell echo ${VERSION} | cut -d '-' -f 1-2).orig.tar.gz
cd build && tar xzf $(APPNAME)_$(shell echo ${VERSION} | cut -d '-' -f 1-2).orig.tar.gz
cp -r debian/ build/$(APPNAME)-$(VERSION)/
cd build/$(APPNAME)-$(VERSION) && debuild -us -uc
cp build/*.deb dist/
git checkout -- debian/changelog
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Utils # Utils
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
clean: clean:
rm -rf dist/ rm -rf dist/ build/
staging\nssm.exe: staging\nssm.exe:
xcopy /y "C:\ProgramData\chocolatey\lib\NSSM\tools\nssm.exe" $(STAGING) xcopy /y "C:\ProgramData\chocolatey\lib\NSSM\tools\nssm.exe" $(STAGING)
......
...@@ -3,10 +3,10 @@ RiseupVPN ...@@ -3,10 +3,10 @@ RiseupVPN
Anonymous VPN. Easy, fast, secure. Anonymous VPN. Easy, fast, secure.
This repo has everything needed to build BitmaskLite/RiseupVPN on different This repo has everything needed to build Bitmask VPN/RiseupVPN on different
platforms (windows, mac and linux). platforms (windows, mac and linux).
RiseupVPN is a branded build of Bitmask Lite. Bitmask Lite is a minimal rewrite RiseupVPN is a branded build of Bitmask VPN. Bitmask VPN is a minimal rewrite
of the Bitmask VPN Client, written in golang, that for now lacks client of the Bitmask VPN Client, written in golang, that for now lacks client
authentication, and is preconfigured to use a single provider. As of this authentication, and is preconfigured to use a single provider. As of this
moment, it is built for a single provider (riseup.net), but it should be easy moment, it is built for a single provider (riseup.net), but it should be easy
...@@ -58,7 +58,7 @@ Windows ...@@ -58,7 +58,7 @@ Windows
We build a windows installer for RiseupVPN, using nsis. For testing, you can find the `snap artifact`_ for the latest build in the master branch in the CI. We publish the `latest stable windows installer`_, as well as `windows pre-releases`_. We build a windows installer for RiseupVPN, using nsis. For testing, you can find the `snap artifact`_ for the latest build in the master branch in the CI. We publish the `latest stable windows installer`_, as well as `windows pre-releases`_.
.. _`snap artifact`: https://0xacab.org/leap/bitmask-systray/-/jobs/artifacts/master/download?job=win_installer .. _`snap artifact`: https://0xacab.org/leap/bitmask-vpn/-/jobs/artifacts/master/download?job=win_installer
.. _`latest stable windows installer`: https://downloads.leap.se/RiseupVPN/windows/RiseupVPN-win-latest.exe .. _`latest stable windows installer`: https://downloads.leap.se/RiseupVPN/windows/RiseupVPN-win-latest.exe
.. _`windows pre-releases`: https://downloads.leap.se/RiseupVPN/windows/beta/ .. _`windows pre-releases`: https://downloads.leap.se/RiseupVPN/windows/beta/
...@@ -125,18 +125,18 @@ You can also cross-compile openvpn:: ...@@ -125,18 +125,18 @@ You can also cross-compile openvpn::
Hacking Hacking
--------------- ---------------
If you want to contribute to BitmaskLite/RiseupVPN, you can get in contact with us in the ``#leap`` channel at freenode. If you want to contribute to Bitmask VPN/RiseupVPN, you can get in contact with us in the ``#leap`` channel at freenode.
You might also want to have a look at some related pieces that are used to build these packages. You might also want to have a look at some related pieces that are used to build these packages.
* `bitmask-systray`_: this is the golang implementation of RiseupVPN. It is * `bitmask-vpn`_: this is the golang implementation of RiseupVPN. It is
basically a wrapper around openvpn, with knowledge of what configuration basically a wrapper around openvpn, with knowledge of what configuration
files are expected to exist in a LEAP provider. The only user interface is a minimalistic systray that uses libappindicator. files are expected to exist in a LEAP provider. The only user interface is a minimalistic systray that uses libappindicator.
* `the bitmask helper`_: it lives in this repo. It implements a long-lived helper that runs with administrative privileges, used in OSX and Windows for launching openvpn and the firewall. In OSX it is run as a LaunchDaemon, and in Windows we use nssm to run this helper. It communicates with BitmaskLite via a local http service. * `the bitmask helper`_: it lives in bitmask-vpn for Windows and osX. It implements a long-lived helper that runs with administrative privileges, used in OSX and Windows for launching openvpn and the firewall. In OSX it is run as a LaunchDaemon, and in Windows we use nssm to run this helper. It communicates with Bitmask VPN via a local http service.
* `bitmask-root`_: for the snaps, in GNU/Linux we use a one-shot privileged helper that relies on policykit to elevate privileges without asking for password each time, instead of the long-lived helper that we use in osx and windows packages (although there is a linux implementation, and this long-lived helper might make sense in some cases, we want to explore that. For instance for OpenWRT packages). * `bitmask-root`_: for the snaps, in GNU/Linux we use a one-shot privileged helper that relies on policykit to elevate privileges without asking for password each time, instead of the long-lived helper that we use in osx and windows packages (although there is a linux implementation, and this long-lived helper might make sense in some cases, we want to explore that. For instance for OpenWRT packages).
In case you are wondering what is the relationship of BitmaskLite and the regular Bitmask, it is planned that the bitmask client will at some point switch to use the same helpers. This repo probably will be turned into a generic packaging and helper tool to be used for both branded builds of BitmaskLite, and packaging of the frozen python payloads generated from bitmask-dev. In case you are wondering what is the relationship of Bitmask VPN and the regular Bitmask, it is planned that the bitmask client will at some point switch to use the same helpers. This repo probably will be turned into a generic packaging and helper tool to be used for both branded builds of BitmaskLite, and packaging of the frozen python payloads generated from bitmask-dev.
.. _`bitmask-systray`: https://0xacab.org/leap/bitmask-systray .. _`bitmask-vpn`: https://0xacab.org/leap/bitmask-vpn
.. _`the bitmask helper`: https://0xacab.org/leap/riseup_vpn/tree/master/helper .. _`the bitmask helper`: https://0xacab.org/leap/bitmask-vpn/tree/master/pkg/helper/
.. _`bitmask-root`: https://0xacab.org/leap/bitmask-dev/blob/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root .. _`bitmask-root`: https://0xacab.org/leap/bitmask-dev/blob/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root
...@@ -2,7 +2,9 @@ Source: riseup-vpn ...@@ -2,7 +2,9 @@ Source: riseup-vpn
Section: net Section: net
Priority: extra Priority: extra
Maintainer: LEAP Encryption Access Project <debian@leap.se> Maintainer: LEAP Encryption Access Project <debian@leap.se>
Build-Depends: debhelper (>= 10.0.0), golang-go, dh-golang Build-Depends: debhelper (>= 10.0.0), dh-golang, golang-go (> 2:1.9),
golang-golang-x-text-dev (>= 0.3.0-2),
libgtk-3-dev, libappindicator3-dev, pkg-config
Standards-Version: 3.9.8 Standards-Version: 3.9.8
Package: riseup-vpn Package: riseup-vpn
...@@ -13,9 +15,9 @@ Depends: ${misc:Depends}, ...@@ -13,9 +15,9 @@ Depends: ${misc:Depends},
policykit-1-gnome | polkit-1-auth-agent, policykit-1-gnome | polkit-1-auth-agent,
python2 | python3, python2 | python3,
Enhances: openvpn Enhances: openvpn
Description: Easy, fast, and secure VPN service from RiseUp. Description: Easy, fast, and secure VPN service from Riseup.
This package is a custom build of the new Bitmask VPN client, preconfigured This package is a custom build of the new Bitmask VPN client, preconfigured
to use the RiseUp provider. to use the https://riseup.net provider.
. .
The service does not require a user account, keep logs, or track you in any The service does not require a user account, keep logs, or track you in any
way. The service is paid for entirely by donations from users. way. The service is paid for entirely by donations from users.
[Desktop Entry]
Version=1.0
Type=Application
Name=RiseupVPN
Comment=Easy VPN by Riseup
Comment[es]=VPN Facil de Riseup
Comment[de]=Easy VPN by Riseup
Exec=riseup-vpn %U
Terminal=false
Icon=riseupvpn
Categories=Network;Application;
StartupNotify=true
X-AppInstall-Package=riseup-vpn
Keywords=encryption;vpn;riseup;leap
...@@ -4,21 +4,21 @@ ...@@ -4,21 +4,21 @@
# This has to be exported to make some magic below work. # This has to be exported to make some magic below work.
export DH_OPTIONS export DH_OPTIONS
export DH_GOPKG = 0xacab.org/leap/riseup_vpn export DH_GOPKG = 0xacab.org/leap/bitmask-vpn
export DH_GOLANG_EXCLUDES = vendor export DH_GOLANG_EXCLUDES = vendor
VERSION = debian-$(shell git describe --tags --always)
%: %:
dh $@ --with golang --buildsystem golang dh $@ --with golang --buildsystem golang
override_dh_auto_test: override_dh_auto_test:
override_dh_auto_build: override_dh_auto_build:
# FIXME how ugly is this? rm -rf src/0xacab.org/leap/bitmask-vpn/tools/transifex
# this is the only way I found of having a quilt package made for the customized builds that gets rm -rf obj-$(DEB_BUILD_GNU_TYPE)/src/0xacab.org/leap/bitmask-vpn/tools/transifex
# in place the sources for bitmask-vpn rm -rf tools
# XXX What var can I use instead of the hardcoded build dir? dh_auto_build -O--buildsystem=golang -- -ldflags "-X main.version=$(VERSION)"
ln -s `pwd` obj-x86_64-linux-gnu/src/0xacab.org/leap/bitmask-systray
dh_auto_build
override_dh_install: override_dh_install:
mkdir -p $(CURDIR)/debian/riseup-vpn/usr/sbin mkdir -p $(CURDIR)/debian/riseup-vpn/usr/sbin
...@@ -26,6 +26,10 @@ override_dh_install: ...@@ -26,6 +26,10 @@ override_dh_install:
mkdir -p $(CURDIR)/debian/riseup-vpn/usr/share/polkit-1/actions mkdir -p $(CURDIR)/debian/riseup-vpn/usr/share/polkit-1/actions
cp $(CURDIR)/helpers/se.leap.bitmask.policy $(CURDIR)/debian/riseup-vpn/usr/share/polkit-1/actions cp $(CURDIR)/helpers/se.leap.bitmask.policy $(CURDIR)/debian/riseup-vpn/usr/share/polkit-1/actions
rm -fr $(CURDIR)/debian/riseup-vpn/usr/share/gocode rm -fr $(CURDIR)/debian/riseup-vpn/usr/share/gocode
rm -fr $(CURDIR)/debian/riseup-vpn/usr/bin/transifex strip $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-vpn
strip $(CURDIR)/debian/riseup-vpn/usr/bin/riseup_vpn rm $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-helper
rm $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-connect
mv $(CURDIR)/debian/riseup-vpn/usr/bin/bitmask-vpn $(CURDIR)/debian/riseup-vpn/usr/bin/riseup-vpn
mkdir -p $(CURDIR)/debian/riseup-vpn/usr/share/riseup-vpn
cp $(CURDIR)/debian/icons/scalable/riseupvpn.svg $(CURDIR)/debian/riseup-vpn/usr/share/riseup-vpn/icon.svg
dh_install dh_install
# An image to build and package the go binary for Bitmask Lite (RiseupVPN) # An image to build and package the go binary for Bitmask Lite (RiseupVPN)
# (c) LEAP Encryption Access Project 2018 # (c) LEAP Encryption Access Project 2018
FROM ubuntu:18.04 FROM ubuntu:disco
MAINTAINER LEAP Encryption Access Project <info@leap.se> MAINTAINER LEAP Encryption Access Project <info@leap.se>
LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.0" LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.0"
...@@ -16,7 +16,8 @@ RUN apt install -y --no-install-recommends \ ...@@ -16,7 +16,8 @@ RUN apt install -y --no-install-recommends \
git curl wget \ git curl wget \
golang libappindicator3-dev libgtk-3-dev \ golang libappindicator3-dev libgtk-3-dev \
mingw-w64 upx-ucl python snapcraft \ mingw-w64 upx-ucl python snapcraft \
unzip unzip \
devscripts fakeroot debhelper dh-golang golang-golang-x-text-dev
# we need nsis >= 3.0 # we need nsis >= 3.0
RUN echo 'deb http://archive.ubuntu.com/ubuntu cosmic universe' >> /etc/apt/sources.list RUN echo 'deb http://archive.ubuntu.com/ubuntu cosmic universe' >> /etc/apt/sources.list
......
...@@ -5,10 +5,10 @@ Name=RiseupVPN ...@@ -5,10 +5,10 @@ Name=RiseupVPN
Comment=Anonymous VPN Comment=Anonymous VPN
Comment[es]=VPN Anonima Comment[es]=VPN Anonima
Comment[de]=Anonymous VPN Comment[de]=Anonymous VPN
Path=/snap/bin Path=/snap/bin/
Exec=riseup-vpn.launcher Exec="/snap/bin/riseup-vpn.launcher"
Terminal=false Terminal=false
Icon=/snap/riseup-vpn/current/snap/gui/riseupvpn.svg Icon=/snap/riseup-vpn/current/meta/gui/icon.svg
Categories=Network;Application; Categories=Network;Application;
StartupNotify=true StartupNotify=true
Keywords=VPN;riseup;leap Keywords=VPN;riseup;leap
......
...@@ -22,7 +22,7 @@ BUNDLE_IDENTIFIER = "se.leap.riseupvpn" ...@@ -22,7 +22,7 @@ BUNDLE_IDENTIFIER = "se.leap.riseupvpn"
here = os.path.split(os.path.abspath(__file__))[0] here = os.path.split(os.path.abspath(__file__))[0]
ENTRYPOINT = 'bitmask-systray' ENTRYPOINT = 'bitmask-vpn'
HELPER = 'bitmask_helper' HELPER = 'bitmask_helper'
OPENVPN = 'openvpn' OPENVPN = 'openvpn'
TEMPLATE_INFO = 'template-info.plist' TEMPLATE_INFO = 'template-info.plist'
......
...@@ -8,5 +8,5 @@ LOG=/tmp/bitmask-install.log ...@@ -8,5 +8,5 @@ LOG=/tmp/bitmask-install.log
ps aux | grep [b]itmask_helper \ ps aux | grep [b]itmask_helper \
&& launchctl unload /Library/LaunchDaemons/se.leap.bitmask-helper.plist \ && launchctl unload /Library/LaunchDaemons/se.leap.bitmask-helper.plist \
&& echo `date` ":: RiseupVPN pre-install: unloaded bitmask-helper." >> $LOG && echo `date` ":: RiseupVPN pre-install: unloaded bitmask-helper." >> $LOG
echo `date` ":: RiseupVPN pre-install: done." >> $LOG echo `date` ":: RiseupVPN pre-install: ok." >> $LOG
exit 0 exit 0
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# to use policykit. # to use policykit.
helpers: helpers:
pre/pack_installers local/pre/pack_installers
build: helpers build: helpers
# for speeding up build, see https://tribaal.io/making-lxd-fly-on-ubuntu-as-well.html # for speeding up build, see https://tribaal.io/making-lxd-fly-on-ubuntu-as-well.html
sudo snapcraft cleanbuild sudo snapcraft cleanbuild
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="128"
height="128"
viewBox="0 0 33.866666 33.866668"
version="1.1"
id="svg896"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="riseupvpn-launcher.svg">
<defs
id="defs890" />
<sodipodi:namedview
id="base"
pagecolor="#d7d7d7"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="5.12"
inkscape:cx="26.899914"
inkscape:cy="56.22909"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
units="px"
inkscape:window-width="1869"
inkscape:window-height="1025"
inkscape:window-x="51"
inkscape:window-y="27"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid1471"
empspacing="4" />
</sodipodi:namedview>
<metadata
id="metadata893">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-263.13332)">
<path
style="fill:#006cb2;fill-opacity:1;stroke-width:0.26458335"
d="M 15.617988,295.66418 C 9.9401302,292.50672 5.6959906,287.52131 4.7342129,282.87951 4.4622971,281.56718 4.4516145,281.24899 4.4519256,274.47112 l 2.394e-4,-6.47461 0.5616386,-0.36177 c 2.3734615,-1.52883 4.8841786,-2.55103 7.4419094,-3.06699 5.221864,-1.05337 10.639669,0.003 15.485448,3.16684 l 0.398232,0.25998 v 6.50684 c 0,6.8044 -0.01093,7.13134 -0.280843,8.43104 -0.956329,4.6043 -4.632206,9.09553 -10.057782,12.28874 -1.576255,0.9277 -1.527525,0.91863 -2.382844,0.44299 z"
id="path5137"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csccssscssscc" />
<path
inkscape:connector-curvature="0"
style="fill:#007cc3;fill-opacity:1;stroke-width:0.26458335"
d="m 16.396917,264.17336 c -1.317958,-4.7e-4 -2.635612,0.13103 -3.941076,0.39437 -2.5577318,0.51596 -5.068528,1.53812 -7.4419895,3.06696 l -0.5615828,0.36177 -4.707e-4,6.47466 c -2.394e-4,6.77787 0.010371,7.096 0.2822554,8.40832 0.9617776,4.64181 5.2059168,9.62724 10.8837756,12.7847 h 1.19e-4 c 0.368953,0.20517 0.569745,0.32326 0.805249,0.31706 v -31.80747 c -0.0088,-2e-5 -0.01755,-4.8e-4 -0.02641,-4.8e-4 z"
id="path887" />
<path
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458338"
d="m 16.989143,272.54844 c 0,0 -0.315707,-0.61165 -0.336761,-0.69601 -0.02106,-0.0844 -0.189431,-0.94909 -0.189431,-0.94909 l 0.210485,-0.37963 0.463046,-0.696 0.673531,-0.52727 0.168377,-0.0633 1.620684,-0.61164 0.147331,-0.14764 -0.168385,-0.25308 -0.231523,-0.12655 -0.424879,-0.10907 -1.064407,-0.10907 -0.825967,0.007 -0.568293,0.12654 -0.505146,-0.18981 -0.63143,-0.0844 -0.9261,-0.0211 -0.463054,-0.0211 -0.778761,0.29527 -1.178677,1.37091 -0.147339,0.52727 -0.08418,0.464 -0.399908,0.86473 -0.252577,0.82254 -0.126285,0.88582 v 0.18982 l -0.610384,0.92799 -0.336761,0.69601 v 0.99126 l 0.10523,2.04581 0.189431,0.73821 0.378861,0.6749 0.4841,0.44292 0.210477,0.8647 0.799815,1.77155 0.947154,1.13886 0.06311,0.0633 0.336761,1.70835 -1.157623,2.10911 -0.363408,0.28169 -0.272426,0.22054 -0.467179,-0.0129 -0.260603,0.13452 -0.316122,0.0134 -0.190994,0.19047 -0.408963,-0.0616 -0.4044091,-0.0196 -0.311982,0.24606 -0.044916,0.36556 0.207365,-0.23472 0.3488649,-0.10158 0.03654,0.33552 0.5512672,-0.18726 0.316122,-0.0134 0.557721,0.0667 c 0,0 0.483518,-0.0316 0.567216,-0.0407 0.0837,-0.009 0.597276,0.0411 0.597276,0.0411 l 0.376644,-0.041 0.199723,0.0844 0.267456,-0.0716 0.290265,0.13818 0.418488,-0.0455 0.05401,-0.28169 -0.01596,-0.14678 0.28571,0.0962 0.232049,0.18692 0.150642,0.21701 -0.0088,-0.27495 -0.182953,-0.31946 c 0,0 -0.125159,-0.17737 -0.208857,-0.16824 -0.0837,0.009 -0.408971,-0.0616 -0.408971,-0.0616 l -0.223321,0.088 -0.243857,-0.10085 -0.239677,0.13226 -0.220665,-0.0822 -0.106491,-0.20049 -0.153322,-0.0471 0.164763,-0.42962 0.378861,-0.52859 0.505146,-0.84364 0.442,-0.5273 0.168385,-0.21088 c 0,0 0.210477,-0.31633 0.210477,-0.40071 0,-0.0844 0.04212,-0.97016 0.04212,-0.97016 l -0.273623,-0.56947 -0.126285,-0.46402 2.441546,0.59059 h 0.147331 l 2.083731,1.49744 0.294669,0.37959 0.10523,1.49729 -0.04212,0.33746 -0.147338,0.27419 -0.105358,0.16875 -0.09101,0.23675 -0.06215,0.1583 -0.386712,0.11988 -0.393086,-0.0709 -0.238209,-0.0294 -0.437428,0.0633 -0.184118,0.19713 -0.07084,0.24475 0.05712,0.24744 0.09172,-0.24769 0.124641,-0.16724 0.121984,-0.0388 0.0094,0.21174 0.163957,0.10406 0.338995,-0.15563 0.166646,-0.0242 0.05409,0.22658 0.508999,-0.01 0.345035,-0.11394 0.282886,0.0443 0.410893,0.047 0.142823,-0.0417 0.112881,-0.10156 0.182442,0.37841 0.0024,-0.42654 -0.176722,-0.48581 -0.256358,-0.15463 0.04324,-0.12712 -0.189423,-0.35849 0.02106,-1.37079 1.052392,1.2444 1.389154,1.09674 c 0,0 0.947146,0.33749 1.03133,0.33749 0.08419,0 0.736677,-0.0844 0.736677,-0.0844 l 0.420954,-0.69598 -0.315715,-0.94908 0.126284,-0.31642 -0.673531,-0.88574 -1.426794,-1.45279 -0.341213,-1.14141 0.02106,-0.78037 -0.315707,-0.82257 -0.357816,-0.65376 0.210477,-0.65377 -0.168377,-0.94904 -0.717785,-1.61568 0.265151,-0.0448 -0.444984,-0.77034 0.289101,-0.0918 -0.508218,-0.82847 0.213764,-0.11524 -0.380944,-0.62543 0.124202,-0.0696 -0.460971,-0.37337 0.168384,-0.0875 -1.199723,-0.84051 z"
id="path5892"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csccccccccccccccccccccccccccccccccccccccccccccccccccccccscccccccccccccsccccccccccccscccccccccccccccccccccccccccccccccccccccccccscccccccccccccccccccccccc" />
</g>
</svg>
#!/usr/bin/env python #!/usr/bin/env python3
# DO NOT MODIFY MANUALLY # DO NOT MODIFY MANUALLY
# This helper installs the polkit policy file # This helper installs the polkit policy file
# for the RiseupVPN snap. # for the RiseupVPN snap.
...@@ -22,5 +22,5 @@ if 'ID=debian' in release: ...@@ -22,5 +22,5 @@ if 'ID=debian' in release:
desktop_path = "/usr/share/applications/riseup-vpn.desktop" desktop_path = "/usr/share/applications/riseup-vpn.desktop"
if os.path.exists(desktop_path): if os.path.exists(desktop_path):
os.remove(desktop_path) os.remove(desktop_path)
os.symlink("/snap/riseup-vpn/current/snap/gui/riseup-vpn.desktop", desktop_path) os.symlink("/snap/riseup-vpn/current/snap/meta/gui/riseup-vpn.desktop", desktop_path)
subprocess.call(['update-desktop-database']) subprocess.call(['update-desktop-database'])
launchpad
=========
In launchpad, you need to configure a git source for your project, and define a snap recipe for that source.
Be warned that launchpad does an automatic import every 6 hours.
If you need to do manual builds, you first need to trigger an import. Look for the "import now" button in your source page:
https://code.launchpad.net/~leapsnaps/riseupvpn/+git/riseup_vpn
Then you can trigger a manual build:
https://code.launchpad.net/~leapsnaps/+snap/riseup-vpn/+request-builds
#!/usr/bin/env python3 #!/usr/bin/env python3
# TODO move to local/ folder.
import os import os
import subprocess import subprocess
from base64 import encodestring as encode from base64 import encodestring as encode
...@@ -27,12 +26,12 @@ with open(os.path.join(HELPDIR, POLKIT_FILE)) as polkit: ...@@ -27,12 +26,12 @@ with open(os.path.join(HELPDIR, POLKIT_FILE)) as polkit:
b64_polkit = encode(polkit.read().encode()) b64_polkit = encode(polkit.read().encode())
with open(INSTALL, 'w') as install: with open(INSTALL, 'w') as install:
install.write('#!/usr/bin/env python\n') install.write('#!/usr/bin/env python3\n')
install.write('# DO NOT MODIFY MANUALLY\n') install.write('# DO NOT MODIFY MANUALLY\n')
install.write('# This helper installs the polkit policy file\n') install.write('# This helper installs the polkit policy file\n')
install.write('# for the RiseupVPN snap.\n') install.write('# for the RiseupVPN snap.\n')
install.write('# It is generated automatically\n') install.write('# It is generated automatically\n')
install.write('# by the script at "snap/pre/pack_installers"\n') install.write('# by the script at "snap/local/pre/pack_installers"\n')
install.write('import subprocess\n') install.write('import subprocess\n')
install.write('import os\n') install.write('import os\n')
install.write('from base64 import decodestring as decode\n') install.write('from base64 import decodestring as decode\n')
...@@ -51,7 +50,7 @@ if 'ID=debian' in release: ...@@ -51,7 +50,7 @@ if 'ID=debian' in release:
desktop_path = "/usr/share/applications/{app_name}.desktop" desktop_path = "/usr/share/applications/{app_name}.desktop"
if os.path.exists(desktop_path): if os.path.exists(desktop_path):
os.remove(desktop_path) os.remove(desktop_path)
os.symlink("/snap/{app_name}/current/snap/gui/{app_name}.desktop", desktop_path) os.symlink("/snap/{app_name}/current/snap/meta/gui/{app_name}.desktop", desktop_path)
subprocess.call(['update-desktop-database']) subprocess.call(['update-desktop-database'])
""".format( """.format(
polkit=b64_polkit, polkit=b64_polkit,
......
File moved
...@@ -10,10 +10,12 @@ description: | ...@@ -10,10 +10,12 @@ description: |
grade: stable grade: stable
confinement: classic confinement: classic
icon: snap/gui/riseupvpn.svg icon: snap/gui/icon.svg
base: core18
parts: parts:
desktop-gtk3: desktop-gtk3:
plugin: nil
stage-packages: stage-packages:
- libc6 - libc6
prime: prime:
...@@ -28,11 +30,16 @@ parts: ...@@ -28,11 +30,16 @@ parts:
bitmask-root: bitmask-root:
after: [desktop-gtk3] after: [desktop-gtk3]
plugin: dump plugin: dump
source: https://0xacab.org/leap/bitmask-dev/
source-type: git
build-packages: build-packages:
- wget - wget
override-prime: | override-prime: |
wget -O ./bin/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
chmod +x ./bin/bitmask-root mkdir -p bin
wget -O bin/bitmask-root https://0xacab.org/leap/bitmask-dev/raw/master/src/leap/bitmask/vpn/helpers/linux/bitmask-root
chmod +x bin/bitmask-root
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
openvpn: openvpn:
plugin: nil plugin: nil
...@@ -46,9 +53,15 @@ parts: ...@@ -46,9 +53,15 @@ parts:
bitmask-vpn: bitmask-vpn:
after: [desktop-gtk3] after: [desktop-gtk3]
plugin: go plugin: go
source: https://0xacab.org/leap/bitmask-vpn.git source-type: git
go-importpath: 0xacab.org/leap/bitmask-vpn go-packages:
# prepare: XXX run systray tests here - 0xacab.org/leap/bitmask-vpn/cmd/bitmask-vpn
override-build: |
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
#cat $SNAPCRAFT_PROJECT_DIR/snap/local/bitmask-vpn.desktop
cp ../../../gui/bitmask-vpn.desktop $SNAPCRAFT_PRIME/riseup-vpn.desktop
snapcraftctl build
echo ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
build-packages: build-packages:
- pkg-config - pkg-config
- patchelf - patchelf
...@@ -63,10 +76,11 @@ parts: ...@@ -63,10 +76,11 @@ parts:
apps: apps:
launcher: launcher:
command: ./bin/bitmask-vpn command: bin/bitmask-vpn
desktop: riseup-vpn.desktop
environment: environment:
LD_LIBRARY_PATH: "$SNAP/usr/lib/$(gcc -print-multiarch):$SNAP/lib/$(gcc -print-multiarch):$LD_LIBRARY_PATH" LD_LIBRARY_PATH: "$SNAP/usr/lib/$(gcc -print-multiarch):$SNAP/lib/$(gcc -print-multiarch):$LD_LIBRARY_PATH"
openvpn: openvpn:
command: ./usr/sbin/openvpn command: usr/sbin/openvpn
bitmask-root: bitmask-root:
command: ./bin/bitmask-root command: bin/bitmask-root
..\staging\bitmask_helper.exe ..\staging\bitmask_helper.exe
..\staging\bitmask-systray.exe ..\staging\bitmask-vpn.exe
..\staging\libcrypto-1_1-x64.dll ..\staging\libcrypto-1_1-x64.dll
..\staging\liblzo2-2.dll ..\staging\liblzo2-2.dll
..\staging\libpkcs11-helper-1.dll ..\staging\libpkcs11-helper-1.dll
......