Commands reference

ahriman

ArcH linux ReposItory MANager

usage: ahriman [-h] [-a ARCHITECTURE] [-c CONFIGURATION] [--force] [-l LOCK] [--log-handler {console,syslog,journald}]
               [-q] [--report | --no-report] [-r REPOSITORY] [--unsafe] [-V] [--wait-timeout WAIT_TIMEOUT]
               {aur-search,search,help-commands-unsafe,help,help-updates,help-version,version,package-add,add,package-update,package-changes,package-changes-remove,package-remove,remove,package-status,status,package-status-remove,package-status-update,status-update,patch-add,patch-list,patch-remove,patch-set-add,repo-backup,repo-check,check,repo-create-keyring,repo-create-mirrorlist,repo-daemon,daemon,repo-rebuild,rebuild,repo-remove-unknown,remove-unknown,repo-report,report,repo-restore,repo-sign,sign,repo-status-update,repo-sync,sync,repo-tree,repo-triggers,repo-update,update,service-clean,clean,repo-clean,service-config,config,repo-config,service-config-validate,config-validate,repo-config-validate,service-key-import,key-import,service-repositories,service-run,run,service-setup,init,repo-init,repo-setup,setup,service-shell,shell,service-tree-migrate,user-add,user-list,user-remove,web}
               ...

Named Arguments

-a, --architecture

filter by target architecture

-c, --configuration

configuration path

Default: /etc/ahriman.ini

--force

force run, remove file lock

Default: False

-l, --lock

lock file

Default: /tmp/ahriman.lock

--log-handler

Possible choices: console, syslog, journald

explicit log handler specification. If none set, the handler will be guessed from environment

-q, --quiet

force disable any logging

Default: False

--report, --no-report

force enable or disable reporting to web service

Default: True

-r, --repository

filter by target repository

--unsafe

allow to run ahriman as non-ahriman user. Some actions might be unavailable

Default: False

-V, --version

show program’s version number and exit

--wait-timeout

wait for lock to be free. Negative value will lead to immediate application run even if there is lock file. In case of zero value, the application will wait infinitely

Default: -1

command

command

Possible choices: aur-search, search, help-commands-unsafe, help, help-updates, help-version, version, package-add, add, package-update, package-changes, package-changes-remove, package-remove, remove, package-status, status, package-status-remove, package-status-update, status-update, patch-add, patch-list, patch-remove, patch-set-add, repo-backup, repo-check, check, repo-create-keyring, repo-create-mirrorlist, repo-daemon, daemon, repo-rebuild, rebuild, repo-remove-unknown, remove-unknown, repo-report, report, repo-restore, repo-sign, sign, repo-status-update, repo-sync, sync, repo-tree, repo-triggers, repo-update, update, service-clean, clean, repo-clean, service-config, config, repo-config, service-config-validate, config-validate, repo-config-validate, service-key-import, key-import, service-repositories, service-run, run, service-setup, init, repo-init, repo-setup, setup, service-shell, shell, service-tree-migrate, user-add, user-list, user-remove, web

command to run

Sub-commands

help-commands-unsafe

list unsafe commands as defined in default args

ahriman help-commands-unsafe [-h] [subcommand ...]
Positional Arguments
subcommand

instead of showing commands, just test command line for unsafe subcommand and return 0 in case if command is safe and 1 otherwise

help

show help message for application or command and exit

ahriman help [-h] [subcommand]
Positional Arguments
subcommand

show help message for specific command

help-updates

request AUR for current version and compare with current service version

ahriman help-updates [-h] [-e]
Named Arguments
-e, --exit-code

return non-zero exit code if updates available

Default: False

help-version (version)

print application and its dependencies versions

ahriman help-version [-h]

package-add (add, package-update)

add existing or new package to the build queue

ahriman package-add [-h] [--dependencies | --no-dependencies] [-e] [--increment | --no-increment] [-n] [-y]
                    [-s {auto,archive,aur,directory,local,remote,repository}] [-u USERNAME] [-v VARIABLE]
                    package [package ...]
Positional Arguments
package

package source (base name, path to local files, remote URL)

Named Arguments
--dependencies, --no-dependencies

process missing package dependencies

Default: True

-e, --exit-code

return non-zero exit status if result is empty

Default: False

--increment, --no-increment

increment package release (pkgrel) version on duplicate

Default: True

-n, --now

run update function after

Default: False

-y, --refresh

download fresh package databases from the mirror before actions, -yy to force refresh even if up to date

Default: False

-s, --source

Possible choices: auto, archive, aur, directory, local, remote, repository

explicitly specify the package source for this command

Default: auto

-u, --username

build as user

-v, --variable

apply specified makepkg variables to the next build

This subcommand should be used for new package addition. It also supports flag –now in case if you would like to build the package immediately. You can add new package from one of supported sources: 1) if it is already built package you can specify the path to the archive; 2) you can also add built packages from the directory (e.g. during the migration from another repository source); 3) it is also possible to add package from local PKGBUILD, but in this case it will be ignored during the next automatic updates; 4) ahriman supports downloading archives from remote (e.g. HTTP) sources; 5) and finally you can add package from AUR.

package-changes

retrieve package changes stored in database

ahriman package-changes [-h] [-e] package
Positional Arguments
package

package base

Named Arguments
-e, --exit-code

return non-zero exit status if result is empty

Default: False

This feature requests package status from the web interface if it is available.

package-changes-remove

remove the package changes stored remotely

ahriman package-changes-remove [-h] package
Positional Arguments
package

package base

package-remove (remove)

remove package from the repository

ahriman package-remove [-h] package [package ...]
Positional Arguments
package

package name or base

package-status (status)

request status of the package

ahriman package-status [-h] [--ahriman] [-e] [--info | --no-info] [-s {unknown,pending,building,failed,success}]
                       [package ...]
Positional Arguments
package

filter status by package base

Named Arguments
--ahriman

get service status itself

Default: False

-e, --exit-code

return non-zero exit status if result is empty

Default: False

--info, --no-info

show additional package information

Default: False

-s, --status

Possible choices: unknown, pending, building, failed, success

filter packages by status

This feature requests package status from the web interface if it is available.

package-status-remove

remove the package from the status page

ahriman package-status-remove [-h] package [package ...]
Positional Arguments
package

remove specified packages from status page

Please note that this subcommand does not remove the package itself, it just clears the status page.

package-status-update (status-update)

update package status on the status page

ahriman package-status-update [-h] [-s {unknown,pending,building,failed,success}] [package ...]
Positional Arguments
package

set status for specified packages. If no packages supplied, service status will be updated

Named Arguments
-s, --status

Possible choices: unknown, pending, building, failed, success

new package build status

Default: success

patch-add

create or update patched PKGBUILD function or variable

ahriman patch-add [-h] package variable [patch]
Positional Arguments
package

package base

variable

PKGBUILD variable or function name. If variable is a function, it must end with ()

patch

path to file which contains function or variable value. If not set, the value will be read from stdin

Unlike patch-set-add, this function allows to patch only one PKGBUILD function, e.g. typing ahriman patch-add ahriman pkgver it will change the pkgver inside PKGBUILD, typing ahriman patch-add ahriman build() it will change build() function inside PKGBUILD

patch-list

list available patches for the package

ahriman patch-list [-h] [-e] [-v VARIABLE] [package]
Positional Arguments
package

package base

Named Arguments
-e, --exit-code

return non-zero exit status if result is empty

Default: False

-v, --variable

if set, show only patches for specified PKGBUILD variables

patch-remove

remove patches for the package

ahriman patch-remove [-h] [-v VARIABLE] package
Positional Arguments
package

package base

Named Arguments
-v, --variable

should be used for single-function patches in case if you wold like to remove only specified PKGBUILD variables. In case if not set, it will remove all patches related to the package

patch-set-add

create or update source patches

ahriman patch-set-add [-h] [-t TRACK] package
Positional Arguments
package

path to directory with changed files for patch addition/update

Named Arguments
-t, --track

files which has to be tracked

Default: [’.diff’, ‘.patch’]

In order to add a patch set for the package you will need to clone the AUR package manually, add required changes (e.g. external patches, edit PKGBUILD) and run command, e.g. ahriman patch-set-add path/to/directory. By default it tracks *.patch and *.diff files, but this behavior can be changed by using –track option

repo-backup

backup repository settings and database

ahriman repo-backup [-h] path
Positional Arguments
path

path of the output archive

repo-check (check)

check for packages updates. Same as repo-update –dry-run –no-manual

ahriman repo-check [-h] [--changes | --no-changes] [-e] [--vcs | --no-vcs] [-y] [package ...]
Positional Arguments
package

filter check by package base

Named Arguments
--changes, --no-changes

calculate changes from the latest known commit if available. Only applicable in dry run mode

Default: True

-e, --exit-code

return non-zero exit status if result is empty

Default: False

--vcs, --no-vcs

fetch actual version of VCS packages

Default: True

-y, --refresh

download fresh package databases from the mirror before actions, -yy to force refresh even if up to date

Default: False

repo-create-keyring

create package which contains list of trusted keys as set by configuration. Note, that this action will only create package, the package itself has to be built manually

ahriman repo-create-keyring [-h]

repo-create-mirrorlist

create package which contains list of available mirrors as set by configuration. Note, that this action will only create package, the package itself has to be built manually

ahriman repo-create-mirrorlist [-h]

repo-daemon (daemon)

start process which periodically will run update process

ahriman repo-daemon [-h] [-i INTERVAL] [--aur | --no-aur] [--changes | --no-changes]
                    [--dependencies | --no-dependencies] [--dry-run] [--increment | --no-increment]
                    [--local | --no-local] [--manual | --no-manual] [--partitions | --no-partitions] [-u USERNAME]
                    [--vcs | --no-vcs] [-y]
Named Arguments
-i, --interval

interval between runs in seconds

Default: 43200

--aur, --no-aur

enable or disable checking for AUR updates

Default: True

--changes, --no-changes

calculate changes from the latest known commit if available. Only applicable in dry run mode

Default: True

--dependencies, --no-dependencies

process missing package dependencies

Default: True

--dry-run

just perform check for updates, same as check command

Default: False

--increment, --no-increment

increment package release (pkgrel) on duplicate

Default: True

--local, --no-local

enable or disable checking of local packages for updates

Default: True

--manual, --no-manual

include or exclude manual updates

Default: True

--partitions, --no-partitions

instead of updating whole repository, split updates into chunks

Default: True

-u, --username

build as user

--vcs, --no-vcs

fetch actual version of VCS packages

Default: True

-y, --refresh

download fresh package databases from the mirror before actions, -yy to force refresh even if up to date

Default: False

repo-rebuild (rebuild)

force rebuild whole repository

ahriman repo-rebuild [-h] [--depends-on DEPENDS_ON] [--dry-run] [--from-database] [--increment | --no-increment] [-e]
                     [-s {unknown,pending,building,failed,success}] [-u USERNAME]
Named Arguments
--depends-on

only rebuild packages that depend on specified packages

--dry-run

just perform check for packages without rebuild process itself

Default: False

--from-database

read packages from database instead of filesystem. This feature in particular is required in case if you would like to restore repository from another repository instance. Note, however, that in order to restore packages you need to have original ahriman instance run with web service and have run repo-update at least once.

Default: False

--increment, --no-increment

increment package release (pkgrel) on duplicate

Default: True

-e, --exit-code

return non-zero exit status if result is empty

Default: False

-s, --status

Possible choices: unknown, pending, building, failed, success

filter packages by status. Requires –from-database to be set

-u, --username

build as user

repo-remove-unknown (remove-unknown)

remove packages which are missing in AUR and do not have local PKGBUILDs

ahriman repo-remove-unknown [-h] [--dry-run]
Named Arguments
--dry-run

just perform check for packages without removal

Default: False

repo-report (report)

generate repository report according to current settings

ahriman repo-report [-h]

Create and/or update repository report as configured.

repo-restore

restore settings and database

ahriman repo-restore [-h] [-o OUTPUT] path
Positional Arguments
path

path of the input archive

Named Arguments
-o, --output

root path of the extracted files

Default: /

repo-sign (sign)

(re-)sign packages and repository database according to current settings

ahriman repo-sign [-h] [package ...]
Positional Arguments
package

sign only specified packages

Sign repository and/or packages as configured.

repo-status-update

update repository status on the status page

ahriman repo-status-update [-h] [-s {unknown,pending,building,failed,success}]
Named Arguments
-s, --status

Possible choices: unknown, pending, building, failed, success

new status

Default: success

repo-sync (sync)

sync repository files to remote server according to current settings

ahriman repo-sync [-h]

Synchronize the repository to remote services as configured.

repo-tree

dump repository tree based on packages dependencies

ahriman repo-tree [-h] [-p PARTITIONS]
Named Arguments
-p, --partitions

also divide packages by independent partitions

Default: 1

repo-triggers

run triggers on empty build result as configured by settings

ahriman repo-triggers [-h] [trigger ...]
Positional Arguments
trigger

instead of running all triggers as set by configuration, just process specified ones in order of mention

repo-update (update)

check for packages updates and run build process if requested

ahriman repo-update [-h] [--aur | --no-aur] [--changes | --no-changes] [--dependencies | --no-dependencies] [--dry-run]
                    [-e] [--increment | --no-increment] [--local | --no-local] [--manual | --no-manual] [-u USERNAME]
                    [--vcs | --no-vcs] [-y]
                    [package ...]
Positional Arguments
package

filter check by package base

Named Arguments
--aur, --no-aur

enable or disable checking for AUR updates

Default: True

--changes, --no-changes

calculate changes from the latest known commit if available. Only applicable in dry run mode

Default: True

--dependencies, --no-dependencies

process missing package dependencies

Default: True

--dry-run

just perform check for updates, same as check command

Default: False

-e, --exit-code

return non-zero exit status if result is empty

Default: False

--increment, --no-increment

increment package release (pkgrel) on duplicate

Default: True

--local, --no-local

enable or disable checking of local packages for updates

Default: True

--manual, --no-manual

include or exclude manual updates

Default: True

-u, --username

build as user

--vcs, --no-vcs

fetch actual version of VCS packages

Default: True

-y, --refresh

download fresh package databases from the mirror before actions, -yy to force refresh even if up to date

Default: False

service-clean (clean, repo-clean)

remove local caches

ahriman service-clean [-h] [--cache | --no-cache] [--chroot | --no-chroot] [--manual | --no-manual]
                      [--packages | --no-packages] [--pacman | --no-pacman]
Named Arguments
--cache, --no-cache

clear directory with package caches

Default: False

--chroot, --no-chroot

clear build chroot

Default: False

--manual, --no-manual

clear manually added packages queue

Default: False

--packages, --no-packages

clear directory with built packages

Default: False

--pacman, --no-pacman

clear directory with pacman local database cache

Default: False

The subcommand clears every temporary directories (builds, caches etc). Normally you should not run this command manually. Also in case if you are going to clear the chroot directories you will need root privileges.

service-config (config, repo-config)

dump configuration for the specified architecture

ahriman service-config [-h] [--info | --no-info] [--secure | --no-secure] [section] [key]
Positional Arguments
section

filter settings by section

key

filter settings by key

Named Arguments
--info, --no-info

show additional information, e.g. configuration files

Default: True

--secure, --no-secure

hide passwords and secrets from output

Default: True

service-config-validate (config-validate, repo-config-validate)

validate configuration and print found errors

ahriman service-config-validate [-h] [-e]
Named Arguments
-e, --exit-code

return non-zero exit status if configuration is invalid

Default: False

service-key-import (key-import)

import PGP key from public sources to the repository user

ahriman service-key-import [-h] [--key-server KEY_SERVER] key
Positional Arguments
key

PGP key to import from public server

Named Arguments
--key-server

key server for key import

Default: “keyserver.ubuntu.com”

By default ahriman runs build process with package sources validation (in case if signature and keys are available in PKGBUILD). This process will fail in case if key is not known for build user. This subcommand can be used in order to import the PGP key to user keychain.

service-repositories

list all available repositories

ahriman service-repositories [-h] [--id-only | --no-id-only]
Named Arguments
--id-only, --no-id-only

show machine readable identifier instead

Default: False

service-run (run)

run multiple commands on success run of the previous command

ahriman service-run [-h] command [command ...]
Positional Arguments
command

command to be run (quoted) without ahriman

Commands must be quoted by using usual bash rules. Processes will be spawned under the same user as this command

service-setup (init, repo-init, repo-setup, setup)

create initial service configuration, requires root

ahriman service-setup [-h] [--build-as-user BUILD_AS_USER] [--from-configuration FROM_CONFIGURATION]
                      [--generate-salt | --no-generate-salt] [--makeflags-jobs | --no-makeflags-jobs] [--mirror MIRROR]
                      [--multilib | --no-multilib] --packager PACKAGER [--server SERVER] [--sign-key SIGN_KEY]
                      [--sign-target {disabled,packages,repository}] [--web-port WEB_PORT]
                      [--web-unix-socket WEB_UNIX_SOCKET]
Named Arguments
--build-as-user

force makepkg user to the specific one

--from-configuration

path to default devtools pacman configuration

Default: /usr/share/devtools/pacman.conf.d/extra.conf

--generate-salt, --no-generate-salt

generate salt for user passwords

Default: False

--makeflags-jobs, --no-makeflags-jobs

append MAKEFLAGS variable with parallelism set to number of cores

Default: True

--mirror

use the specified explicitly mirror instead of including mirrorlist

--multilib, --no-multilib

add or do not multilib repository

Default: True

--packager

packager name and email

--server

server to be used for devtools. If none set, local files will be used

--sign-key

sign key id

--sign-target

Possible choices: disabled, packages, repository

sign options

--web-port

port of the web service

--web-unix-socket

path to unix socket used for interprocess communications

Create _minimal_ configuration for the service according to provided options.

service-shell (shell)

drop into python shell

ahriman service-shell [-h] [code]
Positional Arguments
code

instead of dropping into shell, just execute the specified code

service-tree-migrate

migrate repository tree between versions

ahriman service-tree-migrate [-h]

user-add

update user for web services with the given password and role. In case if password was not entered it will be asked interactively

ahriman user-add [-h] [--key KEY] [--packager PACKAGER] [-p PASSWORD] [-R {unauthorized,read,reporter,full}] username
Positional Arguments
username

username for web service

Named Arguments
--key

optional PGP key used by this user. The private key must be imported

--packager

optional packager id used for build process in form of Name Surname <mail@example.com>

-p, --password

user password. Blank password will be treated as empty password, which is in particular must be used for OAuth2 authorization type.

-R, --role

Possible choices: unauthorized, read, reporter, full

user access level

Default: read

user-list

list users from the user mapping and their roles

ahriman user-list [-h] [-e] [-R {unauthorized,read,reporter,full}] [username]
Positional Arguments
username

filter users by username

Named Arguments
-e, --exit-code

return non-zero exit status if result is empty

Default: False

-R, --role

Possible choices: unauthorized, read, reporter, full

filter users by role

user-remove

remove user from the user mapping and update the configuration

ahriman user-remove [-h] username
Positional Arguments
username

username for web service

web

start web server

ahriman web [-h]

Argument list can also be read from file by using @ prefix.