This commit also extends configuration of the multilib option, adding
the ability to exlcude multilib repository from repositories list
Note, that in order to support repository list and mirror correctly,
alpm configuration section is now architectture specific
Some commands have been moved to another group and thus having another
default name (old subcommands are still available...for now):
* daemon -> repo-daemon
* key-import -> service-key-import
* repo-clean -> service-clean
* repo-config -> service-config
* repo-config-validate -> service-config-validate
* repo-setup -> service-setup
* repo-shell -> service-shell
* version -> help-version
Note that this commit contains the following breaking changes:
* remote pull and remote push triggers are now enabled by default (with
empty target list)
* remote pull and remote push triggers now require target option to be
set (old behaviour had fallback on `gitremote`)
* validation is now considered to be stable, so it is enabled by default
in docker image (can be disabled however)
Some commands were made unsafe in old versions, but nowadays they can be
run without having special privileges.
There was also a bug in which status commands were not available if you
are not ahriman user and unix socket is used. It has been fixed by
switching to manual socket creation (see also
https://github.com/aio-libs/aiohttp/issues/4155)
This reverts commit 11732a8609.
Original solution has introduced special workaround (strict flag) which
contradicts the concept of immutable context. Moreover, it introduces
possible side-effects, because child process will use the one set by
parent instead of having own one.
The correct solution is to re-create context in process entry point
Sorry, it was Jan 1 and I was drunk :(
In case of immediate handle load it would try to sync databases (or at
least to create database files), which is not possible in case if
command is run as non-ahriman user. This commit makes handle load lazy
and allows to run some commands as non-ahriman user
* Unlike older version, currently service will always try to pull AUR
package to check version. Previously if no-vcs flag is set, it would
ignore VCS packages completelly
* Introduce build.vcs_allowed_age option. If set, it will skip version
calculation if package age (now - build_date) is less than this value
This feature can be used for unauthorized access to apis - e.g. for
reporting service if it is run on the same machine. Since now it becomes
recommended way for the interprocess communication, thus some options
(e.g. creating user with as-service flag) are no longer available now
In case if password is asked via getpass, it is possible to make typo
and user will not see the mistake. In order to avoid it, additional
confirmation has been added
* implement log storage at backend
* handle process id during removal. During one process we can write logs from different packages in different times (e.g. check and update later) and we would like to store all logs belong to the same process
* set package context in main functions
* implement logs support in interface
* filter out logs posting http logs
* add timestamp to log records
* hide getting logs under reporter permission
List of breaking changes:
* `ahriman.core.lazy_logging.LazyLogging` has been renamed to `ahriman.core.log.LazyLogging`
* `ahriman.core.configuration.Configuration.from_path` does not have `quiet` attribute now
* `ahriman.core.configuration.Configuration` class does not have `load_logging` method now
* `ahriman.core.status.client.Client.load` requires `report` argument now
The issue appears together with --intent-to-add flag for adding new
files. Original testing has been performed by having already added new
files, thus it passed all checks.
This commit also adds `commit_author` option which will allow to
overwrite the author.
Old logic used OR condition, i.e. if set from-database, it would ignore
the --depends-on flag. In new logic it calculates dependencies based on
the package list, which can be retrieved from database
By default this feature is enabled. On the first run it will copy (if
exists) databases from filesystem to local cache (one per each
architecture). Later it will use this cache for all alpm operations. In
order to update this cache, some commands (mainly package building)
provide `-y`/`--refresh` option which has same semantics as pacman -Sy
does.
Note however that due to extending `Pacman` class some methods were
renamed in order to be more descriptive:
* `Pacman.all_packages` -> `Pacman.packages`
* `Pacman.get` -> `Pacman.package_get`
This commit also adds multilib repository to the default docker image
which was missed.
* Move devtools executable to ahriman home, because we don't really
need to use executable inside root
* Use named sudoers file instead of single file. It will allow easily to
remove file as well as use setup command for several
repositories/architectures
In order to force new triggers to use on_result method, the old method
has been removed. However, default on_result method still checks if the
old method exists and tries to run it
The issue appears when there is no boto, jinja and some other libraries
are not installed because the classes which use these libraries are
still being imported inside the package file. The fix removes those
imports from package root, because they should not be here, in fact,
content of report and upload packages must be imported only inside the
trigger class and only if they are actually required
This commit also adds setuptools as required dependency since it is used
for some parsers (previously it was provided dependency)
(without special settings)
The issue appears if file or its version contains one of special URI
characters, e.g. +. Theu will be interpreted as query parameters by
(some) servers (e.g. S3 works in this way). In this commit we rename
archive to the one with safe name.
* migrate docstrings from reST to google format
* add raises note
Also change behaviour of the `from_option` method to fallback to
disabled instead of raising exception on unknown option
* fix part of warnings for sphinx
* make identation a bit more readable
* review fixes
* add verbose description for properties to make them parsed by sphinx extenstion
* add demo sphinx generator
Old versions cached full output to memory and only after that printed it
into log. This behaviour causes issues in case if operation stucks and
you would need to find the step at which it does. New check_output
method uses Popen directly and iterates over stdout lines
Also changed behaviour from merging stderr into stdout to separate
stderr logging.
Any other behaviour of the function must be the same.
Also changed GPG.key_import method to disable local signing since it
seems it is useless (and may break process in case if there is no
private key)
this also requires to move default configuration files to share/ahriman.
Thus the following features have been added
* default configuration is not stored in /usr/share/ahriman/settings
* package installed via PKGBUILD now copies files from /usr
* configuration class now fallbacks to default in /usr
In current workflow you need to run setup to run init (because of
repository name), but you need to run init before setup (because of
repository tree rights).
New solution just add `Repo.init()` method call to setup subcommand
after config reload to make sure that repository name has been applied.
In addition chown method as well as setuid method for check_output have
been added.
* Allow spaces in lists. This feature has been done in the way as shell
interprets arguments by using quotation marks
* Clear current content on reload
This feature also introduces the followiing changes
* aur-search command now works as expected with multiterms
* printer classes for managing of data print
* --sort-by argument for aur-search subcommand instead of using package
name
* --quiet argument now has also --no-quite option
* if --quite is supplied, the log level will be set to warn instead of
critical to be able to see error messages
* pretty_datetime function now also supports datetime objects
* BuildStatus is now pure dataclass
In this feature target option must allways point to section name instead
of type. Type will be read from type option. In case if type option is
not presented it will try to check if section with architecture exists
(e.g. target = email, section = email:x86_64); if it does, the correct
section name and type will be used. Otherwise it will check if the
specified section exists; if it does, seection name and type will be
returned.
in order to sort method correctly we are going to use the following
namiing schema:
{subject}_{action}_{details}
This schema still have some exceptions, e.g. single word methods, bool
methods (is_) and getters in case if they are singular (i.e. there is
no any other method with this subject)
* add ability to add manually stored packages
* update tests
* handle manual packages in remove-unknown method
* live fixes
also rename branches to has_remotes method and change return type
according to the source code defaults always updates the values
dictionary. This in this specific case it is impossible to override the
value it will be always empty list.
In order to handle it we are adding another property to the Handler
class which allows to run with None architecture list.
This particular set_defaults behaviour is still useful for other cases
when we have to run command without any specific architecture
* add external process spawner and update test cases
* pass no_report to handlers
* provide service api endpoints
* do not spawn process for single architecture run
* pass no report to handlers
* make _call method of handlers public and also simplify process spawn
* move update under add
* implement actions from web page
* clear logging & improve l&f
* initial auth implementation
* add create user parser
* add tests
* update dependencies list
* add login annd logout to index also improve auth
* realworld fixes
* add method set_option to Configuration and also use it everywhere
* split CreateUser handler to additional read method
* check user duplicate on auth mapping read
* generate salt by using passlib instead of random.choice
* case-insensetive usernames
* update dependencies
* update configuration reference
* improve tests
* fix codefactor errors
* hide fields if authorization is enabled, but no auth supplied
* add settings object for auth provider
* readme update
* add init subcommand
* add also init command to repository object
* add ability to generate list of architectures
* check if architecture list is not empty
* import pgp key implementation
* do not ask confirmation for local sign. Also add argparser test
* superseed requests by python-aur package
* ...and drop --skippgpcheck makgepkg flag by default
General idea is to use classmethod for every constructor and
statismethod otherwise.
Also use self and cls whenever it's possible to call static and class
methods
* add models tests (#1)
also replace single quote to double one to confort PEP docstring
+ move _check_output to class properties to make it available for
mocking
* alpm tests implementation
* try to replace os with pathlib
* update tests for pathlib
* fix includes glob and trim version from dependencies
* build_tools package tests
* repository component tests
* add sign tests
* complete status tests
* handle exceptions in actual_version calls
* complete core tests
* move configuration to root conftest
* application tests
* complete application tests
* change copyright to more generic one
* base web tests
* complete web tests
* complete testkit
also add argument parsers test