aurpublish
Upload packages to the Arch User Repository
TLDR
Verify PKGBUILD integrity, generate .SRCINFO, create a commit message template, and publish the package to the AUR
Add githooks to the current repository
Display help
SYNOPSIS
aurpublish [options]
pkgdir
PARAMETERS
pkgdir
The path to the local package directory containing the Git repository to be pushed.
--help
Displays usage information and exits.
--version
Displays the aurpublish version information and exits.
--dry-run
Performs all operations except the actual push to the remote repository, allowing for testing.
--force
Forces the push operation using Git's
--force-with-lease option, used for overwriting remote history safely.
--ssh-key
Specifies an alternative SSH key file to use for connecting to
aur.archlinux.org instead of the default.
--gpg-key
Signs the Git commit with the specified GPG key ID.
--skip-check-local-repo
Bypasses the check that verifies if the local repository is a child of an aur-src(1) repository.
--no-cleanup
Prevents the command from cleaning up temporary files after execution.
--debug
Enables extensive debug output for troubleshooting.
--verbose
Enables verbose output, providing more details on the command's execution.
DESCRIPTION
aurpublish is a specialized command within the aurutils toolkit designed for publishing packages to the Arch User Repository (AUR). Its primary function is to automate the Git operations required to push a local package repository, typically created and managed by aur-src(1), to the official AUR Git server at
aur.archlinux.org.
When executed, aurpublish takes a local directory containing a package's Git repository (which includes the PKGBUILD file and any associated sources) and performs the necessary
git push commands. This typically involves pushing the current HEAD of the local repository to a branch on the AUR remote named after the package base (e.g.,
git push aur HEAD:pkgbase).
The command significantly simplifies the process for AUR package maintainers by abstracting away manual Git commands. It relies on pre-configured SSH access to
aur.archlinux.org to authenticate the push operation. Maintainers usually use aurpublish after making changes to their PKGBUILD, updating sources, or bumping package versions, ensuring their AUR submissions are correctly synchronized with their local development environment.
CAVEATS
Successful use of aurpublish requires proper SSH key configuration for authentication with
aur.archlinux.org. Without it, pushes will fail.
Users should exercise caution with the
--force option, as it can overwrite remote history if not used carefully, potentially causing issues for other users tracking the repository.
It is crucial to ensure the local repository specified by
pkgdir is clean and correctly prepared (e.g., updated PKGBUILD, correct sources, new .SRCINFO) before publishing to avoid broken or outdated packages on the AUR.
ENVIRONMENT VARIABLES
aurpublish respects several environment variables to configure its behavior:
AUR_SRC_DIR: Specifies the default directory for local AUR Git repositories. Defaults to
~/.cache/aurutils/sync.
AUR_SSH_KEY: Defines the path to the SSH key for authentication with
aur.archlinux.org. Defaults to
~/.ssh/id_rsa.
AUR_GPG_KEY: Sets the default GPG key ID for signing commits.
TYPICAL WORKFLOW
A common workflow involving aurpublish includes:
1. Creating or cloning a package repository using aur-src(1).
2. Making necessary changes to the PKGBUILD file and updating sources.
3. Running
makepkg --printsrcinfo > .SRCINFO to update the
.SRCINFO file, which is crucial for AUR.
4. Committing changes to the local Git repository.
5. Finally, executing
aurpublish
HISTORY
aurpublish is a component of the aurutils project, a collection of helper tools designed to streamline interaction with the Arch User Repository. The aurutils project itself began development around 2014-2015, created by Alad W. and Lukas Fleischer. Its aim was to provide a more robust and integrated workflow for building, installing, and maintaining AUR packages, filling gaps not fully addressed by manual processes or simpler tools. aurpublish emerged as the dedicated tool for the final step of publishing package updates, automating the Git push functionality that previously required manual commands.