1
0
mirror of https://github.com/falk-werner/webfuse synced 2024-10-27 20:34:10 +00:00

removes binary dependency to qemu from project

This commit is contained in:
nosamad 2019-03-20 00:58:06 +01:00
parent 506860b31a
commit fc2648c915
6 changed files with 29 additions and 9 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
.vscode
.build
.deps
docker/qemu-*

View File

@ -4,3 +4,4 @@
# some cases, their employer may be the copyright holder. To see the full list
# of contributors, see the revision history in source control.
Falk Werner
Osama El Hosami

View File

@ -15,6 +15,7 @@ DOCKER_RUNUSER ?= $(shell id -u)
DOCKER_RUNGROUP ?= $(shell id -g)
UBUNTU_CODENAME ?= bionic
QEMU_VERSION ?= v3.1.0-2
MARCH_AMD64 := $(filter-out amd64,$(MARCH))
MARCH_ARM32V7 := $(filter-out arm32v7,$(MARCH))
@ -83,6 +84,13 @@ configure: $(CONFIGURE_TARGETS)
%-ubuntu: CODENAME := $(UBUNTU_CODENAME)
$(PROJECT_ROOT)/docker/qemu-arm-static-$(QEMU_VERSION):
$(SILENT) \
curl -fSL -o $@ https://github.com/multiarch/qemu-user-static/releases/download/$(QEMU_VERSION)/qemu-arm-static \
&& chmod +x $@
$(OUT)/docker/wsfs-builder-arm32v7-ubuntu: $(PROJECT_ROOT)/docker/qemu-arm-static-$(QEMU_VERSION)
$(OUT)/docker/%: $(PROJECT_ROOT)/docker/%.dockerfile $(PROJECT_RESOURCES) | $(OUT_DIRS)
$(SILENT)$(DOCKER) build --rm $(DOCKER_BUILDFLAGS) --iidfile $@ --file $< --tag $*:$(VERSION) $(dir $<)

Binary file not shown.

View File

@ -4,6 +4,7 @@ FROM ubuntu:$CODENAME
RUN set -x \
&& apt update \
&& apt upgrade -y \
&& apt install --yes --no-install-recommends \
openssl \
ca-certificates \
@ -11,7 +12,8 @@ RUN set -x \
build-essential \
cmake \
ninja-build \
pkg-config
pkg-config \
&& rm -rf /var/lib/apt/lists/*
ARG NPROC=1
ARG GTEST_VERSION=1.8.1
@ -40,11 +42,13 @@ RUN set -x \
&& ./configure \
&& make -j$NPROC install) \
&& rm /tmp/fuse-$FUSE_VERSION.tar.gz \
&& rm -rf /tmp/libfuse-fuse-$FUSE_VERSION
&& rm -rf /tmp/libfuse-fuse-$FUSE_VERSION \
&& rm -rf /var/lib/apt/lists/*
ARG WEBSOCKETS_VERSION=3.1.0
RUN set -x \
&& apt update \
&& apt install --yes --no-install-recommends \
libssl-dev \
&& curl -fSL https://github.com/warmcat/libwebsockets/archive/v$WEBSOCKETS_VERSION.tar.gz -o /tmp/libwebsockets-$WEBSOCKETS_VERSION.tar.gz \
@ -53,7 +57,8 @@ RUN set -x \
&& cmake . \
&& make -j$NPROC install) \
&& rm /tmp/libwebsockets-$WEBSOCKETS_VERSION.tar.gz \
&& rm -rf /tmp/libwebsockets-$WEBSOCKETS_VERSION
&& rm -rf /tmp/libwebsockets-$WEBSOCKETS_VERSION \
&& rm -rf /var/lib/apt/lists/*
ARG JANSSON_VERSION=2.12
@ -61,7 +66,7 @@ RUN set -x \
&& curl -fSL https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.tar.gz -o /tmp/libjansson-$JANSSON_VERSION.tar.gz \
&& tar -C /tmp -xf /tmp/libjansson-$JANSSON_VERSION.tar.gz \
&& ( cd /tmp/jansson-$JANSSON_VERSION \
&& cmake . \
&& cmake -DJANSSON_BUILD_DOCS=OFF . \
&& make -j$NPROC install) \
&& rm /tmp/libjansson-$JANSSON_VERSION.tar.gz \
&& rm -rf /tmp/jansson-$JANSSON_VERSION

View File

@ -2,10 +2,11 @@ ARG CODENAME=bionic
FROM arm32v7/ubuntu:$CODENAME
COPY qemu-arm-static /usr/bin/
COPY qemu-arm-static-* /usr/bin/qemu-arm-static
RUN set -x \
&& apt update \
&& apt upgrade -y \
&& apt install --yes --no-install-recommends \
openssl \
ca-certificates \
@ -13,7 +14,8 @@ RUN set -x \
build-essential \
cmake \
ninja-build \
pkg-config
pkg-config \
&& rm -rf /var/lib/apt/lists/*
ARG NPROC=1
ARG GTEST_VERSION=1.8.1
@ -42,11 +44,13 @@ RUN set -x \
&& ./configure \
&& make -j$NPROC install) \
&& rm /tmp/fuse-$FUSE_VERSION.tar.gz \
&& rm -rf /tmp/libfuse-fuse-$FUSE_VERSION
&& rm -rf /tmp/libfuse-fuse-$FUSE_VERSION \
&& rm -rf /var/lib/apt/lists/*
ARG WEBSOCKETS_VERSION=3.1.0
RUN set -x \
&& apt update \
&& apt install --yes --no-install-recommends \
libssl-dev \
&& curl -fSL https://github.com/warmcat/libwebsockets/archive/v$WEBSOCKETS_VERSION.tar.gz -o /tmp/libwebsockets-$WEBSOCKETS_VERSION.tar.gz \
@ -55,7 +59,8 @@ RUN set -x \
&& cmake . \
&& make -j$NPROC install) \
&& rm /tmp/libwebsockets-$WEBSOCKETS_VERSION.tar.gz \
&& rm -rf /tmp/libwebsockets-$WEBSOCKETS_VERSION
&& rm -rf /tmp/libwebsockets-$WEBSOCKETS_VERSION \
&& rm -rf /var/lib/apt/lists/*
ARG JANSSON_VERSION=2.12
@ -63,7 +68,7 @@ RUN set -x \
&& curl -fSL https://github.com/akheron/jansson/archive/v$JANSSON_VERSION.tar.gz -o /tmp/libjansson-$JANSSON_VERSION.tar.gz \
&& tar -C /tmp -xf /tmp/libjansson-$JANSSON_VERSION.tar.gz \
&& ( cd /tmp/jansson-$JANSSON_VERSION \
&& cmake . \
&& cmake -DJANSSON_BUILD_DOCS=OFF . \
&& make -j$NPROC install) \
&& rm /tmp/libjansson-$JANSSON_VERSION.tar.gz \
&& rm -rf /tmp/jansson-$JANSSON_VERSION