feat: update user configuration example and add development package support

- Enhanced the user.depot.toml.example file with additional comments and options for user-local preferences.
- Bumped version from 0.35.0 to 0.35.1 in meson.build.
- Introduced a new option for DEPOT_DEVELOPMENT_PACKAGE in meson_options.txt.
- Added functions to handle the requested development package in build_options.rs.
- Updated various builder files (autotools.rs, cmake.rs, custom.rs, meson.rs, perl.rs) to support passing build flags.
- Implemented checks for the required development package during source builds in commands.rs and commands/build_cmd.rs.
- Added tests to ensure the correct behavior of development package requirements and source build warnings.
- Modified manual source handling in source/mod.rs to validate local manual sources before proceeding with builds.
- Updated cargo build and test scripts to accept a new development package argument.
- Added VSCode settings to disable automatic configuration on open.
This commit is contained in:
2026-04-04 17:02:42 -05:00
parent 135514acb3
commit 34d52d11a9
24 changed files with 866 additions and 164 deletions
+31 -14
View File
@@ -1,28 +1,45 @@
[flags]
# Default build flags applied to all packages via /etc/depot.d/build.toml
# Compiler selection
cc = "gcc"
# Example /etc/depot.d/build.toml
#
# Drop-in build defaults. This file is a good place for policy that should
# apply everywhere without crowding the main /etc/depot.toml.
# Default CFLAGS
# Toolchain selection.
cc = "clang"
# cxx = "clang++"
# ar = "ar"
# ld = "ld.lld"
# Compiler defaults. These are merged with package-level flags unless a package
# explicitly replaces them.
cflags = ["-O2"]
cflags += ["-pipe"]
# cxxflags = ["-O2", "-pipe"]
# Optional install directory overrides for supported builders
#bindir = "/usr/bin"
#libdir = "/usr/lib"
#sysconfdir = "/etc"
# Default LDFLAGS
# Linker defaults.
ldflags = ["-Wl,-O1"]
# Default LTOFLAGS and automatic injection into CFLAGS/CXXFLAGS/LDFLAGS.
# Link-time optimization policy.
ltoflags = ["-flto=auto"]
# Rust-specific LTO flags appended only to RUSTFLAGS when use_lto is enabled.
#RUSTLTOFLAGS = ["-Clinker-plugin-lto"]
# rustltoflags = ["-Clinker-plugin-lto"]
use_lto = true
# CARCH short name (can be overridden per-package)
# Architecture defaults. Packages may still override this when needed.
carch = "x86_64"
# chost = "x86_64-sfg-linux-gnu"
# cbuild = "x86_64-sfg-linux-gnu"
# Example of appending per-package cflags: (will be exposed as build.cflags appends)
# Optional install directory overrides for supported builders.
# bindir = "/usr/bin"
# libdir = "/usr/lib"
# sysconfdir = "/etc"
# Example of additive layering in depot.d:
# cflags += ["-fstack-clash-protection"]
# ldflags += ["-Wl,-z,relro", "-Wl,-z,now"]
# Avoid host-specific tuning such as -march=native in shared system configs
# unless every package built on this machine is intended only for this machine.
# cflags += ["-march=native"]
+16 -3
View File
@@ -1,6 +1,19 @@
[package]
# System-wide package overrides. Example: set default provides or package metadata
# name = ""
# Example /etc/depot.d/package.toml
#
# System-wide package metadata overrides. Use this sparingly: this is best for
# policy defaults or local compatibility shims, not for rewriting package specs.
# Example: provide a virtual runtime package name to satisfy runtime deps
# Example fields you might override globally in a controlled environment:
# homepage = "https://mirror.example.org/packages"
# license = ["MIT"]
# Example: provide a virtual package name to satisfy dependency expressions.
# This can be useful on systems with a local compatibility package.
# provides = ["filesystem"]
# Example: declare that local packages replace an older naming scheme.
# replaces = ["old-filesystem"]
# Example: force a conflict relationship across locally maintained packages.
# conflicts = ["legacy-filesystem"]
+27
View File
@@ -1,22 +1,38 @@
# Example /etc/depot.d/repos.toml
#
# Repository configuration for source specs and binary package feeds.
# Lower priority numbers win first when multiple repos provide the same package.
[settings]
# Prefer binary packages when both a binary package and a source spec exist.
# Set this to false if you want source specs to be preferred by default.
prefer_binary = true
[source.vertex]
# Source repository used for spec lookup and source-build planning.
url = "https://gitlab.com/vertex-linux/packages.git"
enabled = true
priority = 50
# Restrict scanning to selected subdirectories inside the source repo.
subdirs = ["core", "extra"]
# Example:
# branch = "main"
[binary.core]
# Binary repository for core packages.
url = "https://repo.sfgos.net/core"
enabled = true
priority = 10
repo_db = "repo.db.zst"
[binary.core.arch.x86_64]
# Enable this repo for x86_64 systems.
enabled = true
[binary.extra]
# Secondary binary repository for additional packages.
url = "https://repo.sfgos.net/extra"
enabled = true
priority = 20
@@ -24,3 +40,14 @@ repo_db = "repo.db.zst"
[binary.extra.arch.x86_64]
enabled = true
# Additional examples:
#
# [binary.testing]
# url = "https://repo.example.org/testing"
# enabled = false
# priority = 5
# repo_db = "repo.db.zst"
#
# [binary.testing.arch.x86_64]
# enabled = true
+67 -26
View File
@@ -1,42 +1,83 @@
# Example /etc/depot.toml - system-wide configuration for Depot
# Example /etc/depot.toml
#
# This file is the main system-wide configuration for Depot.
# Keep settings here for machine-wide defaults that should apply to every user.
# For smaller drop-in overrides, prefer adding files under /etc/depot.d/.
#
# Most values here act as defaults and can still be overridden:
# - per package in package specs
# - per invocation with CLI flags
# - per user in ~/.config/depot.toml
[build]
# Installation prefix for package builds
# Installation prefix used by supported build systems when a package does not
# override it explicitly. For a normal system package build this is usually /usr.
prefix = "/usr"
# Default compiler and archiver
cc = "gcc"
# Default toolchain commands. These are passed through to builders that honor
# CC/CXX/AR and related variables.
cc = "clang"
ar = "ar"
# Optional examples:
# cxx = "clang++"
# ld = "ld.lld"
# cpp = "cpp"
# strip = "strip"
# ranlib = "ranlib"
[build.flags]
# Basic compiler flags
# Baseline C compiler flags for packages that do not supply their own.
# Keep these conservative unless you are intentionally tuning for one machine.
cflags = ["-O2"]
# Append additional flags (demonstrates += append support)
# Appends are often clearer than rewriting the whole list. This demonstrates
# Depot's += support for layered config files.
# NOTE: this is NOT regular TOML syntax. The += operator is a special extension that Depot supports
cflags += ["-g"]
# Optional install directory overrides for supported builders
#bindir = "/usr/bin"
#sbindir = "/usr/bin"
#libdir = "/usr/lib"
#libexecdir = "/usr/lib"
#sysconfdir = "/etc"
#localstatedir = "/var"
#sharedstatedir = "/var/lib"
#includedir = "/usr/include"
#datarootdir = "/usr/share"
#datadir = "/usr/share"
#mandir = "/usr/share/man"
#infodir = "/usr/share/info"
# Linker flags
# Optional C++ and linker defaults:
# cxxflags = ["-O2"]
ldflags = ["-Wl,-O1"]
# Target architecture short name (CARCH). Defaults to host arch if unset.
# Link-time optimization defaults. When use_lto is true, Depot will inject
# ltoflags into the appropriate compiler and linker flag sets automatically.
# ltoflags = ["-flto=auto"]
# use_lto = false
# Target architecture short name (CARCH). If unset, Depot derives this from the
# current host system or active cross target.
carch = "x86_64"
# Target triples (optional)
#chost = "x86_64-pc-linux-gnu"
#cbuild = "x86_64-pc-linux-gnu"
# Target triples are usually only needed for cross or multilib scenarios.
# chost = "x86_64-pc-linux-gnu"
# cbuild = "x86_64-pc-linux-gnu"
# Optional install directory overrides for supported builders. Leave these at
# their defaults unless you are intentionally targeting a non-standard layout.
# bindir = "/usr/bin"
# sbindir = "/usr/bin"
# libdir = "/usr/lib"
# libexecdir = "/usr/lib"
# sysconfdir = "/etc"
# localstatedir = "/var"
# sharedstatedir = "/var/lib"
# includedir = "/usr/include"
# datarootdir = "/usr/share"
# datadir = "/usr/share"
# mandir = "/usr/share/man"
# infodir = "/usr/share/info"
# Additional examples:
# makeflags = "-j8"
# env_vars = ["CCACHE_DIR=/var/cache/ccache"]
# passthrough_env = ["http_proxy", "https_proxy"]
[install]
# Install test dependencies along with build/runtime dependencies.
# When true, Depot will also try to install declared test dependencies while
# resolving dependencies for source builds.
test_deps = false
# Example future-friendly place for install policy overrides:
# assume_yes = false
# keep_cache = true
+23 -6
View File
@@ -1,18 +1,35 @@
# Example per-user configuration (~/.config/depot.toml)
#
# Use this file for local preferences that should not affect other users on the
# same machine. System-wide defaults still come from /etc/depot.toml and
# /etc/depot.d/*.toml unless you override them here.
[build]
# A user-local prefix is useful when you are building software for your own
# account instead of assembling system packages.
prefix = "/usr/local"
# Personal toolchain preference.
cc = "clang"
# cxx = "clang++"
[build.flags]
# User-local compiler preferences.
cflags = ["-O2"]
cflags += ["-g"]
carch = "x86_64"
[install]
test_deps = false
# Examples:
# cxxflags = ["-O2", "-g"]
# ldflags = ["-Wl,-O1"]
# makeflags = "-j4"
# Optional install directory overrides for supported builders
#bindir = "/usr/local/bin"
#sbindir = "/usr/local/sbin"
#libdir = "/usr/local/lib"
# Optional install directory overrides for supported builders.
# bindir = "/usr/local/bin"
# sbindir = "/usr/local/sbin"
# libdir = "/usr/local/lib"
# datadir = "/usr/local/share"
[install]
# Install test dependencies automatically for your own source builds.
test_deps = false