Repository navigation
Fix cache cleanup and PKGBUILD review safety - #1621
Merged
pfeifferj merged 4 commits intoNov 14, 2026
Merged
Conversation
A forged pkgbase in .SRCINFO can redirect selective cleanup outside the cache or into a sibling checkout. Use the directory entry for deletion and Git cleanup. Skip permission repair on symlink and non-directory pkg entries so cleanup cannot chmod a symlink target. Signed-off-by: Josephine Pfeiffer <josie@archlinux.org>
Controls in package files, Git messages and remote text can conceal text or alter the terminal during review. Escape them before adding display styles, including controls decoded from news and comment HTML. Files with unsafe contents or names use escaped text instead of bat. Color escaped diffs with Paru's palette. External FileManager rendering, raw -Gp output and Unicode format characters remain outside this policy. Signed-off-by: Josephine Pfeiffer <josie@archlinux.org>
Local target discovery can source unrelated PKGBUILDs before any prompt, including during info and search. Generate missing metadata only in cwd directories matching explicit ./ targets, and avoid the eager cwd scan when constructing an explicit -B build. Existing metadata still resolves package names, split packages and local dependencies. A differently named directory or the current directory needs metadata or an explicit -B selection. Local dependencies without metadata may resolve from a configured repository or the AUR instead. Configured PKGBUILD repositories keep their existing policies. Signed-off-by: Josephine Pfeiffer <josie@archlinux.org>
The hook runs inside the downloaded checkout and can source its files. Running it before review exposes that code even when the user rejects the checkout. Move it after review acceptance while preserving explicit SkipReview and --noconfirm behavior. The configured hook remains trusted and can modify the accepted tree. Signed-off-by: Josephine Pfeiffer <josie@archlinux.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use the enumerated cache entry for deletion and Git cleanup so a forged pkgbase cannot redirect either operation. Skip permission repair for symlink and non-directory pkg entries.
Escape terminal controls in comments, decoded news, and built-in review output, including file names, symlink targets, Git messages and diffs. Control-containing files and names use escaped plain text; ordinary files retain bat highlighting. Diff colors now come from Paru instead of Git's configured palette. External FileManager rendering, raw -Gp and Unicode format characters outside char::is_control remain outside this escaping policy.
Generate missing .SRCINFO only in cwd directories matching explicit ./ targets. Existing metadata remains available for package names, split packages and dependencies. Without metadata, a package in a differently named directory, or the current directory itself, no longer resolves through ./package-name. Supply its .SRCINFO or select the directory with -B. An unnamed local dependency without metadata is omitted from the local repository and may resolve from a configured repository or the AUR instead. Configured PKGBUILD repositories keep their existing policies. Explicit -B builds no longer source unrelated working-directory PKGBUILDs.
Run PreBuildCommand after review acceptance so an interactive rejection prevents the hook from running. Existing --skipreview and --noconfirm behavior remains unchanged; the configured hook can still modify the accepted tree.