You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2026/10/26 06:29:54 UTC

(opendal-yinyang) branch xuanwo/linux-fuse-devbox-setup created (now 06ef6a7)

This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a change to branch xuanwo/linux-fuse-devbox-setup
in repository https://gitbox.apache.org/repos/asf/opendal-yinyang.git


      at 06ef6a7  build: prepare an isolated Linux FUSE development host

This branch includes the following new commits:

     new 06ef6a7  build: prepare an isolated Linux FUSE development host

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(opendal-yinyang) 01/01: build: prepare an isolated Linux FUSE development host

Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a commit to branch xuanwo/linux-fuse-devbox-setup
in repository https://gitbox.apache.org/repos/asf/opendal-yinyang.git

commit 06ef6a7a22a479ee6ffb6418a29f8ec872d22ca3
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Mon Oct 26 14:29:44 2026 +0800

    build: prepare an isolated Linux FUSE development host
    
    Co-authored-by: Chojan Shang <ps...@apache.org>
---
 experiments/linux-devbox/setup.sh  | 109 +++++++++++++++++++++++++++++++++++++
 experiments/linux-devbox/verify.sh |  80 +++++++++++++++++++++++++++
 2 files changed, 189 insertions(+)

diff --git a/experiments/linux-devbox/setup.sh b/experiments/linux-devbox/setup.sh
new file mode 100644
index 0000000..ce03b4f
--- /dev/null
+++ b/experiments/linux-devbox/setup.sh
@@ -0,0 +1,109 @@
+#!/usr/bin/env bash
+# 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.
+
+# Task-specific Ubuntu development host setup, not a product installer.
+set -euo pipefail
+umask 077
+state_dir="$HOME/.local/state/yinyang-devbox"
+mkdir -p "$state_dir"
+exec > >(tee -a "$state_dir/setup.log") 2>&1
+finish() {
+    result=$?
+    printf '%s\n' "$result" > "$state_dir/setup.exit.tmp"
+    mv "$state_dir/setup.exit.tmp" "$state_dir/setup.exit"
+}
+trap finish EXIT
+date -Is
+git rev-parse HEAD
+. /etc/os-release
+test "$ID" = ubuntu
+test "$VERSION_ID" = 24.04
+
+sudo apt-get update
+sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y \
+    build-essential clang lld pkg-config libssl-dev libfuse3-dev fuse3 \
+    git gh curl ca-certificates jq tmux ripgrep fd-find zsh tree \
+    python3 nodejs npm unzip zip gdb strace sqlite3 docker.io
+sudo systemctl enable --now docker
+sudo modprobe fuse
+test -c /dev/fuse
+test -r /dev/fuse
+test -w /dev/fuse
+mkdir -p "$HOME/.local/bin"
+ln -sf /usr/bin/fdfind "$HOME/.local/bin/fd"
+# /usr/local/bin is present in both bash and zsh login shells.
+sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd
+sudo hostnamectl set-hostname lance-fuse-demo
+
+if ! test -x "$HOME/.cargo/bin/rustup"; then
+    rustup_binary=$(mktemp)
+    curl --fail --location --retry 3 \
+        https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init \
+        --output "$rustup_binary"
+    chmod 700 "$rustup_binary"
+    "$rustup_binary" -y --profile minimal --default-toolchain stable
+fi
+. "$HOME/.cargo/env"
+rustup component add clippy rustfmt rust-analyzer
+rustup toolchain install 1.91.0 --profile minimal
+
+binstall_dir=$(mktemp -d)
+curl --fail --location --retry 3 \
+    https://github.com/cargo-bins/cargo-binstall/releases/download/v1.26.1/cargo-binstall-x86_64-unknown-linux-musl.tgz \
+    --output "$binstall_dir/binstall.tgz"
+printf '%s  %s\n' 43d379fef8cb450961a14ff113e7bce7b5e1e52db709c776d186f928d8a20a40 \
+    "$binstall_dir/binstall.tgz" | sha256sum --check
+tar -xzf "$binstall_dir/binstall.tgz" -C "$binstall_dir"
+install -m 755 "$binstall_dir/cargo-binstall" "$HOME/.cargo/bin/cargo-binstall"
+cargo binstall --no-confirm --disable-telemetry \
+    taplo-cli typos-cli hawkeye cargo-deny@0.14.22
+sudo npm install --global @openai/codex
+# No GitHub token, signing key or Codex login is copied to the host.
+git config --global user.name Xuanwo
+git config --global user.email github@xuanwo.io
+git config --global fetch.prune true
+git config --global push.autoSetupRemote true
+git config --global commit.gpgsign false
+git config --global tag.gpgsign false
+
+image='docker.io/pgsty/silo:RELEASE.2026-09-16T00-00-00Z@sha256:635197cb9f36d01bee221d34d1c7d7960f6a95c48b0b6c01d99cd13bdae51a46'
+if ! sudo docker container inspect yinyang-silo >/dev/null 2>&1; then
+    sudo docker run -d --name yinyang-silo --restart unless-stopped \
+        -p 127.0.0.1:9000:9000 \
+        --mount type=volume,source=yinyang-silo-data,target=/data \
+        -e MINIO_ROOT_USER=yinyang-test -e MINIO_ROOT_PASSWORD=yinyang-test-only \
+        "$image" server /data
+else
+    sudo docker start yinyang-silo
+fi
+for attempt in {1..30}; do
+    if curl --fail --silent http://127.0.0.1:9000/minio/health/ready; then
+        break
+    fi
+    sleep 1
+done
+curl --fail http://127.0.0.1:9000/minio/health/ready
+sudo docker exec yinyang-silo mcli alias set local http://127.0.0.1:9000 yinyang-test yinyang-test-only
+sudo docker exec yinyang-silo mcli mb --ignore-existing local/yinyang-test
+rustc --version
+cargo --version
+codex --version
+fusermount3 --version
+pkg-config --modversion fuse3
+date -Is
+
diff --git a/experiments/linux-devbox/verify.sh b/experiments/linux-devbox/verify.sh
new file mode 100644
index 0000000..769b257
--- /dev/null
+++ b/experiments/linux-devbox/verify.sh
@@ -0,0 +1,80 @@
+#!/usr/bin/env bash
+# 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.
+
+# Run in tmux from the checkout root; preserve evidence outside the repository.
+set -euo pipefail
+umask 077
+. "$HOME/.cargo/env"
+state_dir="$HOME/.local/state/yinyang-devbox"
+mkdir -p "$state_dir"
+exec > >(tee -a "$state_dir/verify.log") 2>&1
+finish() {
+    result=$?
+    printf '%s\n' "$result" > "$state_dir/verify.exit.tmp"
+    mv "$state_dir/verify.exit.tmp" "$state_dir/verify.exit"
+}
+trap finish EXIT
+date -Is
+git rev-parse HEAD
+uname -a
+rustc --version
+cargo --version
+cargo x --help
+for task in lint check test licenses; do
+    cargo x "$task" --help
+    cargo x "$task"
+done
+cargo +1.91.0 check --workspace --all-targets --locked
+export YINYANG_S3_BUCKET=yinyang-test
+export YINYANG_S3_ENDPOINT=http://127.0.0.1:9000
+export YINYANG_S3_REGION=us-east-1
+export YINYANG_S3_ACCESS_KEY_ID=yinyang-test
+export YINYANG_S3_SECRET_ACCESS_KEY=yinyang-test-only
+export YINYANG_STORAGE_PROFILE=minio
+cargo test --workspace --all-targets s3_ -- --ignored --nocapture
+
+# The distro example checks host FUSE readiness, not YinYang Mount correctness.
+example=$(dpkg -L libfuse3-dev | sed -n '\|/examples/hello.c$|p' | head -n 1)
+test -n "$example"
+cc -Wall "$example" $(pkg-config fuse3 --cflags --libs) -o "$state_dir/fuse-hello"
+mount_dir=$(mktemp -d "$state_dir/fuse-smoke.XXXXXX")
+"$state_dir/fuse-hello" -f "$mount_dir" > "$state_dir/fuse-hello.log" 2>&1 &
+fuse_pid=$!
+cleanup_fuse() {
+    if mountpoint -q "$mount_dir"; then
+        fusermount3 -u "$mount_dir"
+    fi
+    wait "$fuse_pid" || true
+    rmdir "$mount_dir"
+}
+trap 'cleanup_fuse; finish' EXIT
+for attempt in {1..30}; do
+    if mountpoint -q "$mount_dir"; then break; fi
+    sleep 1
+done
+mountpoint -q "$mount_dir"
+findmnt --target "$mount_dir" --output TARGET,SOURCE,FSTYPE,OPTIONS
+test "$(cat "$mount_dir/hello")" = 'Hello World!'
+stat "$mount_dir/hello"
+fusermount3 -u "$mount_dir"
+wait "$fuse_pid"
+rmdir "$mount_dir"
+trap finish EXIT
+printf '%s\n' 'Non-root FUSE mount/read/stat/unmount passed.'
+date -Is
+