From f7c40d48c0727a96843c85990cc36ae5a9ac6888 Mon Sep 17 00:00:00 2001
From: Joel Grunbaum <joelgrun@gmail.com>
Date: Sat, 07 Feb 2026 23:42:43 +0000
Subject: [PATCH] Add integration test for binary

---
 README.md |  146 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 146 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..dd87bde
--- /dev/null
+++ b/README.md
@@ -0,0 +1,146 @@
+# Archbuild
+
+A modern, sustainable AUR package building and repository management tool for Arch Linux.
+
+## Features
+
+- **Automatic AUR builds** - Clone and build packages from the AUR
+- **Dependency resolution** - Automatically resolve and build AUR dependencies in correct order
+- **Parallel builds** - Build multiple packages concurrently with configurable worker count
+- **Package signing** - Optional GPG signing for packages and database
+- **Retry logic** - Configurable retries with exponential backoff for transient failures
+- **Package retention** - Keep configurable number of old versions, auto-cleanup
+- **Notifications** - Email and webhook (Discord, Slack, ntfy) notifications on failures
+- **VCS package handling** - Automatically rebuild git/svn/hg packages
+- **Modern Python** - Type-safe, async, well-tested codebase
+
+## Installation
+
+### From Source
+```bash
+# Clone the repository
+git clone https://github.com/joelgrun/archbuild
+cd archbuild
+
+# Set up virtual environment and install
+python -m venv .venv
+source .venv/bin/activate
+pip install -e .
+```
+
+### Native Arch Linux Package
+To build and install as a native system package:
+```bash
+makepkg -si
+```
+
+### Standalone Binary
+To create a standalone executable that doesn't require Python:
+```bash
+python scripts/build_binary.py
+```
+The binary will be available at `dist/archbuild-bin`.
+
+## Quick Start
+
+1. **Create configuration**:
+   ```bash
+   cp config/config.example.yaml config.yaml
+   # Edit config.yaml with your settings
+   ```
+
+2. **Initialize repository**:
+   ```bash
+   archbuild -c config.yaml init
+   ```
+
+3. **Add packages**:
+   ```bash
+   archbuild add yay paru
+   ```
+
+4. **Build all packages**:
+   ```bash
+   archbuild build-all
+   ```
+
+5. **Build a specific package**:
+   ```bash
+   archbuild build <package>
+   ```
+
+## Commands
+
+| Command                    | Description                                |
+|----------------------------|--------------------------------------------|
+| `init`                     | Initialize repository directories          |
+| `add <packages...>`        | Add and build new packages                 |
+| `remove <packages...>`     | Remove packages from repo                  |
+| `build-all [-f]`           | Build all packages, `-f` forces rebuild    |
+| `build <package>`          | Build a specific package                   |
+| `check`                    | Check for packages moved to official repos |
+| `list`                     | List packages in repository                |
+| `remake`                   | Rebuild repository database                |
+| `cleanup`                  | Remove old package versions                |
+| `migrate-config <vars.sh>` | Migrate legacy config                      |
+| `test-notifications`       | Test notification setup                    |
+
+## Configuration
+
+See `config/config.example.yaml` for all options. Key settings:
+
+```yaml
+repository:
+  name: "myrepo"
+  path: "/repo/x86_64"
+  build_dir: "/repo/build"
+
+building:
+  parallel: true
+  max_workers: 4
+  retry_attempts: 3
+
+retention:
+  keep_versions: 3
+
+notifications:
+  email:
+    enabled: true
+    to: "admin@example.com"
+```
+
+## Migration from Bash Version
+
+```bash
+archbuild migrate-config vars.sh -o config.yaml
+```
+
+## Systemd Timer
+
+Create `/etc/systemd/system/archbuild.service`:
+```ini
+[Unit]
+Description=Build AUR packages
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/archbuild -c /etc/archbuild/config.yaml build-all
+User=builduser
+```
+
+Create `/etc/systemd/system/archbuild.timer`:
+```ini
+[Unit]
+Description=Run archbuild daily
+
+[Timer]
+OnCalendar=daily
+Persistent=true
+
+[Install]
+WantedBy=timers.target
+```
+
+## License
+
+MIT

--
Gitblit v1.10.0