summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--docs/installation/index.rst5
-rwxr-xr-xpkg/build_bundle_with_venv.sh4
-rw-r--r--pkg/bundles/build.mk1
-rw-r--r--pkg/docker_build13
5 files changed, 21 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 7ff10d1..b3cba97 100644
--- a/Makefile
+++ b/Makefile
@@ -79,7 +79,10 @@ bundle_in_virtualenv:
bundle_in_docker:
# needs a docker container called 'mybundle', created with 'make docker_container'
- cat pkg/docker_build | docker run -i -v ~/leap/bitmask-dev:/dist -w /dist -u `id -u` mybundle bash
+ 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)" mybundle bash
+ cp -r bitmaskbuild/$(DIST_VERSION) dist/
+ rm -rf bitmaskbuild
docker_container:
cd pkg/docker_bundle && docker build -t mybundle .
diff --git a/docs/installation/index.rst b/docs/installation/index.rst
index 39efb56..e237aaa 100644
--- a/docs/installation/index.rst
+++ b/docs/installation/index.rst
@@ -78,6 +78,11 @@ and then you can launch the above script inside that container::
make bundle_in_docker
+That will build the latest from master. If you're interested in building some
+development branch, you can pass some extra variables::
+
+ make bundle_in_docker REPO=https://0xacab.org/kali/bitmask-dev BRANCH=somethingcool
+
A new bundle is created by the CI for every commit using this procedure
involving docker, you can read more about the bundles in the :ref:`qa section
<qa>`.
diff --git a/pkg/build_bundle_with_venv.sh b/pkg/build_bundle_with_venv.sh
index ce82c77..1ca267c 100755
--- a/pkg/build_bundle_with_venv.sh
+++ b/pkg/build_bundle_with_venv.sh
@@ -4,6 +4,7 @@
# To be run by Gitlab Runner,
# will produce an artifact for each build.
###########################################################
+
# Stop bundling in case of errors
set -e
@@ -20,7 +21,8 @@ source "$VENV"/bin/activate
echo "[+] Using venv in" $VIRTUAL_ENV
$VIRTUAL_ENV/bin/pip install appdirs packaging
-$VIRTUAL_ENV/bin/pip install -U pyinstaller
+# qt-plugins instability in develop: see https://github.com/pyinstaller/pyinstaller/issues/1906
+$VIRTUAL_ENV/bin/pip install -U pyinstaller==3.2.1
$VIRTUAL_ENV/bin/pip install zope.interface zope.proxy
# fix for #8789
diff --git a/pkg/bundles/build.mk b/pkg/bundles/build.mk
index 8c7f7fb..4dd43fc 100644
--- a/pkg/bundles/build.mk
+++ b/pkg/bundles/build.mk
@@ -23,6 +23,7 @@ bundle: bundle_clean
echo `git describe` > $(DIST)/version
mv $(DIST) _bundlelib && mkdir $(DIST_VERSION) && mv _bundlelib $(DIST_VERSION)/lib/
cd pkg/launcher && make
+ cp release-notes.rst $(DIST_VERSION)
cp pkg/launcher/bitmask $(DIST_VERSION)
bundle_linux_gpg:
diff --git a/pkg/docker_build b/pkg/docker_build
index 192ae58..9669a87 100644
--- a/pkg/docker_build
+++ b/pkg/docker_build
@@ -1,7 +1,10 @@
-git clone https://github.com/leapcode/bitmask-dev bitmaskbuild
-mkdir -p dist/
+: ${REPO:="https://github.com/leapcode/bitmask-dev"}
+: ${BRANCH:="master"}
+
+RELEASE=bitmask-`cat pkg/next-version`
+echo "[+] CLONING REPO from $REPO [$BRANCH]"
+git clone $REPO bitmaskbuild
cd bitmaskbuild
+git checkout $BRANCH
+mkdir -p dist/
pkg/build_bundle_with_venv.sh
-
-cp -r bitmaskbuild/dist/ dist/
-rm -rf bitmaskbuild