mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
Docs update (#61)
* Improve sphinx documentation * update faq formatting * fix setup doc * fix docs according to the generated htmls
This commit is contained in:
parent
720edc24ba
commit
2dac5a2520
@ -9,7 +9,7 @@ build:
|
|||||||
|
|
||||||
sphinx:
|
sphinx:
|
||||||
builder: html
|
builder: html
|
||||||
configuration: docs/source/conf.py
|
configuration: docs/conf.py
|
||||||
|
|
||||||
python:
|
python:
|
||||||
install:
|
install:
|
||||||
|
3
Makefile
3
Makefile
@ -42,8 +42,7 @@ push: spec archlinux
|
|||||||
|
|
||||||
spec:
|
spec:
|
||||||
# make sure that old files are removed
|
# make sure that old files are removed
|
||||||
find docs/source -type f -name "$(PROJECT)*.rst" -delete
|
find docs -type f -name "$(PROJECT)*.rst" -delete
|
||||||
rm -f docs/source/modules.rst
|
|
||||||
tox -e docs
|
tox -e docs
|
||||||
|
|
||||||
spec-html: spec
|
spec-html: spec
|
||||||
|
@ -23,10 +23,10 @@ Wrapper for managing custom repository inspired by [repo-scripts](https://github
|
|||||||
|
|
||||||
## Installation and run
|
## Installation and run
|
||||||
|
|
||||||
For installation details please refer to the [documentation](docs/setup.md). For command help, `--help` subcommand must be used. Subcommands have own help message as well. The package also provides a [man page](docs/ahriman.1).
|
For installation details please refer to the [documentation](docs/setup.rst). For command help, `--help` subcommand must be used. Subcommands have own help message as well. The package also provides a [man page](docs/ahriman.1).
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Every available option is described in the [documentation](docs/configuration.md).
|
Every available option is described in the [documentation](docs/configuration.rst).
|
||||||
|
|
||||||
## [FAQ](docs/faq.md)
|
## [FAQ](docs/faq.rst)
|
||||||
|
43
docs/advanced-usage.rst
Normal file
43
docs/advanced-usage.rst
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
Advanced usage
|
||||||
|
==============
|
||||||
|
|
||||||
|
Depending on the goal the package can be used in different ways. Nevertheless, in the most cases you will need some basic classes
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from ahriman.core.configuration import Configuration
|
||||||
|
from ahriman.core.database.sqlite import SQLite
|
||||||
|
|
||||||
|
architecture = "x86_64"
|
||||||
|
configuration = Configuration.from_path(Path("/etc/ahriman.ini"), architecture, quiet=False)
|
||||||
|
sqlite = SQLite.load(configuration)
|
||||||
|
|
||||||
|
At this point there are ``configuration`` and ``database`` instances which can be used later at any time anywhere, e.g.
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
# instance of ``RepositoryPaths`` class
|
||||||
|
paths = configuration.repository_paths
|
||||||
|
|
||||||
|
Almost all actions are wrapped by ``ahriman.core.repository.Repository`` class
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
from ahriman.core.repository import Repository
|
||||||
|
|
||||||
|
repository = Repository(architecture, configuration, database, no_report=False, unsafe=False)
|
||||||
|
|
||||||
|
And the ``repository`` instance can be used to perform repository maintenance
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
build_result = repository.process_build(known_packages)
|
||||||
|
built_packages = repository.packages_built()
|
||||||
|
update_result = repository.process_update(built_packages)
|
||||||
|
|
||||||
|
repository.process_report(None, update_result)
|
||||||
|
repository.process_sync(None, update_result.success)
|
||||||
|
|
||||||
|
For the more info please refer to the classes documentation.
|
546
docs/ahriman.1
546
docs/ahriman.1
@ -1,4 +1,4 @@
|
|||||||
.TH ahriman "1" Manual
|
.TH AHRIMAN "1" Manual
|
||||||
.SH NAME
|
.SH NAME
|
||||||
ahriman
|
ahriman
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
@ -6,8 +6,8 @@ ahriman
|
|||||||
[-h] [-a ARCHITECTURE] [-c CONFIGURATION] [--force] [-l LOCK] [--no-report] [-q] [--unsafe] [-v] {aur-search,search,help,help-commands-unsafe,key-import,package-add,add,package-update,package-remove,remove,package-status,status,package-status-remove,package-status-update,status-update,patch-add,patch-list,patch-remove,repo-backup,repo-check,check,repo-clean,clean,repo-config,config,repo-rebuild,rebuild,repo-remove-unknown,remove-unknown,repo-report,report,repo-restore,repo-setup,init,repo-init,setup,repo-sign,sign,repo-status-update,repo-sync,sync,repo-update,update,user-add,user-list,user-remove,web} ...
|
[-h] [-a ARCHITECTURE] [-c CONFIGURATION] [--force] [-l LOCK] [--no-report] [-q] [--unsafe] [-v] {aur-search,search,help,help-commands-unsafe,key-import,package-add,add,package-update,package-remove,remove,package-status,status,package-status-remove,package-status-update,status-update,patch-add,patch-list,patch-remove,repo-backup,repo-check,check,repo-clean,clean,repo-config,config,repo-rebuild,rebuild,repo-remove-unknown,remove-unknown,repo-report,report,repo-restore,repo-setup,init,repo-init,setup,repo-sign,sign,repo-status-update,repo-sync,sync,repo-update,update,user-add,user-list,user-remove,web} ...
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
ArcH Linux ReposItory MANager
|
ArcH Linux ReposItory MANager
|
||||||
.SH OPTIONS
|
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
.TP
|
.TP
|
||||||
\fB\-a\fR \fI\,ARCHITECTURE\/\fR, \fB\-\-architecture\fR \fI\,ARCHITECTURE\/\fR
|
\fB\-a\fR \fI\,ARCHITECTURE\/\fR, \fB\-\-architecture\fR \fI\,ARCHITECTURE\/\fR
|
||||||
target architectures (can be used multiple times)
|
target architectures (can be used multiple times)
|
||||||
@ -40,8 +40,8 @@ allow to run ahriman as non\-ahriman user. Some actions might be unavailable
|
|||||||
\fB\-v\fR, \fB\-\-version\fR
|
\fB\-v\fR, \fB\-\-version\fR
|
||||||
show program's version number and exit
|
show program's version number and exit
|
||||||
|
|
||||||
.SS
|
.SH
|
||||||
\fBSub-commands\fR
|
COMMAND
|
||||||
.TP
|
.TP
|
||||||
\fBahriman\fR \fI\,aur-search\/\fR
|
\fBahriman\fR \fI\,aur-search\/\fR
|
||||||
search for package
|
search for package
|
||||||
@ -129,9 +129,9 @@ remove user
|
|||||||
.TP
|
.TP
|
||||||
\fBahriman\fR \fI\,web\/\fR
|
\fBahriman\fR \fI\,web\/\fR
|
||||||
web server
|
web server
|
||||||
.SH OPTIONS 'ahriman aur-search'
|
.SH COMMAND \fI\,'ahriman aur-search'\/\fR
|
||||||
usage: ahriman aur-search [-h] [-e] [-i]
|
usage: ahriman aur-search [-h] [-e] [-i]
|
||||||
[--sort-by {description,first_submitted,id,last_modified,maintainer,name,num_votes,out_of_date,package_base,package_base_id,popularity,url,url_path,version}]
|
[--sort-by {description,first_submitted,id,last_modified,maintainer,name,num_votes,out_of_date,package_base,package_base_id,popularity,repository,url,url_path,version}]
|
||||||
search [search ...]
|
search [search ...]
|
||||||
|
|
||||||
search for package in AUR using API
|
search for package in AUR using API
|
||||||
@ -140,6 +140,7 @@ search for package in AUR using API
|
|||||||
\fBsearch\fR
|
\fBsearch\fR
|
||||||
search terms, can be specified multiple times, result will match all terms
|
search terms, can be specified multiple times, result will match all terms
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman aur-search'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
\fB\-e\fR, \fB\-\-exit\-code\fR
|
||||||
return non\-zero exit status if result is empty
|
return non\-zero exit status if result is empty
|
||||||
@ -149,35 +150,11 @@ return non\-zero exit status if result is empty
|
|||||||
show additional package information
|
show additional package information
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-sort\-by\fR {description,first_submitted,id,last_modified,maintainer,name,num_votes,out_of_date,package_base,package_base_id,popularity,url,url_path,version}
|
\fB\-\-sort\-by\fR \fI\,{description,first_submitted,id,last_modified,maintainer,name,num_votes,out_of_date,package_base,package_base_id,popularity,repository,url,url_path,version}\/\fR
|
||||||
sort field by this field. In case if two packages have the same value of the specified field, they will be always sorted
|
sort field by this field. In case if two packages have the same value of the specified field, they will be always sorted
|
||||||
by name
|
by name
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman search'
|
.SH COMMAND \fI\,'ahriman help'\/\fR
|
||||||
usage: ahriman aur-search [-h] [-e] [-i]
|
|
||||||
[--sort-by {description,first_submitted,id,last_modified,maintainer,name,num_votes,out_of_date,package_base,package_base_id,popularity,url,url_path,version}]
|
|
||||||
search [search ...]
|
|
||||||
|
|
||||||
search for package in AUR using API
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBsearch\fR
|
|
||||||
search terms, can be specified multiple times, result will match all terms
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-i\fR, \fB\-\-info\fR
|
|
||||||
show additional package information
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sort\-by\fR {description,first_submitted,id,last_modified,maintainer,name,num_votes,out_of_date,package_base,package_base_id,popularity,url,url_path,version}
|
|
||||||
sort field by this field. In case if two packages have the same value of the specified field, they will be always sorted
|
|
||||||
by name
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman help'
|
|
||||||
usage: ahriman help [-h] [command]
|
usage: ahriman help [-h] [command]
|
||||||
|
|
||||||
show help message for application or command and exit
|
show help message for application or command and exit
|
||||||
@ -186,19 +163,18 @@ show help message for application or command and exit
|
|||||||
\fBcommand\fR
|
\fBcommand\fR
|
||||||
show help message for specific command
|
show help message for specific command
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman help-commands-unsafe'\/\fR
|
||||||
.SH OPTIONS 'ahriman help-commands-unsafe'
|
|
||||||
usage: ahriman help-commands-unsafe [-h] [--command COMMAND]
|
usage: ahriman help-commands-unsafe [-h] [--command COMMAND]
|
||||||
|
|
||||||
list unsafe commands as defined in default args
|
list unsafe commands as defined in default args
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman help-commands-unsafe'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-command\fR \fI\,COMMAND\/\fR
|
\fB\-\-command\fR \fI\,COMMAND\/\fR
|
||||||
instead of showing commands, just test command line for unsafe subcommand and return 0 in case if command is safe and 1
|
instead of showing commands, just test command line for unsafe subcommand and return 0 in case if command is safe and 1
|
||||||
otherwise
|
otherwise
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman key-import'
|
.SH COMMAND \fI\,'ahriman key-import'\/\fR
|
||||||
usage: ahriman key-import [-h] [--key-server KEY_SERVER] key
|
usage: ahriman key-import [-h] [--key-server KEY_SERVER] key
|
||||||
|
|
||||||
import PGP key from public sources to the repository user
|
import PGP key from public sources to the repository user
|
||||||
@ -207,11 +183,12 @@ import PGP key from public sources to the repository user
|
|||||||
\fBkey\fR
|
\fBkey\fR
|
||||||
PGP key to import from public server
|
PGP key to import from public server
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman key-import'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-key\-server\fR \fI\,KEY_SERVER\/\fR
|
\fB\-\-key\-server\fR \fI\,KEY_SERVER\/\fR
|
||||||
key server for key import
|
key server for key import
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman package-add'
|
.SH COMMAND \fI\,'ahriman package-add'\/\fR
|
||||||
usage: ahriman package-add [-h] [-e] [-n]
|
usage: ahriman package-add [-h] [-e] [-n]
|
||||||
[-s {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}]
|
[-s {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}]
|
||||||
[--without-dependencies]
|
[--without-dependencies]
|
||||||
@ -223,6 +200,7 @@ add existing or new package to the build queue
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
package source (base name, path to local files, remote URL)
|
package source (base name, path to local files, remote URL)
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman package-add'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
\fB\-e\fR, \fB\-\-exit\-code\fR
|
||||||
return non\-zero exit status if result is empty
|
return non\-zero exit status if result is empty
|
||||||
@ -232,70 +210,14 @@ return non\-zero exit status if result is empty
|
|||||||
run update function after
|
run update function after
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}, \fB\-\-source\fR {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}
|
\fB\-s\fR \fI\,{PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}\/\fR, \fB\-\-source\fR \fI\,{PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}\/\fR
|
||||||
explicitly specify the package source for this command
|
explicitly specify the package source for this command
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-without\-dependencies\fR
|
\fB\-\-without\-dependencies\fR
|
||||||
do not add dependencies
|
do not add dependencies
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman add'
|
.SH COMMAND \fI\,'ahriman package-remove'\/\fR
|
||||||
usage: ahriman package-add [-h] [-e] [-n]
|
|
||||||
[-s {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}]
|
|
||||||
[--without-dependencies]
|
|
||||||
package [package ...]
|
|
||||||
|
|
||||||
add existing or new package to the build queue
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
package source (base name, path to local files, remote URL)
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-n\fR, \fB\-\-now\fR
|
|
||||||
run update function after
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-s\fR {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}, \fB\-\-source\fR {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}
|
|
||||||
explicitly specify the package source for this command
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-without\-dependencies\fR
|
|
||||||
do not add dependencies
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman package-update'
|
|
||||||
usage: ahriman package-add [-h] [-e] [-n]
|
|
||||||
[-s {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}]
|
|
||||||
[--without-dependencies]
|
|
||||||
package [package ...]
|
|
||||||
|
|
||||||
add existing or new package to the build queue
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
package source (base name, path to local files, remote URL)
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-n\fR, \fB\-\-now\fR
|
|
||||||
run update function after
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-s\fR {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}, \fB\-\-source\fR {PackageSource.Auto,PackageSource.Archive,PackageSource.AUR,PackageSource.Directory,PackageSource.Local,PackageSource.Remote,PackageSource.Repository}
|
|
||||||
explicitly specify the package source for this command
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-without\-dependencies\fR
|
|
||||||
do not add dependencies
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman package-remove'
|
|
||||||
usage: ahriman package-remove [-h] package [package ...]
|
usage: ahriman package-remove [-h] package [package ...]
|
||||||
|
|
||||||
remove package from the repository
|
remove package from the repository
|
||||||
@ -304,18 +226,7 @@ remove package from the repository
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
package name or base
|
package name or base
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman package-status'\/\fR
|
||||||
.SH OPTIONS 'ahriman remove'
|
|
||||||
usage: ahriman package-remove [-h] package [package ...]
|
|
||||||
|
|
||||||
remove package from the repository
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
package name or base
|
|
||||||
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman package-status'
|
|
||||||
usage: ahriman package-status [-h] [--ahriman] [-e] [-i]
|
usage: ahriman package-status [-h] [--ahriman] [-e] [-i]
|
||||||
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
||||||
[package ...]
|
[package ...]
|
||||||
@ -326,6 +237,7 @@ request status of the package
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
filter status by package base
|
filter status by package base
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman package-status'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-ahriman\fR
|
\fB\-\-ahriman\fR
|
||||||
get service status itself
|
get service status itself
|
||||||
@ -339,37 +251,10 @@ return non\-zero exit status if result is empty
|
|||||||
show additional package information
|
show additional package information
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}, \fB\-\-status\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}
|
\fB\-s\fR \fI\,{BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}\/\fR, \fB\-\-status\fR \fI\,{BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}\/\fR
|
||||||
filter packages by status
|
filter packages by status
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman status'
|
.SH COMMAND \fI\,'ahriman package-status-remove'\/\fR
|
||||||
usage: ahriman package-status [-h] [--ahriman] [-e] [-i]
|
|
||||||
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
|
||||||
[package ...]
|
|
||||||
|
|
||||||
request status of the package
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
filter status by package base
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-ahriman\fR
|
|
||||||
get service status itself
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-i\fR, \fB\-\-info\fR
|
|
||||||
show additional package information
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-s\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}, \fB\-\-status\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}
|
|
||||||
filter packages by status
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman package-status-remove'
|
|
||||||
usage: ahriman package-status-remove [-h] package [package ...]
|
usage: ahriman package-status-remove [-h] package [package ...]
|
||||||
|
|
||||||
remove the package from the status page
|
remove the package from the status page
|
||||||
@ -378,8 +263,7 @@ remove the package from the status page
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
remove specified packages
|
remove specified packages
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman package-status-update'\/\fR
|
||||||
.SH OPTIONS 'ahriman package-status-update'
|
|
||||||
usage: ahriman package-status-update [-h]
|
usage: ahriman package-status-update [-h]
|
||||||
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
||||||
[package ...]
|
[package ...]
|
||||||
@ -390,26 +274,12 @@ update package status on the status page
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
set status for specified packages. If no packages supplied, service status will be updated
|
set status for specified packages. If no packages supplied, service status will be updated
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman package-status-update'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}, \fB\-\-status\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}
|
\fB\-s\fR \fI\,{BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}\/\fR, \fB\-\-status\fR \fI\,{BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}\/\fR
|
||||||
new status
|
new status
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman status-update'
|
.SH COMMAND \fI\,'ahriman patch-add'\/\fR
|
||||||
usage: ahriman package-status-update [-h]
|
|
||||||
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
|
||||||
[package ...]
|
|
||||||
|
|
||||||
update package status on the status page
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
set status for specified packages. If no packages supplied, service status will be updated
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-s\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}, \fB\-\-status\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}
|
|
||||||
new status
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman patch-add'
|
|
||||||
usage: ahriman patch-add [-h] [-t TRACK] package
|
usage: ahriman patch-add [-h] [-t TRACK] package
|
||||||
|
|
||||||
create or update source patches
|
create or update source patches
|
||||||
@ -418,11 +288,12 @@ create or update source patches
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
path to directory with changed files for patch addition/update
|
path to directory with changed files for patch addition/update
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman patch-add'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-t\fR \fI\,TRACK\/\fR, \fB\-\-track\fR \fI\,TRACK\/\fR
|
\fB\-t\fR \fI\,TRACK\/\fR, \fB\-\-track\fR \fI\,TRACK\/\fR
|
||||||
files which has to be tracked
|
files which has to be tracked
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman patch-list'
|
.SH COMMAND \fI\,'ahriman patch-list'\/\fR
|
||||||
usage: ahriman patch-list [-h] [-e] [package]
|
usage: ahriman patch-list [-h] [-e] [package]
|
||||||
|
|
||||||
list available patches for the package
|
list available patches for the package
|
||||||
@ -431,11 +302,12 @@ list available patches for the package
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
package base
|
package base
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman patch-list'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
\fB\-e\fR, \fB\-\-exit\-code\fR
|
||||||
return non\-zero exit status if result is empty
|
return non\-zero exit status if result is empty
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman patch-remove'
|
.SH COMMAND \fI\,'ahriman patch-remove'\/\fR
|
||||||
usage: ahriman patch-remove [-h] package
|
usage: ahriman patch-remove [-h] package
|
||||||
|
|
||||||
remove patches for the package
|
remove patches for the package
|
||||||
@ -444,8 +316,7 @@ remove patches for the package
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
package base
|
package base
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman repo-backup'\/\fR
|
||||||
.SH OPTIONS 'ahriman repo-backup'
|
|
||||||
usage: ahriman repo-backup [-h] path
|
usage: ahriman repo-backup [-h] path
|
||||||
|
|
||||||
backup settings and database
|
backup settings and database
|
||||||
@ -454,8 +325,7 @@ backup settings and database
|
|||||||
\fBpath\fR
|
\fBpath\fR
|
||||||
path of the output archive
|
path of the output archive
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman repo-check'\/\fR
|
||||||
.SH OPTIONS 'ahriman repo-check'
|
|
||||||
usage: ahriman repo-check [-h] [-e] [--no-vcs] [package ...]
|
usage: ahriman repo-check [-h] [-e] [--no-vcs] [package ...]
|
||||||
|
|
||||||
check for packages updates. Same as update \-\-dry\-run \-\-no\-manual
|
check for packages updates. Same as update \-\-dry\-run \-\-no\-manual
|
||||||
@ -464,6 +334,7 @@ check for packages updates. Same as update \-\-dry\-run \-\-no\-manual
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
filter check by package base
|
filter check by package base
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-check'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
\fB\-e\fR, \fB\-\-exit\-code\fR
|
||||||
return non\-zero exit status if result is empty
|
return non\-zero exit status if result is empty
|
||||||
@ -472,29 +343,12 @@ return non\-zero exit status if result is empty
|
|||||||
\fB\-\-no\-vcs\fR
|
\fB\-\-no\-vcs\fR
|
||||||
do not check VCS packages
|
do not check VCS packages
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman check'
|
.SH COMMAND \fI\,'ahriman repo-clean'\/\fR
|
||||||
usage: ahriman repo-check [-h] [-e] [--no-vcs] [package ...]
|
|
||||||
|
|
||||||
check for packages updates. Same as update \-\-dry\-run \-\-no\-manual
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
filter check by package base
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-vcs\fR
|
|
||||||
do not check VCS packages
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-clean'
|
|
||||||
usage: ahriman repo-clean [-h] [--cache] [--chroot] [--manual] [--packages]
|
usage: ahriman repo-clean [-h] [--cache] [--chroot] [--manual] [--packages]
|
||||||
|
|
||||||
remove local caches
|
remove local caches
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-clean'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-cache\fR
|
\fB\-\-cache\fR
|
||||||
clear directory with package caches
|
clear directory with package caches
|
||||||
@ -511,48 +365,17 @@ clear manually added packages queue
|
|||||||
\fB\-\-packages\fR
|
\fB\-\-packages\fR
|
||||||
clear directory with built packages
|
clear directory with built packages
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman clean'
|
.SH COMMAND \fI\,'ahriman repo-config'\/\fR
|
||||||
usage: ahriman repo-clean [-h] [--cache] [--chroot] [--manual] [--packages]
|
|
||||||
|
|
||||||
remove local caches
|
|
||||||
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-cache\fR
|
|
||||||
clear directory with package caches
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-chroot\fR
|
|
||||||
clear build chroot
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-manual\fR
|
|
||||||
clear manually added packages queue
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-packages\fR
|
|
||||||
clear directory with built packages
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-config'
|
|
||||||
usage: ahriman repo-config [-h]
|
usage: ahriman repo-config [-h]
|
||||||
|
|
||||||
dump configuration for the specified architecture
|
dump configuration for the specified architecture
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman repo-rebuild'\/\fR
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman config'
|
|
||||||
usage: ahriman repo-config [-h]
|
|
||||||
|
|
||||||
dump configuration for the specified architecture
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-rebuild'
|
|
||||||
usage: ahriman repo-rebuild [-h] [--depends-on DEPENDS_ON] [--dry-run] [--from-database] [-e]
|
usage: ahriman repo-rebuild [-h] [--depends-on DEPENDS_ON] [--dry-run] [--from-database] [-e]
|
||||||
|
|
||||||
force rebuild whole repository
|
force rebuild whole repository
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-rebuild'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-depends\-on\fR \fI\,DEPENDS_ON\/\fR
|
\fB\-\-depends\-on\fR \fI\,DEPENDS_ON\/\fR
|
||||||
only rebuild packages that depend on specified package
|
only rebuild packages that depend on specified package
|
||||||
@ -571,36 +394,12 @@ original ahriman instance run with web service and have run repo\-update at leas
|
|||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
\fB\-e\fR, \fB\-\-exit\-code\fR
|
||||||
return non\-zero exit status if result is empty
|
return non\-zero exit status if result is empty
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman rebuild'
|
.SH COMMAND \fI\,'ahriman repo-remove-unknown'\/\fR
|
||||||
usage: ahriman repo-rebuild [-h] [--depends-on DEPENDS_ON] [--dry-run] [--from-database] [-e]
|
|
||||||
|
|
||||||
force rebuild whole repository
|
|
||||||
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-depends\-on\fR \fI\,DEPENDS_ON\/\fR
|
|
||||||
only rebuild packages that depend on specified package
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-dry\-run\fR
|
|
||||||
just perform check for packages without rebuild process itself
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-from\-database\fR
|
|
||||||
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.
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-remove-unknown'
|
|
||||||
usage: ahriman repo-remove-unknown [-h] [--dry-run] [-i]
|
usage: ahriman repo-remove-unknown [-h] [--dry-run] [-i]
|
||||||
|
|
||||||
remove packages which are missing in AUR and do not have local PKGBUILDs
|
remove packages which are missing in AUR and do not have local PKGBUILDs
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-remove-unknown'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-dry\-run\fR
|
\fB\-\-dry\-run\fR
|
||||||
just perform check for packages without removal
|
just perform check for packages without removal
|
||||||
@ -609,21 +408,7 @@ just perform check for packages without removal
|
|||||||
\fB\-i\fR, \fB\-\-info\fR
|
\fB\-i\fR, \fB\-\-info\fR
|
||||||
show additional package information
|
show additional package information
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman remove-unknown'
|
.SH COMMAND \fI\,'ahriman repo-report'\/\fR
|
||||||
usage: ahriman repo-remove-unknown [-h] [--dry-run] [-i]
|
|
||||||
|
|
||||||
remove packages which are missing in AUR and do not have local PKGBUILDs
|
|
||||||
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-dry\-run\fR
|
|
||||||
just perform check for packages without removal
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-i\fR, \fB\-\-info\fR
|
|
||||||
show additional package information
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-report'
|
|
||||||
usage: ahriman repo-report [-h] [target ...]
|
usage: ahriman repo-report [-h] [target ...]
|
||||||
|
|
||||||
generate repository report according to current settings
|
generate repository report according to current settings
|
||||||
@ -632,18 +417,7 @@ generate repository report according to current settings
|
|||||||
\fBtarget\fR
|
\fBtarget\fR
|
||||||
target to generate report
|
target to generate report
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman repo-restore'\/\fR
|
||||||
.SH OPTIONS 'ahriman report'
|
|
||||||
usage: ahriman repo-report [-h] [target ...]
|
|
||||||
|
|
||||||
generate repository report according to current settings
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBtarget\fR
|
|
||||||
target to generate report
|
|
||||||
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-restore'
|
|
||||||
usage: ahriman repo-restore [-h] [-o OUTPUT] path
|
usage: ahriman repo-restore [-h] [-o OUTPUT] path
|
||||||
|
|
||||||
restore settings and database
|
restore settings and database
|
||||||
@ -652,19 +426,21 @@ restore settings and database
|
|||||||
\fBpath\fR
|
\fBpath\fR
|
||||||
path of the input archive
|
path of the input archive
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-restore'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-o\fR \fI\,OUTPUT\/\fR, \fB\-\-output\fR \fI\,OUTPUT\/\fR
|
\fB\-o\fR \fI\,OUTPUT\/\fR, \fB\-\-output\fR \fI\,OUTPUT\/\fR
|
||||||
root path of the extracted files
|
root path of the extracted files
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-setup'
|
.SH COMMAND \fI\,'ahriman repo-setup'\/\fR
|
||||||
usage: ahriman repo-setup [-h] [--build-as-user BUILD_AS_USER] [--build-command BUILD_COMMAND]
|
usage: ahriman repo-setup [-h] [--build-as-user BUILD_AS_USER] [--build-command BUILD_COMMAND]
|
||||||
[--from-configuration FROM_CONFIGURATION] [--no-multilib] --packager PACKAGER --repository
|
[--from-configuration FROM_CONFIGURATION] [--no-multilib] --packager PACKAGER --repository
|
||||||
REPOSITORY [--sign-key SIGN_KEY]
|
REPOSITORY [--sign-key SIGN_KEY]
|
||||||
[--sign-target {SignSettings.Packages,SignSettings.Repository}] [--web-port WEB_PORT]
|
[--sign-target {SignSettings.Disabled,SignSettings.Packages,SignSettings.Repository}]
|
||||||
|
[--web-port WEB_PORT]
|
||||||
|
|
||||||
create initial service configuration, requires root
|
create initial service configuration, requires root
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-setup'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-build\-as\-user\fR \fI\,BUILD_AS_USER\/\fR
|
\fB\-\-build\-as\-user\fR \fI\,BUILD_AS_USER\/\fR
|
||||||
force makepkg user to the specific one
|
force makepkg user to the specific one
|
||||||
@ -694,149 +470,14 @@ repository name
|
|||||||
sign key id
|
sign key id
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-sign\-target\fR {SignSettings.Packages,SignSettings.Repository}
|
\fB\-\-sign\-target\fR \fI\,{SignSettings.Disabled,SignSettings.Packages,SignSettings.Repository}\/\fR
|
||||||
sign options
|
sign options
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-web\-port\fR \fI\,WEB_PORT\/\fR
|
\fB\-\-web\-port\fR \fI\,WEB_PORT\/\fR
|
||||||
port of the web service
|
port of the web service
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman init'
|
.SH COMMAND \fI\,'ahriman repo-sign'\/\fR
|
||||||
usage: ahriman repo-setup [-h] [--build-as-user BUILD_AS_USER] [--build-command BUILD_COMMAND]
|
|
||||||
[--from-configuration FROM_CONFIGURATION] [--no-multilib] --packager PACKAGER --repository
|
|
||||||
REPOSITORY [--sign-key SIGN_KEY]
|
|
||||||
[--sign-target {SignSettings.Packages,SignSettings.Repository}] [--web-port WEB_PORT]
|
|
||||||
|
|
||||||
create initial service configuration, requires root
|
|
||||||
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-build\-as\-user\fR \fI\,BUILD_AS_USER\/\fR
|
|
||||||
force makepkg user to the specific one
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-build\-command\fR \fI\,BUILD_COMMAND\/\fR
|
|
||||||
build command prefix
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-from\-configuration\fR \fI\,FROM_CONFIGURATION\/\fR
|
|
||||||
path to default devtools pacman configuration
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-multilib\fR
|
|
||||||
do not add multilib repository
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-packager\fR \fI\,PACKAGER\/\fR
|
|
||||||
packager name and email
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-repository\fR \fI\,REPOSITORY\/\fR
|
|
||||||
repository name
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sign\-key\fR \fI\,SIGN_KEY\/\fR
|
|
||||||
sign key id
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sign\-target\fR {SignSettings.Packages,SignSettings.Repository}
|
|
||||||
sign options
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-web\-port\fR \fI\,WEB_PORT\/\fR
|
|
||||||
port of the web service
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-init'
|
|
||||||
usage: ahriman repo-setup [-h] [--build-as-user BUILD_AS_USER] [--build-command BUILD_COMMAND]
|
|
||||||
[--from-configuration FROM_CONFIGURATION] [--no-multilib] --packager PACKAGER --repository
|
|
||||||
REPOSITORY [--sign-key SIGN_KEY]
|
|
||||||
[--sign-target {SignSettings.Packages,SignSettings.Repository}] [--web-port WEB_PORT]
|
|
||||||
|
|
||||||
create initial service configuration, requires root
|
|
||||||
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-build\-as\-user\fR \fI\,BUILD_AS_USER\/\fR
|
|
||||||
force makepkg user to the specific one
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-build\-command\fR \fI\,BUILD_COMMAND\/\fR
|
|
||||||
build command prefix
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-from\-configuration\fR \fI\,FROM_CONFIGURATION\/\fR
|
|
||||||
path to default devtools pacman configuration
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-multilib\fR
|
|
||||||
do not add multilib repository
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-packager\fR \fI\,PACKAGER\/\fR
|
|
||||||
packager name and email
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-repository\fR \fI\,REPOSITORY\/\fR
|
|
||||||
repository name
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sign\-key\fR \fI\,SIGN_KEY\/\fR
|
|
||||||
sign key id
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sign\-target\fR {SignSettings.Packages,SignSettings.Repository}
|
|
||||||
sign options
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-web\-port\fR \fI\,WEB_PORT\/\fR
|
|
||||||
port of the web service
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman setup'
|
|
||||||
usage: ahriman repo-setup [-h] [--build-as-user BUILD_AS_USER] [--build-command BUILD_COMMAND]
|
|
||||||
[--from-configuration FROM_CONFIGURATION] [--no-multilib] --packager PACKAGER --repository
|
|
||||||
REPOSITORY [--sign-key SIGN_KEY]
|
|
||||||
[--sign-target {SignSettings.Packages,SignSettings.Repository}] [--web-port WEB_PORT]
|
|
||||||
|
|
||||||
create initial service configuration, requires root
|
|
||||||
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-build\-as\-user\fR \fI\,BUILD_AS_USER\/\fR
|
|
||||||
force makepkg user to the specific one
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-build\-command\fR \fI\,BUILD_COMMAND\/\fR
|
|
||||||
build command prefix
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-from\-configuration\fR \fI\,FROM_CONFIGURATION\/\fR
|
|
||||||
path to default devtools pacman configuration
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-multilib\fR
|
|
||||||
do not add multilib repository
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-packager\fR \fI\,PACKAGER\/\fR
|
|
||||||
packager name and email
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-repository\fR \fI\,REPOSITORY\/\fR
|
|
||||||
repository name
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sign\-key\fR \fI\,SIGN_KEY\/\fR
|
|
||||||
sign key id
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-sign\-target\fR {SignSettings.Packages,SignSettings.Repository}
|
|
||||||
sign options
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-web\-port\fR \fI\,WEB_PORT\/\fR
|
|
||||||
port of the web service
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-sign'
|
|
||||||
usage: ahriman repo-sign [-h] [package ...]
|
usage: ahriman repo-sign [-h] [package ...]
|
||||||
|
|
||||||
(re\-)sign packages and repository database according to current settings
|
(re\-)sign packages and repository database according to current settings
|
||||||
@ -845,29 +486,18 @@ usage: ahriman repo-sign [-h] [package ...]
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
sign only specified packages
|
sign only specified packages
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman repo-status-update'\/\fR
|
||||||
.SH OPTIONS 'ahriman sign'
|
|
||||||
usage: ahriman repo-sign [-h] [package ...]
|
|
||||||
|
|
||||||
(re\-)sign packages and repository database according to current settings
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
sign only specified packages
|
|
||||||
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-status-update'
|
|
||||||
usage: ahriman repo-status-update [-h]
|
usage: ahriman repo-status-update [-h]
|
||||||
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
[-s {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}]
|
||||||
|
|
||||||
update repository status on the status page
|
update repository status on the status page
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-status-update'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}, \fB\-\-status\fR {BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}
|
\fB\-s\fR \fI\,{BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}\/\fR, \fB\-\-status\fR \fI\,{BuildStatusEnum.Unknown,BuildStatusEnum.Pending,BuildStatusEnum.Building,BuildStatusEnum.Failed,BuildStatusEnum.Success}\/\fR
|
||||||
new status
|
new status
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-sync'
|
.SH COMMAND \fI\,'ahriman repo-sync'\/\fR
|
||||||
usage: ahriman repo-sync [-h] [target ...]
|
usage: ahriman repo-sync [-h] [target ...]
|
||||||
|
|
||||||
sync repository files to remote server according to current settings
|
sync repository files to remote server according to current settings
|
||||||
@ -876,18 +506,7 @@ sync repository files to remote server according to current settings
|
|||||||
\fBtarget\fR
|
\fBtarget\fR
|
||||||
target to sync
|
target to sync
|
||||||
|
|
||||||
|
.SH COMMAND \fI\,'ahriman repo-update'\/\fR
|
||||||
.SH OPTIONS 'ahriman sync'
|
|
||||||
usage: ahriman repo-sync [-h] [target ...]
|
|
||||||
|
|
||||||
sync repository files to remote server according to current settings
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBtarget\fR
|
|
||||||
target to sync
|
|
||||||
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman repo-update'
|
|
||||||
usage: ahriman repo-update [-h] [--dry-run] [-e] [--no-aur] [--no-local] [--no-manual] [--no-vcs] [package ...]
|
usage: ahriman repo-update [-h] [--dry-run] [-e] [--no-aur] [--no-local] [--no-manual] [--no-vcs] [package ...]
|
||||||
|
|
||||||
check for packages updates and run build process if requested
|
check for packages updates and run build process if requested
|
||||||
@ -896,6 +515,7 @@ check for packages updates and run build process if requested
|
|||||||
\fBpackage\fR
|
\fBpackage\fR
|
||||||
filter check by package base
|
filter check by package base
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman repo-update'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-dry\-run\fR
|
\fB\-\-dry\-run\fR
|
||||||
just perform check for updates, same as check command
|
just perform check for updates, same as check command
|
||||||
@ -920,40 +540,7 @@ do not include manual updates
|
|||||||
\fB\-\-no\-vcs\fR
|
\fB\-\-no\-vcs\fR
|
||||||
do not check VCS packages
|
do not check VCS packages
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman update'
|
.SH COMMAND \fI\,'ahriman user-add'\/\fR
|
||||||
usage: ahriman repo-update [-h] [--dry-run] [-e] [--no-aur] [--no-local] [--no-manual] [--no-vcs] [package ...]
|
|
||||||
|
|
||||||
check for packages updates and run build process if requested
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fBpackage\fR
|
|
||||||
filter check by package base
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-dry\-run\fR
|
|
||||||
just perform check for updates, same as check command
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
|
||||||
return non\-zero exit status if result is empty
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-aur\fR
|
|
||||||
do not check for AUR updates. Implies \-\-no\-vcs
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-local\fR
|
|
||||||
do not check local packages for updates
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-manual\fR
|
|
||||||
do not include manual updates
|
|
||||||
|
|
||||||
.TP
|
|
||||||
\fB\-\-no\-vcs\fR
|
|
||||||
do not check VCS packages
|
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman user-add'
|
|
||||||
usage: ahriman user-add [-h] [--as-service] [-p PASSWORD] [-r {UserAccess.Safe,UserAccess.Read,UserAccess.Write}] [-s]
|
usage: ahriman user-add [-h] [--as-service] [-p PASSWORD] [-r {UserAccess.Safe,UserAccess.Read,UserAccess.Write}] [-s]
|
||||||
username
|
username
|
||||||
|
|
||||||
@ -963,6 +550,7 @@ update user for web services with the given password and role. In case if passwo
|
|||||||
\fBusername\fR
|
\fBusername\fR
|
||||||
username for web service
|
username for web service
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman user-add'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-\-as\-service\fR
|
\fB\-\-as\-service\fR
|
||||||
add user as service user
|
add user as service user
|
||||||
@ -973,14 +561,14 @@ user password. Blank password will be treated as empty password, which is in par
|
|||||||
authorization type.
|
authorization type.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-r\fR {UserAccess.Safe,UserAccess.Read,UserAccess.Write}, \fB\-\-role\fR {UserAccess.Safe,UserAccess.Read,UserAccess.Write}
|
\fB\-r\fR \fI\,{UserAccess.Safe,UserAccess.Read,UserAccess.Write}\/\fR, \fB\-\-role\fR \fI\,{UserAccess.Safe,UserAccess.Read,UserAccess.Write}\/\fR
|
||||||
user access level
|
user access level
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR, \fB\-\-secure\fR
|
\fB\-s\fR, \fB\-\-secure\fR
|
||||||
set file permissions to user\-only
|
set file permissions to user\-only
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman user-list'
|
.SH COMMAND \fI\,'ahriman user-list'\/\fR
|
||||||
usage: ahriman user-list [-h] [-e] [-r {UserAccess.Safe,UserAccess.Read,UserAccess.Write}] [username]
|
usage: ahriman user-list [-h] [-e] [-r {UserAccess.Safe,UserAccess.Read,UserAccess.Write}] [username]
|
||||||
|
|
||||||
list users from the user mapping and their roles
|
list users from the user mapping and their roles
|
||||||
@ -989,15 +577,16 @@ list users from the user mapping and their roles
|
|||||||
\fBusername\fR
|
\fBusername\fR
|
||||||
filter users by username
|
filter users by username
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman user-list'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-e\fR, \fB\-\-exit\-code\fR
|
\fB\-e\fR, \fB\-\-exit\-code\fR
|
||||||
return non\-zero exit status if result is empty
|
return non\-zero exit status if result is empty
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
\fB\-r\fR {UserAccess.Safe,UserAccess.Read,UserAccess.Write}, \fB\-\-role\fR {UserAccess.Safe,UserAccess.Read,UserAccess.Write}
|
\fB\-r\fR \fI\,{UserAccess.Safe,UserAccess.Read,UserAccess.Write}\/\fR, \fB\-\-role\fR \fI\,{UserAccess.Safe,UserAccess.Read,UserAccess.Write}\/\fR
|
||||||
filter users by role
|
filter users by role
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman user-remove'
|
.SH COMMAND \fI\,'ahriman user-remove'\/\fR
|
||||||
usage: ahriman user-remove [-h] [-s] username
|
usage: ahriman user-remove [-h] [-s] username
|
||||||
|
|
||||||
remove user from the user mapping and update the configuration
|
remove user from the user mapping and update the configuration
|
||||||
@ -1006,23 +595,26 @@ remove user from the user mapping and update the configuration
|
|||||||
\fBusername\fR
|
\fBusername\fR
|
||||||
username for web service
|
username for web service
|
||||||
|
|
||||||
|
.SH OPTIONS \fI\,'ahriman user-remove'\/\fR
|
||||||
.TP
|
.TP
|
||||||
\fB\-s\fR, \fB\-\-secure\fR
|
\fB\-s\fR, \fB\-\-secure\fR
|
||||||
set file permissions to user\-only
|
set file permissions to user\-only
|
||||||
|
|
||||||
.SH OPTIONS 'ahriman web'
|
.SH COMMAND \fI\,'ahriman web'\/\fR
|
||||||
usage: ahriman web [-h]
|
usage: ahriman web [-h]
|
||||||
|
|
||||||
start web server
|
start web server
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.SH COMMENTS
|
.SH COMMENTS
|
||||||
Argument list can also be read from file by using @ prefix.
|
Argument list can also be read from file by using @ prefix.
|
||||||
|
|
||||||
.SH AUTHORS
|
.SH AUTHORS
|
||||||
.B ahriman
|
.nf
|
||||||
was written by ahriman team <>.
|
ahriman team
|
||||||
|
.fi.nf
|
||||||
|
|
||||||
|
.fi
|
||||||
|
|
||||||
.SH DISTRIBUTION
|
.SH DISTRIBUTION
|
||||||
The latest version of ahriman may be downloaded from
|
The latest version of ahriman may be downloaded from
|
||||||
.UR https://github.com/arcan1s/ahriman
|
.UR https://github.com/arcan1s/ahriman
|
||||||
|
@ -11,7 +11,6 @@ ahriman.application.application.application module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.application.application\_packages module
|
ahriman.application.application.application\_packages module
|
||||||
------------------------------------------------------------
|
------------------------------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.application.application.application\_packages module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.application.application\_properties module
|
ahriman.application.application.application\_properties module
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.application.application.application\_properties module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.application.application\_repository module
|
ahriman.application.application.application\_repository module
|
||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.application.application.application\_repository module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -47,4 +43,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.application.handlers.add module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.backup module
|
ahriman.application.handlers.backup module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.application.handlers.backup module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.clean module
|
ahriman.application.handlers.clean module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.application.handlers.clean module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.dump module
|
ahriman.application.handlers.dump module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.application.handlers.dump module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.handler module
|
ahriman.application.handlers.handler module
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.application.handlers.handler module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.help module
|
ahriman.application.handlers.help module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -56,7 +51,6 @@ ahriman.application.handlers.help module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.key\_import module
|
ahriman.application.handlers.key\_import module
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
@ -65,7 +59,6 @@ ahriman.application.handlers.key\_import module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.patch module
|
ahriman.application.handlers.patch module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -74,7 +67,6 @@ ahriman.application.handlers.patch module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.rebuild module
|
ahriman.application.handlers.rebuild module
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
@ -83,7 +75,6 @@ ahriman.application.handlers.rebuild module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.remove module
|
ahriman.application.handlers.remove module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -92,7 +83,6 @@ ahriman.application.handlers.remove module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.remove\_unknown module
|
ahriman.application.handlers.remove\_unknown module
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
@ -101,7 +91,6 @@ ahriman.application.handlers.remove\_unknown module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.report module
|
ahriman.application.handlers.report module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -110,7 +99,6 @@ ahriman.application.handlers.report module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.restore module
|
ahriman.application.handlers.restore module
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
@ -119,7 +107,6 @@ ahriman.application.handlers.restore module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.search module
|
ahriman.application.handlers.search module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -128,7 +115,6 @@ ahriman.application.handlers.search module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.setup module
|
ahriman.application.handlers.setup module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -137,7 +123,6 @@ ahriman.application.handlers.setup module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.sign module
|
ahriman.application.handlers.sign module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -146,7 +131,6 @@ ahriman.application.handlers.sign module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.status module
|
ahriman.application.handlers.status module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -155,7 +139,6 @@ ahriman.application.handlers.status module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.status\_update module
|
ahriman.application.handlers.status\_update module
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
@ -164,7 +147,6 @@ ahriman.application.handlers.status\_update module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.sync module
|
ahriman.application.handlers.sync module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -173,7 +155,6 @@ ahriman.application.handlers.sync module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.unsafe\_commands module
|
ahriman.application.handlers.unsafe\_commands module
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
@ -182,7 +163,6 @@ ahriman.application.handlers.unsafe\_commands module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.update module
|
ahriman.application.handlers.update module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -191,7 +171,6 @@ ahriman.application.handlers.update module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.users module
|
ahriman.application.handlers.users module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -200,7 +179,6 @@ ahriman.application.handlers.users module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.handlers.web module
|
ahriman.application.handlers.web module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -209,7 +187,6 @@ ahriman.application.handlers.web module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -218,4 +195,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -20,7 +20,6 @@ ahriman.application.ahriman module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.application.lock module
|
ahriman.application.lock module
|
||||||
-------------------------------
|
-------------------------------
|
||||||
@ -29,7 +28,6 @@ ahriman.application.lock module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -38,4 +36,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.alpm.remote.aur module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.alpm.remote.official module
|
ahriman.core.alpm.remote.official module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -20,7 +19,14 @@ ahriman.core.alpm.remote.official module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
ahriman.core.alpm.remote.official\_syncdb module
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: ahriman.core.alpm.remote.official_syncdb
|
||||||
|
:members:
|
||||||
|
:no-undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
ahriman.core.alpm.remote.remote module
|
ahriman.core.alpm.remote.remote module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -29,7 +35,6 @@ ahriman.core.alpm.remote.remote module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -38,4 +43,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -19,7 +19,6 @@ ahriman.core.alpm.pacman module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.alpm.repo module
|
ahriman.core.alpm.repo module
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -28,7 +27,6 @@ ahriman.core.alpm.repo module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -37,4 +35,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.auth.auth module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.auth.helpers module
|
ahriman.core.auth.helpers module
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.auth.helpers module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.auth.mapping module
|
ahriman.core.auth.mapping module
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.auth.mapping module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.auth.oauth module
|
ahriman.core.auth.oauth module
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.core.auth.oauth module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -47,4 +43,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.build\_tools.sources module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.build\_tools.task module
|
ahriman.core.build\_tools.task module
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.build\_tools.task module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -29,4 +27,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -4,6 +4,14 @@ ahriman.core.database.data package
|
|||||||
Submodules
|
Submodules
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
ahriman.core.database.data.package\_remotes module
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: ahriman.core.database.data.package_remotes
|
||||||
|
:members:
|
||||||
|
:no-undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
ahriman.core.database.data.package\_statuses module
|
ahriman.core.database.data.package\_statuses module
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
@ -11,7 +19,6 @@ ahriman.core.database.data.package\_statuses module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.database.data.patches module
|
ahriman.core.database.data.patches module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -20,7 +27,6 @@ ahriman.core.database.data.patches module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.database.data.users module
|
ahriman.core.database.data.users module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -29,7 +35,6 @@ ahriman.core.database.data.users module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -38,4 +43,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,14 @@ ahriman.core.database.migrations.m000\_initial module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
ahriman.core.database.migrations.m001\_package\_source module
|
||||||
|
-------------------------------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: ahriman.core.database.migrations.m001_package_source
|
||||||
|
:members:
|
||||||
|
:no-undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -20,4 +27,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.database.operations.auth\_operations module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.database.operations.build\_operations module
|
ahriman.core.database.operations.build\_operations module
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.database.operations.build\_operations module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.database.operations.operations module
|
ahriman.core.database.operations.operations module
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.database.operations.operations module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.database.operations.package\_operations module
|
ahriman.core.database.operations.package\_operations module
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.core.database.operations.package\_operations module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.database.operations.patch\_operations module
|
ahriman.core.database.operations.patch\_operations module
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.core.database.operations.patch\_operations module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -56,4 +51,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -21,7 +21,6 @@ ahriman.core.database.sqlite module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -30,4 +29,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.formatters.aur\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.build\_printer module
|
ahriman.core.formatters.build\_printer module
|
||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.formatters.build\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.configuration\_printer module
|
ahriman.core.formatters.configuration\_printer module
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.formatters.configuration\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.package\_printer module
|
ahriman.core.formatters.package\_printer module
|
||||||
-----------------------------------------------
|
-----------------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.core.formatters.package\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.printer module
|
ahriman.core.formatters.printer module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.core.formatters.printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.status\_printer module
|
ahriman.core.formatters.status\_printer module
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
@ -56,7 +51,6 @@ ahriman.core.formatters.status\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.string\_printer module
|
ahriman.core.formatters.string\_printer module
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
@ -65,7 +59,6 @@ ahriman.core.formatters.string\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.update\_printer module
|
ahriman.core.formatters.update\_printer module
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
@ -74,7 +67,6 @@ ahriman.core.formatters.update\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.formatters.user\_printer module
|
ahriman.core.formatters.user\_printer module
|
||||||
--------------------------------------------
|
--------------------------------------------
|
||||||
@ -83,7 +75,6 @@ ahriman.core.formatters.user\_printer module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -92,4 +83,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.report.console module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.report.email module
|
ahriman.core.report.email module
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.report.email module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.report.html module
|
ahriman.core.report.html module
|
||||||
-------------------------------
|
-------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.report.html module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.report.jinja\_template module
|
ahriman.core.report.jinja\_template module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.core.report.jinja\_template module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.report.report module
|
ahriman.core.report.report module
|
||||||
---------------------------------
|
---------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.core.report.report module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.report.telegram module
|
ahriman.core.report.telegram module
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@ -56,7 +51,6 @@ ahriman.core.report.telegram module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -65,4 +59,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.repository.cleaner module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.repository.executor module
|
ahriman.core.repository.executor module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.repository.executor module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.repository.repository module
|
ahriman.core.repository.repository module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.repository.repository module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.repository.repository\_properties module
|
ahriman.core.repository.repository\_properties module
|
||||||
-----------------------------------------------------
|
-----------------------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.core.repository.repository\_properties module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.repository.update\_handler module
|
ahriman.core.repository.update\_handler module
|
||||||
----------------------------------------------
|
----------------------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.core.repository.update\_handler module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -56,4 +51,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -28,7 +28,6 @@ ahriman.core.configuration module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.exceptions module
|
ahriman.core.exceptions module
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -37,7 +36,6 @@ ahriman.core.exceptions module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.spawn module
|
ahriman.core.spawn module
|
||||||
-------------------------
|
-------------------------
|
||||||
@ -46,7 +44,6 @@ ahriman.core.spawn module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.tree module
|
ahriman.core.tree module
|
||||||
------------------------
|
------------------------
|
||||||
@ -55,7 +52,6 @@ ahriman.core.tree module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.util module
|
ahriman.core.util module
|
||||||
------------------------
|
------------------------
|
||||||
@ -64,7 +60,6 @@ ahriman.core.util module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -73,4 +68,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.sign.gpg module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -20,4 +19,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.status.client module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.status.watcher module
|
ahriman.core.status.watcher module
|
||||||
----------------------------------
|
----------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.status.watcher module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.status.web\_client module
|
ahriman.core.status.web\_client module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.status.web\_client module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -38,4 +35,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.core.upload.github module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.upload.http\_upload module
|
ahriman.core.upload.http\_upload module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.core.upload.http\_upload module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.upload.rsync module
|
ahriman.core.upload.rsync module
|
||||||
--------------------------------
|
--------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.core.upload.rsync module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.upload.s3 module
|
ahriman.core.upload.s3 module
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.core.upload.s3 module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.core.upload.upload module
|
ahriman.core.upload.upload module
|
||||||
---------------------------------
|
---------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.core.upload.upload module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -56,4 +51,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.models.action module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.aur\_package module
|
ahriman.models.aur\_package module
|
||||||
----------------------------------
|
----------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.models.aur\_package module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.auth\_settings module
|
ahriman.models.auth\_settings module
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.models.auth\_settings module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.build\_status module
|
ahriman.models.build\_status module
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.models.build\_status module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.counters module
|
ahriman.models.counters module
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -47,7 +43,6 @@ ahriman.models.counters module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.internal\_status module
|
ahriman.models.internal\_status module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -56,7 +51,6 @@ ahriman.models.internal\_status module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.migration module
|
ahriman.models.migration module
|
||||||
-------------------------------
|
-------------------------------
|
||||||
@ -65,7 +59,6 @@ ahriman.models.migration module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.migration\_result module
|
ahriman.models.migration\_result module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -74,7 +67,6 @@ ahriman.models.migration\_result module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.package module
|
ahriman.models.package module
|
||||||
-----------------------------
|
-----------------------------
|
||||||
@ -83,7 +75,6 @@ ahriman.models.package module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.package\_description module
|
ahriman.models.package\_description module
|
||||||
------------------------------------------
|
------------------------------------------
|
||||||
@ -92,7 +83,6 @@ ahriman.models.package\_description module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.package\_source module
|
ahriman.models.package\_source module
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
@ -101,7 +91,6 @@ ahriman.models.package\_source module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.property module
|
ahriman.models.property module
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -110,7 +99,14 @@ ahriman.models.property module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
ahriman.models.remote\_source module
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
.. automodule:: ahriman.models.remote_source
|
||||||
|
:members:
|
||||||
|
:no-undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
ahriman.models.report\_settings module
|
ahriman.models.report\_settings module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -119,7 +115,6 @@ ahriman.models.report\_settings module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.repository\_paths module
|
ahriman.models.repository\_paths module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -128,7 +123,6 @@ ahriman.models.repository\_paths module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.result module
|
ahriman.models.result module
|
||||||
----------------------------
|
----------------------------
|
||||||
@ -137,7 +131,6 @@ ahriman.models.result module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.sign\_settings module
|
ahriman.models.sign\_settings module
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -146,7 +139,6 @@ ahriman.models.sign\_settings module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.smtp\_ssl\_settings module
|
ahriman.models.smtp\_ssl\_settings module
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
@ -155,7 +147,6 @@ ahriman.models.smtp\_ssl\_settings module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.upload\_settings module
|
ahriman.models.upload\_settings module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -164,7 +155,6 @@ ahriman.models.upload\_settings module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.user module
|
ahriman.models.user module
|
||||||
--------------------------
|
--------------------------
|
||||||
@ -173,7 +163,6 @@ ahriman.models.user module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.user\_access module
|
ahriman.models.user\_access module
|
||||||
----------------------------------
|
----------------------------------
|
||||||
@ -182,7 +171,6 @@ ahriman.models.user\_access module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.models.user\_identity module
|
ahriman.models.user\_identity module
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -191,7 +179,6 @@ ahriman.models.user\_identity module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -200,4 +187,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -22,7 +22,6 @@ ahriman.version module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -31,4 +30,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.web.middlewares.auth\_handler module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.middlewares.exception\_handler module
|
ahriman.web.middlewares.exception\_handler module
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.web.middlewares.exception\_handler module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -29,4 +27,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -20,7 +20,6 @@ ahriman.web.routes module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.web module
|
ahriman.web.web module
|
||||||
----------------------
|
----------------------
|
||||||
@ -29,7 +28,6 @@ ahriman.web.web module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -38,4 +36,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -21,7 +21,6 @@ ahriman.web.views.base module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.index module
|
ahriman.web.views.index module
|
||||||
------------------------------
|
------------------------------
|
||||||
@ -30,7 +29,6 @@ ahriman.web.views.index module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -39,4 +37,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.web.views.service.add module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.service.remove module
|
ahriman.web.views.service.remove module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.web.views.service.remove module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.service.request module
|
ahriman.web.views.service.request module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.web.views.service.request module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.service.search module
|
ahriman.web.views.service.search module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.web.views.service.search module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -47,4 +43,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.web.views.status.ahriman module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.status.package module
|
ahriman.web.views.status.package module
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.web.views.status.package module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.status.packages module
|
ahriman.web.views.status.packages module
|
||||||
----------------------------------------
|
----------------------------------------
|
||||||
@ -29,7 +27,6 @@ ahriman.web.views.status.packages module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.status.status module
|
ahriman.web.views.status.status module
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -38,7 +35,6 @@ ahriman.web.views.status.status module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -47,4 +43,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -11,7 +11,6 @@ ahriman.web.views.user.login module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
ahriman.web.views.user.logout module
|
ahriman.web.views.user.logout module
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -20,7 +19,6 @@ ahriman.web.views.user.logout module
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
||||||
|
|
||||||
Module contents
|
Module contents
|
||||||
---------------
|
---------------
|
||||||
@ -29,4 +27,3 @@ Module contents
|
|||||||
:members:
|
:members:
|
||||||
:no-undoc-members:
|
:no-undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:private-members:
|
|
@ -1,227 +0,0 @@
|
|||||||
# Package structure
|
|
||||||
|
|
||||||
Packages have strict rules of importing:
|
|
||||||
|
|
||||||
* `ahriman.application` package must not be used anywhere except for itself.
|
|
||||||
* `ahriman.core` and `ahriman.models` packages don't have any import restriction. Actually we would like to totally restrict importing of `core` package from `models`, but it is impossible at the moment.
|
|
||||||
* `ahriman.web` package is allowed to be imported from `ahriman.application` (web handler only, only `ahriman.web.web` methods). It also must not be imported globally, only local import is allowed.
|
|
||||||
|
|
||||||
Full dependency diagram:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## `ahriman.application` package
|
|
||||||
|
|
||||||
This package contains application (aka executable) related classes and everything for that. It also contains package called `ahriman.application.handlers` in which all available subcommands are described as separated classes derived from base `ahriman.application.handlers.handler.Handler` class.
|
|
||||||
|
|
||||||
`ahriman.application.application.application.Application` (god class) is used for any interaction from parsers with repository, web etc. It is divided into multiple traits by functions (package related and repository related) in the same package.
|
|
||||||
|
|
||||||
`ahriman.application.ahriman` contains only command line parses and executes specified `Handler` on success, `ahriman.application.lock.Lock` is additional class which provides file-based lock and also performs some common checks.
|
|
||||||
|
|
||||||
## `ahriman.core` package
|
|
||||||
|
|
||||||
This package contains everything which is required for any time of application run and separated to several packages:
|
|
||||||
|
|
||||||
* `ahriman.core.alpm` package controls pacman related functions. It provides wrappers for `pyalpm` library and safe calls for repository tools (`repo-add` and `repo-remove`). Also this package contains `ahriman.core.alpm.remote` package which provides wrapper for remote sources (e.g. AUR RPC and official repositories RPC).
|
|
||||||
* `ahriman.core.auth` package provides classes for authorization methods used by web mostly. Base class is `ahriman.core.auth.auth.Auth` which must be called by `load` method.
|
|
||||||
* `ahriman.core.build_tools` is a package which provides wrapper for `devtools` commands.
|
|
||||||
* `ahriman.core.database` is everything including data and schema migrations for database.
|
|
||||||
* `ahriman.core.formatters` package provides `Printer` sub-classes for printing data (e.g. package properties) to stdout which are used by some handlers.
|
|
||||||
* `ahriman.core.report` is a package with reporting classes. Usually it must be called by `ahriman.core.report.report.Report.load` method.
|
|
||||||
* `ahriman.core.repository` contains several traits and base repository (`ahriman.core.repository.repository.Repository` class) implementation.
|
|
||||||
* `ahriman.core.sign` package provides sign feature (only gpg calls are available).
|
|
||||||
* `ahriman.core.status` contains helpers and watcher class which are required for web application. Reporter must be initialized by using `ahriman.core.status.client.Client.load` method.
|
|
||||||
* `ahriman.core.upload` package provides sync feature, must be called by `ahriman.core.upload.upload.Upload.load` method.
|
|
||||||
|
|
||||||
This package also provides some generic functions and classes which may be used by other packages:
|
|
||||||
|
|
||||||
* `ahriman.core.configuration.Configuration` is an extension for standard `configparser` library.
|
|
||||||
* `ahriman.core.exceptions` provides custom exceptions.
|
|
||||||
* `ahriman.core.spawn.Spawn` is a tool which can spawn another `ahriman` process. This feature is used by web application.
|
|
||||||
* `ahriman.core.tree` is a dependency tree implementation.
|
|
||||||
|
|
||||||
## `ahriman.models` package
|
|
||||||
|
|
||||||
It provides models for any other part of application. Unlike `ahriman.core` package classes from here provides only conversion methods (e.g. create class from another or convert to). Mostly case classes and enumerations.
|
|
||||||
|
|
||||||
## `ahriman.web` package
|
|
||||||
|
|
||||||
Web application. It is important that this package is isolated from any other to allow it to be optional feature (i.e. dependencies which are required by the package are optional).
|
|
||||||
|
|
||||||
* `ahriman.web.middlewares` provides middlewares for request handlers.
|
|
||||||
* `ahriman.web.views` contains web views derived from aiohttp view class.
|
|
||||||
* `ahriman.web.routes` creates routes for web application.
|
|
||||||
* `ahriman.web.web` provides main web application functions (e.g. start, initialization).
|
|
||||||
|
|
||||||
# Application run
|
|
||||||
|
|
||||||
* Parse command line arguments, find command and related handler which is set by parser.
|
|
||||||
* Call `Handler.execute` method.
|
|
||||||
* Define list of architectures to run. In case if there is more than one architecture specified run several subprocesses or process in current process otherwise. Class attribute `ALLOW_MULTI_ARCHITECTURE_RUN` controls whether application can be run in multiple processes or not - this feature is required for some handlers (e.g. `Web`) which should be able to spawn child process in daemon mode (it is impossible to do for daemonic processes).
|
|
||||||
* In each child process call lock functions.
|
|
||||||
* After success checks pass control to `Handler.run` method defined by specific handler class.
|
|
||||||
* Return result (success or failure) of each subprocess and exit from application.
|
|
||||||
* Some handlers may override their status and throw `ExitCode` exception. This exception is just silently suppressed and changes application exit code to `1`.
|
|
||||||
|
|
||||||
In most cases handlers spawn god class `ahriman.application.application.Application` class and call required methods.
|
|
||||||
|
|
||||||
Application is designed to run from `systemd` services and provides parametrized by architecture timer and service file for that.
|
|
||||||
|
|
||||||
# Database
|
|
||||||
|
|
||||||
The service uses SQLite database in order to store some internal info.
|
|
||||||
|
|
||||||
## Database instance
|
|
||||||
|
|
||||||
All methods related to specific part of database (basically operations per table) are split into different traits located inside `ahriman.core.database.operations` package. The base trait `ahriman.core.database.operations.operations.Operations` also provides generic methods for database access (e.g. row converters and transactional support).
|
|
||||||
|
|
||||||
The `ahriman.core.database.sqlite.SQLite` class itself derives from all of these traits and implements methods for initialization, including migrations.
|
|
||||||
|
|
||||||
## Schema and data migrations
|
|
||||||
|
|
||||||
The schema migration are applied according to current `pragma user_info` values, located at `ahriman.core.database.migrations` package and named as `m000_migration_name.py` (the preceding `m` is required in order to import migration content for tests). Additional class `ahriman.core.database.migrations.Migrations` reads all migrations autmatically and applies them in alphabetical order.
|
|
||||||
|
|
||||||
There are also data migrations which are located at `ahriman.core.database.data` package and move data from old-style (e.g. json files in filesystem, directory trees, etc) to the database. They are also part of migration and (unlike schema migrations) are applied only at specific version breakpoints (e.g. if `user_version` is more than 0 no initial migration will be applied).
|
|
||||||
|
|
||||||
## Type conversions
|
|
||||||
|
|
||||||
By default, it parses rows into python dictionary. In addition, the following pseudo-types are supported:
|
|
||||||
|
|
||||||
* `Dict[str, Any]`, `List[Any]` - for storing JSON data structures in database (technically there is no restriction on types for dictionary keys and values, but it is recommended to use only string keys). The type is stored as `json` datatype and `json.loads` and `json.dumps` methods are used in order to read and write from/to database respectively.
|
|
||||||
|
|
||||||
# Basic flows
|
|
||||||
|
|
||||||
## Add new packages or rebuild existing
|
|
||||||
|
|
||||||
Idea is to copy package to the directory from which it will be handled at the next update run. Different variants are supported:
|
|
||||||
|
|
||||||
* If supplied argument is file then application moves the file to the directory with built packages. Same rule applies for directory, but in this case it copies every package-like file from the specified directory.
|
|
||||||
* If supplied argument is directory and there is `PKGBUILD` file there it will be treated as local package. In this case it will queue this package to build and copy source files (`PKGBUILD` and `.SRCINFO`) to caches.
|
|
||||||
* If supplied argument iis not file then application tries to lookup for the specified name in AUR and clones it into the directory with manual updates. This scenario can also handle package dependencies which are missing in repositories.
|
|
||||||
|
|
||||||
This logic can be overwritten by specifying the `source` parameter, which is partially useful if you would like to add package from AUR, but there is local directory cloned from AUR.
|
|
||||||
|
|
||||||
## Rebuild packages
|
|
||||||
|
|
||||||
Same as add function for every package in repository. Optional filter by reverse dependency can be supplied.
|
|
||||||
|
|
||||||
## Remove packages
|
|
||||||
|
|
||||||
This flow removes package from filesystem, updates repository database and also runs synchronization and reporting methods.
|
|
||||||
|
|
||||||
## Update packages
|
|
||||||
|
|
||||||
This feature is divided into to stages: check AUR for updates and run rebuild for required packages. Whereas check does not do anything except for check itself, update flow is the following:
|
|
||||||
|
|
||||||
1. Process every built package first. Those packages are usually added manually.
|
|
||||||
2. Run sync and report methods.
|
|
||||||
3. Generate dependency tree for packages to be built.
|
|
||||||
4. For each level of tree it does:
|
|
||||||
1. Download package data from AUR.
|
|
||||||
2. Build every package in clean chroot.
|
|
||||||
3. Sign packages if required.
|
|
||||||
4. Add packages to database and sign database if required.
|
|
||||||
5. Process sync and report methods.
|
|
||||||
|
|
||||||
After any step any package data is being removed.
|
|
||||||
|
|
||||||
# Core functions reference
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
`ahriman.core.configuration.Configuration` class provides some additional methods (e.g. `getpath` and `getlist`) and also combines multiple files into single configuration dictionary using architecture overrides. It is the recommended way to deal with settings.
|
|
||||||
|
|
||||||
## Utils
|
|
||||||
|
|
||||||
For every external command run (which is actually not recommended if possible) custom wrapper for `subprocess` is used. Additional functions `ahriman.core.auth.helpers` provide safe calls for `aiohttp_security` methods and are required to make this dependency optional.
|
|
||||||
|
|
||||||
## Submodules
|
|
||||||
|
|
||||||
Some packages provide different behaviour depending on configuration settings. In these cases inheritance is used and recommended way to deal with them is to call class method `load` from base classes.
|
|
||||||
|
|
||||||
## Authorization
|
|
||||||
|
|
||||||
The package provides several authorization methods: disabled, based on configuration and OAuth2.
|
|
||||||
|
|
||||||
Disabled (default) authorization provider just allows everything for everyone and does not have any specific configuration (it uses some default configuration parameters though). It also provides generic interface for derived classes.
|
|
||||||
|
|
||||||
Mapping (aka configuration) provider uses hashed passwords with salt from the database in order to authenticate users. This provider also enables user permission checking (read/write) (authorization). Thus, it defines the following methods:
|
|
||||||
|
|
||||||
* `check_credentials` - user password validation (authentication).
|
|
||||||
* `verify_access` - user permission validation (authorization).
|
|
||||||
|
|
||||||
Passwords must be stored in database as `hash(password + salt)`, where `password` is user defined password (taken from user input), `salt` is random string (any length) defined globally in configuration and `hash` is secure hash function. Thus, the following configuration
|
|
||||||
|
|
||||||
```csv
|
|
||||||
"username","password","access"
|
|
||||||
"username","$6$rounds=656000$mWBiecMPrHAL1VgX$oU4Y5HH8HzlvMaxwkNEJjK13ozElyU1wAHBoO/WW5dAaE4YEfnB0X3FxbynKMl4FBdC3Ovap0jINz4LPkNADg0","read"
|
|
||||||
```
|
|
||||||
|
|
||||||
means that there is user `username` with `read` access and password `password` hashed by `sha512` with salt `salt`.
|
|
||||||
|
|
||||||
OAuth provider uses library definitions (`aioauth-client`) in order _authenticate_ users. It still requires user permission to be set in database, thus it inherits mapping provider without any changes. Whereas we could override `check_credentials` (authentication method) by something custom, OAuth flow is a bit more complex than just forward request, thus we have to implement the flow in login form.
|
|
||||||
|
|
||||||
OAuth's implementation also allows authenticating users via username + password (in the same way as mapping does) though it is not recommended for end-users and password must be left blank. In particular this feature is used by service reporting (aka robots).
|
|
||||||
|
|
||||||
In order to configure users there are special commands.
|
|
||||||
|
|
||||||
## Remote synchronization
|
|
||||||
|
|
||||||
There are several supported synchronization providers, currently they are `rsync`, `s3`, `github`.
|
|
||||||
|
|
||||||
`rsync` provider does not have any specific logic except for running external rsync application with configured arguments. The service does not handle SSH configuration, thus it has to be configured before running application manually.
|
|
||||||
|
|
||||||
`s3` provider uses `boto3` package and implements sync feature. The files are stored in architecture directory (e.g. if bucket is `repository`, packages will be stored in `repository/x86_64` for the `x86_64` architecture), bucket must be created before any action and API key must have permissions to write to the bucket. No external configuration required. In order to upload only changed files the service compares calculated hashes with the Amazon ETags, used realization is described [here](https://teppen.io/2018/10/23/aws_s3_verify_etags/).
|
|
||||||
|
|
||||||
`github` provider authenticates through basic auth, API key with repository write permissions is required. There will be created a release with the name of the architecture in case if it does not exist; files will be uploaded to the release assets. It also stores array of files and their MD5 checksums in release body in order to upload only changed ones. According to the Github API in case if there is already uploaded asset with the same name (e.g. database files), asset will be removed first.
|
|
||||||
|
|
||||||
## Additional features
|
|
||||||
|
|
||||||
Some features require optional dependencies to be installed:
|
|
||||||
|
|
||||||
* Version control executables (e.g. `git`, `svn`) for VCS packages.
|
|
||||||
* `gnupg` application for package and repository sign feature.
|
|
||||||
* `rsync` application for rsync based repository sync.
|
|
||||||
* `boto3` python package for `S3` sync.
|
|
||||||
* `Jinja2` python package for HTML report generation (it is also used by web application).
|
|
||||||
|
|
||||||
# Web application
|
|
||||||
|
|
||||||
Web application requires the following python packages to be installed:
|
|
||||||
|
|
||||||
* Core part requires `aiohttp` (application itself), `aiohttp_jinja2` and `Jinja2` (HTML generation from templates).
|
|
||||||
* In addition, `aiohttp_debugtoolbar` is required for debug panel. Please note that this option does not work together with authorization and basically must not be used in production.
|
|
||||||
* In addition, authorization feature requires `aiohttp_security`, `aiohttp_session` and `cryptography`.
|
|
||||||
* In addition to base authorization dependencies, OAuth2 also requires `aioauth-client` library.
|
|
||||||
|
|
||||||
## Middlewares
|
|
||||||
|
|
||||||
Service provides some custom middlewares, e.g. logging every exception (except for user ones) and user authorization.
|
|
||||||
|
|
||||||
## Web views
|
|
||||||
|
|
||||||
All web views are defined in separated package and derived from `ahriman.web.views.base.Base` class which provides typed interfaces for web application.
|
|
||||||
|
|
||||||
REST API supports both form and JSON data, but the last one is recommended.
|
|
||||||
|
|
||||||
Different APIs are separated into different packages:
|
|
||||||
|
|
||||||
* `ahriman.web.views.service` provides views for application controls.
|
|
||||||
* `ahriman.web.views.status` package provides REST API for application reporting.
|
|
||||||
* `ahriman.web.views.user` package provides login and logout methods which can be called without authorization.
|
|
||||||
|
|
||||||
## Templating
|
|
||||||
|
|
||||||
Package provides base jinja templates which can be overridden by settings. Vanilla templates are actively using bootstrap library.
|
|
||||||
|
|
||||||
## Requests and scopes
|
|
||||||
|
|
||||||
Service provides optional authorization which can be turned on in settings. In order to control user access there are two levels of authorization - read-only (only GET-like requests) and write (anything) which are provided by each web view directly.
|
|
||||||
|
|
||||||
If this feature is configured any request will be prohibited without authentication. In addition, configuration flag `auth.safe_build_status` can be used in order to allow seeing main page without authorization.
|
|
||||||
|
|
||||||
For authenticated users it uses encrypted session cookies to store tokens; encryption key is generated each time at the start of the application. It also stores expiration time of the session inside.
|
|
||||||
|
|
||||||
## External calls
|
|
||||||
|
|
||||||
Web application provides external calls to control main service. It spawns child process with specific arguments and waits for its termination. This feature must be used either with authorization or in safe (i.e. when status page is not available world-wide) environment.
|
|
261
docs/architecture.rst
Normal file
261
docs/architecture.rst
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
Architecture
|
||||||
|
============
|
||||||
|
|
||||||
|
Package structure
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Packages have strict rules of importing:
|
||||||
|
|
||||||
|
* ``ahriman.application`` package must not be used anywhere except for itself.
|
||||||
|
* ``ahriman.core`` and ``ahriman.models`` packages don't have any import restriction. Actually we would like to totally restrict importing of ``core`` package from ``models``\ , but it is impossible at the moment.
|
||||||
|
* ``ahriman.web`` package is allowed to be imported from ``ahriman.application`` (web handler only, only ``ahriman.web.web`` methods). It also must not be imported globally, only local import is allowed.
|
||||||
|
|
||||||
|
Full dependency diagram:
|
||||||
|
|
||||||
|
.. image:: ahriman-architecture.svg
|
||||||
|
:target: _images/ahriman-architecture.svg
|
||||||
|
:alt: architecture
|
||||||
|
|
||||||
|
``ahriman.application`` package
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This package contains application (aka executable) related classes and everything for that. It also contains package called ``ahriman.application.handlers`` in which all available subcommands are described as separated classes derived from base ``ahriman.application.handlers.handler.Handler`` class.
|
||||||
|
|
||||||
|
``ahriman.application.application.application.Application`` (god class) is used for any interaction from parsers with repository, web etc. It is divided into multiple traits by functions (package related and repository related) in the same package.
|
||||||
|
|
||||||
|
``ahriman.application.ahriman`` contains only command line parses and executes specified ``Handler`` on success, ``ahriman.application.lock.Lock`` is additional class which provides file-based lock and also performs some common checks.
|
||||||
|
|
||||||
|
``ahriman.core`` package
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This package contains everything which is required for any time of application run and separated to several packages:
|
||||||
|
|
||||||
|
* ``ahriman.core.alpm`` package controls pacman related functions. It provides wrappers for ``pyalpm`` library and safe calls for repository tools (\ ``repo-add`` and ``repo-remove``\ ). Also this package contains ``ahriman.core.alpm.remote`` package which provides wrapper for remote sources (e.g. AUR RPC and official repositories RPC).
|
||||||
|
* ``ahriman.core.auth`` package provides classes for authorization methods used by web mostly. Base class is ``ahriman.core.auth.auth.Auth`` which must be called by ``load`` method.
|
||||||
|
* ``ahriman.core.build_tools`` is a package which provides wrapper for ``devtools`` commands.
|
||||||
|
* ``ahriman.core.database`` is everything including data and schema migrations for database.
|
||||||
|
* ``ahriman.core.formatters`` package provides ``Printer`` sub-classes for printing data (e.g. package properties) to stdout which are used by some handlers.
|
||||||
|
* ``ahriman.core.report`` is a package with reporting classes. Usually it must be called by ``ahriman.core.report.report.Report.load`` method.
|
||||||
|
* ``ahriman.core.repository`` contains several traits and base repository (\ ``ahriman.core.repository.repository.Repository`` class) implementation.
|
||||||
|
* ``ahriman.core.sign`` package provides sign feature (only gpg calls are available).
|
||||||
|
* ``ahriman.core.status`` contains helpers and watcher class which are required for web application. Reporter must be initialized by using ``ahriman.core.status.client.Client.load`` method.
|
||||||
|
* ``ahriman.core.upload`` package provides sync feature, must be called by ``ahriman.core.upload.upload.Upload.load`` method.
|
||||||
|
|
||||||
|
This package also provides some generic functions and classes which may be used by other packages:
|
||||||
|
|
||||||
|
* ``ahriman.core.configuration.Configuration`` is an extension for standard ``configparser`` library.
|
||||||
|
* ``ahriman.core.exceptions`` provides custom exceptions.
|
||||||
|
* ``ahriman.core.spawn.Spawn`` is a tool which can spawn another ``ahriman`` process. This feature is used by web application.
|
||||||
|
* ``ahriman.core.tree`` is a dependency tree implementation.
|
||||||
|
|
||||||
|
``ahriman.models`` package
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
It provides models for any other part of application. Unlike ``ahriman.core`` package classes from here provides only conversion methods (e.g. create class from another or convert to). Mostly case classes and enumerations.
|
||||||
|
|
||||||
|
``ahriman.web`` package
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Web application. It is important that this package is isolated from any other to allow it to be optional feature (i.e. dependencies which are required by the package are optional).
|
||||||
|
|
||||||
|
* ``ahriman.web.middlewares`` provides middlewares for request handlers.
|
||||||
|
* ``ahriman.web.views`` contains web views derived from aiohttp view class.
|
||||||
|
* ``ahriman.web.routes`` creates routes for web application.
|
||||||
|
* ``ahriman.web.web`` provides main web application functions (e.g. start, initialization).
|
||||||
|
|
||||||
|
Application run
|
||||||
|
---------------
|
||||||
|
|
||||||
|
* Parse command line arguments, find command and related handler which is set by parser.
|
||||||
|
* Call ``Handler.execute`` method.
|
||||||
|
* Define list of architectures to run. In case if there is more than one architecture specified run several subprocesses or process in current process otherwise. Class attribute ``ALLOW_MULTI_ARCHITECTURE_RUN`` controls whether application can be run in multiple processes or not - this feature is required for some handlers (e.g. ``Web``\ ) which should be able to spawn child process in daemon mode (it is impossible to do for daemonic processes).
|
||||||
|
* In each child process call lock functions.
|
||||||
|
* After success checks pass control to ``Handler.run`` method defined by specific handler class.
|
||||||
|
* Return result (success or failure) of each subprocess and exit from application.
|
||||||
|
* Some handlers may override their status and throw ``ExitCode`` exception. This exception is just silently suppressed and changes application exit code to ``1``.
|
||||||
|
|
||||||
|
In most cases handlers spawn god class ``ahriman.application.application.Application`` class and call required methods.
|
||||||
|
|
||||||
|
Application is designed to run from ``systemd`` services and provides parametrized by architecture timer and service file for that.
|
||||||
|
|
||||||
|
Database
|
||||||
|
--------
|
||||||
|
|
||||||
|
The service uses SQLite database in order to store some internal info.
|
||||||
|
|
||||||
|
Database instance
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
All methods related to specific part of database (basically operations per table) are split into different traits located inside ``ahriman.core.database.operations`` package. The base trait ``ahriman.core.database.operations.operations.Operations`` also provides generic methods for database access (e.g. row converters and transactional support).
|
||||||
|
|
||||||
|
The ``ahriman.core.database.sqlite.SQLite`` class itself derives from all of these traits and implements methods for initialization, including migrations.
|
||||||
|
|
||||||
|
Schema and data migrations
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The schema migration are applied according to current ``pragma user_info`` values, located at ``ahriman.core.database.migrations`` package and named as ``m000_migration_name.py`` (the preceding ``m`` is required in order to import migration content for tests). Additional class ``ahriman.core.database.migrations.Migrations`` reads all migrations autmatically and applies them in alphabetical order.
|
||||||
|
|
||||||
|
There are also data migrations which are located at ``ahriman.core.database.data`` package and move data from old-style (e.g. json files in filesystem, directory trees, etc) to the database. They are also part of migration and (unlike schema migrations) are applied only at specific version breakpoints (e.g. if ``user_version`` is more than 0 no initial migration will be applied).
|
||||||
|
|
||||||
|
Type conversions
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
By default, it parses rows into python dictionary. In addition, the following pseudo-types are supported:
|
||||||
|
|
||||||
|
* ``Dict[str, Any]``\ , ``List[Any]`` - for storing JSON data structures in database (technically there is no restriction on types for dictionary keys and values, but it is recommended to use only string keys). The type is stored as ``json`` datatype and ``json.loads`` and ``json.dumps`` methods are used in order to read and write from/to database respectively.
|
||||||
|
|
||||||
|
Basic flows
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Add new packages or rebuild existing
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Idea is to copy package to the directory from which it will be handled at the next update run. Different variants are supported:
|
||||||
|
|
||||||
|
* If supplied argument is file then application moves the file to the directory with built packages. Same rule applies for directory, but in this case it copies every package-like file from the specified directory.
|
||||||
|
* If supplied argument is directory and there is ``PKGBUILD`` file there it will be treated as local package. In this case it will queue this package to build and copy source files (\ ``PKGBUILD`` and ``.SRCINFO``\ ) to caches.
|
||||||
|
* If supplied argument iis not file then application tries to lookup for the specified name in AUR and clones it into the directory with manual updates. This scenario can also handle package dependencies which are missing in repositories.
|
||||||
|
|
||||||
|
This logic can be overwritten by specifying the ``source`` parameter, which is partially useful if you would like to add package from AUR, but there is local directory cloned from AUR.
|
||||||
|
|
||||||
|
Rebuild packages
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Same as add function for every package in repository. Optional filter by reverse dependency can be supplied.
|
||||||
|
|
||||||
|
Remove packages
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This flow removes package from filesystem, updates repository database and also runs synchronization and reporting methods.
|
||||||
|
|
||||||
|
Update packages
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This feature is divided into to stages: check AUR for updates and run rebuild for required packages. Whereas check does not do anything except for check itself, update flow is the following:
|
||||||
|
|
||||||
|
#. Process every built package first. Those packages are usually added manually.
|
||||||
|
#. Run sync and report methods.
|
||||||
|
#. Generate dependency tree for packages to be built.
|
||||||
|
#. For each level of tree it does:
|
||||||
|
|
||||||
|
#. Download package data from AUR.
|
||||||
|
#. Build every package in clean chroot.
|
||||||
|
#. Sign packages if required.
|
||||||
|
#. Add packages to database and sign database if required.
|
||||||
|
#. Process sync and report methods.
|
||||||
|
|
||||||
|
After any step any package data is being removed.
|
||||||
|
|
||||||
|
Core functions reference
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
Configuration
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``ahriman.core.configuration.Configuration`` class provides some additional methods (e.g. ``getpath`` and ``getlist``\ ) and also combines multiple files into single configuration dictionary using architecture overrides. It is the recommended way to deal with settings.
|
||||||
|
|
||||||
|
Utils
|
||||||
|
^^^^^
|
||||||
|
|
||||||
|
For every external command run (which is actually not recommended if possible) custom wrapper for ``subprocess`` is used. Additional functions ``ahriman.core.auth.helpers`` provide safe calls for ``aiohttp_security`` methods and are required to make this dependency optional.
|
||||||
|
|
||||||
|
Submodules
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
Some packages provide different behaviour depending on configuration settings. In these cases inheritance is used and recommended way to deal with them is to call class method ``load`` from base classes.
|
||||||
|
|
||||||
|
Authorization
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The package provides several authorization methods: disabled, based on configuration and OAuth2.
|
||||||
|
|
||||||
|
Disabled (default) authorization provider just allows everything for everyone and does not have any specific configuration (it uses some default configuration parameters though). It also provides generic interface for derived classes.
|
||||||
|
|
||||||
|
Mapping (aka configuration) provider uses hashed passwords with salt from the database in order to authenticate users. This provider also enables user permission checking (read/write) (authorization). Thus, it defines the following methods:
|
||||||
|
|
||||||
|
* ``check_credentials`` - user password validation (authentication).
|
||||||
|
* ``verify_access`` - user permission validation (authorization).
|
||||||
|
|
||||||
|
Passwords must be stored in database as ``hash(password + salt)``\ , where ``password`` is user defined password (taken from user input), ``salt`` is random string (any length) defined globally in configuration and ``hash`` is secure hash function. Thus, the following configuration
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
"username","password","access"
|
||||||
|
"username","$6$rounds=656000$mWBiecMPrHAL1VgX$oU4Y5HH8HzlvMaxwkNEJjK13ozElyU1wAHBoO/WW5dAaE4YEfnB0X3FxbynKMl4FBdC3Ovap0jINz4LPkNADg0","read"
|
||||||
|
|
||||||
|
means that there is user ``username`` with ``read`` access and password ``password`` hashed by ``sha512`` with salt ``salt``.
|
||||||
|
|
||||||
|
OAuth provider uses library definitions (\ ``aioauth-client``\ ) in order *authenticate* users. It still requires user permission to be set in database, thus it inherits mapping provider without any changes. Whereas we could override ``check_credentials`` (authentication method) by something custom, OAuth flow is a bit more complex than just forward request, thus we have to implement the flow in login form.
|
||||||
|
|
||||||
|
OAuth's implementation also allows authenticating users via username + password (in the same way as mapping does) though it is not recommended for end-users and password must be left blank. In particular this feature is used by service reporting (aka robots).
|
||||||
|
|
||||||
|
In order to configure users there are special commands.
|
||||||
|
|
||||||
|
Remote synchronization
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
There are several supported synchronization providers, currently they are ``rsync``\ , ``s3``\ , ``github``.
|
||||||
|
|
||||||
|
``rsync`` provider does not have any specific logic except for running external rsync application with configured arguments. The service does not handle SSH configuration, thus it has to be configured before running application manually.
|
||||||
|
|
||||||
|
``s3`` provider uses ``boto3`` package and implements sync feature. The files are stored in architecture directory (e.g. if bucket is ``repository``\ , packages will be stored in ``repository/x86_64`` for the ``x86_64`` architecture), bucket must be created before any action and API key must have permissions to write to the bucket. No external configuration required. In order to upload only changed files the service compares calculated hashes with the Amazon ETags, used realization is described `here <https://teppen.io/2018/10/23/aws_s3_verify_etags/>`_.
|
||||||
|
|
||||||
|
``github`` provider authenticates through basic auth, API key with repository write permissions is required. There will be created a release with the name of the architecture in case if it does not exist; files will be uploaded to the release assets. It also stores array of files and their MD5 checksums in release body in order to upload only changed ones. According to the Github API in case if there is already uploaded asset with the same name (e.g. database files), asset will be removed first.
|
||||||
|
|
||||||
|
Additional features
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Some features require optional dependencies to be installed:
|
||||||
|
|
||||||
|
* Version control executables (e.g. ``git``\ , ``svn``\ ) for VCS packages.
|
||||||
|
* ``gnupg`` application for package and repository sign feature.
|
||||||
|
* ``rsync`` application for rsync based repository sync.
|
||||||
|
* ``boto3`` python package for ``S3`` sync.
|
||||||
|
* ``Jinja2`` python package for HTML report generation (it is also used by web application).
|
||||||
|
|
||||||
|
Web application
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Web application requires the following python packages to be installed:
|
||||||
|
|
||||||
|
* Core part requires ``aiohttp`` (application itself), ``aiohttp_jinja2`` and ``Jinja2`` (HTML generation from templates).
|
||||||
|
* In addition, ``aiohttp_debugtoolbar`` is required for debug panel. Please note that this option does not work together with authorization and basically must not be used in production.
|
||||||
|
* In addition, authorization feature requires ``aiohttp_security``\ , ``aiohttp_session`` and ``cryptography``.
|
||||||
|
* In addition to base authorization dependencies, OAuth2 also requires ``aioauth-client`` library.
|
||||||
|
|
||||||
|
Middlewares
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
Service provides some custom middlewares, e.g. logging every exception (except for user ones) and user authorization.
|
||||||
|
|
||||||
|
Web views
|
||||||
|
^^^^^^^^^
|
||||||
|
|
||||||
|
All web views are defined in separated package and derived from ``ahriman.web.views.base.Base`` class which provides typed interfaces for web application.
|
||||||
|
|
||||||
|
REST API supports both form and JSON data, but the last one is recommended.
|
||||||
|
|
||||||
|
Different APIs are separated into different packages:
|
||||||
|
|
||||||
|
* ``ahriman.web.views.service`` provides views for application controls.
|
||||||
|
* ``ahriman.web.views.status`` package provides REST API for application reporting.
|
||||||
|
* ``ahriman.web.views.user`` package provides login and logout methods which can be called without authorization.
|
||||||
|
|
||||||
|
Templating
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
Package provides base jinja templates which can be overridden by settings. Vanilla templates are actively using bootstrap library.
|
||||||
|
|
||||||
|
Requests and scopes
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Service provides optional authorization which can be turned on in settings. In order to control user access there are two levels of authorization - read-only (only GET-like requests) and write (anything) which are provided by each web view directly.
|
||||||
|
|
||||||
|
If this feature is configured any request will be prohibited without authentication. In addition, configuration flag ``auth.safe_build_status`` can be used in order to allow seeing main page without authorization.
|
||||||
|
|
||||||
|
For authenticated users it uses encrypted session cookies to store tokens; encryption key is generated each time at the start of the application. It also stores expiration time of the session inside.
|
||||||
|
|
||||||
|
External calls
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Web application provides external calls to control main service. It spawns child process with specific arguments and waits for its termination. This feature must be used either with authorization or in safe (i.e. when status page is not available world-wide) environment.
|
10
docs/command-line.rst
Normal file
10
docs/command-line.rst
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Commands help
|
||||||
|
=============
|
||||||
|
|
||||||
|
ahriman
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. argparse::
|
||||||
|
:module: ahriman.application.ahriman
|
||||||
|
:func: _parser
|
||||||
|
:prog: ahriman
|
@ -11,18 +11,35 @@
|
|||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#
|
#
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
# import sys
|
from unittest import mock
|
||||||
# sys.path.insert(0, os.path.abspath("."))
|
|
||||||
|
|
||||||
basedir = Path(__file__).resolve().parent.parent.parent
|
from ahriman.version import __version__
|
||||||
metadata_path = basedir / "src/ahriman/version.py"
|
|
||||||
metadata = {}
|
|
||||||
with metadata_path.open() as metadata_file:
|
|
||||||
exec(metadata_file.read(), metadata) # pylint: disable=exec-used
|
|
||||||
|
|
||||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
|
||||||
|
basedir = Path(__file__).resolve().parent.parent / "src"
|
||||||
|
sys.path.insert(0, str(basedir))
|
||||||
|
|
||||||
|
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
|
||||||
|
|
||||||
|
for module in (
|
||||||
|
"aioauth_client",
|
||||||
|
"aiohttp",
|
||||||
|
"aiohttp.web",
|
||||||
|
"aiohttp.web_exceptions",
|
||||||
|
"aiohttp.web_response",
|
||||||
|
"aiohttp.web_urldispatcher",
|
||||||
|
"aiohttp_jinja2",
|
||||||
|
"aiohttp_security",
|
||||||
|
"aiohttp_session",
|
||||||
|
"aiohttp_session.cookie_storage",
|
||||||
|
"boto3",
|
||||||
|
"cryptography",
|
||||||
|
"pyalpm",
|
||||||
|
):
|
||||||
|
sys.modules[module] = mock.Mock()
|
||||||
|
|
||||||
|
|
||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
@ -32,7 +49,7 @@ copyright = "2021-2022, ahriman team"
|
|||||||
author = "ahriman team"
|
author = "ahriman team"
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = metadata["__version__"]
|
release = __version__
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
@ -43,6 +60,7 @@ release = metadata["__version__"]
|
|||||||
extensions = [
|
extensions = [
|
||||||
"sphinx.ext.autodoc",
|
"sphinx.ext.autodoc",
|
||||||
"sphinx.ext.napoleon",
|
"sphinx.ext.napoleon",
|
||||||
|
"sphinxarg.ext",
|
||||||
]
|
]
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
@ -73,11 +91,18 @@ html_theme = "default" if on_rtd else "alabaster"
|
|||||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
html_static_path = ["_static"]
|
html_static_path = ["_static"]
|
||||||
|
|
||||||
|
add_module_names = False
|
||||||
|
|
||||||
|
modindex_common_prefix = ["ahriman.application.", "ahriman.core.", "ahriman.models.", "ahriman.web."]
|
||||||
|
|
||||||
|
|
||||||
# -- Extension configuration -------------------------------------------------
|
# -- Extension configuration -------------------------------------------------
|
||||||
|
|
||||||
|
autoclass_content = "both"
|
||||||
|
|
||||||
autodoc_member_order = "groupwise"
|
autodoc_member_order = "groupwise"
|
||||||
|
|
||||||
autodoc_default_options = {
|
autodoc_default_options = {
|
||||||
"no-undoc-members": True,
|
"no-undoc-members": True,
|
||||||
|
"special-members": "__init__",
|
||||||
}
|
}
|
@ -1,187 +0,0 @@
|
|||||||
# ahriman configuration
|
|
||||||
|
|
||||||
Some groups can be specified for each architecture separately. E.g. if there are `build` and `build:x86_64` groups it will use the option from `build:x86_64` for the `x86_64` architecture and `build` for any other (architecture specific group has higher priority). In case if both groups are presented, architecture specific options will be merged into global ones overriding them.
|
|
||||||
|
|
||||||
There are two variable types which have been added to default ones, they are paths and lists. List values will be read in the same way as shell does:
|
|
||||||
|
|
||||||
* By default, it splits value by spaces excluding empty elements.
|
|
||||||
* In case if quotation mark (`"` or `'`) will be found, any spaces inside will be ignored.
|
|
||||||
* In order to use quotation mark inside value it is required to put it to another quotation mark, e.g. `wor"'"d "with quote"` will be parsed as `["wor'd", "with quote"]` and vice versa.
|
|
||||||
* Unclosed quotation mark is not allowed and will rise an exception.
|
|
||||||
|
|
||||||
Path values, except for casting to `pathlib.Path` type, will be also expanded to absolute paths relative to the configuration path. E.g. if path is set to `ahriman.ini.d/logging.ini` and root configuration path is `/etc/ahriman.ini`, the value will be expanded to `/etc/ahriman.ini.d/logging.ini`. In order to disable path expand, use the full path, e.g. `/etc/ahriman.ini.d/logging.ini`.
|
|
||||||
|
|
||||||
## `settings` group
|
|
||||||
|
|
||||||
Base configuration settings.
|
|
||||||
|
|
||||||
* `include` - path to directory with configuration files overrides, string, required.
|
|
||||||
* `database` - path to SQLite database, string, required.
|
|
||||||
* `logging` - path to logging configuration, string, required. Check `logging.ini` for reference.
|
|
||||||
|
|
||||||
## `alpm` group
|
|
||||||
|
|
||||||
libalpm and AUR related configuration.
|
|
||||||
|
|
||||||
* `database` - path to pacman local database cache, string, required.
|
|
||||||
* `repositories` - list of pacman repositories, space separated list of strings, required.
|
|
||||||
* `root` - root for alpm library, string, required.
|
|
||||||
|
|
||||||
## `auth` group
|
|
||||||
|
|
||||||
Base authorization settings. `OAuth` provider requires `aioauth-client` library to be installed.
|
|
||||||
|
|
||||||
* `target` - specifies authorization provider, string, optional, default `disabled`. Allowed values are `disabled`, `configuration`, `oauth`.
|
|
||||||
* `client_id` - OAuth2 application client ID, string, required in case if `oauth` is used.
|
|
||||||
* `client_secret` - OAuth2 application client secret key, string, required in case if `oauth` is used.
|
|
||||||
* `max_age` - parameter which controls both cookie expiration and token expiration inside the service, integer, optional, default is 7 days.
|
|
||||||
* `oauth_provider` - OAuth2 provider class name as is in `aioauth-client` (e.g. `GoogleClient`, `GithubClient` etc), string, required in case if `oauth` is used.
|
|
||||||
* `oauth_scopes` - scopes list for OAuth2 provider, which will allow retrieving user email (which is used for checking user permissions), e.g. `https://www.googleapis.com/auth/userinfo.email` for `GoogleClient` or `user:email` for `GithubClient`, space separated list of strings, required in case if `oauth` is used.
|
|
||||||
* `safe_build_status` - allow requesting status page without authorization, boolean, required.
|
|
||||||
* `salt` - password hash salt, string, required in case if authorization enabled (automatically generated by `create-user` subcommand).
|
|
||||||
|
|
||||||
Authorized users are stored inside internal database, if any of external provides are used the password field for non-service users must be empty.
|
|
||||||
|
|
||||||
## `build:*` groups
|
|
||||||
|
|
||||||
Build related configuration. Group name can refer to architecture, e.g. `build:x86_64` can be used for x86_64 architecture specific settings.
|
|
||||||
|
|
||||||
* `archbuild_flags` - additional flags passed to `archbuild` command, space separated list of strings, optional.
|
|
||||||
* `build_command` - default build command, string, required.
|
|
||||||
* `ignore_packages` - list packages to ignore during a regular update (manual update will still work), space separated list of strings, optional.
|
|
||||||
* `makepkg_flags` - additional flags passed to `makepkg` command, space separated list of strings, optional.
|
|
||||||
* `makechrootpkg_flags` - additional flags passed to `makechrootpkg` command, space separated list of strings, optional.
|
|
||||||
|
|
||||||
## `repository` group
|
|
||||||
|
|
||||||
Base repository settings.
|
|
||||||
|
|
||||||
* `name` - repository name, string, required.
|
|
||||||
* `root` - root path for application, string, required.
|
|
||||||
|
|
||||||
## `sign:*` groups
|
|
||||||
|
|
||||||
Settings for signing packages or repository. Group name can refer to architecture, e.g. `sign:x86_64` can be used for x86_64 architecture specific settings.
|
|
||||||
|
|
||||||
* `target` - configuration flag to enable signing, space separated list of strings, required. Allowed values are `package` (sign each package separately), `repository` (sign repository database file).
|
|
||||||
* `key` - default PGP key, string, required. This key will also be used for database signing if enabled.
|
|
||||||
* `key_*` settings - PGP key which will be used for specific packages, string, optional. For example, if there is `key_yay` option the specified key will be used for yay package and default key for others.
|
|
||||||
|
|
||||||
## `report` group
|
|
||||||
|
|
||||||
Report generation settings.
|
|
||||||
|
|
||||||
* `target` - list of reports to be generated, space separated list of strings, required. It must point to valid section (or to section with architecture), e.g. `somerandomname` must point to existing section, `email` must point to one of `email` of `email:x86_64` (the one with architecture has higher priority).
|
|
||||||
|
|
||||||
Type will be read from several ways:
|
|
||||||
|
|
||||||
* In case if `type` option set inside the section, it will be used.
|
|
||||||
* Otherwise, it will look for type from section name removing architecture name.
|
|
||||||
* And finally, it will use section name as type.
|
|
||||||
|
|
||||||
### `console` type
|
|
||||||
|
|
||||||
Section name must be either `console` (plus optional architecture name, e.g. `console:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `use_utf` - use utf8 symbols in output if set and ascii otherwise, boolean, optional, default `yes`.
|
|
||||||
|
|
||||||
### `email` type
|
|
||||||
|
|
||||||
Section name must be either `email` (plus optional architecture name, e.g. `email:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `type` - type of the report, string, optional, must be set to `email` if exists.
|
|
||||||
* `full_template_path` - path to Jinja2 template for full package description index, string, optional.
|
|
||||||
* `homepage` - link to homepage, string, optional.
|
|
||||||
* `host` - SMTP host for sending emails, string, required.
|
|
||||||
* `link_path` - prefix for HTML links, string, required.
|
|
||||||
* `no_empty_report` - skip report generation for empty packages list, boolean, optional, default `yes`.
|
|
||||||
* `password` - SMTP password to authenticate, string, optional.
|
|
||||||
* `port` - SMTP port for sending emails, int, required.
|
|
||||||
* `receivers` - SMTP receiver addresses, space separated list of strings, required.
|
|
||||||
* `sender` - SMTP sender address, string, required.
|
|
||||||
* `ssl` - SSL mode for SMTP connection, one of `ssl`, `starttls`, `disabled`, optional, default `disabled`.
|
|
||||||
* `template_path` - path to Jinja2 template, string, required.
|
|
||||||
* `user` - SMTP user to authenticate, string, optional.
|
|
||||||
|
|
||||||
### `html` type
|
|
||||||
|
|
||||||
Section name must be either `html` (plus optional architecture name, e.g. `html:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `type` - type of the report, string, optional, must be set to `html` if exists.
|
|
||||||
* `path` - path to html report file, string, required.
|
|
||||||
* `homepage` - link to homepage, string, optional.
|
|
||||||
* `link_path` - prefix for HTML links, string, required.
|
|
||||||
* `template_path` - path to Jinja2 template, string, required.
|
|
||||||
|
|
||||||
### `telegram` type
|
|
||||||
|
|
||||||
Section name must be either `telegram` (plus optional architecture name, e.g. `telegram:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `type` - type of the report, string, optional, must be set to `telegram` if exists.
|
|
||||||
* `api_key` - telegram bot API key, string, required. Please refer FAQ about how to create chat and bot
|
|
||||||
* `chat_id` - telegram chat id, either string with `@` or integer value, required.
|
|
||||||
* `homepage` - link to homepage, string, optional.
|
|
||||||
* `link_path` - prefix for HTML links, string, required.
|
|
||||||
* `template_path` - path to Jinja2 template, string, required.
|
|
||||||
* `template_type` - `parse_mode` to be passed to telegram API, one of `MarkdownV2`, `HTML`, `Markdown`, string, optional, default `HTML`.
|
|
||||||
|
|
||||||
## `upload` group
|
|
||||||
|
|
||||||
Remote synchronization settings.
|
|
||||||
|
|
||||||
* `target` - list of synchronizations to be used, space separated list of strings, required. It must point to valid section (or to section with architecture), e.g. `somerandomname` must point to existing section, `github` must point to one of `github` of `github:x86_64` (with architecture it has higher priority).
|
|
||||||
|
|
||||||
Type will be read from several ways:
|
|
||||||
|
|
||||||
* In case if `type` option set inside the section, it will be used.
|
|
||||||
* Otherwise, it will look for type from section name removing architecture name.
|
|
||||||
* And finally, it will use section name as type.
|
|
||||||
|
|
||||||
### `github` type
|
|
||||||
|
|
||||||
This feature requires Github key creation (see below). Section name must be either `github` (plus optional architecture name, e.g. `github:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `type` - type of the upload, string, optional, must be set to `github` if exists.
|
|
||||||
* `owner` - Github repository owner, string, required.
|
|
||||||
* `password` - created Github API key. In order to create it do the following:
|
|
||||||
1. Go to [settings page](https://github.com/settings/profile).
|
|
||||||
2. Switch to [developers settings](https://github.com/settings/apps).
|
|
||||||
3. Switch to [personal access tokens](https://github.com/settings/tokens).
|
|
||||||
4. Generate new token. Required scope is `public_repo` (or `repo` for private repository support).
|
|
||||||
* `repository` - Github repository name, string, required. Repository must be created before any action and must have active branch (e.g. with readme).
|
|
||||||
* `username` - Github authorization user, string, required. Basically the same as `owner`.
|
|
||||||
|
|
||||||
### `rsync` type
|
|
||||||
|
|
||||||
Requires `rsync` package to be installed. Do not forget to configure ssh for user `ahriman`. Section name must be either `rsync` (plus optional architecture name, e.g. `rsync:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `type` - type of the upload, string, optional, must be set to `rsync` if exists.
|
|
||||||
* `command` - rsync command to run, space separated list of string, required.
|
|
||||||
* `remote` - remote server to rsync (e.g. `1.2.3.4:path/to/sync`), string, required.
|
|
||||||
|
|
||||||
### `s3` type
|
|
||||||
|
|
||||||
Requires `boto3` library to be installed. Section name must be either `s3` (plus optional architecture name, e.g. `s3:x86_64`) or random name with `type` set.
|
|
||||||
|
|
||||||
* `type` - type of the upload, string, optional, must be set to `github` if exists.
|
|
||||||
* `access_key` - AWS access key ID, string, required.
|
|
||||||
* `bucket` - bucket name (e.g. `bucket`), string, required.
|
|
||||||
* `chunk_size` - chunk size for calculating entity tags, int, optional, default 8 * 1024 * 1024.
|
|
||||||
* `region` - bucket region (e.g. `eu-central-1`), string, required.
|
|
||||||
* `secret_key` - AWS secret access key, string, required.
|
|
||||||
|
|
||||||
## `web:*` groups
|
|
||||||
|
|
||||||
Web server settings. If any of `host`/`port` is not set, web integration will be disabled. Group name can refer to architecture, e.g. `web:x86_64` can be used for x86_64 architecture specific settings. This feature requires `aiohttp` libraries to be installed.
|
|
||||||
|
|
||||||
* `address` - optional address in form `proto://host:port` (`port` can be omitted in case of default `proto` ports), will be used instead of `http://{host}:{port}` in case if set, string, optional. This option is required in case if `OAuth` provider is used.
|
|
||||||
* `debug` - enable debug toolbar, boolean, optional, default `no`.
|
|
||||||
* `debug_check_host` - check hosts to access debug toolbar, boolean, optional, default `no`.
|
|
||||||
* `debug_allowed_hosts` - allowed hosts to get access to debug toolbar, space separated list of string, optional.
|
|
||||||
* `host` - host to bind, string, optional.
|
|
||||||
* `index_url` - full url of the repository index page, string, optional.
|
|
||||||
* `password` - password to authorize in web service in order to update service status, string, required in case if authorization enabled.
|
|
||||||
* `port` - port to bind, int, optional.
|
|
||||||
* `static_path` - path to directory with static files, string, required.
|
|
||||||
* `templates` - path to templates directory, string, required.
|
|
||||||
* `username` - username to authorize in web service in order to update service status, string, required in case if authorization enabled.
|
|
206
docs/configuration.rst
Normal file
206
docs/configuration.rst
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
Configuration
|
||||||
|
=============
|
||||||
|
|
||||||
|
Some groups can be specified for each architecture separately. E.g. if there are ``build`` and ``build:x86_64`` groups it will use the option from ``build:x86_64`` for the ``x86_64`` architecture and ``build`` for any other (architecture specific group has higher priority). In case if both groups are presented, architecture specific options will be merged into global ones overriding them.
|
||||||
|
|
||||||
|
There are two variable types which have been added to default ones, they are paths and lists. List values will be read in the same way as shell does:
|
||||||
|
|
||||||
|
* By default, it splits value by spaces excluding empty elements.
|
||||||
|
* In case if quotation mark (\ ``"`` or ``'``\ ) will be found, any spaces inside will be ignored.
|
||||||
|
* In order to use quotation mark inside value it is required to put it to another quotation mark, e.g. ``wor"'"d "with quote"`` will be parsed as ``["wor'd", "with quote"]`` and vice versa.
|
||||||
|
* Unclosed quotation mark is not allowed and will rise an exception.
|
||||||
|
|
||||||
|
Path values, except for casting to ``pathlib.Path`` type, will be also expanded to absolute paths relative to the configuration path. E.g. if path is set to ``ahriman.ini.d/logging.ini`` and root configuration path is ``/etc/ahriman.ini``\ , the value will be expanded to ``/etc/ahriman.ini.d/logging.ini``. In order to disable path expand, use the full path, e.g. ``/etc/ahriman.ini.d/logging.ini``.
|
||||||
|
|
||||||
|
``settings`` group
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Base configuration settings.
|
||||||
|
|
||||||
|
* ``include`` - path to directory with configuration files overrides, string, required.
|
||||||
|
* ``database`` - path to SQLite database, string, required.
|
||||||
|
* ``logging`` - path to logging configuration, string, required. Check ``logging.ini`` for reference.
|
||||||
|
|
||||||
|
``alpm`` group
|
||||||
|
--------------
|
||||||
|
|
||||||
|
libalpm and AUR related configuration.
|
||||||
|
|
||||||
|
* ``database`` - path to pacman local database cache, string, required.
|
||||||
|
* ``repositories`` - list of pacman repositories, space separated list of strings, required.
|
||||||
|
* ``root`` - root for alpm library, string, required.
|
||||||
|
|
||||||
|
``auth`` group
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Base authorization settings. ``OAuth`` provider requires ``aioauth-client`` library to be installed.
|
||||||
|
|
||||||
|
* ``target`` - specifies authorization provider, string, optional, default ``disabled``. Allowed values are ``disabled``\ , ``configuration``\ , ``oauth``.
|
||||||
|
* ``client_id`` - OAuth2 application client ID, string, required in case if ``oauth`` is used.
|
||||||
|
* ``client_secret`` - OAuth2 application client secret key, string, required in case if ``oauth`` is used.
|
||||||
|
* ``max_age`` - parameter which controls both cookie expiration and token expiration inside the service, integer, optional, default is 7 days.
|
||||||
|
* ``oauth_provider`` - OAuth2 provider class name as is in ``aioauth-client`` (e.g. ``GoogleClient``\ , ``GithubClient`` etc), string, required in case if ``oauth`` is used.
|
||||||
|
* ``oauth_scopes`` - scopes list for OAuth2 provider, which will allow retrieving user email (which is used for checking user permissions), e.g. ``https://www.googleapis.com/auth/userinfo.email`` for ``GoogleClient`` or ``user:email`` for ``GithubClient``\ , space separated list of strings, required in case if ``oauth`` is used.
|
||||||
|
* ``safe_build_status`` - allow requesting status page without authorization, boolean, required.
|
||||||
|
* ``salt`` - password hash salt, string, required in case if authorization enabled (automatically generated by ``create-user`` subcommand).
|
||||||
|
|
||||||
|
Authorized users are stored inside internal database, if any of external provides are used the password field for non-service users must be empty.
|
||||||
|
|
||||||
|
``build:*`` groups
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Build related configuration. Group name can refer to architecture, e.g. ``build:x86_64`` can be used for x86_64 architecture specific settings.
|
||||||
|
|
||||||
|
* ``archbuild_flags`` - additional flags passed to ``archbuild`` command, space separated list of strings, optional.
|
||||||
|
* ``build_command`` - default build command, string, required.
|
||||||
|
* ``ignore_packages`` - list packages to ignore during a regular update (manual update will still work), space separated list of strings, optional.
|
||||||
|
* ``makepkg_flags`` - additional flags passed to ``makepkg`` command, space separated list of strings, optional.
|
||||||
|
* ``makechrootpkg_flags`` - additional flags passed to ``makechrootpkg`` command, space separated list of strings, optional.
|
||||||
|
|
||||||
|
``repository`` group
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Base repository settings.
|
||||||
|
|
||||||
|
* ``name`` - repository name, string, required.
|
||||||
|
* ``root`` - root path for application, string, required.
|
||||||
|
|
||||||
|
``sign:*`` groups
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Settings for signing packages or repository. Group name can refer to architecture, e.g. ``sign:x86_64`` can be used for x86_64 architecture specific settings.
|
||||||
|
|
||||||
|
* ``target`` - configuration flag to enable signing, space separated list of strings, required. Allowed values are ``package`` (sign each package separately), ``repository`` (sign repository database file).
|
||||||
|
* ``key`` - default PGP key, string, required. This key will also be used for database signing if enabled.
|
||||||
|
* ``key_*`` settings - PGP key which will be used for specific packages, string, optional. For example, if there is ``key_yay`` option the specified key will be used for yay package and default key for others.
|
||||||
|
|
||||||
|
``report`` group
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Report generation settings.
|
||||||
|
|
||||||
|
* ``target`` - list of reports to be generated, space separated list of strings, required. It must point to valid section (or to section with architecture), e.g. ``somerandomname`` must point to existing section, ``email`` must point to one of ``email`` of ``email:x86_64`` (the one with architecture has higher priority).
|
||||||
|
|
||||||
|
Type will be read from several ways:
|
||||||
|
|
||||||
|
* In case if ``type`` option set inside the section, it will be used.
|
||||||
|
* Otherwise, it will look for type from section name removing architecture name.
|
||||||
|
* And finally, it will use section name as type.
|
||||||
|
|
||||||
|
``console`` type
|
||||||
|
^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Section name must be either ``console`` (plus optional architecture name, e.g. ``console:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``use_utf`` - use utf8 symbols in output if set and ascii otherwise, boolean, optional, default ``yes``.
|
||||||
|
|
||||||
|
``email`` type
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Section name must be either ``email`` (plus optional architecture name, e.g. ``email:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``type`` - type of the report, string, optional, must be set to ``email`` if exists.
|
||||||
|
* ``full_template_path`` - path to Jinja2 template for full package description index, string, optional.
|
||||||
|
* ``homepage`` - link to homepage, string, optional.
|
||||||
|
* ``host`` - SMTP host for sending emails, string, required.
|
||||||
|
* ``link_path`` - prefix for HTML links, string, required.
|
||||||
|
* ``no_empty_report`` - skip report generation for empty packages list, boolean, optional, default ``yes``.
|
||||||
|
* ``password`` - SMTP password to authenticate, string, optional.
|
||||||
|
* ``port`` - SMTP port for sending emails, int, required.
|
||||||
|
* ``receivers`` - SMTP receiver addresses, space separated list of strings, required.
|
||||||
|
* ``sender`` - SMTP sender address, string, required.
|
||||||
|
* ``ssl`` - SSL mode for SMTP connection, one of ``ssl``\ , ``starttls``\ , ``disabled``\ , optional, default ``disabled``.
|
||||||
|
* ``template_path`` - path to Jinja2 template, string, required.
|
||||||
|
* ``user`` - SMTP user to authenticate, string, optional.
|
||||||
|
|
||||||
|
``html`` type
|
||||||
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Section name must be either ``html`` (plus optional architecture name, e.g. ``html:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``type`` - type of the report, string, optional, must be set to ``html`` if exists.
|
||||||
|
* ``path`` - path to html report file, string, required.
|
||||||
|
* ``homepage`` - link to homepage, string, optional.
|
||||||
|
* ``link_path`` - prefix for HTML links, string, required.
|
||||||
|
* ``template_path`` - path to Jinja2 template, string, required.
|
||||||
|
|
||||||
|
``telegram`` type
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Section name must be either ``telegram`` (plus optional architecture name, e.g. ``telegram:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``type`` - type of the report, string, optional, must be set to ``telegram`` if exists.
|
||||||
|
* ``api_key`` - telegram bot API key, string, required. Please refer FAQ about how to create chat and bot
|
||||||
|
* ``chat_id`` - telegram chat id, either string with ``@`` or integer value, required.
|
||||||
|
* ``homepage`` - link to homepage, string, optional.
|
||||||
|
* ``link_path`` - prefix for HTML links, string, required.
|
||||||
|
* ``template_path`` - path to Jinja2 template, string, required.
|
||||||
|
* ``template_type`` - ``parse_mode`` to be passed to telegram API, one of ``MarkdownV2``\ , ``HTML``\ , ``Markdown``\ , string, optional, default ``HTML``.
|
||||||
|
|
||||||
|
``upload`` group
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Remote synchronization settings.
|
||||||
|
|
||||||
|
* ``target`` - list of synchronizations to be used, space separated list of strings, required. It must point to valid section (or to section with architecture), e.g. ``somerandomname`` must point to existing section, ``github`` must point to one of ``github`` of ``github:x86_64`` (with architecture it has higher priority).
|
||||||
|
|
||||||
|
Type will be read from several ways:
|
||||||
|
|
||||||
|
* In case if ``type`` option set inside the section, it will be used.
|
||||||
|
* Otherwise, it will look for type from section name removing architecture name.
|
||||||
|
* And finally, it will use section name as type.
|
||||||
|
|
||||||
|
``github`` type
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This feature requires Github key creation (see below). Section name must be either ``github`` (plus optional architecture name, e.g. ``github:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``type`` - type of the upload, string, optional, must be set to ``github`` if exists.
|
||||||
|
* ``owner`` - Github repository owner, string, required.
|
||||||
|
* ``password`` - created Github API key. In order to create it do the following:
|
||||||
|
|
||||||
|
#. Go to `settings page <https://github.com/settings/profile>`_.
|
||||||
|
#. Switch to `developers settings <https://github.com/settings/apps>`_.
|
||||||
|
#. Switch to `personal access tokens <https://github.com/settings/tokens>`_.
|
||||||
|
#. Generate new token. Required scope is ``public_repo`` (or ``repo`` for private repository support).
|
||||||
|
|
||||||
|
* ``repository`` - Github repository name, string, required. Repository must be created before any action and must have active branch (e.g. with readme).
|
||||||
|
* ``username`` - Github authorization user, string, required. Basically the same as ``owner``.
|
||||||
|
|
||||||
|
``rsync`` type
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Requires ``rsync`` package to be installed. Do not forget to configure ssh for user ``ahriman``. Section name must be either ``rsync`` (plus optional architecture name, e.g. ``rsync:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``type`` - type of the upload, string, optional, must be set to ``rsync`` if exists.
|
||||||
|
* ``command`` - rsync command to run, space separated list of string, required.
|
||||||
|
* ``remote`` - remote server to rsync (e.g. ``1.2.3.4:path/to/sync``\ ), string, required.
|
||||||
|
|
||||||
|
``s3`` type
|
||||||
|
^^^^^^^^^^^
|
||||||
|
|
||||||
|
Requires ``boto3`` library to be installed. Section name must be either ``s3`` (plus optional architecture name, e.g. ``s3:x86_64``\ ) or random name with ``type`` set.
|
||||||
|
|
||||||
|
* ``type`` - type of the upload, string, optional, must be set to ``github`` if exists.
|
||||||
|
* ``access_key`` - AWS access key ID, string, required.
|
||||||
|
* ``bucket`` - bucket name (e.g. ``bucket``\ ), string, required.
|
||||||
|
* ``chunk_size`` - chunk size for calculating entity tags, int, optional, default 8 * 1024 * 1024.
|
||||||
|
* ``region`` - bucket region (e.g. ``eu-central-1``\ ), string, required.
|
||||||
|
* ``secret_key`` - AWS secret access key, string, required.
|
||||||
|
|
||||||
|
``web:*`` groups
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Web server settings. If any of ``host``\ /\ ``port`` is not set, web integration will be disabled. Group name can refer to architecture, e.g. ``web:x86_64`` can be used for x86_64 architecture specific settings. This feature requires ``aiohttp`` libraries to be installed.
|
||||||
|
|
||||||
|
* ``address`` - optional address in form ``proto://host:port`` (\ ``port`` can be omitted in case of default ``proto`` ports), will be used instead of ``http://{host}:{port}`` in case if set, string, optional. This option is required in case if ``OAuth`` provider is used.
|
||||||
|
* ``debug`` - enable debug toolbar, boolean, optional, default ``no``.
|
||||||
|
* ``debug_check_host`` - check hosts to access debug toolbar, boolean, optional, default ``no``.
|
||||||
|
* ``debug_allowed_hosts`` - allowed hosts to get access to debug toolbar, space separated list of string, optional.
|
||||||
|
* ``host`` - host to bind, string, optional.
|
||||||
|
* ``index_url`` - full url of the repository index page, string, optional.
|
||||||
|
* ``password`` - password to authorize in web service in order to update service status, string, required in case if authorization enabled.
|
||||||
|
* ``port`` - port to bind, int, optional.
|
||||||
|
* ``static_path`` - path to directory with static files, string, required.
|
||||||
|
* ``templates`` - path to templates directory, string, required.
|
||||||
|
* ``username`` - username to authorize in web service in order to update service status, string, required in case if authorization enabled.
|
621
docs/faq.md
621
docs/faq.md
@ -1,621 +0,0 @@
|
|||||||
# FAQ
|
|
||||||
|
|
||||||
## General topics
|
|
||||||
|
|
||||||
### What is the purpose of the project?
|
|
||||||
|
|
||||||
This project has been created in order to maintain self-hosted Arch Linux user repository without manual intervention - checking for updates and building packages.
|
|
||||||
|
|
||||||
### How do I install it?
|
|
||||||
|
|
||||||
TL;DR
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S ahriman
|
|
||||||
sudo ahriman -a x86_64 repo-setup --packager "ahriman bot <ahriman@example.com>" --repository "repository"
|
|
||||||
systemctl enable --now ahriman@x86_64.timer
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Long answer
|
|
||||||
|
|
||||||
The idea is to install the package as usual, create working directory tree, create configuration for `sudo` and `devtools`. Detailed description of the setup instruction can be found [here](setup.md).
|
|
||||||
|
|
||||||
### What does "architecture specific" mean? / How to configure for different architectures?
|
|
||||||
|
|
||||||
Some sections can be configured per architecture. The service will merge architecture specific values into common settings. In order to specify settings for specific architecture you must point it in section name.
|
|
||||||
|
|
||||||
For example, the section
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[build]
|
|
||||||
build_command = extra-x86_64-build
|
|
||||||
```
|
|
||||||
|
|
||||||
states that default build command is `extra-x86_64-build`. But if there is section
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[build:i686]
|
|
||||||
build_command = extra-i686-build
|
|
||||||
```
|
|
||||||
|
|
||||||
the `extra-i686-build` command will be used for `i686` architecture.
|
|
||||||
|
|
||||||
### How to use reporter/upload settings?
|
|
||||||
|
|
||||||
Normally you probably like to generate only one report for the specific type, e.g. only one email report. In order to do it you will need to have the following configuration:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[report]
|
|
||||||
target = email
|
|
||||||
|
|
||||||
[email]
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
or in case of multiple architectures and _different_ reporting settings:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[report]
|
|
||||||
target = email
|
|
||||||
|
|
||||||
[email:i686]
|
|
||||||
...
|
|
||||||
|
|
||||||
[email:x86_64]
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
But for some cases you would like to have multiple different reports with the same type (e.g. sending different templates to different addresses). For these cases you will need to specify section name in target and type in section, e.g. the following configuration can be used:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[report]
|
|
||||||
target = email_1 email_2
|
|
||||||
|
|
||||||
[email_1]
|
|
||||||
type = email
|
|
||||||
...
|
|
||||||
|
|
||||||
[email_2]
|
|
||||||
type = email
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
### Okay, I've installed ahriman, how do I add new package?
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman package-add ahriman --now
|
|
||||||
```
|
|
||||||
|
|
||||||
`--now` flag is totally optional and just run `repo-update` subcommand after the registering the new package, Thus the extended flow is the following:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman package-add ahriman
|
|
||||||
sudo -u ahriman ahriman repo-update
|
|
||||||
```
|
|
||||||
|
|
||||||
### AUR is fine, but I would like to create package from local PKGBUILD
|
|
||||||
|
|
||||||
TL;DR
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman package-add /path/to/local/directory/with/PKGBUILD --now
|
|
||||||
```
|
|
||||||
|
|
||||||
Before using this command you will need to create local directory, put `PKGBUILD` there and generate `.SRCINFO` by using `makepkg --printsrcinfo > .SRCINFO` command. These packages will be stored locally and _will be ignored_ during automatic update; in order to update the package you will need to run `package-add` command again.
|
|
||||||
|
|
||||||
### But I just wanted to change PKGBUILD from AUR a bit!
|
|
||||||
|
|
||||||
Well it is supported also.
|
|
||||||
|
|
||||||
1. Clone sources from AUR.
|
|
||||||
2. Make changes you would like to (e.g. edit `PKGBUILD`, add external patches).
|
|
||||||
3. Run `sudo -u ahriman ahriman patch-add /path/to/local/directory/with/PKGBUILD`.
|
|
||||||
|
|
||||||
The last command will calculate diff from current tree to the `HEAD` and will store it locally. Patches will be applied on any package actions (e.g. it can be used for dependency management).
|
|
||||||
|
|
||||||
### Hey, I would like to rebuild the official repository package
|
|
||||||
|
|
||||||
So it is the same as adding any other package, but due to restrictions you must specify source explicitly, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman package-add pacmann -s repository
|
|
||||||
```
|
|
||||||
|
|
||||||
### Package build fails because it cannot validate PGP signature of source files
|
|
||||||
|
|
||||||
TL;DR
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman key-import ...
|
|
||||||
```
|
|
||||||
|
|
||||||
### How do I check if there are new commits for VCS packages?
|
|
||||||
|
|
||||||
Normally the service handles VCS packages correctly, but it requires additional dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pacman -S breezy darcs mercurial subversion
|
|
||||||
```
|
|
||||||
|
|
||||||
### I would like to remove package because it is no longer needed/moved to official repositories
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman package-remove ahriman
|
|
||||||
```
|
|
||||||
|
|
||||||
Also, there is command `repo-remove-unknown` which checks packages in AUR and local storage and removes ones which have been removed.
|
|
||||||
|
|
||||||
Remove commands also remove any package files (patches, caches etc).
|
|
||||||
|
|
||||||
### There is new major release of %library-name%, how do I rebuild packages?
|
|
||||||
|
|
||||||
TL;DR
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman repo-rebuild --depends-on python
|
|
||||||
```
|
|
||||||
|
|
||||||
You can even rebuild the whole repository (which is particular useful in case if you would like to change packager) if you do not supply `--depends-on` option.
|
|
||||||
|
|
||||||
However, note that you do not need to rebuild repository in case if you just changed signing option, just use `repo-sign` command instead.
|
|
||||||
|
|
||||||
### Hmm, I have packages built, but how can I use it?
|
|
||||||
|
|
||||||
Add the following lines to your `pacman.conf`:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[repository]
|
|
||||||
Server = file:///var/lib/ahriman/repository/x86_64
|
|
||||||
```
|
|
||||||
|
|
||||||
(You might need to add `SigLevel` option according to the pacman documentation.)
|
|
||||||
|
|
||||||
|
|
||||||
### I would like to serve the repository
|
|
||||||
|
|
||||||
Easy. For example, nginx configuration (without SSL) will look like:
|
|
||||||
|
|
||||||
```
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name repo.example.com;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
autoindex on;
|
|
||||||
root /var/lib/ahriman/repository;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Example of the status page configuration is the following (status service is using 8080 port):
|
|
||||||
|
|
||||||
```
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name builds.example.com;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarder-Proto $scheme;
|
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:8080;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Docker image
|
|
||||||
|
|
||||||
We provide official images which can be found under `arcan1s/ahriman` repository. Docker image is being updated on each master commit as well as on each version. If you would like to use last (probably unstable) build you can use `edge` tag or `latest` for any tagged versions; otherwise you can use any version tag available.
|
|
||||||
|
|
||||||
The default action (in case if no arguments provided) is `repo-update`. Basically the idea is to run container, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run --privileged -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
`--privileged` flag is required to make mount possible inside container. In addition, you can pass own configuration overrides by using the same `-v` flag, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run -v /path/to/local/repo:/var/lib/ahriman -v /etc/ahriman.ini:/etc/ahriman.ini.d/10-overrides.ini arcan1s/ahriman:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
By default, it runs `repo-update`, but it can be overwritten to any other command you would like to, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run arcan1s/ahriman:latest package-add ahriman --now
|
|
||||||
```
|
|
||||||
|
|
||||||
For more details please refer to docker FAQ.
|
|
||||||
|
|
||||||
### Environment variables
|
|
||||||
|
|
||||||
The following environment variables are supported:
|
|
||||||
|
|
||||||
* `AHRIMAN_ARCHITECTURE` - architecture of the repository, default is `x86_64`.
|
|
||||||
* `AHRIMAN_DEBUG` - if set all commands will be logged to console.
|
|
||||||
* `AHRIMAN_FORCE_ROOT` - force run ahriman as root instead of guessing by subcommand.
|
|
||||||
* `AHRIMAN_HOST` - host for the web interface, default is `0.0.0.0`.
|
|
||||||
* `AHRIMAN_OUTPUT` - controls logging handler, e.g. `syslog`, `console`. The name must be found in logging configuration. Note that if `syslog` (the default) handler is used you will need to mount `/dev/log` inside container because it is not available there.
|
|
||||||
* `AHRIMAN_PACKAGER` - packager name from which packages will be built, default is `ahriman bot <ahriman@example.com>`.
|
|
||||||
* `AHRIMAN_PORT` - HTTP server port if any, default is empty.
|
|
||||||
* `AHRIMAN_REPOSITORY` - repository name, default is `aur-clone`.
|
|
||||||
* `AHRIMAN_REPOSITORY_ROOT` - repository root. Because of filesystem rights it is required to override default repository root. By default, it uses `ahriman` directory inside ahriman's home, which can be passed as mount volume.
|
|
||||||
* `AHRIMAN_USER` - ahriman user, usually must not be overwritten, default is `ahriman`.
|
|
||||||
|
|
||||||
You can pass any of these variables by using `-e` argument, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run -e AHRIMAN_PORT=8080 arcan1s/ahriman:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
### Web service setup
|
|
||||||
|
|
||||||
Well for that you would need to have web container instance running forever; it can be achieved by the following command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run -p 8080:8080 -e AHRIMAN_PORT=8080 -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
Note about `AHRIMAN_PORT` environment variable which is required in order to enable web service. An additional port bind by `-p 8080:8080` is required to pass docker port outside of container.
|
|
||||||
|
|
||||||
For every next container run use arguments `-e AHRIMAN_PORT=8080 --net=host`, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
docker run --privileged -e AHRIMAN_PORT=8080 --net=host -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Remote synchronization
|
|
||||||
|
|
||||||
### Wait I would like to use the repository from another server
|
|
||||||
|
|
||||||
There are several choices:
|
|
||||||
|
|
||||||
1. Easy and cheap, just share your local files through the internet, e.g. for `nginx`:
|
|
||||||
|
|
||||||
```
|
|
||||||
server {
|
|
||||||
location /x86_64 {
|
|
||||||
root /var/lib/ahriman/repository/x86_64;
|
|
||||||
autoindex on;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
2. You can also upload your packages using `rsync` to any available server. In order to use it you would need to configure ahriman first:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[upload]
|
|
||||||
target = rsync
|
|
||||||
|
|
||||||
[rsync]
|
|
||||||
remote = 192.168.0.1:/srv/repo
|
|
||||||
```
|
|
||||||
|
|
||||||
After that just add `/srv/repo` to the `pacman.conf` as usual. You can also upload to S3 (e.g. `Server = https://s3.eu-central-1.amazonaws.com/repository/x86_64`) or to Github (e.g. `Server = https://github.com/ahriman/repository/releases/download/x86_64`).
|
|
||||||
|
|
||||||
### How do I configure S3?
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
pacman -S python-boto3
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Create a bucket.
|
|
||||||
4. Create user with write access to the bucket:
|
|
||||||
|
|
||||||
```
|
|
||||||
{
|
|
||||||
"Version": "2012-10-17",
|
|
||||||
"Statement": [
|
|
||||||
{
|
|
||||||
"Sid": "ListObjectsInBucket",
|
|
||||||
"Effect": "Allow",
|
|
||||||
"Action": [
|
|
||||||
"s3:ListBucket"
|
|
||||||
],
|
|
||||||
"Resource": [
|
|
||||||
"arn:aws:s3:::repository"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Sid": "AllObjectActions",
|
|
||||||
"Effect": "Allow",
|
|
||||||
"Action": "s3:*Object",
|
|
||||||
"Resource": [
|
|
||||||
"arn:aws:s3:::repository/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Create an API key for the user and store it.
|
|
||||||
6. Configure the service as following:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[upload]
|
|
||||||
target = s3
|
|
||||||
|
|
||||||
[s3]
|
|
||||||
access_key = ...
|
|
||||||
bucket = repository
|
|
||||||
region = eu-central-1
|
|
||||||
secret_key = ...
|
|
||||||
```
|
|
||||||
|
|
||||||
### How do I configure Github?
|
|
||||||
|
|
||||||
1. Create a repository.
|
|
||||||
2. [Create API key](https://github.com/settings/tokens) with scope `public_repo`.
|
|
||||||
3. Configure the service as following:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[upload]
|
|
||||||
target = github
|
|
||||||
|
|
||||||
[github]
|
|
||||||
owner = ahriman
|
|
||||||
password = ...
|
|
||||||
repository = repository
|
|
||||||
username = ahriman
|
|
||||||
```
|
|
||||||
|
|
||||||
## Reporting
|
|
||||||
|
|
||||||
### I would like to get report to email
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S python-jinja
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Configure the service:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[report]
|
|
||||||
target = email
|
|
||||||
|
|
||||||
[email]
|
|
||||||
host = smtp.example.com
|
|
||||||
link_path = http://example.com/x86_64
|
|
||||||
password = ...
|
|
||||||
port = 465
|
|
||||||
receivers = me@example.com
|
|
||||||
sender = me@example.com
|
|
||||||
user = me@example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
### I'm using synchronization to S3 and would like to generate index page
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S python-jinja
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Configure the service:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[report]
|
|
||||||
target = html
|
|
||||||
|
|
||||||
[html]
|
|
||||||
path = /var/lib/ahriman/repository/x86_64/index.html
|
|
||||||
link_path = http://example.com/x86_64
|
|
||||||
```
|
|
||||||
|
|
||||||
After these steps `index.html` file will be automatically synced to S3
|
|
||||||
|
|
||||||
### I would like to get messages to my telegram account/channel
|
|
||||||
|
|
||||||
1. It still requires additional dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S python-jinja
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Register bot in telegram. You can do it by talking with [@BotFather](https://t.me/botfather). For more details please refer to [official documentation](https://core.telegram.org/bots).
|
|
||||||
|
|
||||||
3. Optionally (if you want to post message in chat):
|
|
||||||
|
|
||||||
1. Create telegram channel.
|
|
||||||
2. Invite your bot into the channel.
|
|
||||||
3. Make your channel public
|
|
||||||
|
|
||||||
4. Get chat id if you want to use by numerical id or just use id prefixed with `@` (e.g. `@ahriman`). If you are not using chat the chat id is your user id. If you don't want to make channel public you can use [this guide](https://stackoverflow.com/a/33862907).
|
|
||||||
|
|
||||||
5. Configure the service:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[report]
|
|
||||||
target = telegram
|
|
||||||
|
|
||||||
[telegram]
|
|
||||||
api_key = aaAAbbBBccCC
|
|
||||||
chat_id = @ahriman
|
|
||||||
link_path = http://example.com/x86_64
|
|
||||||
```
|
|
||||||
|
|
||||||
`api_key` is the one sent by [@BotFather](https://t.me/botfather), `chat_id` is the value retrieved from previous step.
|
|
||||||
|
|
||||||
If you did everything fine you should receive the message with the next update. Quick credentials check can be done by using the following command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
curl 'https://api.telegram.org/bot${CHAT_ID}/sendMessage?chat_id=${API_KEY}&text=hello'
|
|
||||||
```
|
|
||||||
|
|
||||||
(replace `${CHAT_ID}` and `${API_KEY}` with the values from configuration).
|
|
||||||
|
|
||||||
## Web service
|
|
||||||
|
|
||||||
### Readme mentions web interface, how do I use it?
|
|
||||||
|
|
||||||
1. Install dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S python-aiohttp python-aiohttp-jinja2
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Configure service:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[web]
|
|
||||||
port = 8080
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Start the web service `systemctl enable --now ahriman-web@x86_64`.
|
|
||||||
|
|
||||||
### I would like to limit user access to the status page
|
|
||||||
|
|
||||||
1. Install dependencies 😊:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S python-aiohttp-security python-aiohttp-session python-cryptography
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Configure the service to enable authorization:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[auth]
|
|
||||||
target = configuration
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Create user for the service:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman user-add --as-service -r write api
|
|
||||||
```
|
|
||||||
|
|
||||||
This command will ask for the password, just type it in stdin; _do not_ leave the field blank, user will not be able to authorize.
|
|
||||||
|
|
||||||
4. Create end-user `sudo -u ahriman ahriman user-add -r write my-first-user` with password.
|
|
||||||
5. Restart web service `systemctl restart ahriman-web@x86_64`.
|
|
||||||
|
|
||||||
### I would like to use OAuth
|
|
||||||
|
|
||||||
1. Create OAuth web application, download its `client_id` and `client_secret`.
|
|
||||||
2. Guess what? Install dependencies:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
yay -S python-aiohttp-security python-aiohttp-session python-cryptography python-aioauth-client
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Configure the service:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[auth]
|
|
||||||
target = oauth
|
|
||||||
client_id = ...
|
|
||||||
client_secret = ...
|
|
||||||
|
|
||||||
[web]
|
|
||||||
address = https://example.com
|
|
||||||
```
|
|
||||||
|
|
||||||
Configure `oauth_provider` and `oauth_scopes` in case if you would like to use different from Google provider. Scope must grant access to user email. `web.address` is required to make callback URL available from internet.
|
|
||||||
|
|
||||||
4. Create service user:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman user-add --as-service -r write api
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Create end-user `sudo -u ahriman ahriman user-add -r write my-first-user`. When it will ask for the password leave it blank.
|
|
||||||
6. Restart web service `systemctl restart ahriman-web@x86_64`.
|
|
||||||
|
|
||||||
## Backup and restore
|
|
||||||
|
|
||||||
The service provides several commands aim to do easy repository backup and restore. If you would like to move repository from the server `server1.example.com` to another `server2.example.com` you have to perform the following steps:
|
|
||||||
|
|
||||||
1. On the source server `server1.example.com` run `repo-backup` command, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo ahriman repo-backup /tmp/repo.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
This command will pack all configuration files together with database file into the archive specified as command line argument (i.e. `/tmp/repo.tar.gz`). In addition it will also archive `cache` directory (the one which contains local clones used by e.g. local packages) and `.gnupg` of the `ahriman` user.
|
|
||||||
|
|
||||||
2. Copy created archive from source server `server1.example.com` to target `server2.example.com`.
|
|
||||||
|
|
||||||
3. Install ahriman as usual on the target server `server2.example.com` if you didn't yet.
|
|
||||||
|
|
||||||
4. Extract archive e.g. by using subcommand:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo ahriman repo-restore /tmp/repo.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
An additional argument `-o`/`--output` can be used to specify extraction root (`/` by default).
|
|
||||||
|
|
||||||
5. Rebuild repository:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman repo-rebuild --from-database
|
|
||||||
```
|
|
||||||
|
|
||||||
## Other topics
|
|
||||||
|
|
||||||
### How does it differ from %another-manager%?
|
|
||||||
|
|
||||||
Short answer - I do not know.
|
|
||||||
|
|
||||||
#### [archrepo2](https://github.com/lilydjwg/archrepo2)
|
|
||||||
|
|
||||||
Don't know, haven't tried it. But it lacks of documentation at least.
|
|
||||||
|
|
||||||
* Web interface.
|
|
||||||
* No synchronization and reporting.
|
|
||||||
* `archrepo2` actively uses direct shell calls and `yaourt` components.
|
|
||||||
* It has constantly running process instead of timer process (it is not pro or con).
|
|
||||||
|
|
||||||
#### [repoctl](https://github.com/cassava/repoctl)
|
|
||||||
|
|
||||||
* Web interface.
|
|
||||||
* No reporting.
|
|
||||||
* Local packages and patches support.
|
|
||||||
* Some actions are not fully automated (e.g. package update still requires manual intervention for the build itself).
|
|
||||||
* `repoctl` has better AUR interaction features. With colors!
|
|
||||||
* `repoctl` has much easier configuration and even completion.
|
|
||||||
* `repoctl` is able to store old packages.
|
|
||||||
* Ability to host repository from same command vs external services (e.g. nginx) in `ahriman`.
|
|
||||||
|
|
||||||
#### [repo-scripts](https://github.com/arcan1s/repo-scripts)
|
|
||||||
|
|
||||||
Though originally I've created ahriman by trying to improve the project, it still lacks a lot of features:
|
|
||||||
|
|
||||||
* Web interface.
|
|
||||||
* Better reporting with template support.
|
|
||||||
* Synchronization features (there was only `rsync` based).
|
|
||||||
* Local packages and patches support.
|
|
||||||
* No dependency management.
|
|
||||||
* And so on.
|
|
||||||
|
|
||||||
`repo-scripts` also have bad architecture and bad quality code and uses out-of-dated `yaourt` and `package-query`.
|
|
||||||
|
|
||||||
#### [toolbox](https://github.com/chaotic-aur/toolbox)
|
|
||||||
|
|
||||||
It is automation tools for `repoctl` mentioned above. Except for using shell it looks pretty cool and also offers some additional features like patches, remote synchronization (isn't it?) and reporting.
|
|
||||||
|
|
||||||
### I would like to check service logs
|
|
||||||
|
|
||||||
By default, the service writes logs to `/dev/log` which can be accessed by using `journalctl` command (logs are written to the journal of the user under which command is run).
|
|
||||||
|
|
||||||
You can also edit configuration and forward logs to `stderr`, just change `handlers` value, e.g.:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sed -i 's/handlers = syslog_handler/handlers = console_handler/g' /etc/ahriman.ini.d/logging.ini
|
|
||||||
```
|
|
||||||
|
|
||||||
You can even configure logging as you wish, but kindly refer to python `logging` module [configuration](https://docs.python.org/3/library/logging.config.html).
|
|
||||||
|
|
||||||
### Html customization
|
|
||||||
|
|
||||||
It is possible to customize html templates. In order to do so, create files somewhere (refer to Jinja2 documentation and the service source code for available parameters) and put `template_path` to configuration pointing to this directory.
|
|
||||||
|
|
||||||
### I did not find my question
|
|
||||||
|
|
||||||
[Create an issue](https://github.com/arcan1s/ahriman/issues) with type **Question**.
|
|
703
docs/faq.rst
Normal file
703
docs/faq.rst
Normal file
@ -0,0 +1,703 @@
|
|||||||
|
FAQ
|
||||||
|
===
|
||||||
|
|
||||||
|
General topics
|
||||||
|
--------------
|
||||||
|
|
||||||
|
What is the purpose of the project?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
This project has been created in order to maintain self-hosted Arch Linux user repository without manual intervention - checking for updates and building packages.
|
||||||
|
|
||||||
|
How do I install it?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
TL;DR
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S ahriman
|
||||||
|
sudo ahriman -a x86_64 repo-setup --packager "ahriman bot <ahriman@example.com>" --repository "repository"
|
||||||
|
systemctl enable --now ahriman@x86_64.timer
|
||||||
|
|
||||||
|
Long answer
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
The idea is to install the package as usual, create working directory tree, create configuration for ``sudo`` and ``devtools``. Detailed description of the setup instruction can be found :doc:`here <setup>`.
|
||||||
|
|
||||||
|
What does "architecture specific" mean? / How to configure for different architectures?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Some sections can be configured per architecture. The service will merge architecture specific values into common settings. In order to specify settings for specific architecture you must point it in section name.
|
||||||
|
|
||||||
|
For example, the section
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[build]
|
||||||
|
build_command = extra-x86_64-build
|
||||||
|
|
||||||
|
states that default build command is ``extra-x86_64-build``. But if there is section
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[build:i686]
|
||||||
|
build_command = extra-i686-build
|
||||||
|
|
||||||
|
the ``extra-i686-build`` command will be used for ``i686`` architecture.
|
||||||
|
|
||||||
|
How to use reporter/upload settings?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Normally you probably like to generate only one report for the specific type, e.g. only one email report. In order to do it you will need to have the following configuration:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[report]
|
||||||
|
target = email
|
||||||
|
|
||||||
|
[email]
|
||||||
|
...
|
||||||
|
|
||||||
|
or in case of multiple architectures and *different* reporting settings:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[report]
|
||||||
|
target = email
|
||||||
|
|
||||||
|
[email:i686]
|
||||||
|
...
|
||||||
|
|
||||||
|
[email:x86_64]
|
||||||
|
...
|
||||||
|
|
||||||
|
But for some cases you would like to have multiple different reports with the same type (e.g. sending different templates to different addresses). For these cases you will need to specify section name in target and type in section, e.g. the following configuration can be used:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[report]
|
||||||
|
target = email_1 email_2
|
||||||
|
|
||||||
|
[email_1]
|
||||||
|
type = email
|
||||||
|
...
|
||||||
|
|
||||||
|
[email_2]
|
||||||
|
type = email
|
||||||
|
...
|
||||||
|
|
||||||
|
Okay, I've installed ahriman, how do I add new package?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman package-add ahriman --now
|
||||||
|
|
||||||
|
``--now`` flag is totally optional and just run ``repo-update`` subcommand after the registering the new package, Thus the extended flow is the following:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman package-add ahriman
|
||||||
|
sudo -u ahriman ahriman repo-update
|
||||||
|
|
||||||
|
AUR is fine, but I would like to create package from local PKGBUILD
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
TL;DR
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman package-add /path/to/local/directory/with/PKGBUILD --now
|
||||||
|
|
||||||
|
Before using this command you will need to create local directory, put ``PKGBUILD`` there and generate ``.SRCINFO`` by using ``makepkg --printsrcinfo > .SRCINFO`` command. These packages will be stored locally and *will be ignored* during automatic update; in order to update the package you will need to run ``package-add`` command again.
|
||||||
|
|
||||||
|
But I just wanted to change PKGBUILD from AUR a bit!
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Well it is supported also.
|
||||||
|
|
||||||
|
#. Clone sources from AUR.
|
||||||
|
#. Make changes you would like to (e.g. edit ``PKGBUILD``\ , add external patches).
|
||||||
|
#. Run ``sudo -u ahriman ahriman patch-add /path/to/local/directory/with/PKGBUILD``.
|
||||||
|
|
||||||
|
The last command will calculate diff from current tree to the ``HEAD`` and will store it locally. Patches will be applied on any package actions (e.g. it can be used for dependency management).
|
||||||
|
|
||||||
|
Hey, I would like to rebuild the official repository package
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
So it is the same as adding any other package, but due to restrictions you must specify source explicitly, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman package-add pacmann -s repository
|
||||||
|
|
||||||
|
Package build fails because it cannot validate PGP signature of source files
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
TL;DR
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman key-import ...
|
||||||
|
|
||||||
|
How do I check if there are new commits for VCS packages?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Normally the service handles VCS packages correctly, but it requires additional dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
pacman -S breezy darcs mercurial subversion
|
||||||
|
|
||||||
|
I would like to remove package because it is no longer needed/moved to official repositories
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman package-remove ahriman
|
||||||
|
|
||||||
|
Also, there is command ``repo-remove-unknown`` which checks packages in AUR and local storage and removes ones which have been removed.
|
||||||
|
|
||||||
|
Remove commands also remove any package files (patches, caches etc).
|
||||||
|
|
||||||
|
There is new major release of %library-name%, how do I rebuild packages?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
TL;DR
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman repo-rebuild --depends-on python
|
||||||
|
|
||||||
|
You can even rebuild the whole repository (which is particular useful in case if you would like to change packager) if you do not supply ``--depends-on`` option.
|
||||||
|
|
||||||
|
However, note that you do not need to rebuild repository in case if you just changed signing option, just use ``repo-sign`` command instead.
|
||||||
|
|
||||||
|
Hmm, I have packages built, but how can I use it?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Add the following lines to your ``pacman.conf``\ :
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[repository]
|
||||||
|
Server = file:///var/lib/ahriman/repository/x86_64
|
||||||
|
|
||||||
|
(You might need to add ``SigLevel`` option according to the pacman documentation.)
|
||||||
|
|
||||||
|
I would like to serve the repository
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Easy. For example, nginx configuration (without SSL) will look like:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name repo.example.com;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
autoindex on;
|
||||||
|
root /var/lib/ahriman/repository;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Example of the status page configuration is the following (status service is using 8080 port):
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name builds.example.com;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarder-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_pass http://127.0.0.1:8080;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Docker image
|
||||||
|
------------
|
||||||
|
|
||||||
|
We provide official images which can be found under ``arcan1s/ahriman`` repository. Docker image is being updated on each master commit as well as on each version. If you would like to use last (probably unstable) build you can use ``edge`` tag or ``latest`` for any tagged versions; otherwise you can use any version tag available.
|
||||||
|
|
||||||
|
The default action (in case if no arguments provided) is ``repo-update``. Basically the idea is to run container, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
docker run --privileged -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest
|
||||||
|
|
||||||
|
``--privileged`` flag is required to make mount possible inside container. In addition, you can pass own configuration overrides by using the same ``-v`` flag, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
docker run -v /path/to/local/repo:/var/lib/ahriman -v /etc/ahriman.ini:/etc/ahriman.ini.d/10-overrides.ini arcan1s/ahriman:latest
|
||||||
|
|
||||||
|
By default, it runs ``repo-update``\ , but it can be overwritten to any other command you would like to, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
docker run arcan1s/ahriman:latest package-add ahriman --now
|
||||||
|
|
||||||
|
For more details please refer to docker FAQ.
|
||||||
|
|
||||||
|
Environment variables
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following environment variables are supported:
|
||||||
|
|
||||||
|
* ``AHRIMAN_ARCHITECTURE`` - architecture of the repository, default is ``x86_64``.
|
||||||
|
* ``AHRIMAN_DEBUG`` - if set all commands will be logged to console.
|
||||||
|
* ``AHRIMAN_FORCE_ROOT`` - force run ahriman as root instead of guessing by subcommand.
|
||||||
|
* ``AHRIMAN_HOST`` - host for the web interface, default is ``0.0.0.0``.
|
||||||
|
* ``AHRIMAN_OUTPUT`` - controls logging handler, e.g. ``syslog``\ , ``console``. The name must be found in logging configuration. Note that if ``syslog`` (the default) handler is used you will need to mount ``/dev/log`` inside container because it is not available there.
|
||||||
|
* ``AHRIMAN_PACKAGER`` - packager name from which packages will be built, default is ``ahriman bot <ahriman@example.com>``.
|
||||||
|
* ``AHRIMAN_PORT`` - HTTP server port if any, default is empty.
|
||||||
|
* ``AHRIMAN_REPOSITORY`` - repository name, default is ``aur-clone``.
|
||||||
|
* ``AHRIMAN_REPOSITORY_ROOT`` - repository root. Because of filesystem rights it is required to override default repository root. By default, it uses ``ahriman`` directory inside ahriman's home, which can be passed as mount volume.
|
||||||
|
* ``AHRIMAN_USER`` - ahriman user, usually must not be overwritten, default is ``ahriman``.
|
||||||
|
|
||||||
|
You can pass any of these variables by using ``-e`` argument, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
docker run -e AHRIMAN_PORT=8080 arcan1s/ahriman:latest
|
||||||
|
|
||||||
|
Web service setup
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Well for that you would need to have web container instance running forever; it can be achieved by the following command:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
docker run -p 8080:8080 -e AHRIMAN_PORT=8080 -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest
|
||||||
|
|
||||||
|
Note about ``AHRIMAN_PORT`` environment variable which is required in order to enable web service. An additional port bind by ``-p 8080:8080`` is required to pass docker port outside of container.
|
||||||
|
|
||||||
|
For every next container run use arguments ``-e AHRIMAN_PORT=8080 --net=host``\ , e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
docker run --privileged -e AHRIMAN_PORT=8080 --net=host -v /path/to/local/repo:/var/lib/ahriman arcan1s/ahriman:latest
|
||||||
|
|
||||||
|
Remote synchronization
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
Wait I would like to use the repository from another server
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
There are several choices:
|
||||||
|
|
||||||
|
#.
|
||||||
|
Easy and cheap, just share your local files through the internet, e.g. for ``nginx``\ :
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
server {
|
||||||
|
location /x86_64 {
|
||||||
|
root /var/lib/ahriman/repository/x86_64;
|
||||||
|
autoindex on;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#.
|
||||||
|
You can also upload your packages using ``rsync`` to any available server. In order to use it you would need to configure ahriman first:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[upload]
|
||||||
|
target = rsync
|
||||||
|
|
||||||
|
[rsync]
|
||||||
|
remote = 192.168.0.1:/srv/repo
|
||||||
|
|
||||||
|
After that just add ``/srv/repo`` to the ``pacman.conf`` as usual. You can also upload to S3 (e.g. ``Server = https://s3.eu-central-1.amazonaws.com/repository/x86_64``\ ) or to Github (e.g. ``Server = https://github.com/ahriman/repository/releases/download/x86_64``\ ).
|
||||||
|
|
||||||
|
How do I configure S3?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
pacman -S python-boto3
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create a bucket.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create user with write access to the bucket:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
{
|
||||||
|
"Version": "2012-10-17",
|
||||||
|
"Statement": [
|
||||||
|
{
|
||||||
|
"Sid": "ListObjectsInBucket",
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Action": [
|
||||||
|
"s3:ListBucket"
|
||||||
|
],
|
||||||
|
"Resource": [
|
||||||
|
"arn:aws:s3:::repository"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Sid": "AllObjectActions",
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Action": "s3:*Object",
|
||||||
|
"Resource": [
|
||||||
|
"arn:aws:s3:::repository/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create an API key for the user and store it.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure the service as following:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[upload]
|
||||||
|
target = s3
|
||||||
|
|
||||||
|
[s3]
|
||||||
|
access_key = ...
|
||||||
|
bucket = repository
|
||||||
|
region = eu-central-1
|
||||||
|
secret_key = ...
|
||||||
|
|
||||||
|
How do I configure Github?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create a repository.
|
||||||
|
#.
|
||||||
|
`Create API key <https://github.com/settings/tokens>`_ with scope ``public_repo``.
|
||||||
|
#.
|
||||||
|
Configure the service as following:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[upload]
|
||||||
|
target = github
|
||||||
|
|
||||||
|
[github]
|
||||||
|
owner = ahriman
|
||||||
|
password = ...
|
||||||
|
repository = repository
|
||||||
|
username = ahriman
|
||||||
|
|
||||||
|
Reporting
|
||||||
|
---------
|
||||||
|
|
||||||
|
I would like to get report to email
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S python-jinja
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure the service:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[report]
|
||||||
|
target = email
|
||||||
|
|
||||||
|
[email]
|
||||||
|
host = smtp.example.com
|
||||||
|
link_path = http://example.com/x86_64
|
||||||
|
password = ...
|
||||||
|
port = 465
|
||||||
|
receivers = me@example.com
|
||||||
|
sender = me@example.com
|
||||||
|
user = me@example.com
|
||||||
|
|
||||||
|
I'm using synchronization to S3 and would like to generate index page
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S python-jinja
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure the service:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[report]
|
||||||
|
target = html
|
||||||
|
|
||||||
|
[html]
|
||||||
|
path = /var/lib/ahriman/repository/x86_64/index.html
|
||||||
|
link_path = http://example.com/x86_64
|
||||||
|
|
||||||
|
After these steps ``index.html`` file will be automatically synced to S3
|
||||||
|
|
||||||
|
I would like to get messages to my telegram account/channel
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
It still requires additional dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S python-jinja
|
||||||
|
|
||||||
|
#.
|
||||||
|
Register bot in telegram. You can do it by talking with `@BotFather <https://t.me/botfather>`_. For more details please refer to `official documentation <https://core.telegram.org/bots>`_.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Optionally (if you want to post message in chat):
|
||||||
|
|
||||||
|
|
||||||
|
#. Create telegram channel.
|
||||||
|
#. Invite your bot into the channel.
|
||||||
|
#. Make your channel public
|
||||||
|
|
||||||
|
#.
|
||||||
|
Get chat id if you want to use by numerical id or just use id prefixed with ``@`` (e.g. ``@ahriman``\ ). If you are not using chat the chat id is your user id. If you don't want to make channel public you can use `this guide <https://stackoverflow.com/a/33862907>`_.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure the service:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[report]
|
||||||
|
target = telegram
|
||||||
|
|
||||||
|
[telegram]
|
||||||
|
api_key = aaAAbbBBccCC
|
||||||
|
chat_id = @ahriman
|
||||||
|
link_path = http://example.com/x86_64
|
||||||
|
|
||||||
|
``api_key`` is the one sent by `@BotFather <https://t.me/botfather>`_\ , ``chat_id`` is the value retrieved from previous step.
|
||||||
|
|
||||||
|
If you did everything fine you should receive the message with the next update. Quick credentials check can be done by using the following command:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
curl 'https://api.telegram.org/bot${CHAT_ID}/sendMessage?chat_id=${API_KEY}&text=hello'
|
||||||
|
|
||||||
|
(replace ``${CHAT_ID}`` and ``${API_KEY}`` with the values from configuration).
|
||||||
|
|
||||||
|
Web service
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Readme mentions web interface, how do I use it?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S python-aiohttp python-aiohttp-jinja2
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure service:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[web]
|
||||||
|
port = 8080
|
||||||
|
|
||||||
|
#.
|
||||||
|
Start the web service ``systemctl enable --now ahriman-web@x86_64``.
|
||||||
|
|
||||||
|
I would like to limit user access to the status page
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install dependencies 😊:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S python-aiohttp-security python-aiohttp-session python-cryptography
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure the service to enable authorization:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[auth]
|
||||||
|
target = configuration
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create user for the service:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman user-add --as-service -r write api
|
||||||
|
|
||||||
|
This command will ask for the password, just type it in stdin; *do not* leave the field blank, user will not be able to authorize.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create end-user ``sudo -u ahriman ahriman user-add -r write my-first-user`` with password.
|
||||||
|
|
||||||
|
#. Restart web service ``systemctl restart ahriman-web@x86_64``.
|
||||||
|
|
||||||
|
I would like to use OAuth
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create OAuth web application, download its ``client_id`` and ``client_secret``.
|
||||||
|
#.
|
||||||
|
Guess what? Install dependencies:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
yay -S python-aiohttp-security python-aiohttp-session python-cryptography python-aioauth-client
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure the service:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[auth]
|
||||||
|
target = oauth
|
||||||
|
client_id = ...
|
||||||
|
client_secret = ...
|
||||||
|
|
||||||
|
[web]
|
||||||
|
address = https://example.com
|
||||||
|
|
||||||
|
Configure ``oauth_provider`` and ``oauth_scopes`` in case if you would like to use different from Google provider. Scope must grant access to user email. ``web.address`` is required to make callback URL available from internet.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create service user:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman user-add --as-service -r write api
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create end-user ``sudo -u ahriman ahriman user-add -r write my-first-user``. When it will ask for the password leave it blank.
|
||||||
|
|
||||||
|
#. Restart web service ``systemctl restart ahriman-web@x86_64``.
|
||||||
|
|
||||||
|
Backup and restore
|
||||||
|
------------------
|
||||||
|
|
||||||
|
The service provides several commands aim to do easy repository backup and restore. If you would like to move repository from the server ``server1.example.com`` to another ``server2.example.com`` you have to perform the following steps:
|
||||||
|
|
||||||
|
#.
|
||||||
|
On the source server ``server1.example.com`` run ``repo-backup`` command, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo ahriman repo-backup /tmp/repo.tar.gz
|
||||||
|
|
||||||
|
This command will pack all configuration files together with database file into the archive specified as command line argument (i.e. ``/tmp/repo.tar.gz``\ ). In addition it will also archive ``cache`` directory (the one which contains local clones used by e.g. local packages) and ``.gnupg`` of the ``ahriman`` user.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Copy created archive from source server ``server1.example.com`` to target ``server2.example.com``.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install ahriman as usual on the target server ``server2.example.com`` if you didn't yet.
|
||||||
|
|
||||||
|
#.
|
||||||
|
Extract archive e.g. by using subcommand:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo ahriman repo-restore /tmp/repo.tar.gz
|
||||||
|
|
||||||
|
An additional argument ``-o``\ /\ ``--output`` can be used to specify extraction root (\ ``/`` by default).
|
||||||
|
|
||||||
|
#.
|
||||||
|
Rebuild repository:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman repo-rebuild --from-database
|
||||||
|
|
||||||
|
Other topics
|
||||||
|
------------
|
||||||
|
|
||||||
|
How does it differ from %another-manager%?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Short answer - I do not know.
|
||||||
|
|
||||||
|
`archrepo2 <https://github.com/lilydjwg/archrepo2>`_
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Don't know, haven't tried it. But it lacks of documentation at least.
|
||||||
|
|
||||||
|
* Web interface.
|
||||||
|
* No synchronization and reporting.
|
||||||
|
* ``archrepo2`` actively uses direct shell calls and ``yaourt`` components.
|
||||||
|
* It has constantly running process instead of timer process (it is not pro or con).
|
||||||
|
|
||||||
|
`repoctl <https://github.com/cassava/repoctl>`_
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
* Web interface.
|
||||||
|
* No reporting.
|
||||||
|
* Local packages and patches support.
|
||||||
|
* Some actions are not fully automated (e.g. package update still requires manual intervention for the build itself).
|
||||||
|
* ``repoctl`` has better AUR interaction features. With colors!
|
||||||
|
* ``repoctl`` has much easier configuration and even completion.
|
||||||
|
* ``repoctl`` is able to store old packages.
|
||||||
|
* Ability to host repository from same command vs external services (e.g. nginx) in ``ahriman``.
|
||||||
|
|
||||||
|
`repo-scripts <https://github.com/arcan1s/repo-scripts>`_
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Though originally I've created ahriman by trying to improve the project, it still lacks a lot of features:
|
||||||
|
|
||||||
|
* Web interface.
|
||||||
|
* Better reporting with template support.
|
||||||
|
* Synchronization features (there was only ``rsync`` based).
|
||||||
|
* Local packages and patches support.
|
||||||
|
* No dependency management.
|
||||||
|
* And so on.
|
||||||
|
|
||||||
|
``repo-scripts`` also have bad architecture and bad quality code and uses out-of-dated ``yaourt`` and ``package-query``.
|
||||||
|
|
||||||
|
`toolbox <https://github.com/chaotic-aur/toolbox>`_
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
It is automation tools for ``repoctl`` mentioned above. Except for using shell it looks pretty cool and also offers some additional features like patches, remote synchronization (isn't it?) and reporting.
|
||||||
|
|
||||||
|
I would like to check service logs
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
By default, the service writes logs to ``/dev/log`` which can be accessed by using ``journalctl`` command (logs are written to the journal of the user under which command is run).
|
||||||
|
|
||||||
|
You can also edit configuration and forward logs to ``stderr``\ , just change ``handlers`` value, e.g.:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sed -i 's/handlers = syslog_handler/handlers = console_handler/g' /etc/ahriman.ini.d/logging.ini
|
||||||
|
|
||||||
|
You can even configure logging as you wish, but kindly refer to python ``logging`` module `configuration <https://docs.python.org/3/library/logging.config.html>`_.
|
||||||
|
|
||||||
|
Html customization
|
||||||
|
^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
It is possible to customize html templates. In order to do so, create files somewhere (refer to Jinja2 documentation and the service source code for available parameters) and put ``template_path`` to configuration pointing to this directory.
|
||||||
|
|
||||||
|
I did not find my question
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
`Create an issue <https://github.com/arcan1s/ahriman/issues>`_ with type **Question**.
|
@ -1,10 +1,6 @@
|
|||||||
Welcome to ahriman's documentation!
|
Welcome to ahriman's documentation!
|
||||||
===================================
|
===================================
|
||||||
|
|
||||||
.. toctree::
|
|
||||||
:maxdepth: 2
|
|
||||||
:caption: Contents:
|
|
||||||
|
|
||||||
Wrapper for managing custom repository inspired by `repo-scripts <https://github.com/arcan1s/repo-scripts>`_.
|
Wrapper for managing custom repository inspired by `repo-scripts <https://github.com/arcan1s/repo-scripts>`_.
|
||||||
|
|
||||||
Features
|
Features
|
||||||
@ -19,8 +15,22 @@ Features
|
|||||||
* Ability to patch AUR packages and even create package from local PKGBUILDs.
|
* Ability to patch AUR packages and even create package from local PKGBUILDs.
|
||||||
* Repository status interface with optional authorization and control options.
|
* Repository status interface with optional authorization and control options.
|
||||||
|
|
||||||
|
Contents
|
||||||
|
--------
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
setup
|
||||||
|
configuration
|
||||||
|
command-line
|
||||||
|
faq
|
||||||
|
architecture
|
||||||
|
advanced-usage
|
||||||
|
modules
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
------------------
|
||||||
|
|
||||||
* :ref:`genindex`
|
* :ref:`genindex`
|
||||||
* :ref:`modindex`
|
* :ref:`modindex`
|
@ -1,5 +1,5 @@
|
|||||||
src
|
Modules
|
||||||
===
|
=======
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 4
|
:maxdepth: 4
|
@ -1,66 +0,0 @@
|
|||||||
# Setup instructions
|
|
||||||
|
|
||||||
1. Install package as usual.
|
|
||||||
2. Change settings if required, see [configuration reference](configuration.md) for more details.
|
|
||||||
3. TL;DR
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo ahriman -a x86_64 repo-setup ...
|
|
||||||
```
|
|
||||||
|
|
||||||
`repo-setup` literally does the following steps:
|
|
||||||
|
|
||||||
1. Create `/var/lib/ahriman/.makepkg.conf` with `makepkg.conf` overrides if required (at least you might want to set `PACKAGER`):
|
|
||||||
|
|
||||||
```shell
|
|
||||||
echo 'PACKAGER="John Doe <john@doe.com>"' | sudo -u ahriman tee -a /var/lib/ahriman/.makepkg.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Configure build tools (it is required for correct dependency management system):
|
|
||||||
|
|
||||||
1. Create build command, e.g. `ln -s /usr/bin/archbuild /usr/local/bin/ahriman-x86_64-build` (you can choose any name for command, basically it should be `{name}-{arch}-build`).
|
|
||||||
2. Create configuration file, e.g. `cp /usr/share/devtools/pacman-{extra,ahriman}.conf` (same as previous `pacman-{name}.conf`).
|
|
||||||
3. Change configuration file, add your own repository, add multilib repository etc;
|
|
||||||
4. Set `build_command` option to point to your command.
|
|
||||||
5. Configure `/etc/sudoers.d/ahriman` to allow running command without a password.
|
|
||||||
|
|
||||||
```shell
|
|
||||||
ln -s /usr/bin/archbuild /usr/local/bin/ahriman-x86_64-build
|
|
||||||
cp /usr/share/devtools/pacman-{extra,ahriman}.conf
|
|
||||||
|
|
||||||
echo '[multilib]' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
|
||||||
echo 'Include = /etc/pacman.d/mirrorlist' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
|
||||||
|
|
||||||
echo '[aur-clone]' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
|
||||||
echo 'SigLevel = Optional TrustAll' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
|
||||||
echo 'Server = file:///var/lib/ahriman/repository/$arch' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
|
||||||
|
|
||||||
echo '[build]' | tee -a /etc/ahriman.ini.d/build.ini
|
|
||||||
echo 'build_command = ahriman-x86_64-build' | tee -a /etc/ahriman.ini.d/build.ini
|
|
||||||
|
|
||||||
echo 'Cmnd_Alias CARCHBUILD_CMD = /usr/local/bin/ahriman-x86_64-build *' | tee -a /etc/sudoers.d/ahriman
|
|
||||||
echo 'ahriman ALL=(ALL) NOPASSWD: CARCHBUILD_CMD' | tee -a /etc/sudoers.d/ahriman
|
|
||||||
chmod 400 /etc/sudoers.d/ahriman
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Start and enable `ahriman@.timer` via `systemctl`:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
systemctl enable --now ahriman@x86_64.timer
|
|
||||||
```
|
|
||||||
|
|
||||||
5. Start and enable status page:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
systemctl enable --now ahriman-web@x86_64
|
|
||||||
```
|
|
||||||
|
|
||||||
6. Add packages by using `ahriman package-add {package}` command:
|
|
||||||
|
|
||||||
```shell
|
|
||||||
sudo -u ahriman ahriman -a x86_64 package-add ahriman --now
|
|
||||||
```
|
|
||||||
|
|
||||||
## User creation
|
|
||||||
|
|
||||||
`user-add` subcommand is recommended for new user creation.
|
|
76
docs/setup.rst
Normal file
76
docs/setup.rst
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
Initial setup
|
||||||
|
=============
|
||||||
|
|
||||||
|
#.
|
||||||
|
Install package as usual.
|
||||||
|
#.
|
||||||
|
Change settings if required, see :doc:`configuration reference <configuration>` for more details.
|
||||||
|
#.
|
||||||
|
TL;DR
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo ahriman -a x86_64 repo-setup ...
|
||||||
|
|
||||||
|
``repo-setup`` literally does the following steps:
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create ``/var/lib/ahriman/.makepkg.conf`` with ``makepkg.conf`` overrides if required (at least you might want to set ``PACKAGER``\ ):
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
echo 'PACKAGER="John Doe <john@doe.com>"' | sudo -u ahriman tee -a /var/lib/ahriman/.makepkg.conf
|
||||||
|
|
||||||
|
#.
|
||||||
|
Configure build tools (it is required for correct dependency management system):
|
||||||
|
|
||||||
|
#.
|
||||||
|
Create build command, e.g. ``ln -s /usr/bin/archbuild /usr/local/bin/ahriman-x86_64-build`` (you can choose any name for command, basically it should be ``{name}-{arch}-build``\ ).
|
||||||
|
#.
|
||||||
|
Create configuration file, e.g. ``cp /usr/share/devtools/pacman-{extra,ahriman}.conf`` (same as previous ``pacman-{name}.conf``\ ).
|
||||||
|
#.
|
||||||
|
Change configuration file, add your own repository, add multilib repository etc;
|
||||||
|
#.
|
||||||
|
Set ``build_command`` option to point to your command.
|
||||||
|
#.
|
||||||
|
Configure ``/etc/sudoers.d/ahriman`` to allow running command without a password.
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
ln -s /usr/bin/archbuild /usr/local/bin/ahriman-x86_64-build
|
||||||
|
cp /usr/share/devtools/pacman-{extra,ahriman}.conf
|
||||||
|
|
||||||
|
echo '[multilib]' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
||||||
|
echo 'Include = /etc/pacman.d/mirrorlist' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
||||||
|
|
||||||
|
echo '[aur-clone]' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
||||||
|
echo 'SigLevel = Optional TrustAll' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
||||||
|
echo 'Server = file:///var/lib/ahriman/repository/$arch' | tee -a /usr/share/devtools/pacman-ahriman.conf
|
||||||
|
|
||||||
|
echo '[build]' | tee -a /etc/ahriman.ini.d/build.ini
|
||||||
|
echo 'build_command = ahriman-x86_64-build' | tee -a /etc/ahriman.ini.d/build.ini
|
||||||
|
|
||||||
|
echo 'Cmnd_Alias CARCHBUILD_CMD = /usr/local/bin/ahriman-x86_64-build *' | tee -a /etc/sudoers.d/ahriman
|
||||||
|
echo 'ahriman ALL=(ALL) NOPASSWD: CARCHBUILD_CMD' | tee -a /etc/sudoers.d/ahriman
|
||||||
|
chmod 400 /etc/sudoers.d/ahriman
|
||||||
|
|
||||||
|
#.
|
||||||
|
Start and enable ``ahriman@.timer`` via ``systemctl``\ :
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
systemctl enable --now ahriman@x86_64.timer
|
||||||
|
|
||||||
|
#.
|
||||||
|
Start and enable status page:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
systemctl enable --now ahriman-web@x86_64
|
||||||
|
|
||||||
|
#.
|
||||||
|
Add packages by using ``ahriman package-add {package}`` command:
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
sudo -u ahriman ahriman -a x86_64 package-add ahriman --now
|
1
setup.py
1
setup.py
@ -96,6 +96,7 @@ setup(
|
|||||||
"Sphinx",
|
"Sphinx",
|
||||||
"argparse-manpage",
|
"argparse-manpage",
|
||||||
"pydeps",
|
"pydeps",
|
||||||
|
"sphinx-argparse",
|
||||||
"sphinxcontrib-napoleon",
|
"sphinxcontrib-napoleon",
|
||||||
],
|
],
|
||||||
# FIXME technically this dependency is required, but in some cases we do not have access to
|
# FIXME technically this dependency is required, but in some cases we do not have access to
|
||||||
|
@ -327,7 +327,7 @@ def _set_patch_add_parser(root: SubParserAction) -> argparse.ArgumentParser:
|
|||||||
parser = root.add_parser("patch-add", help="add patch set", description="create or update source patches",
|
parser = root.add_parser("patch-add", help="add patch set", description="create or update source patches",
|
||||||
epilog="In order to add a patch set for the package you will need to clone "
|
epilog="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, "
|
"the AUR package manually, add required changes (e.g. external patches, "
|
||||||
"edit PKGBUILD) and run command, e.g. `ahriman patch path/to/directory`. "
|
"edit PKGBUILD) and run command, e.g. ``ahriman patch path/to/directory``. "
|
||||||
"By default it tracks *.patch and *.diff files, but this behavior can be changed "
|
"By default it tracks *.patch and *.diff files, but this behavior can be changed "
|
||||||
"by using --track option",
|
"by using --track option",
|
||||||
formatter_class=_formatter)
|
formatter_class=_formatter)
|
||||||
|
@ -27,6 +27,26 @@ from ahriman.models.result import Result
|
|||||||
class Application(ApplicationPackages, ApplicationRepository):
|
class Application(ApplicationPackages, ApplicationRepository):
|
||||||
"""
|
"""
|
||||||
base application class
|
base application class
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
This class groups ``Repository`` methods into specific method which process all supposed actions caused by
|
||||||
|
underlying action. E.g.::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>> from ahriman.models.package_source import PackageSource
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> application = Application("x86_64", configuration, no_report=False, unsafe=False)
|
||||||
|
>>> # add packages to build queue
|
||||||
|
>>> application.add(["ahriman"], PackageSource.AUR, without_dependencies=False)
|
||||||
|
>>>
|
||||||
|
>>> # check for updates
|
||||||
|
>>> updates = application.updates([], no_aur=False, no_local=False, no_manual=False, no_vcs=False, log_fn=print)
|
||||||
|
>>> # updates for specified packages
|
||||||
|
>>> application.update(updates)
|
||||||
|
|
||||||
|
In case if specific actions or their order are required, the direct access to ``Repository`` must
|
||||||
|
be used instead.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _finalize(self, result: Result) -> None:
|
def _finalize(self, result: Result) -> None:
|
||||||
|
@ -38,6 +38,13 @@ class Handler:
|
|||||||
Attributes:
|
Attributes:
|
||||||
ALLOW_AUTO_ARCHITECTURE_RUN(bool): (class attribute) allow defining architecture from existing repositories
|
ALLOW_AUTO_ARCHITECTURE_RUN(bool): (class attribute) allow defining architecture from existing repositories
|
||||||
ALLOW_MULTI_ARCHITECTURE_RUN(bool): (class attribute) allow running with multiple architectures
|
ALLOW_MULTI_ARCHITECTURE_RUN(bool): (class attribute) allow running with multiple architectures
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Wrapper for all command line actions, though each derived class implements ``run`` method, it usually must not
|
||||||
|
be called directly. The recommended way is to call ``execute`` class method, e.g.::
|
||||||
|
|
||||||
|
>>> from ahriman.application.handlers import Add
|
||||||
|
>>> Add.execute(args)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ALLOW_AUTO_ARCHITECTURE_RUN = True
|
ALLOW_AUTO_ARCHITECTURE_RUN = True
|
||||||
|
@ -123,7 +123,7 @@ class Setup(Handler):
|
|||||||
def configuration_create_devtools(prefix: str, architecture: str, source: Path,
|
def configuration_create_devtools(prefix: str, architecture: str, source: Path,
|
||||||
no_multilib: bool, repository: str, paths: RepositoryPaths) -> None:
|
no_multilib: bool, repository: str, paths: RepositoryPaths) -> None:
|
||||||
"""
|
"""
|
||||||
create configuration for devtools based on `source` configuration
|
create configuration for devtools based on ``source`` configuration
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
prefix(str): command prefix in {prefix}-{architecture}-build
|
prefix(str): command prefix in {prefix}-{architecture}-build
|
||||||
|
@ -44,6 +44,19 @@ class Lock:
|
|||||||
reporter(Client): build status reporter instance
|
reporter(Client): build status reporter instance
|
||||||
paths(RepositoryPaths): repository paths instance
|
paths(RepositoryPaths): repository paths instance
|
||||||
unsafe(bool): skip user check
|
unsafe(bool): skip user check
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Instance of this class except for controlling file-based lock is also required for basic applications checks.
|
||||||
|
The common flow is to create instance in ``with`` block and handle exceptions after all::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> try:
|
||||||
|
>>> with Lock(args, "x86_64", configuration):
|
||||||
|
>>> perform_actions()
|
||||||
|
>>> except Exception as exception:
|
||||||
|
>>> handle_exceptions(exception)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, args: argparse.Namespace, architecture: str, configuration: Configuration) -> None:
|
def __init__(self, args: argparse.Namespace, architecture: str, configuration: Configuration) -> None:
|
||||||
|
@ -28,7 +28,7 @@ class Pacman:
|
|||||||
alpm wrapper
|
alpm wrapper
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
handle(Handle): pyalpm root `Handle`
|
handle(Handle): pyalpm root ``Handle``
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, configuration: Configuration) -> None:
|
def __init__(self, configuration: Configuration) -> None:
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from typing import Any, Dict, List
|
from typing import Any, Dict, List, Type
|
||||||
|
|
||||||
from ahriman.core.alpm.pacman import Pacman
|
from ahriman.core.alpm.pacman import Pacman
|
||||||
from ahriman.core.alpm.remote.remote import Remote
|
from ahriman.core.alpm.remote.remote import Remote
|
||||||
@ -62,8 +62,8 @@ class AUR(Remote):
|
|||||||
raise InvalidPackageInfo(error_details)
|
raise InvalidPackageInfo(error_details)
|
||||||
return [AURPackage.from_json(package) for package in response["results"]]
|
return [AURPackage.from_json(package) for package in response["results"]]
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def remote_git_url(package_base: str, repository: str) -> str:
|
def remote_git_url(cls: Type[Remote], package_base: str, repository: str) -> str:
|
||||||
"""
|
"""
|
||||||
generate remote git url from the package base
|
generate remote git url from the package base
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ class AUR(Remote):
|
|||||||
"""
|
"""
|
||||||
return f"{AUR.DEFAULT_AUR_URL}/{package_base}.git"
|
return f"{AUR.DEFAULT_AUR_URL}/{package_base}.git"
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def remote_web_url(package_base: str) -> str:
|
def remote_web_url(cls: Type[Remote], package_base: str) -> str:
|
||||||
"""
|
"""
|
||||||
generate remote web url from the package base
|
generate remote web url from the package base
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from typing import Any, Dict, List
|
from typing import Any, Dict, List, Type
|
||||||
|
|
||||||
from ahriman.core.alpm.pacman import Pacman
|
from ahriman.core.alpm.pacman import Pacman
|
||||||
from ahriman.core.alpm.remote.remote import Remote
|
from ahriman.core.alpm.remote.remote import Remote
|
||||||
@ -60,8 +60,8 @@ class Official(Remote):
|
|||||||
raise InvalidPackageInfo("API validation error")
|
raise InvalidPackageInfo("API validation error")
|
||||||
return [AURPackage.from_repo(package) for package in response["results"]]
|
return [AURPackage.from_repo(package) for package in response["results"]]
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def remote_git_url(package_base: str, repository: str) -> str:
|
def remote_git_url(cls: Type[Remote], package_base: str, repository: str) -> str:
|
||||||
"""
|
"""
|
||||||
generate remote git url from the package base
|
generate remote git url from the package base
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ class Official(Remote):
|
|||||||
return "https://github.com/archlinux/svntogit-packages.git" # hardcoded, ok
|
return "https://github.com/archlinux/svntogit-packages.git" # hardcoded, ok
|
||||||
return "https://github.com/archlinux/svntogit-community.git"
|
return "https://github.com/archlinux/svntogit-community.git"
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def remote_web_url(package_base: str) -> str:
|
def remote_web_url(cls: Type[Remote], package_base: str) -> str:
|
||||||
"""
|
"""
|
||||||
generate remote web url from the package base
|
generate remote web url from the package base
|
||||||
|
|
||||||
|
@ -33,6 +33,19 @@ class Remote:
|
|||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
logger(logging.Logger): class logger
|
logger(logging.Logger): class logger
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
These classes are designed to be used without instancing. In order to achieve it several class methods are
|
||||||
|
provided: ``info``, ``multisearch`` and ``search``. Thus, the basic flow is the following::
|
||||||
|
|
||||||
|
>>> from ahriman.core.alpm.remote.aur import AUR
|
||||||
|
>>> from ahriman.core.alpm.remote.official import Official
|
||||||
|
>>>
|
||||||
|
>>> package = AUR.info("ahriman", pacman=pacman)
|
||||||
|
>>> search_result = Official.multisearch("pacman", "manager", pacman=pacman)
|
||||||
|
|
||||||
|
Differnece between ``search`` and ``multisearch`` is that ``search`` passes all arguments to underlying wrapper
|
||||||
|
directly, whereas ``multisearch`` splits search one by one and finds intersection between search results.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
@ -79,8 +92,8 @@ class Remote:
|
|||||||
}
|
}
|
||||||
return list(packages.values())
|
return list(packages.values())
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def remote_git_url(package_base: str, repository: str) -> str:
|
def remote_git_url(cls: Type[Remote], package_base: str, repository: str) -> str:
|
||||||
"""
|
"""
|
||||||
generate remote git url from the package base
|
generate remote git url from the package base
|
||||||
|
|
||||||
@ -96,8 +109,8 @@ class Remote:
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
@staticmethod
|
@classmethod
|
||||||
def remote_web_url(package_base: str) -> str:
|
def remote_web_url(cls: Type[Remote], package_base: str) -> str:
|
||||||
"""
|
"""
|
||||||
generate remote web url from the package base
|
generate remote web url from the package base
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ class Sources:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def fetch(sources_dir: Path, remote: Optional[RemoteSource]) -> None:
|
def fetch(sources_dir: Path, remote: Optional[RemoteSource]) -> None:
|
||||||
"""
|
"""
|
||||||
either clone repository or update it to origin/`branch`
|
either clone repository or update it to origin/``remote.branch``
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
sources_dir(Path): local path to fetch
|
sources_dir(Path): local path to fetch
|
||||||
|
@ -43,6 +43,25 @@ class Configuration(configparser.RawConfigParser):
|
|||||||
SYSTEM_CONFIGURATION_PATH(Path): (class attribute) default system configuration path distributed by package
|
SYSTEM_CONFIGURATION_PATH(Path): (class attribute) default system configuration path distributed by package
|
||||||
architecture(Optional[str]): repository architecture
|
architecture(Optional[str]): repository architecture
|
||||||
path(Optional[Path]): path to root configuration file
|
path(Optional[Path]): path to root configuration file
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Configuration class provides additional method in order to handle application configuration. Since this class is
|
||||||
|
derived from built-in ``configparser.RawConfigParser`` class, the same flow is applicable here. Nevertheless,
|
||||||
|
it is recommended to use ``from_path`` class method which also calls initialization methods::
|
||||||
|
|
||||||
|
>>> from pathlib import Path
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration.from_path(Path("/etc/ahriman.ini"), "x86_64", quiet=False)
|
||||||
|
>>> repository_name = configuration.get("repository", "name")
|
||||||
|
>>> makepkg_flags = configuration.getlist("build", "makepkg_flags")
|
||||||
|
|
||||||
|
The configuration instance loaded in this way will contain only sections which are defined for the specified
|
||||||
|
architecture according to the merge rules. Moreover, the architecture names will be removed from section names.
|
||||||
|
|
||||||
|
In order to get current settings, the ``check_loaded`` method can be used. This method will raise an
|
||||||
|
``InitializeException`` in case if configuration was not yet loaded::
|
||||||
|
|
||||||
|
>>> path, architecture = configuration.check_loaded()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
DEFAULT_LOG_FORMAT = "[%(levelname)s %(asctime)s] [%(filename)s:%(lineno)d %(funcName)s]: %(message)s"
|
DEFAULT_LOG_FORMAT = "[%(levelname)s %(asctime)s] [%(filename)s:%(lineno)d %(funcName)s]: %(message)s"
|
||||||
@ -310,7 +329,7 @@ class Configuration(configparser.RawConfigParser):
|
|||||||
|
|
||||||
def set_option(self, section: str, option: str, value: Optional[str]) -> None:
|
def set_option(self, section: str, option: str, value: Optional[str]) -> None:
|
||||||
"""
|
"""
|
||||||
set option. Unlike default `configparser.RawConfigParser.set` it also creates section if it does not exist
|
set option. Unlike default ``configparser.RawConfigParser.set`` it also creates section if it does not exist
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
section(str): section name
|
section(str): section name
|
||||||
|
@ -58,7 +58,7 @@ def migrate_package_remotes(connection: Connection, paths: RepositoryPaths) -> N
|
|||||||
local_cache = paths.cache_for(package_base)
|
local_cache = paths.cache_for(package_base)
|
||||||
if local_cache.exists() and not package.is_vcs:
|
if local_cache.exists() and not package.is_vcs:
|
||||||
continue # skip packages which are not VCS and with local cache
|
continue # skip packages which are not VCS and with local cache
|
||||||
remote_source = RemoteSource.from_remote(PackageSource.AUR, package_base, "aur")
|
remote_source = RemoteSource.from_source(PackageSource.AUR, package_base, "aur")
|
||||||
if remote_source is None:
|
if remote_source is None:
|
||||||
continue # should never happen
|
continue # should never happen
|
||||||
insert_remote(package_base, remote_source)
|
insert_remote(package_base, remote_source)
|
||||||
|
@ -73,7 +73,7 @@ class Operations:
|
|||||||
commit(bool, optional): if True commit() will be called on success (Default value = False)
|
commit(bool, optional): if True commit() will be called on success (Default value = False)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
T: result of the `query` call
|
T: result of the ``query`` call
|
||||||
"""
|
"""
|
||||||
with sqlite3.connect(self.path, detect_types=sqlite3.PARSE_DECLTYPES) as connection:
|
with sqlite3.connect(self.path, detect_types=sqlite3.PARSE_DECLTYPES) as connection:
|
||||||
connection.row_factory = self.factory
|
connection.row_factory = self.factory
|
||||||
|
@ -36,6 +36,16 @@ from ahriman.core.database.operations.patch_operations import PatchOperations
|
|||||||
class SQLite(AuthOperations, BuildOperations, PackageOperations, PatchOperations):
|
class SQLite(AuthOperations, BuildOperations, PackageOperations, PatchOperations):
|
||||||
"""
|
"""
|
||||||
wrapper for sqlite3 database
|
wrapper for sqlite3 database
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Database wrapper must be used together with migration and SQLite3 setup. In order to perform it there is
|
||||||
|
``load`` class method::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> database = SQLite.load(configuration)
|
||||||
|
>>> packages = database.packages_get()
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -38,6 +38,25 @@ class Report:
|
|||||||
architecture(str): repository architecture
|
architecture(str): repository architecture
|
||||||
configuration(Configuration): configuration instance
|
configuration(Configuration): configuration instance
|
||||||
logger(logging.Logger): class logger
|
logger(logging.Logger): class logger
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
``Report`` classes provide several method in order to operate with the report generation and additional class
|
||||||
|
method ``load`` which can be used in order to determine right report instance::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> report = Report.load("x86_64", configuration, "email")
|
||||||
|
|
||||||
|
The ``generate`` method can be used in order to perform the report itself, whereas ``run`` method handles
|
||||||
|
exception and raises ``ReportFailed`` instead::
|
||||||
|
|
||||||
|
>>> try:
|
||||||
|
>>> report.generate([], Result())
|
||||||
|
>>> except Exception as exception:
|
||||||
|
>>> handle_exceptions(exception)
|
||||||
|
>>>
|
||||||
|
>>> report.run([], Result())
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, architecture: str, configuration: Configuration) -> None:
|
def __init__(self, architecture: str, configuration: Configuration) -> None:
|
||||||
|
@ -29,6 +29,25 @@ from ahriman.models.package import Package
|
|||||||
class Repository(Executor, UpdateHandler):
|
class Repository(Executor, UpdateHandler):
|
||||||
"""
|
"""
|
||||||
base repository control class
|
base repository control class
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
This class along with traits provides access to local repository actions, e.g. remove packages, update packages,
|
||||||
|
sync local repository to remote, generate report, etc::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>> from ahriman.core.database.sqlite import SQLite
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> database = SQLite.load(configuration)
|
||||||
|
>>> repository = Repository("x86_64", configuration, database, no_report=False, unsafe=False)
|
||||||
|
>>> known_packages = repository.packages()
|
||||||
|
>>>
|
||||||
|
>>> build_result = repository.process_build(known_packages)
|
||||||
|
>>> built_packages = repository.packages_built()
|
||||||
|
>>> update_result = repository.process_update(built_packages)
|
||||||
|
>>>
|
||||||
|
>>> repository.process_report(["email"], update_result)
|
||||||
|
>>> repository.process_sync(["s3"], update_result.success)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def load_archives(self, packages: Iterable[Path]) -> List[Package]:
|
def load_archives(self, packages: Iterable[Path]) -> List[Package]:
|
||||||
|
@ -179,7 +179,9 @@ class GPG:
|
|||||||
def process_sign_repository(self, path: Path) -> List[Path]:
|
def process_sign_repository(self, path: Path) -> List[Path]:
|
||||||
"""
|
"""
|
||||||
sign repository if required by configuration
|
sign repository if required by configuration
|
||||||
:note: more likely you just want to pass `repository_sign_args` to repo wrapper
|
|
||||||
|
Note:
|
||||||
|
more likely you just want to pass ``repository_sign_args`` to repo wrapper
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
path(Path): path to repository database
|
path(Path): path to repository database
|
||||||
|
@ -101,7 +101,7 @@ class Client:
|
|||||||
|
|
||||||
def update(self, base: str, status: BuildStatusEnum) -> None:
|
def update(self, base: str, status: BuildStatusEnum) -> None:
|
||||||
"""
|
"""
|
||||||
update package build status. Unlike `add` it does not update package properties
|
update package build status. Unlike ``add`` it does not update package properties
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
base(str): package base to update
|
base(str): package base to update
|
||||||
|
@ -36,7 +36,8 @@ class Watcher:
|
|||||||
Attributes:
|
Attributes:
|
||||||
architecture(str): repository architecture
|
architecture(str): repository architecture
|
||||||
database(SQLite): database instance
|
database(SQLite): database instance
|
||||||
known(Dict[str, Tuple[Package, BuildStatus]]): list of known packages. For the most cases `packages` should be used instead
|
known(Dict[str, Tuple[Package, BuildStatus]]): list of known packages. For the most cases ``packages`` should
|
||||||
|
be used instead
|
||||||
logger(logging.Logger): class logger
|
logger(logging.Logger): class logger
|
||||||
repository(Repository): repository object
|
repository(Repository): repository object
|
||||||
status(BuildStatus): daemon status
|
status(BuildStatus): daemon status
|
||||||
|
@ -239,7 +239,7 @@ class WebClient(Client):
|
|||||||
|
|
||||||
def update(self, base: str, status: BuildStatusEnum) -> None:
|
def update(self, base: str, status: BuildStatusEnum) -> None:
|
||||||
"""
|
"""
|
||||||
update package build status. Unlike `add` it does not update package properties
|
update package build status. Unlike ``add`` it does not update package properties
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
base(str): package base to update
|
base(str): package base to update
|
||||||
|
@ -96,6 +96,36 @@ class Tree:
|
|||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
leaves[List[Leaf]): list of tree leaves
|
leaves[List[Leaf]): list of tree leaves
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
The most important feature here is to generate tree levels one by one which can be achieved by using class
|
||||||
|
method::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>> from ahriman.core.database.sqlite import SQLite
|
||||||
|
>>> from ahriman.core.repository import Repository
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> database = SQLite.load(configuration)
|
||||||
|
>>> repository = Repository("x86_64", configuration, database, no_report=False, unsafe=False)
|
||||||
|
>>> packages = repository.packages()
|
||||||
|
>>>
|
||||||
|
>>> tree = Tree.load(packages, database)
|
||||||
|
>>> for tree_level in tree.levels():
|
||||||
|
>>> for package in tree_level:
|
||||||
|
>>> print(package.base)
|
||||||
|
>>> print()
|
||||||
|
|
||||||
|
The direct constructor call is also possible but requires tree leaves to be instantioned in advance, e.g.::
|
||||||
|
|
||||||
|
>>> leaves = [Leaf.load(package, database) for package in packages]
|
||||||
|
>>> tree = Tree(leaves)
|
||||||
|
|
||||||
|
Using the default ``Leaf()`` method is possible, but not really recommended because it requires from the user to
|
||||||
|
build the dependency list by himself::
|
||||||
|
|
||||||
|
>>> leaf = Leaf(package, dependecies)
|
||||||
|
>>> tree = Tree([leaf])
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, leaves: List[Leaf]) -> None:
|
def __init__(self, leaves: List[Leaf]) -> None:
|
||||||
|
@ -38,6 +38,24 @@ class Upload:
|
|||||||
architecture(str): repository architecture
|
architecture(str): repository architecture
|
||||||
configuration(Configuration): configuration instance
|
configuration(Configuration): configuration instance
|
||||||
logger(logging.Logger): application logger
|
logger(logging.Logger): application logger
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
These classes provide the way to upload packages to remote sources as it is described in their implementations.
|
||||||
|
Basic flow includes class instantiating by using the ``load`` method and then calling the ``run`` method which
|
||||||
|
wraps any internal exceptions into the ``SyncFailed`` exception::
|
||||||
|
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> upload = Upload.load("x86_64", configuration, "s3")
|
||||||
|
>>> upload.run(configuration.repository_paths.repository, [])
|
||||||
|
|
||||||
|
Or in case if direct access to exception is required, the ``sync`` method can be used::
|
||||||
|
|
||||||
|
>>> try:
|
||||||
|
>>> upload.sync(configuration.repository_paths.repository, [])
|
||||||
|
>>> except Exception as exception:
|
||||||
|
>>> handle_exceptions(exception)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, architecture: str, configuration: Configuration) -> None:
|
def __init__(self, architecture: str, configuration: Configuration) -> None:
|
||||||
|
@ -55,6 +55,23 @@ def check_output(*args: str, exception: Optional[Exception], cwd: Optional[Path]
|
|||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
subprocess.CalledProcessError: if subprocess ended with status code different from 0 and no exception supplied
|
subprocess.CalledProcessError: if subprocess ended with status code different from 0 and no exception supplied
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Simply call the function::
|
||||||
|
|
||||||
|
>>> check_output("echo", "hello world", exception=None)
|
||||||
|
|
||||||
|
The more complicated calls which include result logging and input data are also possible::
|
||||||
|
|
||||||
|
>>> import logging
|
||||||
|
>>>
|
||||||
|
>>> logger = logging.getLogger()
|
||||||
|
>>> check_output("python", "-c", "greeting = input('say hello: '); print(); print(greeting)",
|
||||||
|
>>> exception=None, input_data="hello world", logger=logger)
|
||||||
|
|
||||||
|
An additional argument ``exception`` can be supplied in order to override the default exception::
|
||||||
|
|
||||||
|
>>> check_output("false", exception=RuntimeError("An exception occurred"))
|
||||||
"""
|
"""
|
||||||
def log(single: str) -> None:
|
def log(single: str) -> None:
|
||||||
if logger is not None:
|
if logger is not None:
|
||||||
@ -101,6 +118,11 @@ def check_user(paths: RepositoryPaths, unsafe: bool) -> None:
|
|||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
UnsafeRun: if root uid differs from current uid and check is enabled
|
UnsafeRun: if root uid differs from current uid and check is enabled
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Simply run function with arguments::
|
||||||
|
|
||||||
|
>>> check_user(paths, unsafe=False)
|
||||||
"""
|
"""
|
||||||
if not paths.root.exists():
|
if not paths.root.exists():
|
||||||
return # no directory found, skip check
|
return # no directory found, skip check
|
||||||
@ -136,6 +158,16 @@ def filter_json(source: Dict[str, Any], known_fields: Iterable[str]) -> Dict[str
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Dict[str, Any]: json object without unknown and empty fields
|
Dict[str, Any]: json object without unknown and empty fields
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
This wrapper is mainly used for the dataclasses, thus the flow must be something like this::
|
||||||
|
|
||||||
|
>>> from dataclasses import fields
|
||||||
|
>>> from ahriman.models.package import Package
|
||||||
|
>>>
|
||||||
|
>>> known_fields = [pair.name for pair in fields(Package)]
|
||||||
|
>>> properties = filter_json(dump, known_fields)
|
||||||
|
>>> package = Package(**properties)
|
||||||
"""
|
"""
|
||||||
return {key: value for key, value in source.items() if key in known_fields and value is not None}
|
return {key: value for key, value in source.items() if key in known_fields and value is not None}
|
||||||
|
|
||||||
@ -164,7 +196,7 @@ def package_like(filename: Path) -> bool:
|
|||||||
filename(Path): name of file to check
|
filename(Path): name of file to check
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
bool: True in case if name contains `.pkg.` and not signature, False otherwise
|
bool: True in case if name contains ``.pkg.`` and not signature, False otherwise
|
||||||
"""
|
"""
|
||||||
name = filename.name
|
name = filename.name
|
||||||
return ".pkg." in name and not name.endswith(".sig")
|
return ".pkg." in name and not name.endswith(".sig")
|
||||||
@ -193,7 +225,7 @@ def pretty_size(size: Optional[float], level: int = 0) -> str:
|
|||||||
|
|
||||||
Args:
|
Args:
|
||||||
size(Optional[float]): size to convert
|
size(Optional[float]): size to convert
|
||||||
level(int, optional): represents current units, 0 is B, 1 is KiB etc (Default value = 0)
|
level(int, optional): represents current units, 0 is B, 1 is KiB, etc (Default value = 0)
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
str: pretty printable size as string
|
str: pretty printable size as string
|
||||||
@ -226,6 +258,13 @@ def tmpdir() -> Generator[Path, None, None]:
|
|||||||
|
|
||||||
Yields:
|
Yields:
|
||||||
Path: path to the created directory
|
Path: path to the created directory
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
This function must be used only inside context manager as decorator states::
|
||||||
|
|
||||||
|
>>> with tmpdir() as path:
|
||||||
|
>>> do_something(path)
|
||||||
|
>>> raise Exception("Clear me after exception please")
|
||||||
"""
|
"""
|
||||||
path = Path(tempfile.mkdtemp())
|
path = Path(tempfile.mkdtemp())
|
||||||
try:
|
try:
|
||||||
@ -244,6 +283,16 @@ def walk(directory_path: Path) -> Generator[Path, None, None]:
|
|||||||
|
|
||||||
Yields:
|
Yields:
|
||||||
Path: all found files in given directory with full path
|
Path: all found files in given directory with full path
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Since the ``pathlib`` module does not provide an alternative to ``os.walk``, this wrapper can be used instead::
|
||||||
|
|
||||||
|
>>> from pathlib import Path
|
||||||
|
>>>
|
||||||
|
>>> for file_path in walk(Path.cwd()):
|
||||||
|
>>> print(file_path)
|
||||||
|
|
||||||
|
Note, however, that unlike the original method, it does not yield directories.
|
||||||
"""
|
"""
|
||||||
for element in directory_path.iterdir():
|
for element in directory_path.iterdir():
|
||||||
if element.is_dir():
|
if element.is_dir():
|
||||||
|
@ -56,6 +56,21 @@ class AURPackage:
|
|||||||
provides(List[str]): list of packages which this package provides
|
provides(List[str]): list of packages which this package provides
|
||||||
license(List[str]): list of package licenses
|
license(List[str]): list of package licenses
|
||||||
keywords(List[str]): list of package keywords
|
keywords(List[str]): list of package keywords
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Mainly this class must be used from class methods instead of default ``__init__``::
|
||||||
|
|
||||||
|
>>> package = AURPackage.from_json(metadata) # load package from json dump
|
||||||
|
>>> # ...or alternatively...
|
||||||
|
>>> package = AURPackage.from_repo(metadata) # load package from official repository RPC
|
||||||
|
>>> # properties of the class are built based on ones from AUR RPC, thus additional method is required
|
||||||
|
>>>
|
||||||
|
>>>
|
||||||
|
>>> from ahriman.core.alpm.pacman import Pacman
|
||||||
|
>>>
|
||||||
|
>>> pacman = Pacman(configuration)
|
||||||
|
>>> metadata = pacman.get("pacman")
|
||||||
|
>>> package = AURPackage.from_pacman(next(metadata)) # load package from pyalpm wrapper
|
||||||
"""
|
"""
|
||||||
|
|
||||||
id: int
|
id: int
|
||||||
|
@ -51,6 +51,25 @@ class Package:
|
|||||||
Filled only on load from archive
|
Filled only on load from archive
|
||||||
remote(Optional[RemoteSource]): package remote source if applicable
|
remote(Optional[RemoteSource]): package remote source if applicable
|
||||||
version(str): package full version
|
version(str): package full version
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Different usages of this class may generate different (incomplete) data, e.g. if instantiating class from json::
|
||||||
|
|
||||||
|
>>> package = Package.from_json(dump)
|
||||||
|
|
||||||
|
it will contain every data available in the json body. Otherwise, if generate package from local archive::
|
||||||
|
|
||||||
|
>>> package = Package.from_archive(local_path, pacman, remote=None)
|
||||||
|
|
||||||
|
it will probably miss file descriptions (in case if there are multiple packages which belong to the base).
|
||||||
|
|
||||||
|
The specific class load method must be defined based on the source provided. The following methods (mostly) must
|
||||||
|
be used: ``from_archive``, ``from_aur``, ``from_build``, ``from_official`` for sources
|
||||||
|
``PackageSource.Archive``, ``PackageSource.AUR``, ``PackageSource.Local`` and ``PackageSource.Repository``
|
||||||
|
repsectively:
|
||||||
|
|
||||||
|
>>> ahriman_package = Package.from_aur("ahriman", pacman)
|
||||||
|
>>> pacman_package = Package.from_official("pacman", pacman)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
base: str
|
base: str
|
||||||
@ -145,7 +164,7 @@ class Package:
|
|||||||
Package: package properties
|
Package: package properties
|
||||||
"""
|
"""
|
||||||
package = AUR.info(name, pacman=pacman)
|
package = AUR.info(name, pacman=pacman)
|
||||||
remote = RemoteSource.from_remote(PackageSource.AUR, package.package_base, package.repository)
|
remote = RemoteSource.from_source(PackageSource.AUR, package.package_base, package.repository)
|
||||||
return cls(package.package_base, package.version, remote, {package.name: PackageDescription()})
|
return cls(package.package_base, package.version, remote, {package.name: PackageDescription()})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -207,7 +226,7 @@ class Package:
|
|||||||
Package: package properties
|
Package: package properties
|
||||||
"""
|
"""
|
||||||
package = OfficialSyncdb.info(name, pacman=pacman) if use_syncdb else Official.info(name, pacman=pacman)
|
package = OfficialSyncdb.info(name, pacman=pacman) if use_syncdb else Official.info(name, pacman=pacman)
|
||||||
remote = RemoteSource.from_remote(PackageSource.Repository, package.package_base, package.repository)
|
remote = RemoteSource.from_source(PackageSource.Repository, package.package_base, package.repository)
|
||||||
return cls(package.package_base, package.version, remote, {package.name: PackageDescription()})
|
return cls(package.package_base, package.version, remote, {package.name: PackageDescription()})
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -44,6 +44,23 @@ class PackageDescription:
|
|||||||
licenses(List[str]): package licenses list
|
licenses(List[str]): package licenses list
|
||||||
provides(List[str]): list of provided packages
|
provides(List[str]): list of provided packages
|
||||||
url(Optional[str]): package url
|
url(Optional[str]): package url
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Unlike the ``Package`` class, this implementation only holds properties. The recommended way to deal with it is
|
||||||
|
to read data based on the source type - either json or ``pyalpm.Package`` instance::
|
||||||
|
|
||||||
|
>>> description = PackageDescription.from_json(dump)
|
||||||
|
>>>
|
||||||
|
>>>
|
||||||
|
>>> from pathlib import Path
|
||||||
|
>>> from ahriman.core.alpm.pacman import Pacman
|
||||||
|
>>> from ahriman.core.configuration import Configuration
|
||||||
|
>>>
|
||||||
|
>>> configuration = Configuration()
|
||||||
|
>>> pacman = Pacman(configuration)
|
||||||
|
>>> pyalpm_description = next(package for package in pacman.get("pacman"))
|
||||||
|
>>> description = PackageDescription.from_package(
|
||||||
|
>>> pyalpm_description, Path("/var/cache/pacman/pkg/pacman-6.0.1-4-x86_64.pkg.tar.zst"))
|
||||||
"""
|
"""
|
||||||
|
|
||||||
architecture: Optional[str] = None
|
architecture: Optional[str] = None
|
||||||
|
@ -38,6 +38,13 @@ class PackageSource(str, Enum):
|
|||||||
Local(PackageSource): (class attribute) source is locally stored PKGBUILD
|
Local(PackageSource): (class attribute) source is locally stored PKGBUILD
|
||||||
Remote(PackageSource): (class attribute) source is remote (http, ftp etc) link
|
Remote(PackageSource): (class attribute) source is remote (http, ftp etc) link
|
||||||
Repository(PackageSource): (class attribute) source is official repository
|
Repository(PackageSource): (class attribute) source is official repository
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
In case if source is unknown the ``resolve()`` and the source descriptor is available method must be used::
|
||||||
|
|
||||||
|
>>> real_source = PackageSource.Auto.resolve("ahriman")
|
||||||
|
|
||||||
|
the code above will ensure that the presudo-source ``PackageSource.Auto`` will not be processed later.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Auto = "auto"
|
Auto = "auto"
|
||||||
|
@ -81,7 +81,7 @@ class RemoteSource:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_remote(cls: Type[RemoteSource], source: PackageSource, package_base: str,
|
def from_source(cls: Type[RemoteSource], source: PackageSource, package_base: str,
|
||||||
repository: str) -> Optional[RemoteSource]:
|
repository: str) -> Optional[RemoteSource]:
|
||||||
"""
|
"""
|
||||||
generate remote source from the package base
|
generate remote source from the package base
|
||||||
|
@ -37,6 +37,20 @@ class RepositoryPaths:
|
|||||||
Attributes:
|
Attributes:
|
||||||
root(Path): repository root (i.e. ahriman home)
|
root(Path): repository root (i.e. ahriman home)
|
||||||
architecture(str): repository architecture
|
architecture(str): repository architecture
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
This class can be used in order to access the repository tree structure::
|
||||||
|
|
||||||
|
>>> paths = RepositoryPaths(Path("/var/lib/ahriman"), "x86_64")
|
||||||
|
|
||||||
|
Additional methods can be used in order to ensure that tree is created::
|
||||||
|
|
||||||
|
>>> paths.tree_create()
|
||||||
|
|
||||||
|
Access to directories inside can be done by either using properties or specifying the package base::
|
||||||
|
|
||||||
|
>>> cache_dir = paths.cache
|
||||||
|
>>> ahriman_cache_dir = paths.cache_for("ahriman")
|
||||||
"""
|
"""
|
||||||
|
|
||||||
root: Path
|
root: Path
|
||||||
|
@ -36,6 +36,28 @@ class User:
|
|||||||
username(str): username
|
username(str): username
|
||||||
password(str): hashed user password with salt
|
password(str): hashed user password with salt
|
||||||
access(UserAccess): user role
|
access(UserAccess): user role
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
Simply create user from database data and perform required validation::
|
||||||
|
|
||||||
|
>>> password = User.generate_password(24)
|
||||||
|
>>> user = User("ahriman", password, UserAccess.Write)
|
||||||
|
|
||||||
|
Since the password supplied may be plain text, the ``hash_password`` method can be used to hash the password::
|
||||||
|
|
||||||
|
>>> user.password = user.hash_password("salt")
|
||||||
|
|
||||||
|
Having the user instance and password, it can be validated::
|
||||||
|
|
||||||
|
>>> if user.check_credentials(password, "salt"):
|
||||||
|
>>> print("password is valid")
|
||||||
|
>>> else:
|
||||||
|
>>> print("password is invalid")
|
||||||
|
|
||||||
|
...and finally access can be verified::
|
||||||
|
|
||||||
|
>>> if user.verify_access(UserAccess.Read):
|
||||||
|
>>> print(f"user {user.username} has read access")
|
||||||
"""
|
"""
|
||||||
|
|
||||||
username: str
|
username: str
|
||||||
|
@ -37,11 +37,11 @@ class AddView(BaseView):
|
|||||||
"""
|
"""
|
||||||
add new package
|
add new package
|
||||||
|
|
||||||
JSON body must be supplied, the following model is used:
|
JSON body must be supplied, the following model is used::
|
||||||
|
|
||||||
>>> {
|
{
|
||||||
>>> "packages": "ahriman" # either list of packages or package name as in AUR
|
"packages": "ahriman" # either list of packages or package name as in AUR
|
||||||
>>> }
|
}
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
HTTPBadRequest: if bad data is supplied
|
HTTPBadRequest: if bad data is supplied
|
||||||
|
@ -37,11 +37,11 @@ class RemoveView(BaseView):
|
|||||||
"""
|
"""
|
||||||
remove existing packages
|
remove existing packages
|
||||||
|
|
||||||
JSON body must be supplied, the following model is used:
|
JSON body must be supplied, the following model is used::
|
||||||
|
|
||||||
>>> {
|
{
|
||||||
>>> "packages": "ahriman", # either list of packages or package name
|
"packages": "ahriman", # either list of packages or package name
|
||||||
>>> }
|
}
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
HTTPBadRequest: if bad data is supplied
|
HTTPBadRequest: if bad data is supplied
|
||||||
|
@ -37,11 +37,11 @@ class RequestView(BaseView):
|
|||||||
"""
|
"""
|
||||||
request to add new package
|
request to add new package
|
||||||
|
|
||||||
JSON body must be supplied, the following model is used:
|
JSON body must be supplied, the following model is used::
|
||||||
|
|
||||||
>>> {
|
{
|
||||||
>>> "packages": "ahriman" # either list of packages or package name as in AUR
|
"packages": "ahriman" # either list of packages or package name as in AUR
|
||||||
>>> }
|
}
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
HTTPBadRequest: if bad data is supplied
|
HTTPBadRequest: if bad data is supplied
|
||||||
|
@ -41,7 +41,7 @@ class SearchView(BaseView):
|
|||||||
"""
|
"""
|
||||||
search packages in AUR
|
search packages in AUR
|
||||||
|
|
||||||
search string (non empty) must be supplied as `for` parameter
|
search string (non empty) must be supplied as ``for`` parameter
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Response: 200 with found package bases and descriptions sorted by base
|
Response: 200 with found package bases and descriptions sorted by base
|
||||||
|
@ -50,11 +50,11 @@ class AhrimanView(BaseView):
|
|||||||
"""
|
"""
|
||||||
update service status
|
update service status
|
||||||
|
|
||||||
JSON body must be supplied, the following model is used:
|
JSON body must be supplied, the following model is used::
|
||||||
|
|
||||||
>>> {
|
{
|
||||||
>>> "status": "unknown", # service status string, must be valid `BuildStatusEnum`
|
"status": "unknown", # service status string, must be valid ``BuildStatusEnum``
|
||||||
>>> }
|
}
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
HTTPBadRequest: if bad data is supplied
|
HTTPBadRequest: if bad data is supplied
|
||||||
|
@ -81,13 +81,13 @@ class PackageView(BaseView):
|
|||||||
"""
|
"""
|
||||||
update package build status
|
update package build status
|
||||||
|
|
||||||
JSON body must be supplied, the following model is used:
|
JSON body must be supplied, the following model is used::
|
||||||
|
|
||||||
>>> {
|
{
|
||||||
>>> "status": "unknown", # package build status string, must be valid `BuildStatusEnum`
|
"status": "unknown", # package build status string, must be valid ``BuildStatusEnum``
|
||||||
>>> "package": {} # package body (use `dataclasses.asdict` to generate one), optional.
|
"package": {} # package body (use ``dataclasses.asdict`` to generate one), optional.
|
||||||
>>> # Must be supplied in case if package base is unknown
|
# Must be supplied in case if package base is unknown
|
||||||
>>> }
|
}
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
HTTPBadRequest: if bad data is supplied
|
HTTPBadRequest: if bad data is supplied
|
||||||
|
@ -71,12 +71,12 @@ class LoginView(BaseView):
|
|||||||
"""
|
"""
|
||||||
login user to service
|
login user to service
|
||||||
|
|
||||||
either JSON body or form data must be supplied the following fields are required:
|
either JSON body or form data must be supplied the following fields are required::
|
||||||
|
|
||||||
>>> {
|
{
|
||||||
>>> "username": "username" # username to use for login
|
"username": "username", # username to use for login
|
||||||
>>> "password": "pa55w0rd" # password to use for login
|
"password": "pa55w0rd" # password to use for login
|
||||||
>>> }
|
}
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
HTTPFound: on success response
|
HTTPFound: on success response
|
||||||
|
@ -235,12 +235,13 @@ def database(configuration: Configuration) -> SQLite:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def package_ahriman(package_description_ahriman: PackageDescription) -> Package:
|
def package_ahriman(package_description_ahriman: PackageDescription, remote_source: RemoteSource) -> Package:
|
||||||
"""
|
"""
|
||||||
package fixture
|
package fixture
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
package_description_ahriman(PackageDescription): description fixture
|
package_description_ahriman(PackageDescription): description fixture
|
||||||
|
remote_source(RemoteSource): remote source fixture
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Package: package test instance
|
Package: package test instance
|
||||||
@ -249,7 +250,7 @@ def package_ahriman(package_description_ahriman: PackageDescription) -> Package:
|
|||||||
return Package(
|
return Package(
|
||||||
base="ahriman",
|
base="ahriman",
|
||||||
version="1.7.0-1",
|
version="1.7.0-1",
|
||||||
remote=RemoteSource.from_remote(PackageSource.AUR, "ahriman", "aur"),
|
remote=remote_source,
|
||||||
packages=packages)
|
packages=packages)
|
||||||
|
|
||||||
|
|
||||||
@ -274,7 +275,7 @@ def package_python_schedule(
|
|||||||
return Package(
|
return Package(
|
||||||
base="python-schedule",
|
base="python-schedule",
|
||||||
version="1.0.0-2",
|
version="1.0.0-2",
|
||||||
remote=RemoteSource.from_remote(PackageSource.AUR, "python-schedule", "aur"),
|
remote=RemoteSource.from_source(PackageSource.AUR, "python-schedule", "aur"),
|
||||||
packages=packages)
|
packages=packages)
|
||||||
|
|
||||||
|
|
||||||
@ -363,17 +364,14 @@ def pacman(configuration: Configuration) -> Pacman:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def remote_source(package_ahriman: Package) -> RemoteSource:
|
def remote_source() -> RemoteSource:
|
||||||
"""
|
"""
|
||||||
remote source fixture
|
remote source fixture
|
||||||
|
|
||||||
Args:
|
|
||||||
package_ahriman(Package): package fixture
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
RemoteSource: remote source test instance
|
RemoteSource: remote source test instance
|
||||||
"""
|
"""
|
||||||
return RemoteSource.from_remote(PackageSource.AUR, "ahriman", "aur")
|
return RemoteSource.from_source(PackageSource.AUR, "ahriman", "aur")
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -60,7 +60,7 @@ def test_migrate_package_remotes_no_remotes(package_ahriman: Package, connection
|
|||||||
"ahriman.core.database.operations.package_operations.PackageOperations._packages_get_select_package_bases",
|
"ahriman.core.database.operations.package_operations.PackageOperations._packages_get_select_package_bases",
|
||||||
return_value={package_ahriman.base: package_ahriman})
|
return_value={package_ahriman.base: package_ahriman})
|
||||||
mocker.patch("pathlib.Path.exists", return_value=False)
|
mocker.patch("pathlib.Path.exists", return_value=False)
|
||||||
mocker.patch("ahriman.models.remote_source.RemoteSource.from_remote", return_value=None)
|
mocker.patch("ahriman.models.remote_source.RemoteSource.from_source", return_value=None)
|
||||||
|
|
||||||
migrate_package_remotes(connection, repository_paths)
|
migrate_package_remotes(connection, repository_paths)
|
||||||
connection.execute.assert_not_called()
|
connection.execute.assert_not_called()
|
||||||
|
@ -183,7 +183,7 @@ def test_remote_update_update(database: SQLite, package_ahriman: Package) -> Non
|
|||||||
must perform package remote update for existing package
|
must perform package remote update for existing package
|
||||||
"""
|
"""
|
||||||
database.remote_update(package_ahriman)
|
database.remote_update(package_ahriman)
|
||||||
remote_source = RemoteSource.from_remote(PackageSource.Repository, package_ahriman.base, "community")
|
remote_source = RemoteSource.from_source(PackageSource.Repository, package_ahriman.base, "community")
|
||||||
package_ahriman.remote = remote_source
|
package_ahriman.remote = remote_source
|
||||||
|
|
||||||
database.remote_update(package_ahriman)
|
database.remote_update(package_ahriman)
|
||||||
|
@ -35,7 +35,7 @@ def test_updates_aur_official(update_handler: UpdateHandler, package_ahriman: Pa
|
|||||||
"""
|
"""
|
||||||
must provide updates based on repository data
|
must provide updates based on repository data
|
||||||
"""
|
"""
|
||||||
package_ahriman.remote = RemoteSource.from_remote(PackageSource.Repository, package_ahriman.base, "community")
|
package_ahriman.remote = RemoteSource.from_source(PackageSource.Repository, package_ahriman.base, "community")
|
||||||
mocker.patch("ahriman.core.repository.update_handler.UpdateHandler.packages", return_value=[package_ahriman])
|
mocker.patch("ahriman.core.repository.update_handler.UpdateHandler.packages", return_value=[package_ahriman])
|
||||||
mocker.patch("ahriman.models.package.Package.is_outdated", return_value=True)
|
mocker.patch("ahriman.models.package.Package.is_outdated", return_value=True)
|
||||||
mocker.patch("ahriman.models.package.Package.from_official", return_value=package_ahriman)
|
mocker.patch("ahriman.models.package.Package.from_official", return_value=package_ahriman)
|
||||||
|
@ -71,7 +71,7 @@ def package_tpacpi_bat_git() -> Package:
|
|||||||
return Package(
|
return Package(
|
||||||
base="tpacpi-bat-git",
|
base="tpacpi-bat-git",
|
||||||
version="3.1.r12.g4959b52-1",
|
version="3.1.r12.g4959b52-1",
|
||||||
remote=RemoteSource.from_remote(PackageSource.AUR, "tpacpi-bat-git", "aur"),
|
remote=RemoteSource.from_source(PackageSource.AUR, "tpacpi-bat-git", "aur"),
|
||||||
packages={"tpacpi-bat-git": PackageDescription()})
|
packages={"tpacpi-bat-git": PackageDescription()})
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,14 +42,14 @@ def test_from_json_empty() -> None:
|
|||||||
assert RemoteSource.from_json({}) is None
|
assert RemoteSource.from_json({}) is None
|
||||||
|
|
||||||
|
|
||||||
def test_from_remote_aur(package_ahriman: Package, mocker: MockerFixture) -> None:
|
def test_from_source_aur(package_ahriman: Package, mocker: MockerFixture) -> None:
|
||||||
"""
|
"""
|
||||||
must construct remote from AUR source
|
must construct remote from AUR source
|
||||||
"""
|
"""
|
||||||
remote_git_url_mock = mocker.patch("ahriman.core.alpm.remote.aur.AUR.remote_git_url")
|
remote_git_url_mock = mocker.patch("ahriman.core.alpm.remote.aur.AUR.remote_git_url")
|
||||||
remote_web_url_mock = mocker.patch("ahriman.core.alpm.remote.aur.AUR.remote_web_url")
|
remote_web_url_mock = mocker.patch("ahriman.core.alpm.remote.aur.AUR.remote_web_url")
|
||||||
|
|
||||||
remote = RemoteSource.from_remote(PackageSource.AUR, package_ahriman.base, "aur")
|
remote = RemoteSource.from_source(PackageSource.AUR, package_ahriman.base, "aur")
|
||||||
remote_git_url_mock.assert_called_once_with(package_ahriman.base, "aur")
|
remote_git_url_mock.assert_called_once_with(package_ahriman.base, "aur")
|
||||||
remote_web_url_mock.assert_called_once_with(package_ahriman.base)
|
remote_web_url_mock.assert_called_once_with(package_ahriman.base)
|
||||||
assert remote.pkgbuild_dir == Path(".")
|
assert remote.pkgbuild_dir == Path(".")
|
||||||
@ -57,14 +57,14 @@ def test_from_remote_aur(package_ahriman: Package, mocker: MockerFixture) -> Non
|
|||||||
assert remote.source == PackageSource.AUR
|
assert remote.source == PackageSource.AUR
|
||||||
|
|
||||||
|
|
||||||
def test_from_remote_official(package_ahriman: Package, mocker: MockerFixture) -> None:
|
def test_from_source_official(package_ahriman: Package, mocker: MockerFixture) -> None:
|
||||||
"""
|
"""
|
||||||
must construct remote from official repository source
|
must construct remote from official repository source
|
||||||
"""
|
"""
|
||||||
remote_git_url_mock = mocker.patch("ahriman.core.alpm.remote.official.Official.remote_git_url")
|
remote_git_url_mock = mocker.patch("ahriman.core.alpm.remote.official.Official.remote_git_url")
|
||||||
remote_web_url_mock = mocker.patch("ahriman.core.alpm.remote.official.Official.remote_web_url")
|
remote_web_url_mock = mocker.patch("ahriman.core.alpm.remote.official.Official.remote_web_url")
|
||||||
|
|
||||||
remote = RemoteSource.from_remote(PackageSource.Repository, package_ahriman.base, "community")
|
remote = RemoteSource.from_source(PackageSource.Repository, package_ahriman.base, "community")
|
||||||
remote_git_url_mock.assert_called_once_with(package_ahriman.base, "community")
|
remote_git_url_mock.assert_called_once_with(package_ahriman.base, "community")
|
||||||
remote_web_url_mock.assert_called_once_with(package_ahriman.base)
|
remote_web_url_mock.assert_called_once_with(package_ahriman.base)
|
||||||
assert remote.pkgbuild_dir == Path("trunk")
|
assert remote.pkgbuild_dir == Path("trunk")
|
||||||
@ -72,11 +72,11 @@ def test_from_remote_official(package_ahriman: Package, mocker: MockerFixture) -
|
|||||||
assert remote.source == PackageSource.Repository
|
assert remote.source == PackageSource.Repository
|
||||||
|
|
||||||
|
|
||||||
def test_from_remote_other() -> None:
|
def test_from_source_other() -> None:
|
||||||
"""
|
"""
|
||||||
must return None in case if source is not one of AUR or Repository
|
must return None in case if source is not one of AUR or Repository
|
||||||
"""
|
"""
|
||||||
assert RemoteSource.from_remote(PackageSource.Archive, "package", "repository") is None
|
assert RemoteSource.from_source(PackageSource.Archive, "package", "repository") is None
|
||||||
assert RemoteSource.from_remote(PackageSource.Directory, "package", "repository") is None
|
assert RemoteSource.from_source(PackageSource.Directory, "package", "repository") is None
|
||||||
assert RemoteSource.from_remote(PackageSource.Local, "package", "repository") is None
|
assert RemoteSource.from_source(PackageSource.Local, "package", "repository") is None
|
||||||
assert RemoteSource.from_remote(PackageSource.Remote, "package", "repository") is None
|
assert RemoteSource.from_source(PackageSource.Remote, "package", "repository") is None
|
||||||
|
4
tox.ini
4
tox.ini
@ -37,14 +37,14 @@ setenv =
|
|||||||
commands =
|
commands =
|
||||||
argparse-manpage --module ahriman.application.ahriman --function _parser --author "ahriman team" --project-name ahriman --author-email "" --url https://github.com/arcan1s/ahriman --output ../docs/ahriman.1
|
argparse-manpage --module ahriman.application.ahriman --function _parser --author "ahriman team" --project-name ahriman --author-email "" --url https://github.com/arcan1s/ahriman --output ../docs/ahriman.1
|
||||||
pydeps ahriman -o ../docs/ahriman-architecture.svg --no-config --no-show --cluster
|
pydeps ahriman -o ../docs/ahriman-architecture.svg --no-config --no-show --cluster
|
||||||
sphinx-apidoc --force --private -o ../docs/source .
|
sphinx-apidoc -o ../docs .
|
||||||
|
|
||||||
[testenv:docs-html]
|
[testenv:docs-html]
|
||||||
deps =
|
deps =
|
||||||
{[tox]dependencies}
|
{[tox]dependencies}
|
||||||
-e .[docs]
|
-e .[docs]
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -b html -a -j auto docs/source docs/html
|
sphinx-build -b html -a -j auto docs docs/html
|
||||||
|
|
||||||
[testenv:tests]
|
[testenv:tests]
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
Reference in New Issue
Block a user