Skip to content
Snippets Groups Projects
Unverified Commit e977c302 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[pkg] update to eoan, go versions, add helper script

parent b093455d
Branches
No related tags found
1 merge request!94WIP: Feat/windows service
......@@ -18,6 +18,8 @@ const (
GeolocationAPI = "$geolocationAPI"
)
var Version string
/*
CaCert : a string containing a representation of the provider CA, used to
......
mods/*
......@@ -3,12 +3,12 @@
# we start with 18.04 (bionic) to match the core18 used in the snap
# but we will have to install a couple of extras on top...
FROM ubuntu:18.04
FROM ubuntu:18.04 as builder
MAINTAINER LEAP Encryption Access Project <info@leap.se>
LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.1"
LABEL Description="An image to build Bitmask Lite" Vendor="LEAP" Version="1.2"
ENV OSXSDK_SHA256="631b4144c6bf75bf7a4d480d685a9b5bda10ee8d03dbf0db829391e2ef858789" \
PATH="$PATH:/osxcross/target/bin"
PATH="$PATH:/osxcross/target/bin:/usr/lib/go-1.12/bin"
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
......@@ -16,6 +16,7 @@ RUN apt-get update && apt-get upgrade -y && \
make cmake \
git curl wget \
libappindicator3-dev libgtk-3-dev \
webkit2gtk-4.0 \
mingw-w64 upx-ucl python snapcraft \
unzip \
devscripts fakeroot debhelper \
......@@ -25,17 +26,19 @@ RUN apt-get update && apt-get upgrade -y && \
software-properties-common dh-golang && \
add-apt-repository -y ppa:longsleep/golang-backports && \
apt-get update && \
apt-get install -y --no-install-recommends golang-1.14-go golang-golang-x-tools-dev
apt-get install -y --no-install-recommends golang-1.12-go golang-golang-x-tools-dev && \
rm -r /var/lib/apt/lists/*
# version in 18.04 (bionic) is too old
RUN wget http://archive.ubuntu.com/ubuntu/pool/universe/g/golang-x-text/golang-golang-x-text-dev_0.3.2-1_all.deb && \
dpkg -i golang-golang-x-text-dev_0.3.2-1_all.deb
# we also need a newer nsis version
RUN echo "deb http://de.archive.ubuntu.com/ubuntu disco main universe" >> /etc/apt/sources.list && \
RUN echo "deb http://de.archive.ubuntu.com/ubuntu eoan main universe" >> /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends nsis && \
sed -i '$ d' /etc/apt/sources.list && apt-get update
sed -i '$ d' /etc/apt/sources.list && apt-get update && \
rm -r /var/lib/apt/lists/*
# osx cross compiling
RUN git clone https://github.com/tpoechtrager/osxcross && \
......@@ -54,3 +57,12 @@ RUN git clone https://github.com/VantaInc/xar && \
cd xar/xar && \
./autogen.sh && ./configure && \
make && sudo make install
# cache go modules
RUN rm -rf /gomods && mkdir -p /gomods/packages
WORKDIR /gomods
COPY mods/go.* /gomods/
COPY mods/packages/ /gomods/packages/
RUN go mod download
COPY builder.sh /
......@@ -2,6 +2,7 @@ IMAGE=bitmask-vpn
REGISTRY=registry.0xacab.org/leap/docker
build:
mkdir -p mods && cp ../go.mod ../go.sum mods/ && cp -r ../packages mods/
docker build -t $(REGISTRY)/$(IMAGE):latest .
push:
docker push $(REGISTRY)/$(IMAGE):latest
......
You can use the makefile to build the image.
"make packages" will build packages inside the builder container.
Use https://github.com/kalikaneko/squid-in-a-can if you want to save some bandwith while building your images.
#!/bin/bash
set -e
export DESTDIR=/bitmask-vpn.orig/deploy/
rm -rf /bitmask-vpn
cp -r /bitmask-vpn.orig /bitmask-vpn
cd /bitmask-vpn
make prepare
make build
case $XBUILD in
win)
make package_win
;;
osx)
make package_osx
;;
yes)
make packages
;;
esac
cp /bitmask-vpn/deploy/* $DESTDIR
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment