sccache-jetm
LOW
maintainer jetm
0 votes
scanned 2026-10-27 21:48:49.990097
Why flagged
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
Triggered rules
Low
Few votes, recently uploaded
zero_votes_recent
Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.
PKGBUILD
1
# Maintainer: Javier Tia <floss@jetm.me>
2
# Based on the Arch Linux sccache PKGBUILD by Maxime Gauduin <alucryd@archlinux.org>
3
4
# sccache with the sccache-dist changes that make distributed compilation work for
5
# OpenEmbedded/Yocto and kernel builds. The upstream release is the source and the
6
# changes are applied on top as a patch in prepare(), so a release that no longer takes
7
# the patch fails the build there instead of shipping a silently different sccache.
8
#
9
# 0001 jetm/sccache carry/0.19.0: v0.19.0 plus 48 commits (the work behind
10
# mozilla/sccache#2776 and #2777 and the scheduler, packaging and rust/gcc dist
11
# fixes not yet sent upstream). Regenerate with
12
# git format-patch --stdout <release>..<rebased carry branch>
13
#
14
# On a new upstream release: rebase the carry branch onto it, regenerate 0001 and
15
# rebuild. A patch that fails to apply stops the build, which is how to find out what
16
# the release changed.
17
#
18
# Open upstream speedup PRs were measured on top of this on the kernel build and left
19
# out: #2718 (fifo jobserver), #2938, #2940, #2936 and #2901 gave no gain (cold 519-538 s
20
# against 499-508 s without them; warm 480 s against 478 s). Their patches are in git
21
# history at 9accb64 if a later release makes them worth another look.
22
#
23
# It conflicts with and provides sccache, so it replaces the distro package.
24
25
pkgname=sccache-jetm
26
_upstream=sccache
27
pkgver=0.19.0
28
pkgrel=1
29
pkgdesc='Shared compilation cache - build with distributed-compile fixes'
30
arch=(x86_64)
31
url=https://github.com/mozilla/sccache
32
license=(Apache-2.0)
33
depends=(
34
gcc-libs
35
glibc
36
openssl
37
)
38
makedepends=(
39
cargo
40
patch
41
)
42
optdepends=(
43
'memcached: Memcached support'
44
'valkey: Redis support'
45
)
46
provides=("sccache=$pkgver")
47
conflicts=(sccache)
48
options=(!lto)
49
_patches=(
50
0001-jetm-carry.patch
51
)
52
source=(
53
"$_upstream-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
54
"${_patches[@]}"
55
)
56
sha256sums=(
57
'2da079033cd19fd8e2a09f56f9a7d9d1a72d591ff3acdc47d95b920145cf2671'
58
'1585533763ec311f6564bf4c247189135acd5e4507b1960053ffe21d8c5f7d94' # 0001-jetm-carry.patch
59
)
60
61
prepare() {
62
cd "$_upstream-$pkgver"
63
local p
64
for p in "${_patches[@]}"; do
65
msg2 "applying $p"
66
patch -Np1 -i "$srcdir/$p"
67
done
68
cargo fetch --locked
69
}
70
71
build() {
72
cd "$_upstream-$pkgver"
73
74
# Use debug
75
export CARGO_PROFILE_RELEASE_DEBUG=2 CARGO_PROFILE_RELEASE_STRIP=false
76
77
# Use LTO
78
export CARGO_PROFILE_RELEASE_LTO=true CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
79
80
# Cluster fix: target znver4 (Zen 4) so the binary runs on both the Zen 5
81
# scheduler/build host and the Zen 4 build node. A native (znver5) build
82
# SIGILLs on Zen 4. znver5 is ISA-backward-compatible with znver4.
83
RUSTFLAGS="${RUSTFLAGS} -C target-cpu=znver4" cargo build --release --frozen --features all,dist-server
84
}
85
86
package() {
87
cd "$_upstream-$pkgver"
88
install -Dt "$pkgdir/usr/bin" target/release/sccache{,-dist}
89
install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 README.md docs/*
90
}
91
92
# vim:set sw=2 sts=-1 et:
93
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-10-27 21:48:49 | Low | 1 |