- Update to version 0.4.1~18: * Add experimental concurrent cache support * build(deps): bump chrono from 0.4.23 to 0.4.24 * build(deps): bump serial_test from 1.0.0 to 2.0.0 * Describe the default conf file locations in docs/Configuration.md * Remove unnecessary import * Use scoped thread provided by standard library (#1703) * Refactor import style (#1701) * Update rust-version in manifest to 1.64 (#1702) * Replace atty with is-terminal (#1699) * build(deps): bump clap from 4.0.32 to 4.1.11 (#1698) * Remove Redis TTL (#1696) * build(deps): bump assert_cmd from 2.0.8 to 2.0.10 (#1669) * build(deps): bump reqsign from 0.8.3 to 0.8.5 (#1692) * build(deps): bump reqwest from 0.11.15 to 0.11.16 (#1691) * build(deps): bump crossbeam-utils from 0.8.14 to 0.8.15 (#1693) * build(deps): bump toml from 0.7.2 to 0.7.3 (#1695) * build(deps): bump predicates from 2.1.5 to 3.0.2 (#1694) * build(deps): bump regex from 1.7.1 to 1.7.3 (#1690) * version 0.4.1 * Revert "Support running dist compilations in unprivileged scenarios (#128)" * Revert "amend to sccache" * Revert "remove remainder cachepot and replace by sccache" * Revert "migrate to ubuntu 22.04 for newly added ci check" * build(deps): bump reqwest from 0.11.14 to 0.11.15 * build(deps): bump openssl from 0.10.45 to 0.10.48 * chore: Add more debug log for gcs to help us diagnose * Add tests to verify that we work with cmake & autotools (#1678) * Try to test c++ support with both clang & gcc * remove trailing whitespaces OBS-URL: https://build.opensuse.org/request/show/1078316 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/sccache?expand=0&rev=37
123 lines
4.2 KiB
RPMSpec
123 lines
4.2 KiB
RPMSpec
#
|
|
# spec file for package sccache
|
|
#
|
|
# Copyright (c) 2023 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.4.1~18
|
|
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
|
|
Source2: cargo_config
|
|
Source10: sccache-dist-builder.service
|
|
Source11: sccache-dist-scheduler.service
|
|
Source12: builder.conf
|
|
Source13: scheduler.conf
|
|
Source14: client.example
|
|
BuildRequires: cargo-packaging
|
|
BuildRequires: pkgconfig(openssl)
|
|
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
|
|
|
|
mkdir .cargo
|
|
cp %{SOURCE2} .cargo/config
|
|
# 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
|