commit 3f874c9d47768bd36d91791cd2a01e491bbd16af
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Apr 19 13:01:20 2024 +0100
Revert "Update to 1.4.0"
This reverts commit 57ae86d43d32acbbeb0731af57aa79e196ebca80.
sources | 3 +-
zerotier-one.spec | 58 +++++++++++++++++++++++++--------------
zerotier-use-vendor-archive.patch | 17 ++++++++++++
3 files changed, 57 insertions(+), 21 deletions(-)
---
diff --git a/sources b/sources
index cb8daf8..8e117ce 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-SHA512 (zerotier-one-1.4.0.tar.gz) =
ff6e8afb5cbac1f0a89d4b34c2b388b394595f8eec7b4a5e4424825ebc158e99a7d2776c04ef58af284480e7c95b2dd8b5fc90a5a0b85336727904750e8ad791
+SHA512 (zerotier-one-1.12.2.tar.gz) =
75a698dc3755f18a9a8909a231f6d9667edfeb3140e3e4925ebe2e01d2172bd1ac8d1498439e0e9959343a4258bc7f3862d8e6a6eb4f03ebc77e02ef7c074e73
+SHA512 (vendor-1.12.2.tar.xz) =
359d86b532d1fb25edbf9a6d0a58f56b15c10aa0ea5c9f2d17b1f093cec87a07092fb92321bb0ed967011415d161e458117511e4c7f4f83e5d718253c8a91618
diff --git a/zerotier-one.spec b/zerotier-one.spec
index 7a13e1d..4928279 100644
--- a/zerotier-one.spec
+++ b/zerotier-one.spec
@@ -5,16 +5,15 @@
%endif
Name: zerotier-one
-Version: 1.4.0
-Release: 1%{?dist}
+Version: 1.12.2
+Release: 3%{?dist}
Summary: Smart Ethernet Switch for Earth
+# Boost: README.md
#
-# GPLv3+: attic/
-# controller/
+# ASL: controller/
# debian/copyright
# include/
-# java/
# node/
# one.cpp
# osdep/
@@ -22,35 +21,43 @@ Summary: Smart Ethernet Switch for Earth
# selftest.cpp
# service/
# version.h
-# COPYING
-# LICENSE.txt
-# README.md
+#
+# ASL 2.0: LICENSE.txt
#
# BSD: ext/libnatpmp/
# ext/miniupnpc/
#
+# Boost: COPYING
#
# MIT ext/cpp-httplib/
# ext/http-parser/
# ext/json/LICENSE.MIT
# ext/librabbitmq/
#
+# GPLv3+: attic/
+# ext/libnatpmp/
+# java/
-License: BSD and GPLv3+ and MIT
+License: BSL and Boost and ASL and ASL 2.0 and MIT
URL:
https://zerotier.com
Source0:
https://github.com/zerotier/ZeroTierOne/archive/%{version}/%{name}-%{vers...
-Source1: zerotier-one-sysusers
+# make with command: 'cd zeroidc && cargo vendor' and tar.xz vendor
directory
+Source1: vendor-%{version}.tar.xz
+Source2: zerotier-one-sysusers
+
+# for use vendor directory for build
+Patch0: zerotier-use-vendor-archive.patch
+BuildRequires: cargo
BuildRequires: clang
-BuildRequires: libnatpmp-devel
-BuildRequires: miniupnpc-devel
+BuildRequires: openssl-devel openssl
BuildRequires: systemd-rpm-macros
Provides: bundled(http-parser)
Provides: bundled(json) = 3.10.2
Provides: bundled(salsa2012)
-Requires: iproute
+Requires: openssl
Requires: /sbin/nologin
%{?systemd_requires}
%{?sysusers_requires_compat}
@@ -82,16 +89,30 @@ the original Google BeyondCorp paper and the Jericho Forum with its
notion of
# rm -rf ext/http-parser
# rm -rf ext/json
+sed \
+ -e 's/RUSTFLAGS=/RUSTFLAGS?=/' \
+ -e 's/cargo build $(RUSTFLAGS)/cargo build --release/' \
+ -i make-linux.mk
+
+
+pushd zeroidc
+tar -xf %{SOURCE1}
+popd
+
%build
-%make_build STRIP=%{_bindir}/true
+%make_build \
+ ZT_USE_MINIUPNPC=1 \
+ STRIP=%{_bindir}/true \
+ one
+
%install
%make_install
install -D -m0644 debian/%{name}.service %{buildroot}%{_unitdir}/%{name}.service
-install -D -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
+install -D -m0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/%{name}.conf
%pre
-%sysusers_create_compat %{SOURCE1}
+%sysusers_create_compat %{SOURCE2}
%post
%systemd_post %{name}.service
@@ -104,7 +125,7 @@ install -D -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
%files
-%license COPYING LICENSE.GPL-2 LICENSE.GPL-3 LICENSE.txt
+%license COPYING
%doc AUTHORS.md README.md RELEASE-NOTES.md OFFICIAL-RELEASE-STEPS.md
%{_mandir}/man{1,8}/*.{1,8}*
%{_sbindir}/zerotier-*
@@ -114,9 +135,6 @@ install -D -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf
%changelog
-* Fri Apr 19 2024 Leigh Scott <leigh123linux(a)gmail.com> - 1.4.0-1
-- Update to 1.4.0
-
* Sun Apr 07 2024 Leigh Scott <leigh123linux(a)gmail.com> - 1.12.2-3
- Rebuild against standard openssl
diff --git a/zerotier-use-vendor-archive.patch b/zerotier-use-vendor-archive.patch
new file mode 100644
index 0000000..ae2794d
--- /dev/null
+++ b/zerotier-use-vendor-archive.patch
@@ -0,0 +1,17 @@
+--- a/zeroidc/.cargo/config.toml
++++ b/zeroidc/.cargo/config.toml
+@@ -9,3 +9,14 @@ rustflags = ["-C", "target-feature=+crt-
+
+ [target.i686-pc-windows-msvc]
+ rustflags = ["-C", "target-feature=+crt-static"]
++
++[source.crates-io]
++replace-with = "vendored-sources"
++
++[source."git+https://github.com/glimberg/rust-jwt"]
++git = "https://github.com/glimberg/rust-jwt"
++replace-with = "vendored-sources"
++
++[source.vendored-sources]
++directory = "vendor"
++