corrected spec for new vendor

This commit is contained in:
TheK0tYaRa 2026-02-20 23:58:32 +03:00
parent 0d53866096
commit 394ad265e4

View file

@ -4,7 +4,7 @@ Release: alt1
Summary: ZeroTier network virtualization service
License: ZeroTier BSL 1.1
License: BUSL-1.1
Group: Networking/Other
Url: https://www.zerotier.com
@ -39,37 +39,32 @@ like conventional VPNs or VLANs. It can run on native systems, VMs, or
containers (Docker, OpenVZ, etc.).
%prep
%setup -a1
mkdir -p zeroidc/.cargo
cat <<EOF >> zeroidc/.cargo/config
mkdir -p rustybits/.cargo
cat <<EOF >> rustybits/.cargo/config.toml
[source.crates-io]
replace-with = "vendored-sources"
[source."git+https://github.com/temporalio/sdk-core?branch=master"]
git = "https://github.com/temporalio/sdk-core"
branch = "master"
replace-with = "vendored-sources"
[source."git+https://github.com/glimberg/rust-jwt"]
git = "https://github.com/glimberg/rust-jwt.git"
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "../vendor"
directory = "$PWD/vendor"
[net]
offline = true
EOF
#==
cp -a vendor/time vendor/time-patched
perl -0777 -pi -e 's/let items = format_items\s*\n\s*\.map\(\|res\|\s*res\.map\(Into::into\)\)\s*\n\s*\.collect::<Result<Box<_>, _>>\(\)\?\s*;/let items = format_items.collect::<Result<Box<_>, _>>()?;/s' \
vendor/time-patched/src/format_description/parse/mod.rs
###
grep zeroidc/Cargo.toml 'time-patched' || cat >> zeroidc/Cargo.toml <<EOF
[patch.crates-io]
time = { path = "../vendor/time-patched" }
EOF
#==
%build
%make_build ZT_USE_MINIUPNPC=1 one
%make_build DEFS=" -Wno-unused-but-set-variable -Wno-nontrivial-memcall -Wno-format -Wno-unused-lambda-capture -Wno-array-parameter " ZT_USE_MINIUPNPC=1 one
%pre
%_bindir/getent passwd zerotier-one || %_sbindir/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one