# sbpkg

sbpkg is a fast and full-featured package manager for SlackBuilds.org (SBo), written in Rust.
It automates the full lifecycle of SBo packages on Slackware Linux — from syncing the
repository and resolving dependencies, to downloading sources, building, installing, and upgrading packages.

## Features

- Dependency resolution
- MD5 checksum and GPG signature verification
- Fallback source download from sbosrcarch mirror
- Blacklist support to exclude packages from upgrades
- rsync and git sync support
- Lock file to prevent concurrent instances
- Color output

## Install

### x86_64

A pre-built binary is included. Extract the archive and run the installer:

```bash
tar xvf sbpkg-2.0.2.tar.gz
cd sbpkg-2.0.2
./install.sh
```

### Other architectures (i686, arm, ...)

Build the binary from source first (requires Rust), then run the installer:

```bash
tar xvf sbpkg-2.0.2.tar.gz
cd sbpkg-2.0.2
cargo build --release
cp target/release/sbpkg bin/sbpkg
./install.sh
```

## Configuration

| File | Description |
|------|-------------|
| `/etc/sbpkg/sbpkg.toml` | Main configuration file |
| `/etc/sbpkg/blacklist.toml` | Packages excluded from upgrade |

## Usage

```
sbpkg <COMMAND> [OPTIONS]
```

| Command | Description |
|---------|-------------|
| `update` | Sync the SlackBuilds repository |
| `upgrade` | Upgrade installed packages |
| `build` | Build packages without installing |
| `install` | Build and install packages |
| `reinstall` | Build and reinstall packages |
| `fetch` | Download sources and copy SlackBuild scripts without building |
| `remove` | Remove installed packages |
| `deps` | List package dependencies |
| `reverse` | Show packages that depend on a given package |
| `info` | Display package information |
| `search` | Search packages in the repository |
| `list` | List installed SBo packages |
| `changelog` | Display the SlackBuilds.org changelog |
| `stats` | Display repository and system statistics |
| `clean` | Clean the build and fetch directories |
| `config` | Display the sbpkg configuration file |

For detailed options see `man sbpkg`.

## Files

| Path | Description |
|------|-------------|
| `/etc/sbpkg/sbpkg.toml` | Main configuration file |
| `/etc/sbpkg/blacklist.toml` | Packages excluded from upgrade |
| `/var/lib/sbpkg/SBo/` | Local SlackBuilds repository |
| `/var/lib/sbpkg/data.json` | Package index generated after each sync |
| `/tmp/sbpkg/build/` | Temporary build directory |
| `/tmp/sbpkg/fetch/` | Temporary fetch directory |
| `/var/log/sbpkg/build.log` | Build log (overwritten each session) |
| `/var/run/sbpkg.lock` | Lock file |

## License

Copyright 2024-2026 Dimitris Zlatanidis — see [LICENSE.txt](LICENSE.txt)
