summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-02-15 17:32:28 +0100
committerKali Kaneko <kali@leap.se>2018-02-15 17:32:28 +0100
commit0388014636ce25fd1786c8bb79727dd643604f11 (patch)
tree38a8c9553488e5cce07dc444efdc5e4145c66f75
parent16e8c9179b15f10570670e6068f87357427fd12b (diff)
[pkg] rename bundling scripts to add clarity
-rw-r--r--Makefile27
-rw-r--r--pkg/bundle_from_docker (renamed from pkg/docker_build_apt)0
-rw-r--r--pkg/bundle_from_docker_venv (renamed from pkg/docker_build)0
-rw-r--r--pkg/docker_build_riseupvpn62
-rw-r--r--pkg/docker_bundler/Dockerfile (renamed from pkg/docker_bundleapt/Dockerfile)0
-rw-r--r--pkg/docker_bundler/Makefile (renamed from pkg/docker_bundleapt/Makefile)0
-rw-r--r--pkg/docker_bundler/systray.sh (renamed from pkg/docker_bundleapt/systray.sh)0
-rw-r--r--pkg/docker_bundler_venv/Dockerfile (renamed from pkg/docker_bundle/Dockerfile)0
-rw-r--r--pkg/docker_bundler_venv/Makefile (renamed from pkg/docker_bundle/Makefile)2
9 files changed, 13 insertions, 78 deletions
diff --git a/Makefile b/Makefile
index 769e63cf..76ba25a5 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ DIST_VERSION = $(DIST)-$(NEXT_VERSION)/
HEADLESS_DIST=dist/bitmask-nox
HEADLESS_DIST_VERSION = $(HEADLESS_DIST)-$(NEXT_VERSION)/
-ANONVPN_DIST=dist/anonvpn
+ANONVPN_DIST=dist/RiseupVPN
ANONVPN_DIST_VERSION = $(ANONVPN_DIST)-$(NEXT_VERSION)/
BITMASK_ROOT = src/leap/bitmask/vpn/helpers/linux/bitmask-root
@@ -95,29 +95,26 @@ package_in_docker:
gitlab-runner exec docker package:amd64_stretch
bundler_image:
- cd pkg/docker_bundleapt && make bundler
-
-bundle_in_docker_virtualenv:
- # this runs bundles inside a virtualenv. it is kind of slow because it compiles all python extensions in dependencies each time.
- rm -rf $(DIST_VERSION) bitmaskbuild
- cat pkg/docker_build | docker run -i -v ~/leap/bitmask-dev:/dist -w /dist -u `id -u` -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" local_bundler bash
- mkdir -p dist/
- cp -r bitmaskbuild/$(DIST_VERSION) dist/
- rm -rf bitmaskbuild
+ cd pkg/docker_bundler && make bundler
bundle_in_docker:
# needs a docker container called 'bitmask-bundler-apt', created with 'make bundler_image'
- rm -rf $(DIST_VERSION) bitmaskbuild
# XXX why was it needed to specify -u `id -u` again? if it's something with gilab CI we might need
# to chown it first.
- cat pkg/docker_build_apt | docker run -i -v /srv/bitmask-builds:/dist -w /dist -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-apt bash
+ cat pkg/bundle_from_docker | docker run -i -v /srv/bitmask-builds:/dist -w /dist -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-apt bash
-bundle_riseupvpn_in_docker:
+bundle_riseupvpn:
# needs a docker container called 'bitmask-bundler-apt', created with 'make bundler_image'
- rm -rf $(DIST_VERSION) bitmaskbuild
# XXX why was it needed to specify -u `id -u` again? if it's something with gilab CI we might need
# to chown it first.
- cat pkg/docker_build_riseupvpn | docker run -i -v /srv/bitmask-builds:/dist -w /dist -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-apt bash
+ cat pkg/bundle_riseupvpn_from_docker | docker run -i -v /srv/bitmask-builds:/dist -w /dist -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-apt bash
+
+bundle_in_docker_virtualenv:
+ # this runs bundles inside a virtualenv. it is kind of slow because it compiles all python extensions in dependencies each time.
+ cat pkg/bundle_from_docker_venv | docker run -i -v ~/leap/bitmask-dev:/dist -w /dist -u `id -u` -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-venv bash
+ mkdir -p dist/
+ cp -r bitmaskbuild/$(DIST_VERSION) dist/
+ rm -rf bitmaskbuild
upload:
python setup.py sdist bdist_wheel --universal upload --sign -i kali@leap.se -r pypi
diff --git a/pkg/docker_build_apt b/pkg/bundle_from_docker
index 1d87b4e1..1d87b4e1 100644
--- a/pkg/docker_build_apt
+++ b/pkg/bundle_from_docker
diff --git a/pkg/docker_build b/pkg/bundle_from_docker_venv
index 9669a87f..9669a87f 100644
--- a/pkg/docker_build
+++ b/pkg/bundle_from_docker_venv
diff --git a/pkg/docker_build_riseupvpn b/pkg/docker_build_riseupvpn
deleted file mode 100644
index e741d8c6..00000000
--- a/pkg/docker_build_riseupvpn
+++ /dev/null
@@ -1,62 +0,0 @@
-# This script gets executed inside the docker-bundler-apt image.
-# Produces a RiseupVPN bundle inside the volume exported as /dist
-# (no virtualenv, so all the dependencies must be already installed in the image).
-
-: ${REPO:="https://github.com/leapcode/bitmask-dev"}
-: ${BRANCH:="master"}
-
-# build bitmask-systray
-# (dependencies should already be in the base image)
-
-export GOPATH=/srv/go
-export CGO_CPPFLAGS="-I/usr/include"
-export CGO_LDFLAGS="-L/usr/lib -L/usr/lib/z86_64-linux-gnu -lzmq -lpthread -lsodium -lrt -lstdc++ -lm -lc -lgcc"
-
-# echo "[+] building systray deps"
-# go get -a 0xacab.org/leap/bitmask-systray
-cd /src/leap && git clone --depth 1 --single-branch --branch master https://0xacab.org/leap/bitmask-systray
-echo "[+] building systray"
-cd bitmask-systray && go build .
-
-cd $HOME
-echo "[+] CLONING REPO from $REPO [$BRANCH]"
-rm -rf bitmaskbuild
-git clone --depth 1 --single-branch --branch $BRANCH $REPO bitmaskbuild
-cd bitmaskbuild
-RELEASE=anonvpn-`cat pkg/next-version`
-echo "[+] RELEASE: $RELEASE"
-git fetch --tags
-# uninstall bitmask-dev from base image and install bitmask-vpn
-pip uninstall --yes leap.bitmask
-pip install -e '.[vpn]'
-mkdir -p dist/
-
-# nuke bitmask mail
-rm -rf src/leap/bitmask/mail
-
-# build anonvpn bundle
-VIRTUAL_ENV=/usr/local make bundle_anonvpn_linux
-
-# copy systray binary and libs
-echo "[+] Copy systray binary"
-cp /src/leap/bitmask-systray/bitmask-systray dist/${RELEASE}/lib/
-cp /usr/lib/x86_64-linux-gnu/libsodium.so.18 dist/${RELEASE}/lib/
-cp /usr/lib/x86_64-linux-gnu/libzmq.so.5.1.1 dist/${RELEASE}/lib/libzmq.so.5
-cp /usr/lib/x86_64-linux-gnu/libappindicator3.so.1 dist/${RELEASE}/lib/
-cp /usr/lib/x86_64-linux-gnu/libpng16.so.16 dist/${RELEASE}/lib/libpng.so.16
-cp /usr/lib/x86_64-linux-gnu/libz.so dist/${RELEASE}/lib/libz.so
-
-# trim some bytes
-rm dist/${RELEASE}/lib/pysqlcipher._sqlite.so
-rm dist/${RELEASE}/lib/libzmq-0576c57a.so.5.0.2
-rm dist/${RELEASE}/lib/libsqlite3.so.0
-
-# rename entrypoint
-echo "[+] Build and copy wrapper binary"
-cd $HOME/bitmaskbuild/pkg/launcher && make
-cd $HOME/bitmaskbuild
-cp pkg/launcher/bitmask dist/${RELEASE}/RiseupVPN
-mv dist/${RELEASE}/lib/anonvpn dist/${RELEASE}/lib/bitmask
-
-cp -r dist/* /dist
-echo "[+] DONE"
diff --git a/pkg/docker_bundleapt/Dockerfile b/pkg/docker_bundler/Dockerfile
index 810cae81..810cae81 100644
--- a/pkg/docker_bundleapt/Dockerfile
+++ b/pkg/docker_bundler/Dockerfile
diff --git a/pkg/docker_bundleapt/Makefile b/pkg/docker_bundler/Makefile
index f36d2ef1..f36d2ef1 100644
--- a/pkg/docker_bundleapt/Makefile
+++ b/pkg/docker_bundler/Makefile
diff --git a/pkg/docker_bundleapt/systray.sh b/pkg/docker_bundler/systray.sh
index 4bb19067..4bb19067 100644
--- a/pkg/docker_bundleapt/systray.sh
+++ b/pkg/docker_bundler/systray.sh
diff --git a/pkg/docker_bundle/Dockerfile b/pkg/docker_bundler_venv/Dockerfile
index b2974dfe..b2974dfe 100644
--- a/pkg/docker_bundle/Dockerfile
+++ b/pkg/docker_bundler_venv/Dockerfile
diff --git a/pkg/docker_bundle/Makefile b/pkg/docker_bundler_venv/Makefile
index f9c82ac1..233a2acc 100644
--- a/pkg/docker_bundle/Makefile
+++ b/pkg/docker_bundler_venv/Makefile
@@ -1,4 +1,4 @@
-IMAGE=bitmask-bundler
+IMAGE=bitmask-bundler-venv
build:
docker build -t 0xacab.org:4567/leap/docker/$(IMAGE):latest .