mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
Merge branch 'edge' of http://git.int.zerotier.com/zerotier/ZeroTierOne into edge
This commit is contained in:
commit
53b85a2bbb
8 changed files with 31 additions and 38 deletions
|
@ -265,7 +265,7 @@ if(NOT PACKAGE_STATIC)
|
|||
zerotier ALL
|
||||
BYPRODUCTS ${CMAKE_BINARY_DIR}/zerotier
|
||||
SOURCES ${go_src}
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${GOARCH} ${GOARM} CGO_ENABLED=1 CGO_CFLAGS=\"-O3\" CGO_LDFLAGS=\"$<TARGET_FILE:zt_core> $<TARGET_FILE:zt_controller> $<TARGET_FILE:zt_service_io_core> $<TARGET_FILE:zt_osdep> ${GO_EXTRA_LIBRARIES}\" ${GO} build ${GOFLAGS} -o ${CMAKE_BINARY_DIR}/${GO_EXE_NAME} ${CMAKE_SOURCE_DIR}/cmd/zerotier/zerotier.go
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${GOARCH} ${GOARM} CGO_ENABLED=1 CGO_CFLAGS=\"-O3\" CGO_LDFLAGS=\"$<TARGET_FILE:zt_core> $<TARGET_FILE:zt_controller> $<TARGET_FILE:zt_service_io_core> $<TARGET_FILE:zt_osdep> ${GO_EXTRA_LIBRARIES}\" ${GO} build -mod=vendor ${GOFLAGS} -o ${CMAKE_BINARY_DIR}/${GO_EXE_NAME} ${CMAKE_SOURCE_DIR}/cmd/zerotier/zerotier.go
|
||||
COMMENT "Compiling Go Code..."
|
||||
)
|
||||
add_dependencies(zerotier zt_osdep zt_core zt_controller zt_service_io_core)
|
||||
|
|
48
Jenkinsfile
vendored
48
Jenkinsfile
vendored
|
@ -113,7 +113,7 @@ def buildStaticBinaries() {
|
|||
def dist = ["alpine"]
|
||||
def archs = []
|
||||
if (params.BUILD_ALL == true) {
|
||||
archs = ["arm64", "amd64", "i386", "armhf", "armel", "ppc64le", "s390x"]
|
||||
archs = ["arm64", "amd64", "i386", "armhf", "ppc64le", "s390x"]
|
||||
} else {
|
||||
archs = ["amd64", "i386"]
|
||||
}
|
||||
|
@ -132,8 +132,6 @@ def buildStaticBinaries() {
|
|||
def cmakeFlags = 'CMAKE_ARGS="-DBUILD_STATIC=1"'
|
||||
if (platform == "i386") {
|
||||
cmakeFlags = 'CMAKE_ARGS="-DBUILD_STATIC=1"'
|
||||
} else if (platform == "armel") {
|
||||
cmakeFlags = 'CMAKE_ARGS="-DBUILD_STATIC=1 -DBUILD_ARM_V5=1"'
|
||||
} else if (platform == "armhf") {
|
||||
cmakeFlags = 'CMAKE_ARGS="-DBUILD_STATIC=1 -DBUILD_ARM_V6=1"'
|
||||
}
|
||||
|
@ -200,7 +198,7 @@ def packageStatic() {
|
|||
})
|
||||
|
||||
if (params.BUILD_ALL == true) {
|
||||
def clefos7 = ["clefos"]
|
||||
def s390xStatics = ["clefos", "debian-buster", "debian-sid", "debian-bullseye", "debian-stretch", "ubuntu-bionic", "ubuntu-eoan", "ubuntu-focal"]
|
||||
def clefos7Arch = ["s390x"]
|
||||
tasks << getTasks(clefos7, clefos7Arch, { distro, arch ->
|
||||
def myNode = {
|
||||
|
@ -210,12 +208,16 @@ def packageStatic() {
|
|||
checkout scm
|
||||
}
|
||||
def runtime = docker.image("ztbuild/${distro}-${arch}:latest")
|
||||
def pkgFormat = "DEB"
|
||||
if (distro == "clefos") {
|
||||
pkgFormat = "RPM"
|
||||
}
|
||||
runtime.inside {
|
||||
dir("build/") {
|
||||
unstash "static-${arch}"
|
||||
sh "mkdir -p build"
|
||||
sh "mv zerotier-static-${arch} build/zerotier && chmod +x build/zerotier"
|
||||
sh 'CMAKE_ARGS="-DPACKAGE_STATIC=1 -DZT_PACKAGE_FORMAT=RPM" make setup'
|
||||
sh "CMAKE_ARGS=\"-DPACKAGE_STATIC=1 -DZT_PACKAGE_FORMAT=${pkgFormat}\" make setup"
|
||||
dir("build") {
|
||||
sh 'make package -j4 VERBOSE=1'
|
||||
}
|
||||
|
@ -234,7 +236,7 @@ def packageStatic() {
|
|||
def debianJessie = ["debian-jessie"]
|
||||
def debianJessieArchs = []
|
||||
if (params.BUILD_ALL == true) {
|
||||
debianJessieArch = ["armhf", "armel", "amd64", "i386"]
|
||||
debianJessieArch = ["armhf", "amd64", "i386"]
|
||||
} else {
|
||||
debianJessieArch = ["amd64", "i386"]
|
||||
}
|
||||
|
@ -278,7 +280,7 @@ def packageStatic() {
|
|||
def ubuntuTrusty = ["ubuntu-trusty"]
|
||||
def ubuntuTrustyArch = []
|
||||
if (params.BUILD_ALL == true) {
|
||||
ubuntuTrustyArch = ["i386", "amd64", "armhf", "arm64", "ppc64le"]
|
||||
ubuntuTrustyArch = ["i386", "amd64", "arm64", "ppc64le"]
|
||||
} else {
|
||||
ubuntuTrustyArch = ["i386", "amd64"]
|
||||
}
|
||||
|
@ -322,7 +324,7 @@ def packageStatic() {
|
|||
def debianWheezy = ["debian-wheezy"]
|
||||
def debianWheezyArchs = []
|
||||
if (params.BUILD_ALL == true) {
|
||||
debianWheezyArchs = ["armhf", "armel", "amd64", "i386"]
|
||||
debianWheezyArchs = ["armhf", "amd64", "i386"]
|
||||
} else {
|
||||
debianWheezyArchs = ["amd64", "i386"]
|
||||
}
|
||||
|
@ -367,12 +369,12 @@ def packageStatic() {
|
|||
|
||||
def buildDebianNative() {
|
||||
def tasks = [:]
|
||||
def buster = ["debian-buster" , "debian-stretch"]
|
||||
def busterArchs = []
|
||||
def debian = ["debian-buster" , "debian-stretch", "debian-sid", "debian-bullseye"]
|
||||
def debianArchs = []
|
||||
if (params.BUILD_ALL) {
|
||||
busterArchs = ["s390x", "ppc64le", "i386", "armhf", "armel", "arm64", "amd64"]
|
||||
debianArchs = ["ppc64le", "i386", "armhf", "armel", "arm64", "amd64"]
|
||||
} else {
|
||||
busterArchs = ["amd64", "i386"]
|
||||
debianArchs = ["amd64", "i386"]
|
||||
}
|
||||
|
||||
def build = { distro, arch ->
|
||||
|
@ -393,7 +395,6 @@ def buildDebianNative() {
|
|||
cmakeFlags = 'CMAKE_ARGS="-DZT_PACKAGE_FORMAT=DEB -DBUILD_ARM_V6=1"'
|
||||
}
|
||||
|
||||
sh 'whoami'
|
||||
dir("build") {
|
||||
sh "${cmakeFlags} make setup"
|
||||
dir("build") {
|
||||
|
@ -410,19 +411,8 @@ def buildDebianNative() {
|
|||
return myNode
|
||||
}
|
||||
|
||||
tasks << getTasks(buster, busterArchs, build)
|
||||
|
||||
// 32-bit arm and CMake don't get along right now on Sid/Bullseye
|
||||
def sid = ["debian-sid", "debian-bullseye"]
|
||||
def sidArchs = []
|
||||
if (params.BUILD_ALL) {
|
||||
busterArchs = ["s390x", "ppc64le", "i386", /*"armhf", "armel",*/ "arm64", "amd64", "mips64le"]
|
||||
} else {
|
||||
busterArchs = ["amd64", "i386"]
|
||||
}
|
||||
|
||||
tasks << getTasks(sid, sidArchs, build)
|
||||
|
||||
tasks << getTasks(debian, debianArchs, build)
|
||||
|
||||
// bash is broken when running under QEMU-s390x on Xenial
|
||||
def xenial = ["ubuntu-xenial"]
|
||||
def xenialArchs = []
|
||||
|
@ -431,12 +421,12 @@ def buildDebianNative() {
|
|||
} else {
|
||||
xenialArchs = ["i386", "amd64"]
|
||||
}
|
||||
//tasks << getTasks(xenial, xenialArchs, build)
|
||||
tasks << getTasks(xenial, xenialArchs, build)
|
||||
|
||||
def ubuntu = ["ubuntu-bionic", "ubuntu-eoan"]
|
||||
def ubuntuArchs = []
|
||||
if (params.BUILD_ALL == true) {
|
||||
ubuntuArchs = ["i386", "amd64", "armhf", "arm64", "ppc64le", "s390x"]
|
||||
ubuntuArchs = ["i386", "amd64", "armhf", "arm64", "ppc64le"]
|
||||
} else {
|
||||
ubuntuArchs = ["i386", "amd64"]
|
||||
}
|
||||
|
@ -445,7 +435,7 @@ def buildDebianNative() {
|
|||
def ubuntuFocal = ["ubuntu-focal"]
|
||||
def ubuntuFocalArchs = []
|
||||
if (params.BUILD_ALL == true) {
|
||||
ubuntuFocalArchs = ["amd64", "arm64", "ppc64le", "s390x"]
|
||||
ubuntuFocalArchs = ["amd64", "arm64", "ppc64le"]
|
||||
} else {
|
||||
ubuntuFocalArchs = ["amd64"]
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ RUN if test "$TARGETPLATFORM" = "linux/mips64le"; then \
|
|||
rm go.tar.gz; \
|
||||
fi;
|
||||
RUN if test "$TARGETPLATFORM" = "linux/arm/v6"; then \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.30.so /lib/ld-linux-armhf.so.3; \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.28.so /lib/ld-linux-armhf.so.3; \
|
||||
fi;
|
||||
|
||||
RUN groupadd -g 1000 jenkins-build && useradd -u 1000 -g 1000 jenkins-build
|
||||
|
|
|
@ -14,7 +14,7 @@ RUN curl -s -k $go_pkg_url -o go.tar.gz && \
|
|||
tar -C /usr/local -xzf go.tar.gz && \
|
||||
rm go.tar.gz
|
||||
RUN if test "$TARGETPLATFORM" = "linux/arm/v6"; then \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.30.so /lib/ld-linux-armhf.so.3; \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.19.so /lib/ld-linux-armhf.so.3; \
|
||||
fi;
|
||||
|
||||
RUN groupadd -g 1000 jenkins-build && useradd -u 1000 -g 1000 jenkins-build
|
||||
|
|
|
@ -20,7 +20,7 @@ WORKDIR /cmake-3.17.3
|
|||
RUN ./bootstrap && make -j8 && make install
|
||||
WORKDIR /
|
||||
RUN if test "$TARGETPLATFORM" = "linux/arm/v6"; then \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.30.so /lib/ld-linux-armhf.so.3; \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.24.so /lib/ld-linux-armhf.so.3; \
|
||||
fi;
|
||||
|
||||
RUN groupadd -g 1000 jenkins-build && useradd -u 1000 -g 1000 jenkins-build
|
||||
|
|
|
@ -18,7 +18,7 @@ RUN curl -s -k $go_pkg_url -o go.tar.gz && \
|
|||
tar -C /usr/local -xzf go.tar.gz && \
|
||||
rm go.tar.gz
|
||||
RUN if test "$TARGETPLATFORM" = "linux/arm/v6"; then \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.30.so /lib/ld-linux-armhf.so.3; \
|
||||
ln -s /lib/arm-linux-gnueabi/ld-2.13.so /lib/ld-linux-armhf.so.3; \
|
||||
fi;
|
||||
|
||||
RUN groupadd -g 1000 jenkins-build && useradd -u 1000 -g 1000 jenkins-build
|
||||
|
|
|
@ -8,7 +8,6 @@ alpine:
|
|||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-arm64.tar.gz" --platform linux/arm64 -f Dockerfile.alpine . -t ztbuild/alpine-arm64 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-386.tar.gz" --platform linux/386 -f Dockerfile.alpine . -t ztbuild/alpine-i386 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" --platform linux/amd64 -f Dockerfile.alpine . -t ztbuild/alpine-amd64 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.alpine . -t ztbuild/alpine-armel --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v7 -f Dockerfile.alpine . -t ztbuild/alpine-armhf --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-ppc64le.tar.gz" --platform linux/ppc64le -f Dockerfile.alpine . -t ztbuild/alpine-ppc64le --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-s390x.tar.gz" --platform linux/s390x -f Dockerfile.alpine . -t ztbuild/alpine-s390x --load
|
||||
|
@ -24,13 +23,11 @@ debian: debian-wheezy debian-jessie debian-buster debian-stretch debian-bullseye
|
|||
|
||||
debian-wheezy:
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" --platform linux/amd64 -f Dockerfile.debian-wheezy . -t ztbuild/debian-wheezy-amd64 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v7 -f Dockerfile.debian-wheezy . -t ztbuild/debian-wheezy-armhf --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.debian-wheezy . -t ztbuild/debian-wheezy-armel --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-386.tar.gz" --platform linux/386 -f Dockerfile.debian-wheezy . -t ztbuild/debian-wheezy-i386 --load
|
||||
|
||||
debian-jessie:
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" --platform linux/amd64 -f Dockerfile.debian-jessie . -t ztbuild/debian-jessie-amd64 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v7 -f Dockerfile.debian-jessie . -t ztbuild/debian-jessie-armhf --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.debian-jessie . -t ztbuild/debian-jessie-armel --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-386.tar.gz" --platform linux/386 -f Dockerfile.debian-jessie . -t ztbuild/debian-jessie-i386 --load
|
||||
|
||||
|
@ -146,3 +143,9 @@ x86:
|
|||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" --platform linux/amd64 -f Dockerfile.ubuntu-eoan . -t ztbuild/ubuntu-eoan-amd64 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-386.tar.gz" --platform linux/386 -f Dockerfile.ubuntu-eoan . -t ztbuild/ubuntu-eoan-i386 --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz" --platform linux/amd64 -f Dockerfile.kali-rolling . -t ztbuild/kali-rolling-amd64 --load
|
||||
|
||||
armel:
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.debian-buster . -t ztbuild/debian-buster-armel --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.debian-stretch . -t ztbuild/debian-stretch-armel --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.debian-bullseye . -t ztbuild/debian-bullseye-armel --load
|
||||
docker buildx build --build-arg go_pkg_url="https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz" --platform linux/arm/v6 -f Dockerfile.debian-sid . -t ztbuild/debian-sid-armel --load
|
||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -4,6 +4,6 @@ github.com/Microsoft/go-winio/pkg/guid
|
|||
# github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95
|
||||
github.com/hectane/go-acl
|
||||
github.com/hectane/go-acl/api
|
||||
# golang.org/x/sys v0.0.0-20200523222454-059865788121
|
||||
# golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980
|
||||
golang.org/x/sys/internal/unsafeheader
|
||||
golang.org/x/sys/windows
|
||||
|
|
Loading…
Add table
Reference in a new issue