From 0f07cd7d241666b88b75fb887515a02c2d6767c8 Mon Sep 17 00:00:00 2001 From: Raboneko <119771935+raboneko@users.noreply.github.com> Date: Sat, 13 Jul 2024 14:50:14 -0700 Subject: [PATCH] fix: sccache (#1350) (#1524) (cherry picked from commit eb9e0263c78c17aea7c3caa067d6b3ab654ca28e) Co-authored-by: madomado --- anda/apps/sccache/rust-sccache.spec | 187 ++++-------------- .../sccache/sccache-fix-metadata-auto.diff | 8 +- 2 files changed, 45 insertions(+), 150 deletions(-) diff --git a/anda/apps/sccache/rust-sccache.spec b/anda/apps/sccache/rust-sccache.spec index 3111ff65b7..23b76b4dd2 100644 --- a/anda/apps/sccache/rust-sccache.spec +++ b/anda/apps/sccache/rust-sccache.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_with check # aarch64 dist is not available %ifarch aarch64 @@ -14,7 +14,7 @@ Name: rust-sccache Version: 0.8.1 -Release: 1%?dist +Release: %autorelease Summary: Ccache-like tool License: Apache-2.0 @@ -89,17 +89,6 @@ use the "default" feature of the "%{crate}" crate. %package -n %{name}+all-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/all) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 -Requires: crate(sccache/azure) = 0.7.4 -Requires: crate(sccache/dist-client) = 0.7.4 -Requires: crate(sccache/gcs) = 0.7.4 -Requires: crate(sccache/gha) = 0.7.4 -Requires: crate(sccache/memcached) = 0.7.4 -Requires: crate(sccache/redis) = 0.7.4 -Requires: crate(sccache/s3) = 0.7.4 -Requires: crate(sccache/webdav) = 0.7.4 %description -n %{name}+all-devel %{_description} @@ -112,9 +101,6 @@ use the "all" feature of the "%{crate}" crate. %package -n %{name}+azure-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/azure) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+azure-devel %{_description} @@ -127,9 +113,6 @@ use the "azure" feature of the "%{crate}" crate. %package -n %{name}+dist-client-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/dist-client) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+dist-client-devel %{_description} @@ -138,13 +121,10 @@ use the "dist-client" feature of the "%{crate}" crate. %files -n %{name}+dist-client-devel %ghost %{crate_instdir}/Cargo.toml -%if %{with dist_server} + %package -n %{name}+dist-server-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/dist-server) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+dist-server-devel %{_description} @@ -157,11 +137,6 @@ use the "dist-server" feature of the "%{crate}" crate. %package -n %{name}+dist-tests-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/dist-tests) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 -Requires: crate(sccache/dist-client) = 0.7.4 -Requires: crate(sccache/dist-server) = 0.7.4 %description -n %{name}+dist-tests-devel %{_description} @@ -170,15 +145,10 @@ use the "dist-tests" feature of the "%{crate}" crate. %files -n %{name}+dist-tests-devel %ghost %{crate_instdir}/Cargo.toml -%endif + %package -n %{name}+flate2-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/flate2) = 0.7.4 -Requires: (crate(flate2) >= 1.0.0 with crate(flate2) < 2.0.0~) -Requires: (crate(flate2/rust_backend) >= 1.0.0 with crate(flate2/rust_backend) < 2.0.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+flate2-devel %{_description} @@ -191,9 +161,6 @@ use the "flate2" feature of the "%{crate}" crate. %package -n %{name}+gcs-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/gcs) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+gcs-devel %{_description} @@ -206,10 +173,6 @@ use the "gcs" feature of the "%{crate}" crate. %package -n %{name}+gha-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/gha) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 -Requires: crate(sccache/opendal) = 0.7.4 %description -n %{name}+gha-devel %{_description} @@ -219,14 +182,21 @@ use the "gha" feature of the "%{crate}" crate. %files -n %{name}+gha-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+http-body-util-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+http-body-util-devel %{_description} + +This package contains library source intended for building other packages which +use the "http-body-util" feature of the "%{crate}" crate. + +%files -n %{name}+http-body-util-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+hyper-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/hyper) = 0.7.4 -Requires: (crate(hyper/default) >= 0.14.27 with crate(hyper/default) < 0.15.0~) -Requires: (crate(hyper/server) >= 0.14.27 with crate(hyper/server) < 0.15.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+hyper-devel %{_description} @@ -236,13 +206,21 @@ use the "hyper" feature of the "%{crate}" crate. %files -n %{name}+hyper-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+hyper-util-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+hyper-util-devel %{_description} + +This package contains library source intended for building other packages which +use the "hyper-util" feature of the "%{crate}" crate. + +%files -n %{name}+hyper-util-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+jwt-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/jwt) = 0.7.4 -Requires: (crate(jsonwebtoken/default) >= 8.0.0 with crate(jsonwebtoken/default) < 9.0.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+jwt-devel %{_description} @@ -255,10 +233,6 @@ use the "jwt" feature of the "%{crate}" crate. %package -n %{name}+libmount-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/libmount) = 0.7.4 -Requires: (crate(libmount/default) >= 0.1.10 with crate(libmount/default) < 0.2.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+libmount-devel %{_description} @@ -271,11 +245,6 @@ use the "libmount" feature of the "%{crate}" crate. %package -n %{name}+memcached-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/memcached) = 0.7.4 -Requires: (crate(opendal/default) >= 0.40.0 with crate(opendal/default) < 0.41.0~) -Requires: (crate(opendal/services-memcached) >= 0.40.0 with crate(opendal/services-memcached) < 0.41.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+memcached-devel %{_description} @@ -288,9 +257,6 @@ use the "memcached" feature of the "%{crate}" crate. %package -n %{name}+native-zlib-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/native-zlib) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+native-zlib-devel %{_description} @@ -303,10 +269,6 @@ use the "native-zlib" feature of the "%{crate}" crate. %package -n %{name}+nix-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/nix) = 0.7.4 -Requires: (crate(nix/default) >= 0.26.2 with crate(nix/default) < 0.27.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+nix-devel %{_description} @@ -319,10 +281,6 @@ use the "nix" feature of the "%{crate}" crate. %package -n %{name}+opendal-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/opendal) = 0.7.4 -Requires: (crate(opendal/default) >= 0.40.0 with crate(opendal/default) < 0.41.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+opendal-devel %{_description} @@ -335,10 +293,6 @@ use the "opendal" feature of the "%{crate}" crate. %package -n %{name}+openssl-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/openssl) = 0.7.4 -Requires: (crate(openssl/default) >= 0.10.55 with crate(openssl/default) < 0.11.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+openssl-devel %{_description} @@ -348,16 +302,21 @@ use the "openssl" feature of the "%{crate}" crate. %files -n %{name}+openssl-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+oss-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+oss-devel %{_description} + +This package contains library source intended for building other packages which +use the "oss" feature of the "%{crate}" crate. + +%files -n %{name}+oss-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+redis-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/redis) = 0.7.4 -Requires: (crate(opendal/default) >= 0.40.0 with crate(opendal/default) < 0.41.0~) -Requires: (crate(opendal/services-redis) >= 0.40.0 with crate(opendal/services-redis) < 0.41.0~) -Requires: (crate(opendal/services-redis-rustls) >= 0.40.0 with crate(opendal/services-redis-rustls) < 0.41.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 -Requires: crate(sccache/url) = 0.7.4 %description -n %{name}+redis-devel %{_description} @@ -370,10 +329,6 @@ use the "redis" feature of the "%{crate}" crate. %package -n %{name}+reqsign-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/reqsign) = 0.7.4 -Requires: (crate(reqsign/default) >= 0.14.1 with crate(reqsign/default) < 0.15.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+reqsign-devel %{_description} @@ -386,15 +341,6 @@ use the "reqsign" feature of the "%{crate}" crate. %package -n %{name}+reqwest-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/reqwest) = 0.7.4 -Requires: (crate(reqwest/blocking) >= 0.11.0 with crate(reqwest/blocking) < 0.12.0~) -Requires: (crate(reqwest/default) >= 0.11.0 with crate(reqwest/default) < 0.12.0~) -Requires: (crate(reqwest/json) >= 0.11.0 with crate(reqwest/json) < 0.12.0~) -Requires: (crate(reqwest/rustls-tls) >= 0.11.0 with crate(reqwest/rustls-tls) < 0.12.0~) -Requires: (crate(reqwest/stream) >= 0.11.0 with crate(reqwest/stream) < 0.12.0~) -Requires: (crate(reqwest/trust-dns) >= 0.11.0 with crate(reqwest/trust-dns) < 0.12.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+reqwest-devel %{_description} @@ -407,11 +353,6 @@ use the "reqwest" feature of the "%{crate}" crate. %package -n %{name}+rouille-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/rouille) = 0.7.4 -Requires: (crate(rouille) >= 3.6.0 with crate(rouille) < 4.0.0~) -Requires: (crate(rouille/ssl) >= 3.6.0 with crate(rouille/ssl) < 4.0.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+rouille-devel %{_description} @@ -424,11 +365,6 @@ use the "rouille" feature of the "%{crate}" crate. %package -n %{name}+s3-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/s3) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 -Requires: crate(sccache/opendal) = 0.7.4 -Requires: crate(sccache/reqsign) = 0.7.4 %description -n %{name}+s3-devel %{_description} @@ -441,10 +377,6 @@ use the "s3" feature of the "%{crate}" crate. %package -n %{name}+sha2-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/sha2) = 0.7.4 -Requires: (crate(sha2/default) >= 0.10.6 with crate(sha2/default) < 0.11.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+sha2-devel %{_description} @@ -457,10 +389,6 @@ use the "sha2" feature of the "%{crate}" crate. %package -n %{name}+syslog-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/syslog) = 0.7.4 -Requires: (crate(syslog/default) >= 6.0.0 with crate(syslog/default) < 7.0.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+syslog-devel %{_description} @@ -470,29 +398,9 @@ use the "syslog" feature of the "%{crate}" crate. %files -n %{name}+syslog-devel %ghost %{crate_instdir}/Cargo.toml -%{dnl ## BEGIN: multiline comment -%package -n %{name}+trust-dns-resolver-devel -Summary: %{summary} -BuildArch: noarch -Provides: crate(sccache/trust-dns-resolver) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 - -%description -n %{name}+trust-dns-resolver-devel %{_description} - -This package contains library source intended for building other packages which -use the "trust-dns-resolver" feature of the "%{crate}" crate. - -%files -n %{name}+trust-dns-resolver-devel -%ghost %{crate_instdir}/Cargo.toml -} ## END OF multiline comment - %package -n %{name}+unstable-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/unstable) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+unstable-devel %{_description} @@ -505,10 +413,6 @@ use the "unstable" feature of the "%{crate}" crate. %package -n %{name}+url-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/url) = 0.7.4 -Requires: (crate(url/default) >= 2.0.0 with crate(url/default) < 3.0.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+url-devel %{_description} @@ -521,9 +425,6 @@ use the "url" feature of the "%{crate}" crate. %package -n %{name}+vendored-openssl-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/vendored-openssl) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+vendored-openssl-devel %{_description} @@ -536,10 +437,6 @@ use the "vendored-openssl" feature of the "%{crate}" crate. %package -n %{name}+version-compare-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/version-compare) = 0.7.4 -Requires: (crate(version-compare/default) >= 0.1.1 with crate(version-compare/default) < 0.2.0~) -Requires: cargo -Requires: crate(sccache) = 0.7.4 %description -n %{name}+version-compare-devel %{_description} @@ -552,10 +449,6 @@ use the "version-compare" feature of the "%{crate}" crate. %package -n %{name}+webdav-devel Summary: %{summary} BuildArch: noarch -Provides: crate(sccache/webdav) = 0.7.4 -Requires: cargo -Requires: crate(sccache) = 0.7.4 -Requires: crate(sccache/opendal) = 0.7.4 %description -n %{name}+webdav-devel %{_description} diff --git a/anda/apps/sccache/sccache-fix-metadata-auto.diff b/anda/apps/sccache/sccache-fix-metadata-auto.diff index 180e3bf4f9..f5e1e6d2aa 100644 --- a/anda/apps/sccache/sccache-fix-metadata-auto.diff +++ b/anda/apps/sccache/sccache-fix-metadata-auto.diff @@ -1,6 +1,6 @@ ---- sccache-0.7.6/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ sccache-0.7.6/Cargo.toml 2024-02-02T06:05:53.548100+00:00 -@@ -378,11 +378,3 @@ +--- sccache-0.8.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ sccache-0.8.1/Cargo.toml 2024-07-10T16:31:31.705674+00:00 +@@ -403,13 +403,3 @@ [target."cfg(unix)".dependencies.daemonize] version = "0.5" @@ -11,4 +11,6 @@ - "handleapi", - "stringapiset", - "winnls", +- "processenv", +- "std", -]