From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AFF91158094 for ; Fri, 9 Sep 2022 09:15:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id F10B7E0837; Fri, 9 Sep 2022 09:15:51 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D25A0E0837 for ; Fri, 9 Sep 2022 09:15:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C507433BEB9 for ; Fri, 9 Sep 2022 09:15:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5E927D4 for ; Fri, 9 Sep 2022 09:15:49 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1662714445.55bcc464de70b4b6b695e292592dd47b6175d4ac.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/zerotier/, net-misc/zerotier/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/zerotier/Manifest net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch net-misc/zerotier/zerotier-1.10.1.ebuild X-VCS-Directories: net-misc/zerotier/ net-misc/zerotier/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 55bcc464de70b4b6b695e292592dd47b6175d4ac X-VCS-Branch: master Date: Fri, 9 Sep 2022 09:15:49 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4a96dacb-1920-439b-9868-fe330566f0d7 X-Archives-Hash: a2d00beb96bc1aa52bb6de376a43ad63 commit: 55bcc464de70b4b6b695e292592dd47b6175d4ac Author: Sam James gentoo org> AuthorDate: Fri Sep 9 09:07:25 2022 +0000 Commit: Sam James gentoo org> CommitDate: Fri Sep 9 09:07:25 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=55bcc464 net-misc/zerotier: add 1.10.1 Closes: https://bugs.gentoo.org/856013 Closes: https://bugs.gentoo.org/786669 Bug: https://bugs.gentoo.org/718648 Signed-off-by: Sam James gentoo.org> net-misc/zerotier/Manifest | 1 + .../files/zerotier-1.10.1-add-armv7a-support.patch | 14 +++++ .../files/zerotier-1.10.1-respect-ldflags.patch | 11 ++++ net-misc/zerotier/zerotier-1.10.1.ebuild | 67 ++++++++++++++++++++++ 4 files changed, 93 insertions(+) diff --git a/net-misc/zerotier/Manifest b/net-misc/zerotier/Manifest index e825f666e9d7..f27d27bd9192 100644 --- a/net-misc/zerotier/Manifest +++ b/net-misc/zerotier/Manifest @@ -1 +1,2 @@ +DIST zerotier-1.10.1.tar.gz 84019609 BLAKE2B 317177c3f64818a78aed3f24e0d5fa8f164bb3778fcf123f222983b784aa8ed4a5bfd842857b3da7bca39e09e74a99b88c541921f2d1ed7633282cc9bae19bd2 SHA512 6a4c9c30b4aad389a60bd72b154f2a0c34303925a5c0efb815b4651db0db5e7b79740b5cfc4f2825bda7c158d374fff277b2f5ba57cd2cf5c740168198e7bbbd DIST zerotier-1.6.4.tar.gz 16021448 BLAKE2B b45219c2e54f3e789fb970fc8cd9d26ce6175c9737f02838efd11c07223ca49c10480935319292e609cb24bef46aaf7f5eebc8335e84af642d25e87ea5a8e163 SHA512 b1cd96cdc76cfd7929016382bc4a373a88d468010134cd65efbe32fc23e1cb56e0306f84ae10b3ad6d65e7a3fa6aebe79ec6c019840123f770bbc6fe2152723c diff --git a/net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch b/net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch new file mode 100644 index 000000000000..c0dd5e900269 --- /dev/null +++ b/net-misc/zerotier/files/zerotier-1.10.1-add-armv7a-support.patch @@ -0,0 +1,14 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -203,6 +203,11 @@ ifeq ($(CC_MACH),armv7) + override DEFS+=-DZT_NO_TYPE_PUNNING + ZT_USE_ARM32_NEON_ASM_CRYPTO=1 + endif ++ifeq ($(CC_MACH),armv7a) ++ ZT_ARCHITECTURE=3 ++ override DEFS+=-DZT_NO_TYPE_PUNNING ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++endif + ifeq ($(CC_MACH),armv7l) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING diff --git a/net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch b/net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch new file mode 100644 index 000000000000..41a42197c17d --- /dev/null +++ b/net-misc/zerotier/files/zerotier-1.10.1-respect-ldflags.patch @@ -0,0 +1,11 @@ +--- a/make-linux.mk ++++ b/make-linux.mk +@@ -70,7 +70,7 @@ else + override CFLAGS+=-Wall -Wno-deprecated -pthread $(INCLUDES) -DNDEBUG $(DEFS) + CXXFLAGS?=-O3 -fstack-protector + override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS) +- LDFLAGS=-pie -Wl,-z,relro,-z,now ++ LDFLAGS?=-pie -Wl,-z,relro,-z,now + RUSTFLAGS=--release + endif + diff --git a/net-misc/zerotier/zerotier-1.10.1.ebuild b/net-misc/zerotier/zerotier-1.10.1.ebuild new file mode 100644 index 000000000000..fff14d007687 --- /dev/null +++ b/net-misc/zerotier/zerotier-1.10.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic systemd toolchain-funcs + +DESCRIPTION="A software-based managed Ethernet switch for planet Earth" +HOMEPAGE="https://www.zerotier.com/" +SRC_URI="https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}"/ZeroTierOne-${PV} + +LICENSE="BSL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" +IUSE="cpu_flags_arm_neon" + +RDEPEND=" + dev-libs/json-glib + net-libs/libnatpmp + >=net-libs/miniupnpc-2:= +" +DEPEND="${RDEPEND}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.10.1-respect-ldflags.patch + "${FILESDIR}"/${PN}-1.10.1-add-armv7a-support.patch +) + +DOCS=( README.md AUTHORS.md ) + +src_configure() { + tc-export CXX CC + + append-ldflags -Wl,-z,noexecstack + + use cpu_flags_arm_neon || export ZT_DISABLE_NEON=1 +} + +src_compile() { + myemakeargs=( + CXX="${CXX}" + STRIP=: + + # Needs Rust and fails to build as of 1.10.1 + ZT_SSO_SUPPORTED=0 + ) + + emake "${myemakeargs[@]}" one +} + +src_test() { + emake "${myemakeargs[@]}" selftest + ./zerotier-selftest || die +} + +src_install() { + default + + # Remove pre-zipped man pages + rm "${ED}"/usr/share/man/{man1,man8}/* || die + + newinitd "${FILESDIR}/${PN}".init-r1 "${PN}" + systemd_dounit "${FILESDIR}/${PN}".service + + doman doc/zerotier-{cli.1,idtool.1,one.8} +}