Add Custom PKGBUILD Repositories Support #2681
Open
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.
Summary
This PR implements comprehensive support for custom PKGBUILD repositories in yay, allowing users to configure and manage private, organization-specific, or local package collections that integrate seamlessly with yay's existing search and installation workflows.
Features Added
🏗️ Core Infrastructure
~/.config/yay/config.jsonwithcustomReposarray🔍 Search Integration
repo/packagesyntax (e.g.,yay -Ss aur/mama,yay -Ss core/linux)📦 Installation Workflow
⚙️ CLI Management
--repo-add=name,type,url/path- Add custom repository--repo-remove=name- Remove custom repository--repo-list- List all configured repositories--repo-update- Update all custom repositories🔧 Configuration & Migration
Repository Types Supported
📁 Local Repositories
{ "name": "local-packages", "type": "local", "path": "/path/to/pkgbuilds", "searchable": true, "priority": 1 }🌐 Git Repositories
{ "name": "github-test", "type": "git", "url": "https://github.com/skorotkiewicz/test-repo", "branch": "main", "searchable": true, "priority": 2, "auth": { "type": "token", "token": "ghp_..." } }🌍 HTTP Repositories
{ "name": "http-repo", "type": "http", "url": "https://example.com/pkgs/", "searchable": true, "priority": 3 }Usage Examples
Search Commands
Repository Management
Installation
Technical Implementation
Key Files Added/Modified
pkg/customrepo/- Complete custom repository packagepkg/settings/config.go- Extended configuration structurepkg/query/query_builder.go- Search integrationpkg/dep/dep_graph.go- Dependency resolutionpkg/sync/workdir/preparer.go- Build process integrationmain.go- CLI command handlingArchitecture Highlights
Testing
Backward Compatibility
Security Considerations
Documentation
Future Enhancements