mirror of
https://github.com/falk-werner/webfuse-provider
synced 2024-10-27 20:44:10 +00:00
upgrade dobuild to newer version
- fixes incompatibilities - renames amd64 arch to x86_64 (uname -m)
This commit is contained in:
parent
21466f04f5
commit
636e7f96f8
17
.travis.yml
17
.travis.yml
@ -13,17 +13,16 @@ addons:
|
||||
env:
|
||||
global:
|
||||
- PARALLELMFLAGS="-j4"
|
||||
- PORTABLE_WORSPACE=1
|
||||
matrix:
|
||||
- DISTRO=ubuntu BUILDTYPE=Debug MARCH=amd64 CHECK_TARGET=memcheck
|
||||
- DISTRO=ubuntu BUILDTYPE=Coverage MARCH=amd64 CHECK_TARGET=check
|
||||
- DISTRO=ubuntu BUILDTYPE=Release MARCH=amd64 CHECK_TARGET=memcheck
|
||||
- DISTRO=ubuntu BUILDTYPE=Debug MARCH=arm32v7 CHECK_TARGET=check
|
||||
- DISTRO=ubuntu BUILDTYPE=MinSizeRel MARCH=arm32v7 CHECK_TARGET=check
|
||||
- DISTRO=alpine BUILDTYPE=Debug MARCH=amd64 CHECK_TARGET=check
|
||||
- DISTRIB_ID=ubuntu VARIANT=debug MARCH=x86_64 CHECK_TARGET=memcheck
|
||||
- DISTRIB_ID=ubuntu VARIANT=coverage MARCH=x86_64 CHECK_TARGET=check
|
||||
- DISTRIB_ID=ubuntu VARIANT=release MARCH=x86_64 CHECK_TARGET=memcheck
|
||||
- DISTRIB_ID=ubuntu VARIANT=debug MARCH=arm32v7 CHECK_TARGET=check
|
||||
- DISTRIB_ID=ubuntu VARIANT=min_size_rel MARCH=arm32v7 CHECK_TARGET=check
|
||||
- DISTRIB_ID=alpine VARIANT=debug MARCH=x86_64 CHECK_TARGET=check
|
||||
before_script:
|
||||
- make BUILDTYPE=$BUILDTYPE MARCH=$MARCH
|
||||
- make $PARALLELMFLAGS VARIANT=$VARIANT MARCH=$MARCH
|
||||
script:
|
||||
- make DISTRO=$DISTRO BUILDTYPE=$BUILDTYPE MARCH=$MARCH $CHECK_TARGET
|
||||
- make $PARALLELMFLAGS DISTRIB_ID=$DISTRIB_ID VARIANT=$VARIANT MARCH=$MARCH $CHECK_TARGET
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
106
Makefile
106
Makefile
@ -1,81 +1,70 @@
|
||||
MAKEFLAGS += $(_PARALLELMFLAGS) --no-builtin-rules
|
||||
MAKEFILE := $(lastword $(MAKEFILE_LIST))
|
||||
SHELL := /bin/sh
|
||||
MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
.PHONY: default
|
||||
default: all
|
||||
|
||||
#######################################################################################################################
|
||||
# Project macros
|
||||
|
||||
filter_targets = $(shell echo '$2' | sed -e 's@\s@\n@g' | sed -n$(foreach REGEX,$1, -e 's@$(REGEX)@\0@p'))
|
||||
|
||||
regex_march_distro = '$1-$2-.*'
|
||||
|
||||
#######################################################################################################################
|
||||
# Overridable project defaults
|
||||
|
||||
PROJECTNAME ?= webfuse
|
||||
PROJECTDIR ?= $(patsubst %/,%,$(dir $(MAKEFILE)))
|
||||
SCRIPTDIR ?= $(PROJECTDIR)/build/mkdocker
|
||||
OUTDIR ?= $(PROJECTDIR)/.build
|
||||
FETCHDIR ?= $(PROJECTDIR)/.deps
|
||||
BUILDTYPE ?= Debug
|
||||
DOBUILD_DOCKERFILE ?= $(PROJECTDIR)/build/%MARCH%-%DISTRIB_ID%-%ID%.dockerfile
|
||||
DOBUILD_PROJECTDIR ?= $(patsubst %/,%,$(dir $(MAKEFILE)))
|
||||
|
||||
SKIP_FETCH ?=
|
||||
DOBUILDDIR ?= $(PROJECTDIR)/build/dobuild
|
||||
PROJECTDIR = $(DOBUILD_PROJECTDIR)
|
||||
|
||||
SKIP_DEFAULT_BUILDTARGET ?= $(or $(MARCH),$(DISTRO))
|
||||
$(SKIP_DEFAULT_BUILDTARGET)BUILDTARGET ?= amd64-ubuntu-builder
|
||||
MARCH ?= '.*'
|
||||
DISTRO ?= '.*'
|
||||
FILTER ?= $(call regex_march_distro,$(MARCH),$(DISTRO))
|
||||
include $(DOBUILDDIR)/defaults.mk
|
||||
|
||||
CONTAINER_USER ?= user
|
||||
CONTAINER_GROUP ?= user
|
||||
#######################################################################################################################
|
||||
# Project defaults and macros
|
||||
|
||||
UBUNTU_CODENAME ?= bionic
|
||||
ALPINE_CODENAME ?= 3.9
|
||||
DEFAULTTARGET = x86_64-ubuntu@bionic+builder@debug
|
||||
|
||||
SKIP_MD5SUM ?= $(call filter_out_command,md5sum)
|
||||
SKIP_MD5SUM := $(SKIP_MD5SUM)
|
||||
FETCHDIR = $(BUILDDIR)/.deps
|
||||
|
||||
dobuild_image_buildargs = \
|
||||
$(addprefix MARCH=,%MARCH%) \
|
||||
$(addprefix DISTRIB_VERSION=,%DISTRIB_VERSION%) \
|
||||
$(addprefix USERID=,$(USERID))
|
||||
|
||||
#######################################################################################################################
|
||||
# Project dependencies
|
||||
|
||||
DUMB_INIT_VERSION ?= 1.2.2
|
||||
DOCKER_BUILDARGS += DUMB_INIT_VERSION=$(DUMB_INIT_VERSION)
|
||||
IMAGE_BUILDARGS += DUMB_INIT_VERSION=$(DUMB_INIT_VERSION)
|
||||
FETCH_TARGETS += $(FETCHDIR)/dumb-init-$(DUMB_INIT_VERSION).tar.gz
|
||||
$(FETCHDIR)/dumb-init-$(DUMB_INIT_VERSION).tar.gz: URL := https://github.com/Yelp/dumb-init/archive/v${DUMB_INIT_VERSION}.tar.gz
|
||||
$(SKIP_MD5SUM)$(FETCHDIR)/dumb-init-$(DUMB_INIT_VERSION).tar.gz: MD5 := 6166084b05772cdcf615a762c6f3b32e
|
||||
|
||||
GTEST_VERSION ?= 1.10.0
|
||||
DOCKER_BUILDARGS += GTEST_VERSION=$(GTEST_VERSION)
|
||||
IMAGE_BUILDARGS += GTEST_VERSION=$(GTEST_VERSION)
|
||||
FETCH_TARGETS += $(FETCHDIR)/googletest-release-$(GTEST_VERSION).tar.gz
|
||||
$(FETCHDIR)/googletest-release-$(GTEST_VERSION).tar.gz: URL := https://github.com/google/googletest/archive/release-$(GTEST_VERSION).tar.gz
|
||||
$(SKIP_MD5SUM)$(FETCHDIR)/googletest-release-$(GTEST_VERSION).tar.gz: MD5 := ecd1fa65e7de707cd5c00bdac56022cd
|
||||
|
||||
FUSE_VERSION ?= 3.9.1
|
||||
DOCKER_BUILDARGS += FUSE_VERSION=$(FUSE_VERSION)
|
||||
IMAGE_BUILDARGS += FUSE_VERSION=$(FUSE_VERSION)
|
||||
FETCH_TARGETS += $(FETCHDIR)/libfuse-fuse-$(FUSE_VERSION).tar.gz
|
||||
$(FETCHDIR)/libfuse-fuse-$(FUSE_VERSION).tar.gz: URL := https://github.com/libfuse/libfuse/archive/fuse-$(FUSE_VERSION).tar.gz
|
||||
$(SKIP_MD5SUM)$(FETCHDIR)/libfuse-fuse-$(FUSE_VERSION).tar.gz: MD5 := 5f7c1062def710d8b60343524a18cc82
|
||||
|
||||
WEBSOCKETS_VERSION ?= 4.0.10
|
||||
DOCKER_BUILDARGS += WEBSOCKETS_VERSION=$(WEBSOCKETS_VERSION)
|
||||
IMAGE_BUILDARGS += WEBSOCKETS_VERSION=$(WEBSOCKETS_VERSION)
|
||||
FETCH_TARGETS += $(FETCHDIR)/libwebsockets-$(WEBSOCKETS_VERSION).tar.gz
|
||||
$(FETCHDIR)/libwebsockets-$(WEBSOCKETS_VERSION).tar.gz: URL := https://github.com/warmcat/libwebsockets/archive/v$(WEBSOCKETS_VERSION).tar.gz
|
||||
$(SKIP_MD5SUM)$(FETCHDIR)/libwebsockets-$(WEBSOCKETS_VERSION).tar.gz: MD5 := a1ce5a279fd06b2ce132c02c292df7aa
|
||||
|
||||
JANSSON_VERSION ?= 2.12
|
||||
DOCKER_BUILDARGS += JANSSON_VERSION=$(JANSSON_VERSION)
|
||||
IMAGE_BUILDARGS += JANSSON_VERSION=$(JANSSON_VERSION)
|
||||
FETCH_TARGETS += $(FETCHDIR)/jansson-$(JANSSON_VERSION).tar.gz
|
||||
$(FETCHDIR)/jansson-$(JANSSON_VERSION).tar.gz: URL := https://github.com/akheron/jansson/archive/v$(JANSSON_VERSION).tar.gz
|
||||
$(SKIP_MD5SUM)$(FETCHDIR)/jansson-$(JANSSON_VERSION).tar.gz: MD5 := c4b106528d5ffb521178565de1ba950d
|
||||
|
||||
QEMU_VERSION ?= v4.1.0-1
|
||||
DOCKER_BUILDARGS += QEMU_VERSION_=$(QEMU_VERSION)
|
||||
IMAGE_BUILDARGS += QEMU_VERSION_=$(QEMU_VERSION)
|
||||
FETCH_TARGETS += $(FETCHDIR)/qemu-arm-static-$(QEMU_VERSION)
|
||||
$(FETCHDIR)/qemu-arm-static-$(QEMU_VERSION): URL := https://github.com/multiarch/qemu-user-static/releases/download/$(QEMU_VERSION)/qemu-arm-static
|
||||
$(SKIP_MD5SUM)$(FETCHDIR)/qemu-arm-static-$(QEMU_VERSION): MD5 := e508e6e4dd7f3a851207aac245a4653f
|
||||
@ -83,18 +72,17 @@ $(SKIP_MD5SUM)$(FETCHDIR)/qemu-arm-static-$(QEMU_VERSION): MD5 := e508e6e4dd7f3a
|
||||
#######################################################################################################################
|
||||
# Architecture-specific rule target configuration
|
||||
|
||||
CMAKE_TARGETS += amd64-ubuntu-builder
|
||||
CMAKE_TARGETS += amd64-alpine-builder
|
||||
CMAKE_TARGETS += arm32v7-ubuntu-builder
|
||||
CMAKE_TARGETS += arm32v7-alpine-builder
|
||||
|
||||
MEMCHECK_FILTER = $(call regex_march_distro,'$(HOST_MARCH)','.*')
|
||||
|
||||
UBUNTU_FILTER = $(call regex_march_distro,'.*','ubuntu')
|
||||
UBUNTU_TARGETS = $(addprefix $(OUTDIR)/docker/,$(call filter_targets,$(UBUNTU_FILTER),$(TARGETS)))
|
||||
|
||||
ALPINE_FILTER = $(call regex_march_distro,'.*','alpine')
|
||||
ALPINE_TARGETS = $(addprefix $(OUTDIR)/docker/,$(call filter_targets,$(ALPINE_FILTER),$(TARGETS)))
|
||||
CMAKE_TARGETS += $(call target_properties_combine,\
|
||||
,\
|
||||
x86_64 arm32v7,\
|
||||
ubuntu@bionic alpine@3.9,\
|
||||
,\
|
||||
,\
|
||||
builder,\
|
||||
,\
|
||||
debug release coverage min_size_rel \
|
||||
)
|
||||
DOCKER_TARGETS += $(CMAKE_TARGETS)
|
||||
|
||||
#######################################################################################################################
|
||||
# Common rule target configuration
|
||||
@ -108,8 +96,6 @@ DOCKER_RUNFLAGS += --security-opt apparmor:unconfined
|
||||
DOCKER_RUNFLAGS += --cap-add SYS_PTRACE
|
||||
DOCKER_RUNFLAGS += --security-opt seccomp=unconfined
|
||||
|
||||
DOCKER_BUILDARGS += CODENAME=$(CODENAME)
|
||||
|
||||
OUTDIRS += $(OUTDIR)/src
|
||||
|
||||
EXTRACT_TARGETS += $(OUTDIR)/docker/qemu-arm-static-$(QEMU_VERSION)
|
||||
@ -118,44 +104,32 @@ EXTRACT_TARGETS += $(patsubst $(FETCHDIR)/%.tar.gz,$(OUTDIR)/src/%,$(FETCH_TARGE
|
||||
#######################################################################################################################
|
||||
# Makefile dependencies
|
||||
|
||||
$(SKIP_FETCH)MAKEFILE_DEPS += curl
|
||||
MAKEFILE_DEPS += gunzip
|
||||
MAKEFILE_DEPS += gzip
|
||||
MAKEFILE_DEPS += tar
|
||||
MAKEFILE_DEPS += chmod
|
||||
MAKEFILE_DEPS += touch
|
||||
MAKEFILE_DEPS += test
|
||||
MAKEFILE_DEPS += cp
|
||||
MAKEFILE_DEPS += sed
|
||||
|
||||
#######################################################################################################################
|
||||
# Rules
|
||||
|
||||
include $(SCRIPTDIR)/cmake.mk
|
||||
include $(SCRIPTDIR)/docker.mk
|
||||
include $(SCRIPTDIR)/standardrules.mk
|
||||
|
||||
$(CHECK_TARGETS): GOALS := test
|
||||
|
||||
$(UBUNTU_TARGETS): CODENAME := $(UBUNTU_CODENAME)
|
||||
|
||||
$(ALPINE_TARGETS): CODENAME := $(ALPINE_CODENAME)
|
||||
include $(DOBUILDDIR)/cmake.mk
|
||||
include $(DOBUILDDIR)/docker.mk
|
||||
include $(DOBUILDDIR)/standardrules.mk
|
||||
|
||||
$(FETCH_TARGETS): | $(FETCHDIR)
|
||||
$(SILENT)$(call curl,$@,$(URL),$(MD5))
|
||||
|
||||
$(OUTDIR)/docker/%.dockerfile : $(PROJECTDIR)/build/%.dockerfile | $(OUTDIRS)
|
||||
cp $< $@
|
||||
|
||||
$(OUTDIR)/docker/qemu-arm-static-$(QEMU_VERSION) : $(FETCHDIR)/qemu-arm-static-$(QEMU_VERSION) | $(OUTDIRS)
|
||||
$(SILENT) \
|
||||
$(call echo_if_silent,cp $< $@) \
|
||||
$(call echo_if_silent_cmd,cp $< $@) \
|
||||
&& cp $< $@ \
|
||||
&& chmod +x $@
|
||||
|
||||
$(OUTDIR)/src/%: $(FETCHDIR)/%.tar.gz | $(OUTDIRS)
|
||||
$(SILENT) \
|
||||
$(call echo_if_silent,tar -C $(dir $@) -xf $<) \
|
||||
&& tar -C $(dir $@) -xf $< \
|
||||
$(call echo_if_silent_cmd,tar -C $(dir $@) -xf $<) \
|
||||
&& tar -I 'gzip -n' -C $(dir $@) -xf $< \
|
||||
&& touch $@
|
||||
|
||||
$(FETCHDIR):
|
||||
|
@ -1,7 +1,7 @@
|
||||
ARG REGISTRY_PREFIX=''
|
||||
ARG CODENAME=3.9
|
||||
ARG DISTRIB_VERSION=3.9
|
||||
|
||||
FROM ${REGISTRY_PREFIX}arm32v7/alpine:${CODENAME} as builder
|
||||
FROM ${REGISTRY_PREFIX}arm32v7/alpine:${DISTRIB_VERSION} as builder
|
||||
|
||||
ARG QEMU_VERSION_=v4.1.0-1
|
||||
|
||||
@ -103,16 +103,8 @@ ENV PKG_CONFIG_PATH=/usr/local/lib32/pkgconfig
|
||||
|
||||
ARG USERID=1000
|
||||
|
||||
ARG PROJECTDIR=/workspace/src
|
||||
ARG OUTDIR=/workspace/out
|
||||
ARG SCRIPTDIR=/workspace/bin
|
||||
|
||||
RUN set -x \
|
||||
&& adduser -u "$USERID" -s /bin/bash -D user \
|
||||
&& mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \
|
||||
&& chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR"
|
||||
|
||||
WORKDIR "$OUTDIR"
|
||||
&& adduser -u "$USERID" -s /bin/bash -D user
|
||||
|
||||
ENTRYPOINT ["dumb-init", "--"]
|
||||
|
||||
CMD [ "/bin/bash" ]
|
||||
|
@ -1,7 +1,7 @@
|
||||
ARG REGISTRY_PREFIX=''
|
||||
ARG CODENAME=bionic
|
||||
ARG DISTRIB_VERSION=bionic
|
||||
|
||||
FROM ${REGISTRY_PREFIX}arm32v7/ubuntu:${CODENAME} as builder
|
||||
FROM ${REGISTRY_PREFIX}arm32v7/ubuntu:${DISTRIB_VERSION} as builder
|
||||
|
||||
ARG QEMU_VERSION_=v4.1.0-1
|
||||
|
||||
@ -96,16 +96,9 @@ ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
||||
|
||||
ARG USERID=1000
|
||||
|
||||
ARG PROJECTDIR=/workspace/src
|
||||
ARG OUTDIR=/workspace/out
|
||||
ARG SCRIPTDIR=/workspace/bin
|
||||
|
||||
RUN set -x \
|
||||
&& useradd -u "$USERID" -ms /bin/bash user \
|
||||
&& mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \
|
||||
&& chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR"
|
||||
|
||||
WORKDIR "$OUTDIR"
|
||||
&& useradd -u "$USERID" -ms /bin/bash user
|
||||
|
||||
ENTRYPOINT ["dumb-init", "--"]
|
||||
CMD [ "/bin/bash" ]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
ARG REGISTRY_PREFIX=''
|
||||
ARG CODENAME=3.9
|
||||
ARG DISTRIB_VERSION=3.9
|
||||
|
||||
FROM ${REGISTRY_PREFIX}alpine:${CODENAME} as builder
|
||||
FROM ${REGISTRY_PREFIX}alpine:${DISTRIB_VERSION} as builder
|
||||
|
||||
RUN set -x \
|
||||
&& apk add --no-cache \
|
||||
@ -99,15 +99,8 @@ ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig
|
||||
|
||||
ARG USERID=1000
|
||||
|
||||
ARG PROJECTDIR=/workspace/src
|
||||
ARG OUTDIR=/workspace/out
|
||||
ARG SCRIPTDIR=/workspace/bin
|
||||
|
||||
RUN set -x \
|
||||
&& adduser -u "$USERID" -s /bin/bash -D user \
|
||||
&& mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \
|
||||
&& chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR"
|
||||
|
||||
WORKDIR "$OUTDIR"
|
||||
&& adduser -u "$USERID" -s /bin/bash -D user
|
||||
|
||||
ENTRYPOINT ["dumb-init", "--"]
|
||||
CMD [ "/bin/bash" ]
|
@ -1,7 +1,7 @@
|
||||
ARG REGISTRY_PREFIX=''
|
||||
ARG CODENAME=bionic
|
||||
ARG DISTRIB_VERSION=bionic
|
||||
|
||||
FROM ${REGISTRY_PREFIX}ubuntu:${CODENAME} as builder
|
||||
FROM ${REGISTRY_PREFIX}ubuntu:${DISTRIB_VERSION} as builder
|
||||
|
||||
RUN set -x \
|
||||
&& apt update \
|
||||
@ -93,15 +93,9 @@ ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
|
||||
|
||||
ARG USERID=1000
|
||||
|
||||
ARG PROJECTDIR=/workspace/src
|
||||
ARG OUTDIR=/workspace/out
|
||||
ARG SCRIPTDIR=/workspace/bin
|
||||
|
||||
RUN set -x \
|
||||
&& useradd -u "$USERID" -ms /bin/bash user \
|
||||
&& mkdir -p "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR" \
|
||||
&& chown user:user "$PROJECTDIR" "$OUTDIR" "$SCRIPTDIR"
|
||||
|
||||
WORKDIR "$OUTDIR"
|
||||
&& useradd -u "$USERID" -ms /bin/bash user
|
||||
|
||||
ENTRYPOINT ["dumb-init", "--"]
|
||||
CMD [ "/bin/bash" ]
|
||||
|
Loading…
Reference in New Issue
Block a user