diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-08 13:03:32 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-08 13:03:32 +0200 |
| commit | 25742bd9efc32de82eeeeaba0f4b8976c169e7ce (patch) | |
| tree | 5dacbf9207123e6e74733e5d474b28ed34888f61 /.extras/hooks/post-commit | |
| parent | 998dbd56e53c8c8c8bc1a425cec16b6ccc752e34 (diff) | |
| download | sbo-slackbuilds-25742bd9efc32de82eeeeaba0f4b8976c169e7ce.tar.gz sbo-slackbuilds-25742bd9efc32de82eeeeaba0f4b8976c169e7ce.zip | |
repo: move packages under their SBo category
Mirror SBo's own <category>/<package>/ layout instead of a flat
<package>/ one. The category is now carried by the directory, so
there's no separate map to maintain, and a package exports to the SBo
repo at the identical relative path.
misc: SecLists, exploitdb, nuclei
games: UrbanTerror
network: feroxbuster, ffuf, gobuster, metasploit-framework-bin, r8125
Categories taken from the synced SBo tree, which is authoritative.
This also repairs two things the flat layout had broken:
- test-build's category_of() returned "." for every package, since it
derives the category from the parent directory name.
- post-commit asserted a fixed depth. It now locates a build by the
directory holding the .SlackBuild, and names the archive after the
package with the package dir at the tarball root, as SBo expects.
Drops the exec bit from SecLists.SlackBuild and gobuster.SlackBuild,
flagged by sbolint once the pre-commit hook started running: SBo
requires 0644 and ships both that way.
Diffstat (limited to '.extras/hooks/post-commit')
| -rwxr-xr-x | .extras/hooks/post-commit | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/.extras/hooks/post-commit b/.extras/hooks/post-commit index 6ed63f7..6f55d61 100755 --- a/.extras/hooks/post-commit +++ b/.extras/hooks/post-commit @@ -7,14 +7,14 @@ SBO_DIR="$REPO_ROOT/SBo" # Find packages whose .SlackBuild was added (A) or modified (M) in this commit. # git diff-tree output format: <status>\t<file> -# We only want files exactly one directory deep, e.g. hugo/hugo.SlackBuild. +# Paths are <category>/<package>/<package>.SlackBuild, matching SBo's own +# layout. Depth isn't asserted: any dir holding a .SlackBuild is a build. PACKAGES=() while IFS=$'\t' read -r status file; do [[ "$status" != "A" && "$status" != "M" ]] && continue dir=$(dirname "$file") base=$(basename "$file") [[ "$dir" == "." ]] && continue # skip root-level files - [[ "$dir" == *"/"* ]] && continue # skip files deeper than one level [[ "$base" == *.SlackBuild ]] || continue PACKAGES+=("$dir") done < <(git diff-tree --no-commit-id -r --name-status HEAD) @@ -51,8 +51,12 @@ for pkg in "${PACKAGES[@]}"; do case "$answer" in [yY]|[yY][eE][sS]) mkdir -p "$SBO_DIR" - if tar -czf "$SBO_DIR/$pkg.tar.gz" -C "$REPO_ROOT" "$pkg"; then - echo " -> Archive created: SBo/$pkg.tar.gz" + # $pkg is <category>/<package>. SBo expects a tarball named after + # the package, with the package dir (not the category) at its + # root, so name it by basename and tar from inside the category. + name=$(basename "$pkg") + if tar -czf "$SBO_DIR/$name.tar.gz" -C "$REPO_ROOT/$(dirname "$pkg")" "$name"; then + echo " -> Archive created: SBo/$name.tar.gz" else echo " -> Archive FAILED." >&2 fi |
