Contributing to aurutils

Contributions to aurutils are welcome. This guide outlines how to set up a development environment, run tests, and report issues.

Reporting Issues

Before filing a bug report, please check the following:

  1. Are you using the latest release of aurutils and its dependencies? Is the issue reproducible on the master branch?
  2. Does the package in question conform to the PKGBUILD(5) man page and the AUR package guidelines?
  3. Does the package provide the correct metadata on the AUR RPC interface?
  4. Does the package build successfully with makepkg -s or in a clean chroot with extra-x86_64-build?
  5. Does the package use internal makepkg functions? (see FS#43502)
  6. Is the problem reproducible and not due to a misconfiguration of pacman, makepkg, sudoers, or gpg?

If you can answer "yes" to all of these questions, please create a debug log:

AUR_DEBUG=1 aur <command> <arguments> >aurutils.log 2>&1

Then, attach the aurutils.log file to your GitHub issue.

Development Setup

To contribute code, you can set up a local development environment.

1. Clone the Repository

git clone https://github.com/aurutils/aurutils.git
cd aurutils

2. Build

The Makefile is used to prepare the scripts for execution. The build target handles generating the main aur script and shell completions.

make build

This will create the aur executable script in the root of the repository.

3. Running Tests

aurutils has a test suite to ensure consistency and correctness.

  • Shellcheck: Lints all shell scripts for common errors.

    make shellcheck

  • Option Parsing Consistency: Verifies that the command-line options defined in the scripts match their getopt parsing loops.

    tests/parseopt-consistency

  • Perl Tests: Runs tests for the Perl modules.

    make -C perl test

  • CI Workflow: The continuous integration workflow defined in .github/workflows/ci.yml runs all of these checks.

4. Submitting Changes

  1. Create a new branch for your feature or bug fix.
  2. Make your changes.
  3. Ensure all tests pass.
  4. Submit a pull request to the aurutils repository.