Reject fuzzy AUR overlay patches - #215
Open
jeremydixon22 wants to merge 3 commits into
Open
Conversation
Greptile SummaryThe PR centralizes AUR overlay application in a strict helper and disables GNU patch fuzz while preserving ordinary line-offset handling.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| helpers/patch-helpers.sh | Introduces the shared strict patch helper and safely stops before patch execution when changing into the package directory fails. |
| bin/sync-aur | Routes live AUR overlay application through the shared zero-fuzz helper. |
| bin/package-worktree | Uses the same strict helper when reconstructing the patched package workspace. |
| bin/omarchy-pkgs | Extends self-testing to cover exact application, fuzzy rejection, and failed directory changes. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[AUR package source] --> B[Sync or worktree replay]
B --> C[apply_patch_strict]
C --> D{Package directory accessible?}
D -->|No| E[Exit without invoking patch]
D -->|Yes| F[GNU patch with fuzz 0]
F -->|Exact context| G[Apply overlay]
F -->|Fuzzy or mismatched context| H[Reject overlay]
Reviews (3): Last reviewed commit: "Test missing patch target handling" | Re-trigger Greptile
Contributor
Author
|
Addressed the review note in the latest commit: the helper now explicitly exits before invoking patch if entering the package directory fails. Rechecked syntax, exact application, failed-directory behavior, and diff cleanliness. |
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.
AUR overlays currently use GNU patch's default fuzz allowance. That can silently ignore changed context and transplant an Omarchy customization onto an upstream recipe it was not written against.
This moves patch application into one shared helper and sets
--fuzz=0for both the livesync-aurpath and the non-mutatingpackage-worktreereplay path. Exact context and ordinary line offsets remain supported; omitted or mismatched context fails closed for maintainer review.The built-in self-test now contains two fixtures:
Verification:
bash -npasses for the helper and all three changed scriptsomarchy-pkgs self-testpasses inarchlinux:base-develv4l2-relaydsuccessfully replays all three existing overlays through the strict helper, withpatched/matchingcurrent/