- Update to version 0.9.0~13:
* Add experimental concurrent cache support * chore: replace is-terminal with standard library (#2311) * prepare release 0.9.1 * Add support for caching target json specs for Rust compilation. (#2269) * Don't use CARGO_REGISTRIES_* configuration in hash keys (#2308) * fix: bring "cargo build -Zprofile" support back (#2306) * deps: Update cc * add test for #2299 * fix test_rlib_dep_reader_call failure when $CARGO_HOME isn't in the user's $HOME * Never cache the outer CUDA compilation (because `nvcc -E` can't be trusted). Always decompose via `nvcc --dryrun`, then cache and report the host compiler call as a CUDA compilation * Always use sccache's own jobserver * Adjust placement of crate dependencies and a comment Crates memmap2, object and shlex are not dist-only requirements. * Skip tests when needed features (gcs & s3) are disabled OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/sccache?expand=0&rev=72
This commit is contained in:
commit
9ca37e2c81
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
12
_constraints
Normal file
12
_constraints
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<disk>
|
||||||
|
<!-- Needed because PPC chronically runs out of disk because sigghhh -->
|
||||||
|
<size unit="G">25</size>
|
||||||
|
</disk>
|
||||||
|
<physicalmemory>
|
||||||
|
<size unit="G">8</size>
|
||||||
|
</physicalmemory>
|
||||||
|
</hardware>
|
||||||
|
</constraints>
|
31
_service
Normal file
31
_service
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<services>
|
||||||
|
<service mode="disabled" name="obs_scm">
|
||||||
|
<!-- <param name="url">https://github.com/mozilla/sccache.git</param> -->
|
||||||
|
<param name="url">https://github.com/Firstyear/sccache.git</param>
|
||||||
|
<param name="versionformat">@PARENT_TAG@~@TAG_OFFSET@</param>
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="revision">20250108-suse-maint-v0.9.1</param>
|
||||||
|
<param name="match-tag">*</param>
|
||||||
|
<param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param>
|
||||||
|
<param name="versionrewrite-replacement">\1</param>
|
||||||
|
<param name="changesgenerate">enable</param>
|
||||||
|
<param name="changesauthor">william.brown@suse.com</param>
|
||||||
|
</service>
|
||||||
|
<service mode="disabled" name="set_version"/>
|
||||||
|
<service mode="disabled" name="tar" />
|
||||||
|
<service mode="disabled" name="recompress">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">zst</param>
|
||||||
|
</service>
|
||||||
|
<service name="cargo_vendor" mode="disabled">
|
||||||
|
<param name="srcdir">sccache</param>
|
||||||
|
<param name="compression">zst</param>
|
||||||
|
<param name="update">true</param>
|
||||||
|
<!-- difficult to exploit side channel, no mitigations available yet -->
|
||||||
|
<!-- https://rustsec.org/advisories/RUSTSEC-2023-0071.html -->
|
||||||
|
<param name="i-accept-the-risk">RUSTSEC-2023-0071</param>
|
||||||
|
</service>
|
||||||
|
<service name="cargo_audit" mode="disabled">
|
||||||
|
<param name="srcdir">sccache</param>
|
||||||
|
</service>
|
||||||
|
</services>
|
4
_servicedata
Normal file
4
_servicedata
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<servicedata>
|
||||||
|
<service name="tar_scm">
|
||||||
|
<param name="url">https://github.com/Firstyear/sccache.git</param>
|
||||||
|
<param name="changesrevision">2049b7fe6fe0b492098e4f74d0cf0e7b15baf965</param></service></servicedata>
|
28
builder.conf
Normal file
28
builder.conf
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# This is where client toolchains will be stored.
|
||||||
|
# You should not need to change this as it is configured to work with systemd.
|
||||||
|
cache_dir = "/var/cache/sccache-builder/toolchains"
|
||||||
|
# The maximum size of the toolchain cache, in bytes.
|
||||||
|
# If unspecified the default is 10GB.
|
||||||
|
# toolchain_cache_size = 10737418240
|
||||||
|
# A public IP address and port that clients will use to connect to this builder.
|
||||||
|
public_addr = "127.0.0.1:10501"
|
||||||
|
# public_addr = "[::1]:10501"
|
||||||
|
|
||||||
|
# The URL used to connect to the scheduler (should use https, given an ideal
|
||||||
|
# setup of a HTTPS server in front of the scheduler)
|
||||||
|
scheduler_url = "https://127.0.0.1:10600"
|
||||||
|
|
||||||
|
[builder]
|
||||||
|
type = "overlay"
|
||||||
|
# The directory under which a sandboxed filesystem will be created for builds.
|
||||||
|
# You should not need to change this as it is configured to work with systemd.
|
||||||
|
build_dir = "/var/cache/sccache-builder/tmp"
|
||||||
|
# The path to the bubblewrap version 0.3.0+ `bwrap` binary.
|
||||||
|
# You should not need to change this as it is configured for a default SUSE install.
|
||||||
|
bwrap_path = "/usr/bin/bwrap"
|
||||||
|
|
||||||
|
[scheduler_auth]
|
||||||
|
type = "jwt_token"
|
||||||
|
# This will be generated by the `generate-jwt-hs256-server-token` command or
|
||||||
|
# provided by an administrator of the sccache cluster. See /etc/sccache/scheduler.conf
|
||||||
|
token = "token goes here"
|
22
client.example
Normal file
22
client.example
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# This file should be copied to ~/.config/sccache/config for your client.
|
||||||
|
# You can debug client issues by starting the server with:
|
||||||
|
# SCCACHE_NO_DAEMON=1 RUST_LOG=info /home/william/.cargo/bin/sccache --dist-status
|
||||||
|
|
||||||
|
[dist]
|
||||||
|
# The URL used to connect to the scheduler (should use https, given an ideal
|
||||||
|
# setup of a HTTPS server in front of the scheduler)
|
||||||
|
scheduler_url = "http://x.x.x.x:10600"
|
||||||
|
# scheduler_url = "http://[::abcd]:10600"
|
||||||
|
# Used for mapping local toolchains to remote cross-compile toolchains. Empty in
|
||||||
|
# this example where the client and build server are both Linux.
|
||||||
|
toolchains = []
|
||||||
|
# Size of the local toolchain cache, in bytes (5GB here, 10GB if unspecified).
|
||||||
|
# toolchain_cache_size = 5368709120
|
||||||
|
|
||||||
|
# The location of the toolchain cache.
|
||||||
|
cache_dir = "/tmp/toolchains"
|
||||||
|
|
||||||
|
[dist.auth]
|
||||||
|
# This should match the `client_auth` section of the scheduler config.
|
||||||
|
type = "token"
|
||||||
|
token = "token here"
|
3
sccache-0.8.1~2.tar.zst
Normal file
3
sccache-0.8.1~2.tar.zst
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e80e164da121efbb6c34ced67b213183f8ce0b0f0ba578dcd323a75eb15518cb
|
||||||
|
size 265371
|
3
sccache-0.8.1~31.tar.zst
Normal file
3
sccache-0.8.1~31.tar.zst
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f3a68a50a5723037f1f74b645d7e28bfc3e06e8baf5d6425aeaad85262a10b30
|
||||||
|
size 292869
|
3
sccache-0.8.2~1.tar.zst
Normal file
3
sccache-0.8.2~1.tar.zst
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3218eaf6c85903497f39074387c2bb8edd3efff166934c2d8227a3c699c2d105
|
||||||
|
size 292917
|
3
sccache-0.9.0~1.tar.zst
Normal file
3
sccache-0.9.0~1.tar.zst
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b729e046e4e22fb348cfbdf14480e49fe42d5f6dcc0cb9a649e4ca2ee32c413e
|
||||||
|
size 316087
|
3
sccache-0.9.1~2.tar.zst
Normal file
3
sccache-0.9.1~2.tar.zst
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f8842ac8eb7ae0f6ab8fc5d3bec935ff02446de4c6287242bd8fb46e0c174800
|
||||||
|
size 318764
|
30
sccache-dist-builder.service
Normal file
30
sccache-dist-builder.service
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=sccache-dist builder
|
||||||
|
After=chronyd.service ntpd.service network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# added automatically, for details please see
|
||||||
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=read-only
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectClock=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelLogs=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
# end of automatic additions
|
||||||
|
User=0
|
||||||
|
Type=simple
|
||||||
|
CacheDirectory=sccache-builder
|
||||||
|
Environment="RUST_LOG=sccache=info"
|
||||||
|
Environment="SCCACHE_NO_DAEMON=1"
|
||||||
|
ExecStart=sccache-dist server --config /etc/sccache/builder.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
|
29
sccache-dist-scheduler.service
Normal file
29
sccache-dist-scheduler.service
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=sccache-dist server
|
||||||
|
After=chronyd.service ntpd.service network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# added automatically, for details please see
|
||||||
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||||
|
ProtectSystem=full
|
||||||
|
ProtectHome=read-only
|
||||||
|
PrivateDevices=true
|
||||||
|
ProtectHostname=true
|
||||||
|
ProtectClock=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelLogs=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
# end of automatic additions
|
||||||
|
DynamicUser=yes
|
||||||
|
Type=simple
|
||||||
|
Environment="RUST_LOG=sccache=info"
|
||||||
|
Environment="SCCACHE_NO_DAEMON=1"
|
||||||
|
ExecStart=sccache-dist scheduler --config /etc/sccache/scheduler.conf
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
|
|
||||||
|
|
1118
sccache.changes
Normal file
1118
sccache.changes
Normal file
File diff suppressed because it is too large
Load Diff
120
sccache.spec
Normal file
120
sccache.spec
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
#
|
||||||
|
# spec file for package sccache
|
||||||
|
#
|
||||||
|
# Copyright (c) 2025 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%define configdir %{_sysconfdir}/%{name}
|
||||||
|
|
||||||
|
Name: sccache
|
||||||
|
Version: 0.9.1~2
|
||||||
|
Release: 0
|
||||||
|
Summary: A compiler caching tool for Rust, C and C++ with optional cloud storage
|
||||||
|
License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT) AND (Apache-2.0 OR CC0-1.0) AND ((Apache-2.0 AND BSD-2-Clause) OR MIT) AND (Apache-2.0 OR MIT OR BSD-2-Clause) AND (Apache-2.0 OR MIT OR Zlib) AND (Apache-2.0 OR MIT OR Zlib) AND (MIT OR Unlicense) AND (Apache-2.0 OR Zlib OR MIT) AND Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT
|
||||||
|
Group: Development/Languages/Rust
|
||||||
|
URL: https://github.com/mozilla/%{name}
|
||||||
|
Source0: %{name}-%{version}.tar.zst
|
||||||
|
Source1: vendor.tar.zst
|
||||||
|
Source10: sccache-dist-builder.service
|
||||||
|
Source11: sccache-dist-scheduler.service
|
||||||
|
Source12: builder.conf
|
||||||
|
Source13: scheduler.conf
|
||||||
|
Source14: client.example
|
||||||
|
BuildRequires: cargo
|
||||||
|
BuildRequires: cargo-packaging
|
||||||
|
BuildRequires: pkgconfig(openssl) >= 3
|
||||||
|
Requires: bubblewrap
|
||||||
|
|
||||||
|
%description
|
||||||
|
Sccache is a ccache-like tool. It is used as a compiler wrapper and
|
||||||
|
avoids compilation when possible, storing a cache in a remote storage
|
||||||
|
using the Amazon Simple Cloud Storage Service (S3) API, Redis or
|
||||||
|
the Google Cloud Storage (GCS) API.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
%setup -qa1
|
||||||
|
|
||||||
|
# Remove exec bits to prevent an issue in fedora shebang checking
|
||||||
|
find vendor -type f -name \*.rs -exec chmod -x '{}' \;
|
||||||
|
|
||||||
|
%build
|
||||||
|
%ifarch x86_64
|
||||||
|
# 'dist-server' available only on x86_64 so far - https://github.com/mozilla/sccache/issues/656
|
||||||
|
features="azure,s3,redis,dist-server,dist-client,concurrent-cache"
|
||||||
|
%else
|
||||||
|
%ifarch aarch64
|
||||||
|
features="azure,s3,redis,concurrent-cache"
|
||||||
|
%else
|
||||||
|
# Most other arches have issues (especially with ring). Use FS cache only
|
||||||
|
features="concurrent-cache"
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%{cargo_build} --no-default-features --features=$features
|
||||||
|
|
||||||
|
%install
|
||||||
|
install -D -d -m 0755 %{buildroot}%{_bindir}
|
||||||
|
install -D -d -m 0755 %{buildroot}%{_unitdir}
|
||||||
|
install -D -d -m 0755 %{buildroot}%{configdir}
|
||||||
|
|
||||||
|
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/sccache %{buildroot}%{_bindir}/sccache
|
||||||
|
%ifarch x86_64
|
||||||
|
install -m 0755 %{_builddir}/%{name}-%{version}/target/release/sccache-dist %{buildroot}%{_bindir}/sccache-dist
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch x86_64
|
||||||
|
install -m 0644 %{SOURCE10} %{buildroot}%{_unitdir}/sccache-dist-builder.service
|
||||||
|
install -m 0644 %{SOURCE11} %{buildroot}%{_unitdir}/sccache-dist-scheduler.service
|
||||||
|
%endif
|
||||||
|
install -m 0644 %{SOURCE12} %{buildroot}%{configdir}/builder.conf
|
||||||
|
install -m 0644 %{SOURCE13} %{buildroot}%{configdir}/scheduler.conf
|
||||||
|
install -m 0644 %{SOURCE14} %{buildroot}%{configdir}/client.example
|
||||||
|
|
||||||
|
%ifarch x86_64
|
||||||
|
%pre
|
||||||
|
%service_add_pre sccache-dist-builder.service
|
||||||
|
%service_add_pre sccache-dist-scheduler.service
|
||||||
|
|
||||||
|
%post
|
||||||
|
%service_add_post sccache-dist-builder.service
|
||||||
|
%service_add_post sccache-dist-scheduler.service
|
||||||
|
|
||||||
|
%preun
|
||||||
|
%service_del_preun sccache-dist-builder.service
|
||||||
|
%service_del_preun sccache-dist-scheduler.service
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%service_del_postun sccache-dist-builder.service
|
||||||
|
%service_del_postun sccache-dist-scheduler.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
|
%{_bindir}/sccache
|
||||||
|
%ifarch x86_64
|
||||||
|
%{_bindir}/sccache-dist
|
||||||
|
|
||||||
|
%{_unitdir}/sccache-dist-builder.service
|
||||||
|
%{_unitdir}/sccache-dist-scheduler.service
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%dir %{configdir}
|
||||||
|
%config(noreplace) %{configdir}/scheduler.conf
|
||||||
|
%config(noreplace) %{configdir}/builder.conf
|
||||||
|
%config(noreplace) %{configdir}/client.example
|
||||||
|
|
||||||
|
%changelog
|
23
scheduler.conf
Normal file
23
scheduler.conf
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# The socket address the scheduler will listen on. It's strongly recommended
|
||||||
|
# to listen on localhost and put a HTTPS server in front of it.
|
||||||
|
public_addr = "127.0.0.1:10600"
|
||||||
|
# public_addr = "[::1]:10600"
|
||||||
|
|
||||||
|
[client_auth]
|
||||||
|
# This is how a client will authenticate to the scheduler.
|
||||||
|
# # sccache-dist auth generate-shared-token --help
|
||||||
|
type = "token"
|
||||||
|
token = "token here"
|
||||||
|
#
|
||||||
|
# type = "jwt_hs256"
|
||||||
|
# secret_key = ""
|
||||||
|
|
||||||
|
[server_auth]
|
||||||
|
# sccache-dist auth --help
|
||||||
|
# To generate the secret_key:
|
||||||
|
# # sccache-dist auth generate-jwt-hs256-key
|
||||||
|
# To generate a key for a builder, use the command:
|
||||||
|
# # sccache-dist auth generate-jwt-hs256-server-token --config /etc/sccache/scheduler.conf --secret-key "..." --server "builderip:builderport"
|
||||||
|
type = "jwt_hs256"
|
||||||
|
secret_key = "my secret key"
|
||||||
|
|
3
vendor.tar.zst
Normal file
3
vendor.tar.zst
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:698e794f4218eadacb3dda84803cd2f116cde922579462a6a0c57054d783e47b
|
||||||
|
size 44571317
|
Loading…
x
Reference in New Issue
Block a user