[PR #397] [CLOSED] Add automated dependency installation script for multiple Linux distr… #412

Closed
opened 2026-10-26 09:50:02 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/3FS/pull/397
Author: @roquess
Created: 2/7/2026
Status: ❌ Closed

Base: main ← Head: dependencies.sh


📝 Commits (1)

  • 6be6918 Add automated dependency installation script for multiple Linux distributions

📊 Changes

1 file changed (+612 additions, -0 deletions)

View changed files

➕ dependencies.sh (+612 -0)

📄 Description

Overview

This PR introduces dependencies.sh, an automated installation script that simplifies the setup process for 3FS by detecting the operating system and installing all required dependencies using the appropriate package manager.

Motivation

Currently, the installation instructions in the README require users to manually identify their OS version and copy-paste the corresponding apt/yum/dnf command. This approach has several limitations:

  • Error-prone: Users might select the wrong command for their distribution
  • Incomplete: Users may forget to install additional prerequisites (libfuse, FoundationDB, Rust)
  • Time-consuming: Manual installation of multiple components requires multiple commands
  • Limited coverage: Only Ubuntu, openEuler, OpenCloudOS, and TencentOS are explicitly documented

Solution

The dependencies.sh script provides:

1. Automatic OS Detection

  • Detects Linux distribution and version using /etc/os-release
  • Identifies the appropriate package manager (apt, dnf, yum, or zypper)
  • Provides intelligent fallback for derivative distributions

2. Comprehensive Distribution Support

Package Manager Supported Distributions
apt Ubuntu 20.04/22.04/24.04, Debian 11/12
dnf/yum Fedora, RHEL 9, Rocky Linux, AlmaLinux, OpenCloudOS 9, TencentOS 4, openEuler
zypper openSUSE Leap, openSUSE Tumbleweed, SLES

3. Complete Dependency Chain

The script installs:

  • System packages (cmake, boost, clang, gcc, etc.)
  • libfuse 3.16.1+ (compiled from source if needed)
  • FoundationDB 7.1+ (downloaded from official releases)
  • Rust toolchain 1.75.0+ (with update to latest stable)

4. User-Friendly Features

  • Color-coded output for better readability
  • Version checking to avoid reinstalling existing dependencies
  • Detailed error messages and warnings
  • Clear next-steps instructions after successful installation

Usage

# Make the script executable
chmod +x dependencies.sh

# Run with sudo
sudo ./dependencies.sh

The script will:

  1. Detect your OS and package manager
  2. Install all system dependencies
  3. Build and install libfuse 3.16.1 if needed
  4. Install FoundationDB 7.1
  5. Install/update Rust toolchain
  6. Display next steps for building 3FS

Testing

The script has been designed to work on:

  • Ubuntu 20.04, 22.04, 24.04
  • Debian 11, 12
  • Fedora 38, 39, 40
  • openSUSE Leap 15.x, Tumbleweed
  • openEuler 2403sp1
  • OpenCloudOS 9
  • TencentOS 4
  • RHEL 9, Rocky Linux 9, AlmaLinux 9

Benefits

  1. Reduced Setup Time: Single command instead of multiple manual steps
  2. Fewer Errors: Automated detection prevents incorrect package installation
  3. Better Documentation: Script serves as executable documentation
  4. Easier Onboarding: New contributors can get started faster
  5. Wider Compatibility: Support for more distributions than currently documented

Changes Made

  • Added dependencies.sh script to repository root
  • Script includes comprehensive error handling and version checking
  • Automated installation of all prerequisites including libfuse and FoundationDB
  • Intelligent fallback for derivative distributions not explicitly listed

Future Improvements

Potential enhancements for future iterations:

  • Add --dry-run flag to show what would be installed
  • Add --minimal flag for installing only essential dependencies
  • Support for macOS via Homebrew
  • Docker container build support
  • Automated testing in CI/CD pipeline

Documentation Updates

If this PR is accepted, the README.md should be updated to reference the new script:

## Quick Start

### Install Dependencies

We provide an automated installation script that supports most Linux distributions:

```bash
chmod +x dependencies.sh
sudo ./dependencies.sh

For manual installation instructions, see Manual Installation below.


---

**Note**: This script requires root privileges to install system packages. Users should review the script before execution as with any script requiring elevated permissions.


---

<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/3FS/pull/397 **Author:** [@roquess](https://github.com/roquess) **Created:** 2/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dependencies.sh` --- ### 📝 Commits (1) - [`6be6918`](https://github.com/deepseek-ai/3FS/commit/6be69189603fab520d451b7d632aa58beb83cbae) Add automated dependency installation script for multiple Linux distributions ### 📊 Changes **1 file changed** (+612 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `dependencies.sh` (+612 -0) </details> ### 📄 Description ## Overview This PR introduces `dependencies.sh`, an automated installation script that simplifies the setup process for 3FS by detecting the operating system and installing all required dependencies using the appropriate package manager. ## Motivation Currently, the installation instructions in the README require users to manually identify their OS version and copy-paste the corresponding `apt`/`yum`/`dnf` command. This approach has several limitations: - **Error-prone**: Users might select the wrong command for their distribution - **Incomplete**: Users may forget to install additional prerequisites (libfuse, FoundationDB, Rust) - **Time-consuming**: Manual installation of multiple components requires multiple commands - **Limited coverage**: Only Ubuntu, openEuler, OpenCloudOS, and TencentOS are explicitly documented ## Solution The `dependencies.sh` script provides: ### 1. **Automatic OS Detection** - Detects Linux distribution and version using `/etc/os-release` - Identifies the appropriate package manager (apt, dnf, yum, or zypper) - Provides intelligent fallback for derivative distributions ### 2. **Comprehensive Distribution Support** | Package Manager | Supported Distributions | |----------------|------------------------| | **apt** | Ubuntu 20.04/22.04/24.04, Debian 11/12 | | **dnf/yum** | Fedora, RHEL 9, Rocky Linux, AlmaLinux, OpenCloudOS 9, TencentOS 4, openEuler | | **zypper** | openSUSE Leap, openSUSE Tumbleweed, SLES | ### 3. **Complete Dependency Chain** The script installs: - System packages (cmake, boost, clang, gcc, etc.) - libfuse 3.16.1+ (compiled from source if needed) - FoundationDB 7.1+ (downloaded from official releases) - Rust toolchain 1.75.0+ (with update to latest stable) ### 4. **User-Friendly Features** - Color-coded output for better readability - Version checking to avoid reinstalling existing dependencies - Detailed error messages and warnings - Clear next-steps instructions after successful installation ## Usage ```bash # Make the script executable chmod +x dependencies.sh # Run with sudo sudo ./dependencies.sh ``` The script will: 1. Detect your OS and package manager 2. Install all system dependencies 3. Build and install libfuse 3.16.1 if needed 4. Install FoundationDB 7.1 5. Install/update Rust toolchain 6. Display next steps for building 3FS ## Testing The script has been designed to work on: - Ubuntu 20.04, 22.04, 24.04 - Debian 11, 12 - Fedora 38, 39, 40 - openSUSE Leap 15.x, Tumbleweed - openEuler 2403sp1 - OpenCloudOS 9 - TencentOS 4 - RHEL 9, Rocky Linux 9, AlmaLinux 9 ## Benefits 1. **Reduced Setup Time**: Single command instead of multiple manual steps 2. **Fewer Errors**: Automated detection prevents incorrect package installation 3. **Better Documentation**: Script serves as executable documentation 4. **Easier Onboarding**: New contributors can get started faster 5. **Wider Compatibility**: Support for more distributions than currently documented ## Changes Made - Added `dependencies.sh` script to repository root - Script includes comprehensive error handling and version checking - Automated installation of all prerequisites including libfuse and FoundationDB - Intelligent fallback for derivative distributions not explicitly listed ## Future Improvements Potential enhancements for future iterations: - Add `--dry-run` flag to show what would be installed - Add `--minimal` flag for installing only essential dependencies - Support for macOS via Homebrew - Docker container build support - Automated testing in CI/CD pipeline ## Documentation Updates If this PR is accepted, the README.md should be updated to reference the new script: ```markdown ## Quick Start ### Install Dependencies We provide an automated installation script that supports most Linux distributions: ```bash chmod +x dependencies.sh sudo ./dependencies.sh ``` For manual installation instructions, see [Manual Installation](#manual-installation) below. ``` --- **Note**: This script requires root privileges to install system packages. Users should review the script before execution as with any script requiring elevated permissions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 09:50:02 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/3FS#412
No description provided.