Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tokio = { version = "1.49.0", features = [
url = "2.5.8"
env_logger = "0.11.8"
log = "0.4.29"
async-trait = { version = "0.1.89", optional = true }
async-trait = "0.1.89"
tr = "0.1.11"
unicode-width = "0.2.2"
regex = "1.12.2"
Expand All @@ -68,7 +68,7 @@ git = ["alpm/git", "alpm-utils/git", "aur-depends/git"]
backtrace = []
generate = ["alpm/generate"]
static = ["alpm/static"]
mock = ["async-trait"]
mock = []
mock_chroot = ["mock"]
#default = ["git", "generate"]

Expand Down
2 changes: 1 addition & 1 deletion completions/bash
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ _paru() {
common=('arch cachedir color config confirm dbpath debug gpgdir help hookdir logfile
noconfirm noprogressbar noscriptlet quiet root verbose

repo aur aururl clonedir makepkg mflags pacman pacman-conf git gitflags sudo sudoflags
repo aur aururl aururls aursource clonedir makepkg mflags pacman pacman-conf git gitflags sudo sudoflags
asp gpg gpgflags fm fmflags chrootflags pager completioninterval sortby searchby limit
upgrademenu removemake noremovemake cleanafter nocleanafter rebuild rebuildall norebuild
rebuildtree redownload noredownload redownloadall pgpfetch nopgpfetch useask
Expand Down
4 changes: 3 additions & 1 deletion completions/fish
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ end


# paru constants
set -l noopt 'not __fish_contains_opt -s G -s V -s P -s S -s D -s Q -s R -s U -s T -s F -s L -s C database query sync remove upgrade deptest files version repoctl chrootctl gendb'
set -l noopt 'not __fish_contains_opt -s G -s V -s P -s S -s D -s Q -s R -s U -s T -s F -s L -s C database query sync remove upgrade deptest files version repoctl chrootctl gendb aursource'
set -l listall "(paru -Pc | string replace ' ' \t)"
set -l listpacman "(__fish_print_pacman_packages)"
set -l show '__fish_contains_opt -s P show'
Expand Down Expand Up @@ -168,6 +168,7 @@ complete -c $progname -s C -f -l chrootctl -n "$noopt" -d 'Interactive shell to
# paru options
complete -c $progname -s c -l clean -n "$noopt" -d 'Remove unneeded dependencies' -f
complete -c $progname -l gendb -n "$noopt" -d 'Generate development package DB' -f
complete -c $progname -l aursource -n "$noopt" -d 'Manage AUR sources' -xa 'list add edit delete move pins unpin'

# Show options
complete -c $progname -n "$show" -s w -l news -d 'Print arch news' -f
Expand Down Expand Up @@ -196,6 +197,7 @@ complete -c $progname -n "not $noopt" -l repo -d 'Assume targets are from the re
complete -c $progname -n "not $noopt" -s a -l aur -d 'Assume targets are from the AUR' -f
complete -c $progname -n "not $noopt" -l aururl -d 'Set an alternative AUR URL' -f
complete -c $progname -n "not $noopt" -l aurrpcurl -d 'Set an alternative URL for the AUR /rpc endpoint' -f
complete -c $progname -n "not $noopt" -l aururls -d 'Ordered list of AUR-compatible sources to query' -f
complete -c $progname -n "not $noopt" -l clonedir -d 'Directory used to download and run PKGBUILDs' -r
complete -c $progname -n "not $noopt" -l makepkg -d 'Makepkg command to use' -f
complete -c $progname -n "not $noopt" -l pacman -d 'Pacman command to use' -f
Expand Down
2 changes: 2 additions & 0 deletions completions/zsh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ _pacman_opts_common=(
{-a,--aur}'[Assume targets are from the AUR]'
'--aururl[Set an alternative AUR URL]:url'
'--aurrpcurl[Set an alternative URL for the AUR /rpc endpoint]:url'
'--aururls[Ordered list of AUR-compatible sources to query]:urls'
'--aursource[Manage AUR sources]:action:(list add edit delete move pins unpin)'

'--clonedir[Directory used to download and run PKGBUILDs]:build dir:_files -/'
'--makepkg[makepkg command to use]:makepkg:_files'
Expand Down
45 changes: 45 additions & 0 deletions man/paru.8
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,44 @@ Will filter a list of packages to ones that appear in the AUR.
Interactive search and install. Displays a list of packages matching the search
terms and prompts the user on which packages to install.

.TP
.B \-\-aursource <action> [args]
Manage the ordered list of AUR-compatible sources stored as \fBAurSource\fR
lines in the user config file (\fB$PARU_CONF\fR if set, otherwise
\fB~/.config/paru/paru.conf\fR). Only the \fBAurSource\fR lines are rewritten;
comments and other settings are kept, and the file is replaced atomically so it
is left untouched on error. If the user config does not exist it is created
with an \fBInclude\fR of /etc/paru.conf. Actions:
.RS
.TP
.B list
Show the sources in priority order.
.TP
.B add <name> <url> [rpcurl]
Append a source. If no sources are configured yet, the current \fBAurUrl\fR
is kept as the first source, named \fBaur\fR.
.TP
.B edit <name> [name=<new>] [url=<url>] [rpcurl=<url>]
Change fields of a source. An empty \fBrpcurl=\fR resets it to <url>/rpc.
.TP
.B delete <name>
Remove a source. Removing every source falls back to \fBAurUrl\fR.
.TP
.B move <name> <position>
Move a source to a 1-based position. Earlier sources win when two sources
provide a package with the same name.
.TP
.B pins
List installed packages that are pinned to the AUR source they were installed
from (see \fBAurSource\fR in paru.conf(5)).
.TP
.B unpin <pkg>...
Forget the recorded source of packages so they follow the normal source order.
.RE

Renaming a source with \fBedit name=\fR updates the packages pinned to it;
deleting a source unpins its packages with a notice.

.TP
.B \-\-gendb
Generate the development package database. This tracks the latest commit for
Expand Down Expand Up @@ -302,6 +340,13 @@ Set an alternative AUR URL.
.B \-\-aurrpcurl
Set an alternative URL for the AUR /rpc endpoint.

.TP
.B \-\-aururls <url[,url...]>
Use an ordered list of AUR-compatible sources for this run instead of the
configured ones. May be repeated. Each source is named after its host
(\fBaur\fR for aur.archlinux.org). An explicit \-\-aururl selects that single
source instead. See \fBAurSource\fR in paru.conf(5).

.TP
.B \-\-clonedir <dir>
Directory used to download and run PKGBUILDs.
Expand Down
44 changes: 44 additions & 0 deletions man/paru.conf.5
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,50 @@ Set an alternative AUR URL.
.B AurRpcUrl = URL
Set an alternative URL for the AUR /rpc endpoint.

.TP
.B AurSource = Name URL [RpcURL]
Add an AUR-compatible source (an aurweb instance such as the AUR or a mirror).
Repeat to configure several; their order is their priority. Every source is
searched and queried for info, dependencies and upgrades and the results are
merged; when two sources provide a package with the same name the earlier one
wins. A source that fails is warned about and skipped; paru only errors if all
of them fail. PKGBUILDs are cloned from \fBURL\fR/<pkgbase>.git of the source the
package was found in, falling back to the other sources. RpcURL defaults to
\fBURL\fR/rpc.

Packages from the first source are shown as \fBaur/\fRpkg; packages from other
sources are shown with the source name, e.g. \fBmirror/\fRpkg. They are AUR
packages in every other respect.

A \fB<source>/<pkg>\fR target (with \-S, \-G, \-Gp and \-Gc) pins the package to
that source: it is resolved and downloaded from there even when a
higher-priority source has a package with the same name. If that source does
not have it, paru warns and falls back to the other sources. If a cached clone
of the package came from a different source, paru stops and asks for it to be
removed.

When a package is installed from a source other than the first one, paru
records that source in \fB$XDG_STATE_HOME/paru/aursources.toml\fR (usually
~/.local/state/paru). Later upgrades (\-Syu, \-Sua, \-Qua, devel checks) and
re-installs of that package look it up and download it from the recorded
source first. If that source is no longer configured or no longer has the
package, paru warns and uses the normal source order. Installing the package
from another source (\fB<source>/<pkg>\fR) or from the first source
(\fBaur/<pkg>\fR) updates the record; records of packages that are no longer
installed are dropped the next time the file is written. Use
\fBparu \-\-aursource pins\fR and \fBparu \-\-aursource unpin <pkg>\fR to view and
clear them.

When any \fBAurSource\fR is set it replaces \fBAurUrl\fR and \fBAurRpcUrl\fR; to
keep the AUR, list it as well. These lines are usually managed with
\fBparu \-\-aursource\fR. A later line with the same name replaces an earlier one.

Example:
.nf
AurSource = aur https://aur.archlinux.org
AurSource = mirror https://aur.example.org
.fi

.TP
.B CloneDir = /path/to/dir
Directory used to download and run PKGBUILDs.
Expand Down
2 changes: 2 additions & 0 deletions paru.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
#NewsOnUpgrade
#MinimumReleaseAge = 3d
#MinimumReleaseAgeExclude
#AurSource = aur https://aur.archlinux.org
#AurSource = mirror https://aur.example.org

#LocalRepo
#Chroot
Expand Down
Loading