From 20410eb37442a510e9ca3f1b038cee647ae5bf21 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 25 Sep 2026 10:37:06 +0200 Subject: Move maintainer tooling out of the repo Git hooks, the upstream sweep and the SBo delivery workflow are the maintainer's operational tools, not package knowledge. They now live in a private workspace that wraps all three SlackBuild repos, with one shared copy of each hook instead of three drifting ones. Also in this pass: - AGENTS.md: checksum loop documented as sbodl (sbofixinfo does not fix checksums), nvchecker must not run without a token config, prefer use_latest_release over use_max_tag - README: Git Hooks section replaced by a short Contributing note - sweep report renamed to LAST_SWEEP.md across all three repos Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 247 ++------------------------------------------------------------ 1 file changed, 5 insertions(+), 242 deletions(-) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index 417eab2..c3388e7 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,245 +1,8 @@ # Slackware Pentesting Suite -A curated collection of penetration testing tools packaged as SlackBuilds for -Slackware GNU/Linux, following [SlackBuilds.org (SBo)](https://slackbuilds.org) -conventions where applicable. +This file is intentionally thin. AGENTS.md is the single source of truth for +this repository's rules and workflows, shared across every agent tool (Claude +Code, opencode, etc). Do not re-populate this file with duplicated content, +edit AGENTS.md instead. ---- - -## Repo Structure - -Each package lives in its own top-level subfolder: - -``` -/ -├── .SlackBuild # Main build script -├── .info # Metadata (version, checksums, URLs) -├── README # Description and usage notes -├── slack-desc # Package description (11-line format) -├── .desktop # (optional) Desktop entry for GUI apps -├── doinst.sh # (optional) Post-install script -├── rc. # (optional) Init script for daemon packages -├── patches/ # (optional) Patch directory for source builds -│ ├── series # (optional) Ordered patch list -│ └── *.patch -└── [...] # Other optional files (man pages, completions, etc.) -``` - ---- - -## Build Strategies - -Packages in this repo fall into several categories — the SlackBuild style -differs accordingly. - -### 1. Source builds (Python) - -Packages such as `netexec` are built from upstream source using the Python -build backend (see `~/Templates/SlackBuilds/python-template.SlackBuild`). - -### 2. Source builds (autotools / cmake) - -Packages such as `cadaver` are built from source using `./configure` or -`cmake`. Follow standard SBo template conventions. - -### 3. Data / archive packages - -Packages such as `webshells`, `windows-binaries` install data files rather -than compiled binaries. No stripping needed. - -> Several packages that used to live here (the Go builds `ffuf`/`gobuster`/ -> `nuclei`, the Rust build `feroxbuster`, the `.deb` repack -> `metasploit-framework-bin`, and the data packages `SecLists`/`exploitdb`) -> are now danix-official on SlackBuilds.org and maintained in the separate -> [sbo-slackbuilds](https://github.com/danixland/sbo-slackbuilds) repo. Their -> build strategies (Go/Rust source builds, `.deb` repack, the metasploit -> msfvenom-completion and man-page regeneration) are documented in that repo's -> `CLAUDE.md`. - ---- - -## SlackBuild Scripting Guidelines - -### Templates (source of truth) - -Local templates live in `~/Templates/SlackBuilds/`. **Always start from the -matching template there** rather than writing a SlackBuild or its accompanying -files from scratch or from memory. The directory holds: - -- Per-build-type SlackBuild templates: `autotools-template.SlackBuild`, - `cmake-template.SlackBuild`, `meson-template.SlackBuild`, - `go-template.SlackBuild`, `conraid-go-template.SlackBuild`, - `python-template.SlackBuild`, `perl-template.SlackBuild`, - `rubygem-template.SlackBuild`, `haskell-template.SlackBuild`. Pick the one - matching the package's build system. -- Shared support files: `slack-desc`, `template.info`, `doinst.sh`, - `douninst.sh`, `README`. Use these as the base for the corresponding files - in a package. - -When the local template and the upstream SBo template disagree, the local one -wins. Only fall back to the [SBo template](https://slackbuilds.org/templates/) -if no local template fits. - -### Copyright line - -In every `.SlackBuild`, the maintainer copyright line is exactly: - -``` -# Copyright danix -``` - -### General - -- Use `set -e` to abort on errors -- Honor `$TMP`, `$BUILD`, `$TAG`, `$OUTPUT`; provide defaults if unset -- Use `$ARCH` detection with proper `SLKCFLAGS` and `LIBDIRSUFFIX` -- Strip binaries and libraries unless the package type makes it irrelevant -- Install docs to `/usr/doc/$PRGNAM-$VERSION/` -- Always include `find -L` + `chown`/`chmod` cleanup block before packaging -- Use `makepkg -l y -c n` to create the final package - -### Patch support - -When upstream patches are needed, store them in `patches/` and apply via: - -```bash -if compgen -G "$CWD/patches/*.patch" > /dev/null; then - if [ -f "$CWD/patches/series" ]; then - while IFS= read -r PATCH; do - [ -z "$PATCH" ] && continue - [ "${PATCH#\#}" != "$PATCH" ] && continue - patch -p1 -i "$CWD/patches/$PATCH" - done < "$CWD/patches/series" - else - for PATCH in "$CWD"/patches/*.patch; do - patch -p1 -i "$PATCH" - done - fi -fi -``` - ---- - -## `.info` File - -Must contain: - -``` -PRGNAM="..." -VERSION="..." -HOMEPAGE="..." -DOWNLOAD="..." -MD5SUM="..." -DOWNLOAD_x86_64="" -MD5SUM_x86_64="" -REQUIRES="" -MAINTAINER="danix" -EMAIL="danix@danix.xyz" -``` - -- Use `DOWNLOAD="UNSUPPORTED"` when no 32-bit source exists -- Use `DOWNLOAD_x86_64` / `MD5SUM_x86_64` for architecture-specific downloads -- Checksums must match the exact source archive -- `REQUIRES=""` if no SBo dependencies; list space-separated SBo names otherwise -- For packages originally authored by others (e.g. Nessus), preserve the - original `MAINTAINER` and `EMAIL` values - ---- - -## `slack-desc` - -- Exactly 11 lines in the `package-name: description` format -- First line: `package-name: package-name (short one-liner)` -- Lines 2–11: description; blank lines use `package-name:` with nothing after -- Do not include the ruler line in the committed file - ---- - -## Tooling: sbo-maintainer-tools - -Source: https://slackware.uk/~urchlay/repos/sbo-maintainer-tools - -| Tool | Purpose | -|------|---------| -| `sbolint` | Lint `.SlackBuild`, `README`, `.info`, `slack-desc` | -| `sbopkglint` | Lint the built package | -| `sbofixinfo` | Auto-fix common `.info` file issues | -| `sbodl` | Download sources and verify `MD5SUM`/`SHA256SUM` from `.info` | - -### Workflow per package - -```bash -# 1. Fix any .info issues automatically -cd && sbofixinfo - -# 2. Download sources and verify checksums -# NOTE: when updating to a new version, sbodl will download the source but fail -# because the .info file still has the old (or placeholder) MD5SUM. In that case: -# a) compute the checksum manually: md5sum -# b) update MD5SUM in the .info file -# c) run sbodl again — it should now report "md5sum matches OK" -cd && sbodl - -# 3. Lint the script and metadata -cd && sbolint - -# 4. Build the package -cd && sudo bash .SlackBuild - -# 5. Lint the built package -cd && sbopkglint - -# 6. Remove symlinks created by sbodl before staging -# sbodl creates symlinks in the package directory pointing to downloaded sources. -# These must never be committed to git. -find . -type l -delete - -# 7. Commit -git add / -git commit -m': add version X.Y.Z' -``` - ---- - -## Git Hooks - -Versioned source lives in `.extras/hooks/`. They are NOT auto-installed -(git ignores `.git/hooks/` only if `core.hooksPath` is unset; the user's -global `core.hooksPath` dispatches to `.git/hooks/` when executable). -After a fresh clone, install them: - -```bash -cp .extras/hooks/* .git/hooks/ && chmod 0755 .git/hooks/{pre,post}-commit -``` - -- `pre-commit` — runs `sbolint` on each changed package; aborts the commit on - any error. Also auto-removes staged source-archive symlinks and blocks - staged regular source archives (`*.tar.*`, `*.zip`, `*.deb`, etc.). Skip - with `SBOLINT=no git commit ...`. -- `post-commit` — for each added/updated `*.SlackBuild`, offers to build the - SBo submission tarball into `SBo/.tar.gz`. - -### `SBO_ARCHIVE` (non-interactive archive answer) - -`post-commit` normally prompts on a TTY. To answer without one (agents, -scripts), set `SBO_ARCHIVE`: - -- `SBO_ARCHIVE=yes git commit ...` — build the tarball, no prompt -- `SBO_ARCHIVE=no git commit ...` — skip, no prompt -- unset + TTY → interactive prompt; unset + no TTY → skip - ---- - -## Commit Conventions - -- One commit per package add/update -- Commit message format: - - Add: `: add version X.Y.Z` - - Update: `: update to X.Y.Z` - - Fix: `: fix ` - ---- - -## Maintainer - -danix — danix@danix.xyz +@AGENTS.md -- cgit v1.2.3