Add git sources, check-updates, repos submodule, improve docs

dpack features:
- Git source support: packages can specify [source].git for cloning
  instead of tarball download. Supports branch, tag, and commit pinning.
  SHA256 can be set to "SKIP" for git sources.
- check-updates command: queries upstream APIs (GitHub releases/tags)
  to find available updates. Packages set [source].update_check URL.
- CheckUpdates CLI subcommand wired into main.rs

Package changes:
- FreeCAD updated to weekly-2026.03.19 development builds
- dwl: added update_check URL and git source documentation
- src/repos extracted to standalone git repo (danny8632/repos.git)
  and added as git submodule

Documentation:
- All 7 README.md files updated with detailed requirements sections
  including which Linux distros are supported, exact package names
  for Arch/Ubuntu/Fedora, and clear notes about which components
  require Linux vs can be built on macOS
- dpack README: added git source and check-updates documentation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-19 11:58:23 +01:00
parent 029642ae5b
commit 5fb597e2d6
136 changed files with 509 additions and 2731 deletions

View File

@@ -16,12 +16,47 @@ A source-based package manager for DarkForge Linux, positioned between CRUX's `p
## Requirements
- Rust 1.75+ (build)
- Linux (runtime — uses Linux namespaces for sandboxing)
- bubblewrap (`bwrap`) for sandboxed builds (optional, falls back to direct execution)
- `curl` or `wget` for source downloads
- `tar` for source extraction
- `readelf` or `objdump` for shared library scanning
**Build-time (compiling dpack itself):**
dpack is written in Rust and can be built on any platform with a Rust toolchain:
- Rust 1.75+ with Cargo (install via https://rustup.rs)
- A C linker (gcc or clang) — needed by some Rust dependencies
- Works on Linux and macOS for development, but runtime features require Linux
```bash
# macOS (Homebrew)
brew install rustup && rustup-init
# Arch Linux
sudo pacman -S rust
# Ubuntu / Debian
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
**Runtime (using dpack to build/install packages):**
dpack must run on a Linux system (it uses Linux-specific features):
- Linux kernel 5.4+ (for namespace support)
- `bash` (build scripts are bash)
- `curl` or `wget` (source tarball downloads)
- `git` (for git-source packages)
- `tar` (source extraction)
- `readelf` or `objdump` (shared library scanning — part of binutils)
- bubblewrap (`bwrap`) for sandboxed builds (optional — falls back to direct execution)
- A C/C++ compiler (gcc or clang) and make (for building packages)
On the DarkForge system itself, all runtime dependencies are provided by the base system. On another Linux distro for testing:
```bash
# Arch Linux
sudo pacman -S base-devel bubblewrap curl git
# Ubuntu / Debian
sudo apt install build-essential bubblewrap curl git binutils
```
## Building
@@ -33,7 +68,11 @@ cargo build --release
The binary is at `target/release/dpack`. Install it:
```bash
# On Linux
sudo install -m755 target/release/dpack /usr/local/bin/
# For development/testing (from the repo root)
cargo run --release -- install zlib
```
## Usage
@@ -64,6 +103,9 @@ dpack list
# Check for file conflicts and shared library issues
dpack check
# Check for available updates (compares installed vs repo + upstream)
dpack check-updates
# Convert foreign package formats
dpack convert /path/to/Pkgfile # CRUX → dpack TOML (stdout)
dpack convert /path/to/curl-8.19.0.ebuild -o curl.toml # Gentoo → dpack TOML (file)
@@ -158,6 +200,42 @@ ldflags = ""
The `system` field is a hint: `autotools`, `cmake`, `meson`, `cargo`, or `custom`.
### Git sources
Instead of downloading a tarball, dpack can clone a git repository directly. This is useful for building from the latest development branch or a specific commit:
```toml
[source]
url = "" # can be empty for git sources
sha256 = "SKIP" # integrity verified by git
git = "https://github.com/FreeCAD/FreeCAD.git" # clone URL
branch = "main" # checkout this branch
# Or pin to a tag (supports ${version} expansion):
# tag = "v${version}"
# Or pin to a specific commit:
# commit = "abc123def456"
```
When `git` is set, dpack clones the repository (with `--depth 1` for branches/tags) into the build directory. The `branch`, `tag`, and `commit` fields control what gets checked out (in priority order: commit > tag > branch > default).
### Upstream update checking
Packages can specify an `update_check` URL in the `[source]` section. When you run `dpack check-updates`, it queries these URLs and compares the result against your installed version.
```toml
[source]
url = "https://example.com/foo-${version}.tar.xz"
sha256 = "..."
update_check = "https://api.github.com/repos/owner/repo/releases/latest"
```
Supported URL patterns:
- **GitHub releases API** — parses `tag_name` from the JSON response
- **GitHub/Gitea tags API** — parses the first tag name
- **Plain URL** — the response body is treated as the version string
## Running Tests
```bash