Commit Graph

110 Commits

Author SHA1 Message Date
arcanis e909e4f570 add configurable exit codes to some commands (#55) 2022-04-01 18:30:11 +03:00
arcanis 06ec16ac77 create user in docker container
also fix user reading and add nocolor flag by default
2022-03-31 03:25:53 +03:00
arcanis 2bc2b63a8a add help command 2022-03-31 02:18:39 +03:00
arcanis 28cc38aaa5 port part of settings to database (#54) 2022-03-31 01:48:06 +03:00
arcanis fb02e676af migrate to tox
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
2022-03-21 04:38:42 +03:00
arcanis 13121298f5 deprecate init/repo-init command
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.
2022-03-21 01:32:11 +03:00
arcanis b83bc5a732 fallback to AUR source in case of PermissionError exception 2022-03-20 03:46:56 +03:00
arcanis 57f25c309a add console printer
also add python-requests as explicit dependency and escape symbols in
repository name for badges in default tempate
2022-03-20 02:31:50 +03:00
arcanis d33844e7b2 ALLOW_AUTO_ARCHITECTURE_RUN flag for unsafe commands 2022-03-19 03:08:45 +03:00
arcanis 61efbb71a2 add docker support (#52)
* add docker support

* make shellcheck happy
2022-03-13 23:43:25 +03:00
arcanis 9f4acacada strict test checks 2022-03-04 02:04:52 +03:00
arcanis 026f74121a set success status on up to date packages 2022-02-06 06:22:58 +03:00
arcanis 60a2e25b9a update for new aiohttp api 2022-02-06 04:05:33 +03:00
arcanis 683abca9e5 use own aur wrapper (#49) 2022-02-06 03:44:57 +03:00
arcanis bfca7e41ab handle dependencies recursively 2021-12-22 19:35:09 +03:00
arcanis 603c5449a8 initial implementation of the local git clones (#48) 2021-12-22 15:56:24 +03:00
arcanis 042638d40e handle packages which have been removed from the repository (#45)
* handle packages which have been removed from the repository

* manually remove packages which have been removed from the base
2021-11-10 01:37:25 +03:00
arcanis fa4244d21e take python laziness into account 2021-11-04 21:30:34 +03:00
arcanis 32a4a82603 improve configuration extension
* 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
2021-10-28 03:19:50 +03:00
arcanis a2639f8dbb add update printer which will print current version if any 2021-10-27 03:11:43 +03:00
arcanis 65ba590ace use PackageSource enum for Package.load method
When using add function it sill tries to load data with invalid source
2021-10-27 02:49:23 +03:00
arcanis d3ea81d234 unify aur.search method
due to specific of the AUR API in order to reduce the code we are using
own wrapper and work with it instead of direct library calls
2021-10-26 04:49:55 +03:00
arcanis 09b0f2914d Add ability to show more info in search and status subcommands
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
2021-10-26 04:27:36 +03:00
arcanis dfd87c502f split application class into traits 2021-10-23 13:44:57 +03:00
arcanis 0b9ab09879 add patches to clean command 2021-10-20 03:22:16 +03:00
arcanis 47c54f0b40 add ability to download package from external links (e.g. HTTP) 2021-10-20 03:09:58 +03:00
arcanis eb16ef12f3 always return json in responses 2021-10-20 02:12:39 +03:00
arcanis 22d92e3b4e add repo-status-update subcommand 2021-10-17 06:38:49 +03:00
arcanis 56b77a84a6 allow to use multiple upload and report targets with the same name
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.
2021-10-17 06:06:08 +03:00
arcanis a5a99ec0b8 split github upload into generic http method and github specific
We might use some features from the http upload for another parser
2021-10-15 23:36:26 +03:00
arcanis 4521c2adde disallow to create tree in case of unsafe run 2021-10-14 04:53:09 +03:00
arcanis 5c5e54228f use generic removal method 2021-10-14 04:08:21 +03:00
arcanis 6514924b2d change method spelling
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)
2021-10-14 04:01:54 +03:00
arcanis 16aa977fa8 add test for every file 2021-10-14 03:34:12 +03:00
arcanis 4502931c39 exactly one called with instead of last call check 2021-10-14 03:12:45 +03:00
arcanis fcb167b1a3 github upload support (#41) 2021-10-14 02:30:13 +03:00
arcanis 72b26603bf add ability to add manually stored packages (#40)
* 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
2021-10-12 21:15:35 +03:00
arcanis 7c4f84fbc7 more verbose help messages 2021-10-07 01:56:22 +03:00
arcanis 3b6b2efcb1 patch control subcommands 2021-10-05 08:57:42 +03:00
arcanis 9f99dd3ff2 patch support (#35) 2021-10-03 15:20:36 +03:00
arcanis bee97df87f do not write anything on httpexceptions in log 2021-10-03 02:05:28 +03:00
arcanis 6becd01803 replace no-log with quiet
Also behavior of the flag has been changed: now it disables logs at all
2021-10-03 01:59:33 +03:00
arcanis 59f2992559 do not use set_defaults for architecture arguments
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
2021-10-03 00:59:24 +03:00
arcanis 73a4cee257 add package request endpoint 2021-10-01 08:58:50 +03:00
arcanis d73d5daad3 add debugtoolbar support 2021-09-26 12:31:12 +03:00
arcanis 51b28baf40 add ability to specify package source explicitly during the addition 2021-09-26 09:55:14 +03:00
arcanis 24326f9753 define permissions in views directly 2021-09-25 17:03:46 +03:00
arcanis 36c763069d only set file rights if requested 2021-09-23 20:36:22 +03:00
arcanis a7a32f0080 better reload 2021-09-17 19:15:53 +03:00
arcanis 16bb1403a1 add ability to reload authentication module 2021-09-17 16:05:38 +03:00