mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
Dockerfile.build: install sccache from distro packages when available
Prefer the distro-packaged sccache (installed via dnf) over downloading a release tarball with curl. Fall back to the curl download when the package is absent or on non-dnf distros, so existing behavior is unchanged. Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>
This commit is contained in:
parent
d3d08a106d
commit
e25810d879
@ -36,7 +36,9 @@ RUN DISTRO=$DISTRO \
|
||||
FOR_MAKE_CHECK=${FOR_MAKE_CHECK} \
|
||||
bash -x ${CEPH_CTR_SRC}/buildcontainer-setup.sh
|
||||
RUN \
|
||||
if [ $(uname -m) != ppc64le ]; then \
|
||||
if rpm --quiet --query sccache 2>/dev/null || { command -v dnf >/dev/null 2>&1 && dnf install -y sccache 2>/dev/null; }; then \
|
||||
echo "sccache provided by distro packages"; \
|
||||
elif [ $(uname -m) != ppc64le ]; then \
|
||||
SCCACHE_ARCH="$(uname -m)"; \
|
||||
if [ "$SCCACHE_ARCH" = riscv64 ]; then SCCACHE_ARCH=riscv64gc; fi; \
|
||||
SCCACHE_URL="${SCCACHE_REPO}/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-${SCCACHE_ARCH}-unknown-linux-musl.tar.gz"; \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user