feat: PKGBUILD + Install-/Usage-Doku + AUR-Repo-Setup
Neue Dateien: - PKGBUILD: AUR-Paket mit Hook-Installation - INSTALL.md: Installations-Guide mit eigenem AUR-Repo - USAGE.md: Befehlsreferenz + Troubleshooting Features: - ALPM-Hook Installation via aegisaur install-hook - Eigenes pacman-Remote auf Gitea - Config/Cache Pfad-Dokumentation Repository: https://gitea.die-heimatlosen.eu/arch_agent/aegisaur
This commit is contained in:
+75
@@ -0,0 +1,75 @@
|
||||
# 📦 Installation Guide
|
||||
|
||||
## Schnellstart
|
||||
|
||||
```bash
|
||||
# Als AUR-Paket installieren (empfohlen)
|
||||
makepkg -si PKGBUILD
|
||||
|
||||
# Oder systemweit nach /usr/local/bin
|
||||
sudo cp target/release/aegisaur /usr/local/bin/
|
||||
sudo chmod +x /usr/local/bin/aegisaur
|
||||
|
||||
# Oder symbolischer Link
|
||||
sudo ln -s $(pwd)/target/release/aegisaur /usr/local/bin/aegisaur
|
||||
```
|
||||
|
||||
## Eigenes AUR-Repository
|
||||
|
||||
### Pfad auf Gitea
|
||||
```
|
||||
https://gitea.die-heimatlosen.eu/arch_agent/aegisaur
|
||||
```
|
||||
|
||||
### Als pacman-Remote hinzufügen
|
||||
|
||||
Bearbeite `/etc/pacman.conf`:
|
||||
|
||||
```ini
|
||||
[aegisaur]
|
||||
SigLevel = Optional TrustAll
|
||||
Server = https://gitea.die-heimatlosen.eu/arch_agent/$repo/releases/download/latest
|
||||
```
|
||||
|
||||
### Oder manuell
|
||||
|
||||
```bash
|
||||
# PKGBUILD herunterladen
|
||||
curl -O https://gitea.die-heimatlosen.eu/arch_agent/aegisaur/raw/branch/master/PKGBUILD
|
||||
|
||||
# Bauen und installieren
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
## ALPM-Hook (systemweit)
|
||||
|
||||
```bash
|
||||
# Installiert Hook nach /usr/share/libalpm/hooks/
|
||||
sudo aegisaur install-hook
|
||||
|
||||
# Deinstalliert Hook
|
||||
sudo aegisaur remove-hook
|
||||
```
|
||||
|
||||
## Konfiguration
|
||||
|
||||
```bash
|
||||
# Erstellt ~/.config/aegisaur/config.toml
|
||||
aegisaur config
|
||||
|
||||
# Beispiel-Config kopieren
|
||||
cp /usr/share/aegisaur/config.example.toml ~/.config/aegisaur/config.toml
|
||||
```
|
||||
|
||||
## Pfad-Übersicht
|
||||
|
||||
| Komponente | Pfad |
|
||||
|------------|------|
|
||||
| Binary | `/usr/bin/aegisaur` |
|
||||
| ALPM-Hook | `/usr/share/libalpm/hooks/99-aegisaur.hook` |
|
||||
| Hook-Script | `/usr/share/libalpm/hooks/aegisaur-check.sh` |
|
||||
| Dokumentation | `/usr/share/doc/aegisaur/` |
|
||||
| Config | `~/.config/aegisaur/config.toml` |
|
||||
| Cache | `~/.cache/aegisaur/` |
|
||||
| Quellcode | `/home/arch_agent_system/.openclaw/workspace/aegisaur/` |
|
||||
| Gitea-Repo | `https://gitea.die-heimatlosen.eu/arch_agent/aegisaur` |
|
||||
@@ -0,0 +1,72 @@
|
||||
# Maintainer: Thuumate <thuumate@ghost.local>
|
||||
# AUR-Repo: https://gitea.die-heimatlosen.eu/arch_agent/aegisaur
|
||||
|
||||
pkgname=aegisaur
|
||||
pkgver=0.1.0
|
||||
pkgrel=1
|
||||
pkgdesc="Trust-Scoring + IOC-Scanner für Arch Linux AUR-Pakete"
|
||||
arch=('x86_64' 'x86_64_v3' 'x86_64_v4' 'aarch64')
|
||||
url="https://gitea.die-heimatlosen.eu/arch_agent/aegisaur"
|
||||
license=('MIT')
|
||||
makedepends=('rust' 'cargo')
|
||||
depends=('pacman' 'libalpm')
|
||||
optdepends=(
|
||||
'sudo: für install-hook und ALPM-Integration'
|
||||
'nodejs: für IOC-Checks mit npm-Paketen'
|
||||
)
|
||||
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
export RUSTFLAGS="-C target-cpu=${CARCH}"
|
||||
cargo build --release --locked
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname-$pkgver"
|
||||
|
||||
# Binary
|
||||
install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/$pkgname"
|
||||
|
||||
# ALPM Hook
|
||||
install -Dm644 "src/hook/hook.install" "$pkgdir/usr/share/libalpm/hooks/99-aegisaur.hook"
|
||||
install -Dm755 "src/hook/check.sh" "$pkgdir/usr/share/libalpm/hooks/aegisaur-check.sh"
|
||||
|
||||
# Dokumentation
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
install -Dm644 TODO.md "$pkgdir/usr/share/doc/$pkgname/TODO.md"
|
||||
install -Dm644 INSTALL.md "$pkgdir/usr/share/doc/$pkgname/INSTALL.md"
|
||||
install -Dm644 USAGE.md "$pkgdir/usr/share/doc/$pkgname/USAGE.md"
|
||||
|
||||
# Config Beispiel
|
||||
install -Dm644 "config/example.toml" "$pkgdir/usr/share/$pkgname/config.example.toml"
|
||||
|
||||
# Licence
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
echo "╔══════════════════════════════════════════════════════════════╗"
|
||||
echo "║ AegisAUR wurde installiert! ║"
|
||||
echo "╚══════════════════════════════════════════════════════════════╝"
|
||||
echo ""
|
||||
echo "Nutzer-Spezifisches Setup:"
|
||||
echo " aegisaur config → Erstellt ~/.config/aegisaur/config.toml"
|
||||
echo ""
|
||||
echo "Systemweites Setup (ALPM-Hook):"
|
||||
echo " sudo aegisaur install-hook"
|
||||
echo ""
|
||||
echo "Schnellstart:"
|
||||
echo " aegisaur scan-all → Scannt alle installierten AUR-Pakete"
|
||||
echo " aegisaur check-ioc → Prüft gegen aktuelle IOC-Listen"
|
||||
echo ""
|
||||
echo "Mehr Infos: https://gitea.die-heimatlosen.eu/arch_agent/aegisaur"
|
||||
}
|
||||
|
||||
pre_remove() {
|
||||
echo "AegisAUR Hook wird entfernt..."
|
||||
if command -v aegisaur >/dev/null 2>&1; then
|
||||
aegisaur remove-hook 2>/dev/null || true
|
||||
fi
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
# 📖 AegisAUR Usage Guide
|
||||
|
||||
## Befehls-Übersicht
|
||||
|
||||
```bash
|
||||
# Einzelnes Paket scannen
|
||||
aegisaur scan <paketname> [--verbose]
|
||||
|
||||
# Alle AUR-Pakete scannen
|
||||
aegisaur scan-all [--verbose]
|
||||
|
||||
# IOC-Check (wie aurvulntest)
|
||||
aegisaur check-ioc [--list atomicarch|all]
|
||||
|
||||
# Whitelist-Verwaltung
|
||||
aegisaur allow <paketname>
|
||||
aegisaur deny <paketname>
|
||||
|
||||
# System-Konfiguration
|
||||
aegisaur config
|
||||
aegisaur cache
|
||||
|
||||
# ALPM-Hook (root nötig)
|
||||
sudo aegisaur install-hook
|
||||
sudo aegisaur remove-hook
|
||||
```
|
||||
|
||||
## Beispiel-Workflows
|
||||
|
||||
### Vor Installation eines AUR-Pakets
|
||||
```bash
|
||||
# 1. Scannen
|
||||
aegisaur scan neues-paket
|
||||
|
||||
# 2. Wenn IOC erkannt → NICHT installieren
|
||||
# 3. Wenn verdächtig → PKGBUILD prüfen
|
||||
# 4. Wenn OK → installieren (mit Hook automatisch)
|
||||
|
||||
yay -S neues-paket # Hook scannt automatisch
|
||||
```
|
||||
|
||||
### Regelmäßige Checks
|
||||
```bash
|
||||
# Alle 48h (via cron/systemd)
|
||||
aegisaur check-ioc
|
||||
```
|
||||
|
||||
### Volle Systemprüfung
|
||||
```bash
|
||||
# Alle AUR-Pakete scannen + IOC-Listen checken
|
||||
aegisaur scan-all && aegisaur check-ioc
|
||||
```
|
||||
|
||||
## Exit Codes
|
||||
|
||||
| Code | Bedeutung |
|
||||
|------|-----------|
|
||||
| 0 | Erfolg |
|
||||
| 1 | Allgemeiner Fehler |
|
||||
| 2 | IOC erkannt / Kritisch |
|
||||
| 3 | Scan-Fehler |
|
||||
|
||||
## Konfiguration
|
||||
|
||||
```toml
|
||||
# ~/.config/aegisaur/config.toml
|
||||
[settings]
|
||||
auto_check_iocs = true
|
||||
auto_check_pkgbuild = true
|
||||
ioc_cache_ttl_minutes = 60
|
||||
warning_threshold = 60
|
||||
critical_threshold = 30
|
||||
block_install_on_critical = false
|
||||
block_install_on_ioc = true
|
||||
notify_desktop = true
|
||||
|
||||
[sources.atomic_arch]
|
||||
name = "Atomic Arch Gist"
|
||||
url = "https://gist.githubusercontent.com/Kidev/85756c3dcad3623ca5604a8135bafd14/raw"
|
||||
enabled = true
|
||||
|
||||
[sources.community]
|
||||
name = "AUR Community Blocklist"
|
||||
url = "https://raw.githubusercontent.com/Kidev/AUR-Blocklist/main/blocklist.txt"
|
||||
enabled = true
|
||||
```
|
||||
|
||||
## Wichtige Pfade
|
||||
|
||||
| Zweck | Lokaler Pfad | Gitea URL |
|
||||
|-------|-------------|-----------|
|
||||
| Quellcode | `/home/arch_agent_system/.openclaw/workspace/aegisaur/` | `https://gitea.die-heimatlosen.eu/arch_agent/aegisaur` |
|
||||
| Binary (Release) | `target/release/aegisaur` | Releases Tab |
|
||||
| PKGBUILD | `./PKGBUILD` | Raw view |
|
||||
| Dokumentation | `./README.md`, `./USAGE.md` | Wiki/Raw |
|
||||
| Issues/Feedback | - | `https://gitea.die-heimatlosen.eu/arch_agent/aegisaur/issues` |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Hook funktioniert nicht
|
||||
```bash
|
||||
# Rechte prüfen
|
||||
ls -la /usr/share/libalpm/hooks/aegisaur*
|
||||
|
||||
# Manuell ausführen
|
||||
sudo bash /usr/share/libalpm/hooks/aegisaur-check.sh
|
||||
```
|
||||
|
||||
### Cache-Probleme
|
||||
```bash
|
||||
# Cache leeren
|
||||
rm -rf ~/.cache/aegisaur/
|
||||
|
||||
# Neu befüllen
|
||||
aegisaur check-ioc
|
||||
```
|
||||
|
||||
### Netzwerk-Fehler
|
||||
```bash
|
||||
# Proxy-Config prüfen
|
||||
env | grep -i proxy
|
||||
|
||||
# Test-Request
|
||||
curl -I https://gist.githubusercontent.com/Kidev/...
|
||||
```
|
||||
|
||||
---
|
||||
*Built with ❤️ (and some 👻 magic)*
|
||||
*Quasi & Thuumate — 2026*
|
||||
Reference in New Issue
Block a user