Skip to content

Feat/install home directory#5

Merged
thibaultfalque merged 4 commits intomainfrom
feat/install-home-directory
Sep 8, 2025
Merged

Feat/install home directory#5
thibaultfalque merged 4 commits intomainfrom
feat/install-home-directory

Conversation

@thibaultfalque
Copy link
Contributor

🚀 Install to Home Directory for XCSP-Launcher

📋 Summary

This PR introduces a rootless installation script for XCSP-Launcher, targeting the user’s home directory (default: ~/.local).
The script:

  • Installs the selected version under ~/.local/opt/xcsp-launcher/<version> and symlinks ~/.local/bin/xcsp
  • Verifies integrity of artifacts via cosign (if available) and sha256sum
  • Installs the XCSP3 solution checker under ~/.local/share/xcsp-launcher/tools/
  • Fetches solver configuration files (*.solver.yaml) into ~/.config/xcsp-launcher/solvers
  • Offers an interactive installation of solvers via xcsp install -c <file>

🎯 Motivation & Context

  • Allow installation in user-space (enterprise, clusters, or locked-down systems) without requiring root privileges.
  • Standardize directory layout with XDG base directories (config, data, state, cache).
  • Strengthen the trust chain with cosign signature verification + checksums.
  • Simplify onboarding with a single script that auto-detects OS and resolves the latest release.

✨ Key Changes

  • New install.sh script (Linux/macOS) with:

    • 📦 Download of release artifacts (direct binary or macOS tarball)

    • 🔐 Optional cosign verification (--cosign-identity configurable) + sha256sum

    • 🗂️ Standardized paths:

      • ~/.local/bin/xcsp → symlink to ~/.local/opt/xcsp-launcher/<version>/xcsp
      • ~/.config/xcsp-launcher/solvers/*.solver.yaml
      • ~/.local/share/xcsp-launcher/tools/xcsp3-solutionChecker-2.5.jar
      • ~/.local/state/xcsp-launcher/ + ~/.cache/xcsp-launcher/
    • ⚙️ Solver configs fetched from crillab/metrics-solvers (git or tarball fallback)

    • 🧩 Interactive solver installation menu (--yes to skip)

    • 🧪 Post-install checks (xcsp --version, PATH hints if needed)

🧰 Usage

# Default install (latest release, prefix ~/.local)
./install.sh

# Install a specific version
./install.sh --version v0.6.3

# Change installation prefix
./install.sh --prefix "$HOME/.local"

# Skip all verification (not recommended)
./install.sh --no-verify

# Override cosign certificate identity
./install.sh --cosign-identity "https://github.com/CPToolset/xcsp-launcher/.github/workflows/release.yml@refs/heads/main"

# Non-interactive mode (skip solver menu)
./install.sh --yes

If xcsp is not found after installation, add this to your shell profile:
export PATH="$HOME/.local/bin:$PATH"

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 8, 2025

@thibaultfalque thibaultfalque merged commit ac4f1d4 into main Sep 8, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant