aur-chroot

aur-chroot is a tool for building packages within a clean systemd-nspawn container.

Synopsis

aur chroot [operations] [options] [package...]

Description

Using a chroot provides a clean, consistent build environment, isolated from your host system. This ensures that the package's declared dependencies are correct and prevents issues caused by locally installed packages or configurations.

aur-chroot manages the creation, updating, and use of these build containers.

Operations

  • --create: Creates a new container root filesystem with mkarchroot. You can specify packages like base-devel to install into the new container.
  • -B, --build: Builds a package from the current directory inside the container using makechrootpkg.
  • -U, --update: Updates the packages inside the container using arch-nspawn.
  • --path: Prints the path to the container's root directory.

Options

  • -D DIR, --directory=DIR: The base directory for chroot containers. Defaults to /var/lib/aurbuild/<machine>.
  • -C FILE, --pacman-conf=FILE: The pacman.conf to use inside the container.
  • -M FILE, --makepkg-conf=FILE: The makepkg.conf to use inside the container.
  • --bind=DIR: Bind a directory read-only into the container.
  • --bind-rw=DIR: Bind a directory read-write into the container.
  • -T, --temp: Build in a temporary container that is removed after the build completes.
  • --user=USER: Run makechrootpkg as the specified user on the host.
  • --margs=ARGS: Comma-separated arguments to pass to makepkg inside the chroot.
  • --cargs=ARGS: Comma-separated arguments to pass to makechrootpkg.