|
|
@ -1,16 +1,16 @@
|
|
|
|
From 72d9afecc6da319e1d59170f07a7b78afbbb1a68 Mon Sep 17 00:00:00 2001
|
|
|
|
From 643bf0d32982b67854a39586244b25f54518de02 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
|
From: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
|
Date: Sat, 9 Mar 2019 22:04:49 +0100
|
|
|
|
Date: Sat, 9 Mar 2019 22:04:49 +0100
|
|
|
|
Subject: [PATCH 19/19] Do not pull optional dependencies
|
|
|
|
Subject: [PATCH 19/19] Do not pull optional dependencies
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
|
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
|
|
|
|
---
|
|
|
|
---
|
|
|
|
data/macros.cargo | 13 +++++++++++--
|
|
|
|
data/macros.cargo | 20 +++++++++++---------
|
|
|
|
rust2rpm/templates/main.spec | 5 -----
|
|
|
|
rust2rpm/templates/main.spec | 5 -----
|
|
|
|
2 files changed, 11 insertions(+), 7 deletions(-)
|
|
|
|
2 files changed, 11 insertions(+), 14 deletions(-)
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/data/macros.cargo b/data/macros.cargo
|
|
|
|
diff --git a/data/macros.cargo b/data/macros.cargo
|
|
|
|
index 96dc354..b1a2e0b 100644
|
|
|
|
index 96dc354..f950e79 100644
|
|
|
|
--- a/data/macros.cargo
|
|
|
|
--- a/data/macros.cargo
|
|
|
|
+++ b/data/macros.cargo
|
|
|
|
+++ b/data/macros.cargo
|
|
|
|
@@ -2,8 +2,10 @@
|
|
|
|
@@ -2,8 +2,10 @@
|
|
|
@ -26,7 +26,18 @@ index 96dc354..b1a2e0b 100644
|
|
|
|
%__cargo_inspector %{_bindir}/cargo-inspector
|
|
|
|
%__cargo_inspector %{_bindir}/cargo-inspector
|
|
|
|
|
|
|
|
|
|
|
|
%cargo_registry %{_datadir}/cargo/registry
|
|
|
|
%cargo_registry %{_datadir}/cargo/registry
|
|
|
|
@@ -74,10 +76,17 @@ if %__cargo_is_lib; then \
|
|
|
|
@@ -36,10 +38,6 @@ registry = "https://crates.io"\
|
|
|
|
|
|
|
|
replace-with = "local-registry"\
|
|
|
|
|
|
|
|
EOF\
|
|
|
|
|
|
|
|
%{__rm} -f Cargo.lock \
|
|
|
|
|
|
|
|
-%if ! %{with check} \
|
|
|
|
|
|
|
|
-# https://github.com/rust-lang/cargo/issues/3732 \
|
|
|
|
|
|
|
|
-%{__awk} -i inplace -v INPLACE_SUFFIX=.orig '/^\\\[dev-dependencies/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \
|
|
|
|
|
|
|
|
-%endif \
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%__cargo_parse_opts(naf:) %{shrink:\
|
|
|
|
|
|
|
|
@@ -74,10 +72,14 @@ if %__cargo_is_lib; then \
|
|
|
|
CRATE_VERSION=$(%__cargo_inspector --version Cargo.toml) \
|
|
|
|
CRATE_VERSION=$(%__cargo_inspector --version Cargo.toml) \
|
|
|
|
REG_DIR=%{buildroot}%{cargo_registry}/$CRATE_NAME-$CRATE_VERSION \
|
|
|
|
REG_DIR=%{buildroot}%{cargo_registry}/$CRATE_NAME-$CRATE_VERSION \
|
|
|
|
%{__mkdir} -p $REG_DIR \
|
|
|
|
%{__mkdir} -p $REG_DIR \
|
|
|
@ -35,12 +46,12 @@ index 96dc354..b1a2e0b 100644
|
|
|
|
+# https://github.com/rust-lang/cargo/pull/6729 \
|
|
|
|
+# https://github.com/rust-lang/cargo/pull/6729 \
|
|
|
|
+ %{__awk} -i inplace -v INPLACE_SUFFIX=.deps '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \
|
|
|
|
+ %{__awk} -i inplace -v INPLACE_SUFFIX=.deps '/^\\\[((.+\\\.)?((dev|build)-)?dependencies|features)/{f=1;next} /^\\\[/{f=0}; !f' Cargo.toml \
|
|
|
|
%{__cargo} package -l | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \
|
|
|
|
%{__cargo} package -l | xargs -d '\\\n' %{__cp} --parents -a -t $REG_DIR \
|
|
|
|
%if ! %{with check} \
|
|
|
|
-%if ! %{with check} \
|
|
|
|
%{__cp} -a Cargo.toml.orig $REG_DIR/Cargo.toml \
|
|
|
|
- %{__cp} -a Cargo.toml.orig $REG_DIR/Cargo.toml \
|
|
|
|
+%else \
|
|
|
|
-%endif \
|
|
|
|
+ %{__cp} -a Cargo.toml.deps $REG_DIR/Cargo.toml \
|
|
|
|
+ %{__mv} Cargo.toml{.deps,} \
|
|
|
|
%endif \
|
|
|
|
+ %{__mv} $REG_DIR/Cargo.toml{.deps,} \
|
|
|
|
+ %{__rm} -f $REG_DIR/Cargo.toml.{orig,deps} \
|
|
|
|
+ %{__rm} -f $REG_DIR/Cargo.toml.orig \
|
|
|
|
echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \
|
|
|
|
echo '{"files":{},"package":""}' > $REG_DIR/.cargo-checksum.json \
|
|
|
|
fi \
|
|
|
|
fi \
|
|
|
|
if %__cargo_is_bin; then \
|
|
|
|
if %__cargo_is_bin; then \
|
|
|
|