AUR-FETCH(1)

NAME
aur-fetch - download packages from the AUR

SYNOPSIS
aur fetch [-S] [-f] [--rebase] [--reset] pkgbase [pkgbase...]

DESCRIPTION
aur-fetch downloads packages specified on the command-line from the AUR using git(1). If the first argument is - or /dev/stdin, packages are taken from standard input.

git(1) repositories are retrieved with git-clone(1) if they do not exist. Otherwise, the origin remote is updated with git-fetch(1). Changes can be merged with git-merge (--merge), git-rebase (--rebase), or git-reset (--reset).

Note: AUR packages have master as the only remote branch, so changes are always merged from origin/master. Local changes may however live in different branches.

OPTIONS

--sync=merge, --merge
    Run git-fetch(1) and merge upstream changes with git-merge(1).

    If no git-merge(1) options are specified, only fast-forwards are allowed with git-merge --ff-only. When specified, aur-fetch forwards the --ff, --ff-only, --no-commit and --no-ff options to git-merge.

    Note: When previewing changes with --no-commit it is advised to also use --no-ff, so that no commits are applied to the index even when a fast-forward is possible. See git-merge(1) for details.

--sync=rebase, --rebase
    Run git-rebase(1) instead of git-merge(1), re-applying local commits on top of upstream AUR commits. The --no-ff option is supported and forwarded to git-merge when specified.

    Warning: If a rebase does not apply cleanly, the user is expected to fix any issues occurring in the git repository before continuing. A rebase may also inadvertently keep malicious commits that Trusted Users have removed from the git history. The --rebase option should thus be used with care. See git-rebase(1) for details.

--sync=auto, --auto
    Run git-rebase(1) for a repository with aurutils.rebase set to true in git-config(1), and git-merge(1) otherwise.

--sync=reset, --reset
    Retrieve new revisions with git-fetch origin and git-reset to the master@{upstream} commit, removing any local commits.

--discard
    When using --sync=merge or --sync=rebase, uncommitted changes may cause the operation to fail. Furthermore, git-rebase expects a clean work tree.

    With --sync=merge, the --discard option checks if new upstream commits are available with git-merge-base. If so, uncommited changes are discarded with git-checkout.

    With --sync=rebase, the --discard option runs git-checkout unconditionally.

--existing
    Check if a git repositories exist in AUR using git-ls-remote(1) before retrieving or updating them.

-r, --recurse
    Download packages and their dependencies with aur-depends(1). If this option is specified, arguments must be supplied by pkgname instead of by pkgbase.

--results=FILE
    Write colon-delimited output in the following form to FILE:

    <action>:<head_from>:<head_to>:file://<path>

    Possible values for <action> are clone, merge, rebase, and fetch. Can be used by higher level tools to differentiate new clones from updates to existing repositories.

    If action is set to clone, <head_from> is set to 4b825dc642cb6eb9a060e54bf8d69288fbee4904, the git(1) empty tree object. <path> is the absolute path to the corresponding git repository.

    Note: When using --no-commit --no-ff and git-merge(1), <head_from> and <head_to> will be identical.

ENVIRONMENT

AUR_LOCATION
    URI where repositories are cloned from. Defaults to https://aur.archlinux.org.

AUR_MIRROR
    URI to an AUR mirror, a git(1) repository where each package is contained in a git-branch(1). Defaults to https://github.com/archlinux/aur.

AUR_MIRROR_TTL
    When updating an AUR mirror, a list of all branches is retrieved with git-ls-remote to validate arguments. The AUR_MIRROR_TTL variable defines (in seconds) how often this command is run. For accurate results, this should roughly equal the synchronization interval between AUR and its mirrors. Defaults to 300.

AUR_MIRROR_BRANCH
    The default branch of an AUR mirror. Defaults to main.

AUR_FETCH_USE_MIRROR
    If this variable is set to a positive integer value, clone repositories from an AUR mirror instead of AUR_LOCATION. Upstream changes are merged from origin/<package> instead of origin/master.

    Remotes of existing git(1) repositories are preserved. When enabling or disabling AUR_FETCH_MIRROR, repositories should be converted manually with git-remote set-url and git-remote set-branches origin.

AUR_ROOT
    Directory where an AUR mirror is cloned to. Defaults to XDG_CACHE_HOME/aur.

SEE ALSO
aur(1), aur-depends(1), git(1), git-clone(1), git-config(1), git-fetch(1), git-merge(1), git-pull(1), git-rebase(1), git-reset(1), git-rev-parse(1)

AUTHORS
Alad Wenter (https://github.com/AladW)