forked from pool/sccache
Accepting request 965122 from home:firstyear:branches:devel:languages:rust
- 0001-Ignore-some-env-vars.patch - sccache will ignore rebuilds if env vars change. As a result, we need to filter a number of values that rpm/osc-build injects that change frequently that disrupts the ability for sccache to cache effectively. OBS-URL: https://build.opensuse.org/request/show/965122 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/sccache?expand=0&rev=14
This commit is contained in:
parent
b65b902463
commit
e4233a3973
37
0001-Ignore-some-env-vars.patch
Normal file
37
0001-Ignore-some-env-vars.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From b1af4f10aa3ec94b2f16d092cfd9f0025a1c5f58 Mon Sep 17 00:00:00 2001
|
||||
From: William Brown <william@blackhats.net.au>
|
||||
Date: Sun, 27 Mar 2022 11:19:09 +1000
|
||||
Subject: [PATCH] Ignore some env vars
|
||||
|
||||
---
|
||||
src/cmdline.rs | 14 +++++++++++++-
|
||||
1 file changed, 13 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cmdline.rs b/src/cmdline.rs
|
||||
index 13773c7..bd89cb3 100644
|
||||
--- a/src/cmdline.rs
|
||||
+++ b/src/cmdline.rs
|
||||
@@ -208,7 +208,19 @@ pub fn parse() -> Result<Command> {
|
||||
//
|
||||
// FIXME: Maybe we should strip out `LD_PRELOAD` always?
|
||||
if env::var_os("RUNNING_UNDER_RR").is_some() {
|
||||
- env_vars.retain(|(k, _v)| k != "LD_PRELOAD" && k != "RUNNING_UNDER_RR");
|
||||
+ env_vars.retain(|(k, _v)|
|
||||
+ k != "LD_PRELOAD" &&
|
||||
+ k != "RUNNING_UNDER_RR" &&
|
||||
+ k != "HOSTNAME" &&
|
||||
+ k != "PWD" &&
|
||||
+ k != "HOST" &&
|
||||
+ k != "RPM_BUILD_ROOT" &&
|
||||
+ k != "SOURCE_DATE_EPOCH" &&
|
||||
+ k != "RPM_PACKAGE_RELEASE" &&
|
||||
+ k != "MINICOM" &&
|
||||
+ k != "DESTDIR" &&
|
||||
+ k != "RPM_PACKAGE_VERSION"
|
||||
+ );
|
||||
}
|
||||
|
||||
Ok(Command::Compile {
|
||||
--
|
||||
2.32.0 (Apple Git-132)
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 27 01:25:36 UTC 2022 - William Brown <william.brown@suse.com>
|
||||
|
||||
- 0001-Ignore-some-env-vars.patch - sccache will ignore rebuilds if
|
||||
env vars change. As a result, we need to filter a number of values
|
||||
that rpm/osc-build injects that change frequently that disrupts
|
||||
the ability for sccache to cache effectively.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 25 05:23:56 UTC 2022 - William Brown <william.brown@suse.com>
|
||||
|
||||
|
@ -33,6 +33,7 @@ Source11: sccache-dist-scheduler.service
|
||||
Source12: builder.conf
|
||||
Source13: scheduler.conf
|
||||
Source14: client.example
|
||||
Patch1: 0001-Ignore-some-env-vars.patch
|
||||
BuildRequires: cargo-packaging
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
Requires: bubblewrap
|
||||
@ -46,6 +47,8 @@ the Google Cloud Storage (GCS) API.
|
||||
%prep
|
||||
%setup -q
|
||||
%setup -qa1
|
||||
%patch1 -p1
|
||||
|
||||
mkdir .cargo
|
||||
cp %{SOURCE2} .cargo/config
|
||||
# Remove exec bits to prevent an issue in fedora shebang checking
|
||||
|
Loading…
Reference in New Issue
Block a user