Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
7138229
feat: Add metadata system tables
suxiaogang223 May 25, 2026
3ae0723
fix: add break for CHAR_END_SUBTYPE
lszskye May 25, 2026
d5d94d8
fix: Fix MemorySegment::Compare to use big-endian byte-order comparis…
lxy-9602 May 25, 2026
5e25655
chore(license): refine build support notices
zjw1111 May 26, 2026
184cda7
fix: Fix undefined behavior in BinarySection bitmask constants caused…
lxy-9602 May 26, 2026
2b5426a
refactor: ColumnarArray: change constructor parameter to raw pointer …
lxy-9602 May 27, 2026
566586b
feat: Support macOS builds with AppleClang and Homebrew Clang
suxiaogang223 May 27, 2026
e98acc9
fix: fix undefined behavior in bitwise left-shift operations across c…
lxy-9602 May 28, 2026
002daa4
feat: optimize parquet reads with page-level filtering
liangjie3138 May 28, 2026
3f02435
fix: add ScopeGuard to wait async tasks before early return in Orphan…
zjw1111 May 28, 2026
ed17877
feat(lumina): support null values in vector column during index building
lxy-9602 May 29, 2026
8372606
chore: modify comment in RecordBatch & add check in GenericRow
lszskye May 29, 2026
98c87aa
fix: fix clang-tidy issues
zjw1111 May 29, 2026
48d55dd
chore: add check scale in BinaryRowWriter
lszskye May 29, 2026
2a4aa2b
fix: fix ub in Blob
lszskye May 29, 2026
6f90168
refact: Refactor Literal operator== to delegate to CompareTo for cons…
lxy-9602 May 29, 2026
4cb047c
refactor: Reuse RowGroupPageIndexReader across columns to improve pag…
zhf999 Jun 1, 2026
3fc019a
feat(blob): Support blob-descriptor-field for inline blob descriptor …
lxy-9602 Jun 1, 2026
93db3e3
fix: Like::TestString to align with Java LIKE semantics
lxy-9602 Jun 1, 2026
5ea204d
chore: update LICENSE with additional PyTorch copyright information
zjw1111 Jun 1, 2026
a15fc72
fix: date validation reject invalid dates instead of silent normaliza…
dalingmeng Jun 2, 2026
c394b0c
fix: fix thread-safe problem for file store path factory
lucasfang Jun 2, 2026
b412c2d
feat: Improve PK MOR read performance with batch queue and cached col…
lxy-9602 Jun 2, 2026
17b7c2a
fix: avoid signed integer overflow UB in BloomFilter and DeltaVarintC…
lxy-9602 Jun 2, 2026
996be78
feat: optimize count(*) for pk/append table
lucasfang Jun 3, 2026
e88a8d4
feat(blob): support blob-view-field for cross-table blob reference re…
lszskye Jun 3, 2026
08c0cc0
fix: fix unstable prefetch reader case
lucasfang Jun 4, 2026
0f099cc
feat: remove support for FLOAT/DOUBLE type partition field
lszskye Jun 4, 2026
beaae3c
fix: skip object store check when UseRESTCatalogCommit is enabled
liujiayi771 Jun 4, 2026
28e2b82
feat: add Bucket() virtual interface to DataSplit base class
fourier307 Jun 4, 2026
5985314
fix(fs): normalize local filesystem paths and some refactoring
zjw1111 Jun 5, 2026
91445ea
feat(benchmark): add append/pk table benchmark
lucasfang Jun 5, 2026
02d1095
Allow FileStoreCommit for PK tables with postpone bucket mode
liujiayi771 Jun 8, 2026
992160c
fix: Avoid signed overflow UB in BSI index and null-deref in bloom fi…
lxy-9602 Jun 8, 2026
1a59f6d
fix: LZ4 block compressor/decompressor safety issues
lxy-9602 Jun 8, 2026
0fc4926
fix(avro): format avro types in decoder errors
wgtmac Jun 8, 2026
1afcf69
fix: override CachedInputStream::Advance to avoid real I/O for skippe…
zhf999 Jun 9, 2026
d9e6d3e
fix: replace arrow type DECIMAL to DECIMAL128
lucasfang Jun 9, 2026
3fec1aa
fix: remove trailing semicolons from statement-like macro definitions
lucasfang Jun 9, 2026
0987863
fix: change FileStorePathFactory::Create() to return shared_ptr
lucasfang Jun 9, 2026
7f3b651
refactor(blob): refactor BlobFileContext to honor the actual schema w…
lxy-9602 Jun 9, 2026
5520806
fix: address ubsan findings
zjw1111 Jun 10, 2026
06a9f02
fix(build): make package config relocatable
zjw1111 Jun 10, 2026
0e2108b
fix(parquet): fix incorrect chunk_end calculation in ComputePageRange…
zhf999 Jun 10, 2026
92ff6cb
feat(fs): support int64 file IO sizes
zjw1111 Jun 10, 2026
f84e376
fix: small fixes for parquet reader including RowRanges, PreBuffer, C…
zhf999 Jun 10, 2026
79e19ae
feat(blob view): support multi-thread reading upstream table & add in…
lszskye Jun 11, 2026
4ef48e9
test: add blob compatible test
lxy-9602 Jun 11, 2026
9ec410c
refractor(parquet): simplify FileReaderWrapper and PageFilteredRowGro…
zhf999 Jun 11, 2026
fb3aa41
fix(scan): fix dangling reference and unsigned overflow in FileStoreScan
lxy-9602 Jun 12, 2026
50768c1
feat(shredding): Add infrastructure for shared-shredding MAP storage …
lxy-9602 Jun 12, 2026
9cd1a50
fix: make byte hashing independent of char signedness
wgtmac Jun 12, 2026
4d170d6
feat(shared-shredding): support nested field projection in ORC format…
lszskye Jun 12, 2026
4e9cb8b
fix: prevent zero-thread DefaultExecutor and validate FileSystem/Sche…
zjw1111 Jun 12, 2026
390dd8d
fix: small fixes for AI reviewing feedback
zhf999 Jun 13, 2026
f179c45
feat: Optimize PK MOR read performance by reduce per-row object alloc…
dalingmeng Jun 13, 2026
dea2ed3
feat: Add manifests and files system tables
suxiaogang223 Jun 15, 2026
868d9db
fix: canonicalize NaN for Hive bucket hash
lxy-9602 Jun 15, 2026
72de354
feat(cache): support manifest file cache
gripleaf Jun 16, 2026
099957a
feat(schema): support pk table schema evolution
gripleaf Jun 16, 2026
99175a9
fix: fix min/max row id serialize bug
lucasfang Jun 17, 2026
d71013d
feat: update lumina lib to v0.3.0-rc1
lxy-9602 Jun 17, 2026
2b01c5c
feat(shredding): support shared-shredding map write
lxy-9602 Jun 17, 2026
4c3d877
fix(parquet): fallback nested field reading to RowGroup reading (walk…
zhf999 Jun 19, 2026
f996e63
feat(tantivy): add Tantivy full-text global index via Rust FFI
spaces-X Jun 21, 2026
82ffaaf
feat(parquet): support parquet metadata cache
gripleaf Jun 22, 2026
1c8616b
fix(format): reset avro reader on schema change
zjw1111 Jun 22, 2026
8fdc2ec
feat(shredding): support shared shredding file reader
lszskye Jun 22, 2026
49f3fb5
fix: address avro blob and executor review issues
zjw1111 Jun 23, 2026
2453996
feat(shredding): improve shared-shredding adaptive width restore & re…
lxy-9602 Jun 24, 2026
f786c93
feat: support read for nested type sub column
lucasfang Jun 24, 2026
73f7267
fix: close input/output streams when remote lookup file read/write fa…
lxy-9602 Jun 24, 2026
699b1ee
fix(testing): address review issues
zjw1111 Jun 25, 2026
2076d4f
feat(shared_shredding): add read inte test for shared_shredding
lszskye Jun 26, 2026
a3f1516
feat: add CreateReader api with field_name & index_type
lszskye Jun 30, 2026
c24aa3d
feat(shredding): add shared-shredding map placement policies
zjw1111 Jun 30, 2026
f75a27b
feat(types): support CHAR/VARCHAR/BINARY/VARBINARY in data type json …
SteNicholas Jul 1, 2026
5ab8be5
fix: align duplicate-key replacement semantics with Java Paimon
lucasfang Jul 1, 2026
0bbac90
fix: handle non-contiguous RowRanges when resolving global row IDs
zhf999 Jul 2, 2026
6ec37ae
test: add tests for executor
lxy-9602 Jul 2, 2026
8804191
fix: release global index writer before reader to avoid mem issue whe…
lxy-9602 Jul 3, 2026
7ed1ae7
fix: fix IsThreadSafe() in UnionGlobalIndexReader
lszskye Jul 3, 2026
ff0ad88
test: add map shared-shredding tests for compaction and alter table a…
lxy-9602 Jul 3, 2026
67b232a
feat(blob): Remove blob external storage mode
lxy-9602 Jul 3, 2026
8eb43d5
feat(schema): scan context support set table schema
gripleaf Jul 6, 2026
dd6e227
feat(manifest): support snapshot live manifest cache
gripleaf Jul 6, 2026
c2fd3e1
feat(parquet): support pushing bitmaps down to page-level filtering (…
zhf999 Jul 10, 2026
9a97f4f
chore: adjust set read_ranges_freshed_ in SetReadRanges
lszskye Jul 10, 2026
6c11487
docs: add coding agent guidelines
zjw1111 Jul 10, 2026
9e8c293
fix: compile with correct flags with AppleClang
smdsbz Jul 10, 2026
3965d83
feat(shared-shredding): Expose shared-shredding utilities
dalingmeng Jul 11, 2026
505cda0
feat(blob view): support blob-view.resolve.enabled to preserve blob v…
SteNicholas Jul 13, 2026
fdca1ac
fix(build): disable glog unwind without libunwind
mrdrivingduck Jul 13, 2026
b7f3ce3
fix(avro): include headers used by file batch reader
wgtmac Jul 15, 2026
c92c4d2
fix(orc): avoid removed Arrow bitmap append API
wgtmac Jul 15, 2026
354daf8
feat(commit): align functionality with java paimon commit
lucasfang Jul 16, 2026
33c52a5
feat: add read-optimized system table
gripleaf Jul 16, 2026
8726c71
feat(blob): support blob.split-by-file-size to weigh blob files in sc…
SteNicholas Jul 16, 2026
0cc0a28
feat(blob): support blob-write-null-on-missing-file and blob-write-nu…
SteNicholas Jul 16, 2026
968a385
fix(commit): fix changelogRecordCount nullopt and add ut
lucasfang Jul 17, 2026
637f4c5
fix(fs): create parent directories before opening Jindo writers
Zouxxyy Jul 20, 2026
7f9b180
fix(jindo): make async reads concurrency-safe
zjw1111 Jul 20, 2026
d84744a
fix: enable TSAN and resolve detected data races
zjw1111 Jul 20, 2026
d84e29a
feat(parquet): support configurable bitmap row-range refining strateg…
zhf999 Jul 20, 2026
5351058
feat(commit): support TruncateTable/Abort/RollbackToAsLatest and add ut
lucasfang Jul 21, 2026
4a18703
build: fetch Lumina from release package
zjw1111 Jul 21, 2026
3da1233
fix(blob): identify a missing blob file with FileSystem::Exists
SteNicholas Jul 21, 2026
cf50b55
fix(btree): preserve empty keys in index metadata & disable global bi…
lxy-9602 Jul 21, 2026
7149439
feat(variant): support variant data type
SteNicholas Jul 22, 2026
7c0f3d1
build: fetch Boost from OSS and define network test macro globally
zjw1111 Jul 22, 2026
998e435
feat: add metrics storage-read-bytes for parquet and fix clean inte test
lucasfang Jul 22, 2026
598c8bc
feat(lumina): support Lumina tag filtering
lxy-9602 Jul 23, 2026
90c3bb7
fix(reader): ensure batch readers return zero-offset Arrow arrays
lxy-9602 Jul 23, 2026
9ed061e
feat: add global system tables framework under `sys` database
suxiaogang223 Jul 23, 2026
60011b4
refactor(format): remove Lance support
zjw1111 Jul 24, 2026
bd4466d
refactor(tantivy): move FFI crate under crates
zjw1111 Jul 24, 2026
1eb50bb
chore: clean up attribution and test data whitespace
zjw1111 Jul 27, 2026
1577b0c
fix(blob): support blob-only writes and reject nested blob fields
lxy-9602 Jul 27, 2026
1df1baa
fix: nested list schema evolution
XiaoHongbo-Hope Jul 27, 2026
0cd7ef1
fix(abi): dynamic_cast error on Predicate across shared libraries
zhangweilst Jul 28, 2026
0d8929d
feat(fs): add object store and S3 file systems
mrdrivingduck Jul 28, 2026
83a9c41
feat(parquet): support page-level (page index) filtering for nested c…
zhf999 Jul 28, 2026
04bc024
test: add test for test coverage
lucasfang Jul 28, 2026
c4f9f45
test: add ut for release-0.3
lszskye Jul 28, 2026
f15596b
chore: remove Git LFS and refresh documentation
zjw1111 Jul 29, 2026
c6f2b91
fix(blob): allow blob files across schema IDs
lxy-9602 Jul 29, 2026
27f6d89
fix(core): support fallback keys for ignore-delete option
SteNicholas Jul 30, 2026
662bccd
feat(shredding): support adaptive schemas across rolling files
lxy-9602 Jul 30, 2026
77b9042
fix(lucene): normalize prefix and wildcard queries
lszskye Jul 30, 2026
b58d238
chore: update version to 0.3.0
lszskye Jul 30, 2026
e543f76
feat(blob): support placeholder fallback for partial updates
SteNicholas Jul 31, 2026
2b74264
feat(parquet): support configuring Arrow pre-buffer hole-size-limit f…
zhf999 Jul 31, 2026
eab6a6c
fix: align floating-point semantics with Java
lxy-9602 Jul 31, 2026
eb172b8
chore: remove target-only migration leftover
lxy-9602 Jul 31, 2026
a04a174
fix(release): align documentation version
lxy-9602 Jul 31, 2026
900a4dd
ci: add consolidated build and test workflow
lxy-9602 Jul 31, 2026
6f8d6bd
fix: align source archive and integration tests
lxy-9602 Jul 31, 2026
2624faf
ci: disable clang-tidy
lxy-9602 Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 35 additions & 2 deletions .devcontainer/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,35 @@

# Adapted from Apache Iceberg C++
# https://github.com/apache/iceberg-cpp/blob/v0.2.0/.devcontainer/Dockerfile.template

#
# This Dockerfile is used to build a development container for Paimon C++.
# It is based on the Ubuntu image and installs necessary dependencies.
# Base: Ubuntu 24.04. Rust toolchain is installed via Dev Container
# Feature `ghcr.io/devcontainers/features/rust:1` (see devcontainer.json),
# so it does NOT appear in this Dockerfile.

FROM ubuntu:24.04

# Optional apt mirror. Defaults to the upstream Ubuntu mirrors so builds work
# everywhere; pass --build-arg APT_MIRROR=<host> (e.g. http://mirrors.aliyun.com)
# to use a regional mirror for faster downloads inside mainland China.
ARG APT_MIRROR=
RUN if [ -n "${APT_MIRROR}" ]; then \
sed -i \
-e "s|http://archive.ubuntu.com/ubuntu|${APT_MIRROR}/ubuntu|g" \
-e "s|http://security.ubuntu.com/ubuntu|${APT_MIRROR}/ubuntu|g" \
-e "s|http://ports.ubuntu.com/ubuntu-ports|${APT_MIRROR}/ubuntu-ports|g" \
/etc/apt/sources.list.d/ubuntu.sources; \
fi

# Optional rustup mirror for the Dev Container Feature
# `ghcr.io/devcontainers/features/rust:1` (and any later `rustup` calls).
# Defaults to the upstream static.rust-lang.org; pass
# --build-arg RUST_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static for a
# China-friendly CDN. Set as ENV so it is inherited by every subsequent layer.
ARG RUST_DIST_SERVER=https://static.rust-lang.org
ENV RUSTUP_DIST_SERVER=${RUST_DIST_SERVER} \
RUSTUP_UPDATE_ROOT=${RUST_DIST_SERVER}/rustup

# Install necessary packages
RUN apt update && \
apt install -y \
Expand All @@ -48,6 +71,16 @@ RUN apt update && \
vim \
wget \
sudo \
# ---- additions for tantivy-fts migration (Rust + Sanitizer + LLVM) ----
clang \
clang-format \
clang-tidy \
lld \
llvm \
libclang-rt-dev \
gdb \
lldb \
valgrind \
&& rm -rf /var/lib/apt/lists/*

# Add a user for development
Expand Down
240 changes: 240 additions & 0 deletions .devcontainer/centos7/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# CentOS 7 cross-build verification image for paimon-cpp + tantivy-fts.
#
# Purpose:
# Prove the tantivy-fts stack builds on the OLDEST reasonable Linux target
# (glibc 2.17, EOL 2024-06-30). The default Ubuntu 24.04 dev container
# proves nothing about glibc compatibility; this image does.
#
# Build:
# docker build -t paimon-cpp-centos7:latest -f .devcontainer/centos7/Dockerfile .
#
# Run:
# docker run -d --name paimon-centos7 \
# --privileged \
# -v "$(pwd):/workspaces/paimon-cpp" \
# paimon-cpp-centos7:latest sleep infinity
# docker exec -it paimon-centos7 bash -l
#
# Inside the container:
# scl enable devtoolset-11 rh-python38 -- bash # activate modern gcc + python
# source /opt/paimon-env.sh # PATH for rust, cmake
# cd /workspaces/paimon-cpp
#
# Run ./.devcontainer/centos7/run.sh smoke from the host for the full check.

# ---------- Base ----------
# CentOS 7 reached EOL 2024-06-30; its default mirrorlist.centos.org is down.
# Pin to vault.centos.org (Red Hat's archived location) via the `linuxserver/centos`
# vault image to avoid retired-mirror failures on `yum install`.
#
# Base image: we pull from quay.io (CentOS community's canonical registry post
# Docker Hub deprecation). Override with CENTOS7_IMAGE build arg when behind a
# firewall that can't reach quay.io (e.g. registry.aliyuncs.com/library/centos:7).
ARG CENTOS7_IMAGE=quay.io/centos/centos:centos7
FROM ${CENTOS7_IMAGE}

# Repoint yum at aliyun's CentOS 7 vault mirror — vault.centos.org itself
# works but is slow/blocked from many CN networks; the aliyun mirror is a
# complete rsync and reliably fast. We overwrite CentOS-Base.repo rather
# than sed-patch it so the result is deterministic regardless of what the
# upstream image ships. fastestmirror plugin is disabled because its ping
# probes against the retired mirror list add ~60s to every `yum install`.
RUN echo -e '[base]\n\
name=CentOS-7 - Base - aliyun vault\n\
baseurl=https://mirrors.aliyun.com/centos-vault/7.9.2009/os/$basearch/\n\
gpgcheck=0\n\
enabled=1\n\
\n\
[updates]\n\
name=CentOS-7 - Updates - aliyun vault\n\
baseurl=https://mirrors.aliyun.com/centos-vault/7.9.2009/updates/$basearch/\n\
gpgcheck=0\n\
enabled=1\n\
\n\
[extras]\n\
name=CentOS-7 - Extras - aliyun vault\n\
baseurl=https://mirrors.aliyun.com/centos-vault/7.9.2009/extras/$basearch/\n\
gpgcheck=0\n\
enabled=1\n\
\n\
[centosplus]\n\
name=CentOS-7 - Plus - aliyun vault\n\
baseurl=https://mirrors.aliyun.com/centos-vault/7.9.2009/centosplus/$basearch/\n\
gpgcheck=0\n\
enabled=0\n' > /etc/yum.repos.d/CentOS-Base.repo \
&& rm -f /etc/yum.repos.d/CentOS-CR.repo \
/etc/yum.repos.d/CentOS-Debuginfo.repo \
/etc/yum.repos.d/CentOS-Media.repo \
/etc/yum.repos.d/CentOS-Sources.repo \
/etc/yum.repos.d/CentOS-Vault.repo \
/etc/yum.repos.d/CentOS-fasttrack.repo \
/etc/yum.repos.d/CentOS-x86_64-kernel.repo \
&& if [ -f /etc/yum/pluginconf.d/fastestmirror.conf ]; then \
sed -i 's/^enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf; \
fi \
&& yum clean all \
&& yum makecache

# ---------- Base toolchain ----------
# EPEL provides ninja-build and a newer python3 than the base 3.6.
# SCL (Software Collections) provides devtoolset-11 (gcc 11) and rh-python38
# without overriding the system gcc/python. CentOS 7's default gcc 4.8 is
# too old for C++17/20 used by lucene++ and our tantivy wrapper.
#
# Same story as CentOS-Base.repo: both epel + SCL default to mirrorlist
# endpoints that are effectively dead; overwrite with aliyun URLs that we
# know respond.
RUN yum install -y epel-release centos-release-scl \
&& echo -e '[epel]\n\
name=Extra Packages for Enterprise Linux 7 - aliyun\n\
baseurl=https://mirrors.aliyun.com/epel/7/$basearch\n\
gpgcheck=0\n\
enabled=1\n' > /etc/yum.repos.d/epel.repo \
&& rm -f /etc/yum.repos.d/epel-testing.repo /etc/yum.repos.d/epel.repo.rpmnew \
&& rm -f /etc/yum.repos.d/CentOS-SCLo-*.repo \
/etc/yum.repos.d/CentOS-SCLo-*.repo.rpmnew \
&& echo -e '[centos-sclo-rh]\n\
name=CentOS-7 - SCLo rh - aliyun vault\n\
baseurl=https://mirrors.aliyun.com/centos-vault/7.9.2009/sclo/$basearch/rh/\n\
gpgcheck=0\n\
enabled=1\n\
\n\
[centos-sclo-sclo]\n\
name=CentOS-7 - SCLo sclo - aliyun vault\n\
baseurl=https://mirrors.aliyun.com/centos-vault/7.9.2009/sclo/$basearch/sclo/\n\
gpgcheck=0\n\
enabled=1\n' > /etc/yum.repos.d/CentOS-SCLo-scl.repo \
&& yum clean all && yum makecache \
&& yum install -y \
devtoolset-11-gcc \
devtoolset-11-gcc-c++ \
devtoolset-11-binutils \
devtoolset-11-libasan-devel \
devtoolset-11-libubsan-devel \
rh-python38 \
rh-python38-python-pip \
git \
ninja-build \
make \
patch \
curl \
wget \
unzip \
which \
file \
sudo \
openssl-devel \
zlib-devel \
libffi-devel \
bzip2-devel \
xz-devel \
perl-IPC-Cmd \
&& yum clean all

# Enable the SCL collections for all subsequent shells (including RUN).
ENV BASH_ENV=/etc/profile.d/scl-enable.sh
SHELL ["/bin/bash", "-c"]
RUN printf '%s\n' \
'source scl_source enable devtoolset-11' \
'source scl_source enable rh-python38' \
> /etc/profile.d/scl-enable.sh \
&& chmod +x /etc/profile.d/scl-enable.sh

# ---------- CMake (must be >= 3.22 for Corrosion) ----------
# CentOS 7's cmake package is 2.8.12; EPEL cmake3 is 3.17 — still too old.
# Install via pip in the rh-python38 SCL so we get a modern CMake without
# touching the system /usr/bin. Point pip at aliyun's pypi mirror: default
# pypi.org is 10-30s per request from CN, aliyun responds in <1s.
ENV PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple/ \
PIP_TRUSTED_HOST=mirrors.aliyun.com
RUN source /etc/profile.d/scl-enable.sh \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install 'cmake==3.28.*' ninja

# ---------- Rust toolchain ----------
# Install rustup as root into /opt/rust so all users share the same toolchain.
# Use the USTC mirror to keep downloads fast in CN; the CI runner version of
# this is mirrored in ci/scripts/setup_rust.sh.
ENV RUSTUP_HOME=/opt/rust/rustup \
CARGO_HOME=/opt/rust/cargo \
RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static \
RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup
# In-container network for Docker Desktop builds is unreliable through many
# CN mirrors (observed: curl 7.29 on CentOS 7 + rsproxy.cn HTTP/2 path ⇒
# partial-read truncations; USTC ⇒ 5xx; rustup sh installer ⇒ 403 from
# legacy cipher). The most reliable fix is to sidestep the issue entirely:
# pre-download rustup-init on the host (where network is solid) and COPY it
# into the image. See .devcontainer/centos7/run.sh for the prefetch step.
COPY .devcontainer/centos7/rustup-init.bin /tmp/rustup-init
RUN chmod +x /tmp/rustup-init \
&& /tmp/rustup-init -y --default-toolchain stable --profile minimal --no-modify-path \
&& rm -f /tmp/rustup-init \
&& mkdir -p $CARGO_HOME \
&& echo -e '[source.crates-io]\n\
replace-with = "rsproxy-sparse"\n\
\n\
[source.rsproxy]\n\
registry = "https://rsproxy.cn/crates.io-index"\n\
\n\
[source.rsproxy-sparse]\n\
registry = "sparse+https://rsproxy.cn/index/"\n\
\n\
[registries.rsproxy]\n\
index = "https://rsproxy.cn/crates.io-index"\n\
\n\
[net]\n\
git-fetch-with-cli = true\n' > $CARGO_HOME/config.toml \
&& $CARGO_HOME/bin/cargo install cbindgen --version 0.29.2 --locked \
&& chmod -R a+rwx /opt/rust \
&& $CARGO_HOME/bin/rustc --version \
&& $CARGO_HOME/bin/cargo --version \
&& $CARGO_HOME/bin/cbindgen --version

# ---------- Environment file consumed by every shell ----------
# Sets PATH for rust / cmake / cargo so `docker exec paimon-centos7 bash -l`
# and interactive sessions have the toolchain on $PATH.
RUN printf '%s\n' \
'export PATH=/opt/rust/cargo/bin:$PATH' \
'# cmake + ninja live under the rh-python38 SCL; path prefix differs by arch.' \
'# `command -v cmake` confirms which one is in use.' \
> /opt/paimon-env.sh \
&& chmod +x /opt/paimon-env.sh \
&& printf '%s\n' 'source /opt/paimon-env.sh' >> /etc/profile.d/scl-enable.sh

# ---------- Non-root user ----------
# Build as `paimon` (uid 1000) so LFS objects under the mount stay owned by
# your host user, matching the main Ubuntu dev container.
RUN useradd -m -u 1000 -s /bin/bash paimon \
&& echo 'paimon ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/paimon

USER paimon
WORKDIR /workspaces/paimon-cpp

# Sanity check surfaces the tool versions in `docker run ... paimon-cpp-centos7 --version`.
CMD ["bash", "-lc", "\
echo '--- CentOS 7 cross-build image sanity check ---'; \
cat /etc/centos-release; \
echo '--- glibc ---'; ldd --version | head -1; \
echo '--- gcc ---'; gcc --version | head -1; \
echo '--- cmake ---'; cmake --version | head -1; \
echo '--- ninja ---'; ninja --version; \
echo '--- rust ---'; rustc --version; \
echo '--- cargo ---'; cargo --version; \
echo '--- cbindgen ---'; cbindgen --version; \
echo 'Ready. From the host repository, run ./.devcontainer/centos7/run.sh smoke'"]
Loading
Loading