Commit Graph

283 Commits

Author SHA1 Message Date
00ca06ffab subcommand review
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
2023-01-12 15:37:05 +02:00
5a05c8ce91 expose trigger configuration schema
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)
2023-01-10 03:33:52 +02:00
b09aea13af add config validator subcommand (#80)
* add config validator subcommand

* add --exit-code flag

* docs & faq update
2023-01-09 18:22:29 +03:00
ef6cf0f00b review unsafe commands access
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)
2023-01-04 17:45:44 +02:00
7ca5b3a363 Release 2.5.4 2023-01-03 01:59:25 +02:00
cf35addaa5 Release 2.5.3 2023-01-02 03:24:11 +02:00
64cc8fd6b0 Release 2.5.2 2023-01-02 01:57:09 +02:00
41515f6c95 Release 2.5.1 2022-12-31 14:58:37 +02:00
541d8d9b39 Release 2.5.0 2022-12-31 02:02:37 +02:00
effc120a43 improve VCS packages checks
* 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
2022-12-30 21:19:23 +02:00
9be4a89c08 Release 2.4.1 2022-12-11 05:17:10 +02:00
0f8596db1e replace alert bodals with toasts 2022-12-09 11:33:19 +02:00
c403c45d72 remove badges from status page 2022-12-09 00:58:03 +02:00
3e299d9685 Release 2.4.0 2022-12-05 00:25:53 +02:00
90be3276dd improve wording in documentation 2022-12-02 15:45:01 +02:00
fe66c6c45c implement support of unix socket for server
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
2022-12-02 01:41:23 +02:00
41cc58ed31 add rebuild implementation to interface 2022-12-02 01:41:23 +02:00
20e45845ba make package actions as dropdown 2022-12-02 01:41:23 +02:00
9fa1fa108f add key-import button to interface 2022-12-02 01:41:23 +02:00
2684e4b3f4 add fallback for copying to clipboard 2022-11-24 02:38:33 +02:00
45f5006db3 add show/hide password button 2022-11-24 02:38:33 +02:00
4462eba860 render httpunauthorized as html in plain http requests 2022-11-22 23:40:27 +02:00
f2c23bad17 allow scrolling with fixed copy button position 2022-11-22 22:20:21 +02:00
b6f6ee8c76 change wording for package actions 2022-11-22 15:46:49 +02:00
b71d1f6e3d fix login and logout buttons decorations 2022-11-22 11:17:59 +02:00
14cb548c3b Extended package status page (#76)
* 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
2022-11-22 02:58:22 +03:00
2eb93a6090 Release 2.3.0 2022-11-16 00:53:48 +02:00
dd6ef38c99 remote threadname from logging
Since application is mostly singlethreaded it makes no sense to log it
2022-11-14 23:21:06 +02:00
415dc42313 Release 2.3.0rc4 2022-11-14 01:02:27 +02:00
880cebe54f Release 2.3.0rc3 2022-11-11 21:20:55 +02:00
dc8a52f6c0 Release 2.3.0rc2 2022-11-11 17:25:11 +02:00
f7ec24523b Release 2.3.0rc1 2022-11-11 16:36:13 +02:00
82b932371b add ability to use ahriman pacman database instead of system one (#71)
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.
2022-11-08 17:26:51 +03:00
09678a3ae1 add possibility to run full update
In case if packages are not set from web, the spawner will run full
repository update
2022-10-31 02:41:24 +02:00
8394004943 Release 2.2.2 2022-09-17 04:05:06 +03:00
7e20ff5184 Release 2.2.1 2022-09-14 04:49:08 +03:00
43166e5f94 Release 2.2.0 2022-09-14 03:28:28 +03:00
43696b9920 Make optional dependencies trully optional (#67)
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)
2022-09-11 01:44:06 +03:00
8befee58fe patch architecture list in runtime (#66) 2022-08-09 15:18:20 +03:00
eae5748a30 Release 2.1.0 2022-07-02 15:42:39 +03:00
fac228d6c6 review loggers once more
This commit makes loggers like java.util.logging with fully qualified
logger name which is created by LazyLogging trait
2022-06-27 01:41:49 +03:00
eb5ac5a52b bump web libraries
also encode strings for the views
2022-06-24 12:03:38 +03:00
047925dcfe review loggers 2022-06-21 11:48:42 +03:00
bf959ceb5f Release 2.0.0 2022-06-05 20:46:32 +03:00
1ea3911531 rewrite api under single /api endpoint 2022-05-29 17:15:49 +03:00
d7966e419d add shell and version parser 2022-05-27 18:34:07 +03:00
3a5268993e update readme 2022-05-22 16:00:24 +03:00
b1dfafe275 dynamic html load (#63)
* dynamic html load
* split by classes
2022-05-20 22:29:36 +03:00
dc3562a4ec add contribution guide 2022-05-11 03:17:37 +03:00
dda94f8f9e Release 2.0.0rc11 2022-05-10 06:03:33 +03:00
89a2d8e298 Release 2.0.0rc10 2022-05-09 21:51:35 +03:00
b9cd98235e triggers implementation (#62) 2022-05-09 20:00:20 +03:00
1905360f8f Release 2.0.0rc9 2022-05-08 03:58:53 +03:00
73057bc08d Release 2.0.0rc8 2022-05-06 20:55:54 +03:00
c73a2a4aa9 add note about ahriman to index page 2022-05-06 02:54:37 +03:00
571f720ae2 Complete official repository support (#59) 2022-05-03 00:49:32 +03:00
06bd29b78d Release 2.0.0rc7 2022-04-11 00:48:08 +03:00
307a7f4a71 Release 2.0.0rc6 2022-04-09 17:34:23 +03:00
25734876de do not render failed packages in jinja (#57)
basic templates require package info which is unavailable if package
wasn't built
2022-04-09 17:31:13 +03:00
53df735eb2 Release 2.0.0rc5 2022-04-08 04:42:05 +03:00
fb7275f9dd change telegram default index to telegram-index 2022-04-08 04:32:34 +03:00
1a83e55d64 add telegram integraion 2022-04-08 03:41:07 +03:00
b8e17c4879 Release 2.0.0rc4 2022-04-08 01:14:35 +03:00
8f18ead4cc Release 2.0.0rc3 2022-04-04 02:40:17 +03:00
97ec5bfa41 Release 2.0.0rc2 2022-04-04 02:27:19 +03:00
c5f086a7c6 Release 2.0.0-rc1 2022-04-04 02:18:31 +03:00
a132b1544a create user in docker container
also fix user reading and add nocolor flag by default
2022-03-31 03:25:53 +03:00
83931f5cf4 port part of settings to database (#54) 2022-03-31 01:48:06 +03:00
d4eadf0013 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
a7c6d95b34 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
fa4c1c6205 Release 1.8.0 2022-02-06 05:45:50 +03:00
9197b416e6 use own aur wrapper (#49) 2022-02-06 03:44:57 +03:00
f54a2fe740 Release 1.7.0 2021-12-26 02:01:09 +03:00
32b129a806 Release 1.6.4 2021-11-10 21:29:45 +03:00
5b678149dc Release 1.6.3 2021-11-04 21:32:27 +03:00
2e07de4a12 Release 1.6.2 2021-10-28 03:20:52 +03:00
c0f7f81050 Release 1.6.1 2021-10-27 03:16:53 +03:00
21845bc934 Release 1.6.0 2021-10-27 01:59:36 +03:00
295f810222 logger improvements
* remove build log since it has no usages actually (replaced by root
  logger)
* decrease boto3 log levels to INFO by default to reduce noice
2021-10-20 02:12:49 +03:00
be017ed102 Release 1.5.0 2021-10-18 03:48:24 +03:00
5f7f58041d docs update 2021-10-15 04:55:46 +03:00
04f365f1a6 aggressive small case 2021-10-14 03:13:15 +03:00
faaf72a840 improve scripts
move logic to separated shell scripts and also create shell script for
repository setup

Also force create directory according to systemd recommendations
2021-10-11 02:20:16 +03:00
ef44895b0d more verbose help messages 2021-10-07 01:56:22 +03:00
a4eaf87116 Release 1.4.1 2021-10-03 01:02:41 +03:00
444da87fdc Release 1.4.0 2021-10-01 09:25:35 +03:00
6be6614e6d add package request endpoint 2021-10-01 08:58:50 +03:00
af5363d158 add index url 2021-09-26 14:29:42 +03:00
d60c553ea2 add debugtoolbar support 2021-09-26 12:31:12 +03:00
5a6d0e0000 set both value and innerText during search
current implementation just adds package name with the description which
is incorrect
2021-09-26 10:34:21 +03:00
845bc9b5e8 Release 1.3.0 2021-09-18 06:28:52 +03:00
22272167e6 change spelling for distro name 2021-09-13 02:49:22 +03:00
41c8f4c35f return description from the search 2021-09-12 22:31:34 +03:00
168b2f6880 OAuth2 (#32)
* make auth method asyncs

* oauth2 demo support

* full coverage

* update docs
2021-09-12 21:41:38 +03:00
88c8c929dc add error description to modals 2021-09-11 23:05:51 +03:00
5bb244cbe8 add static files support and cookie expiration settings 2021-09-11 16:34:43 +03:00
11c03a9041 Add ability to trigger updates from the web (#31)
* 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
2021-09-10 00:33:35 +03:00
49a05d0520 add repository name to base tempalte 2021-09-05 06:15:24 +03:00
19d1e17727 allow read only pages to be requested without authorization 2021-09-05 06:09:43 +03:00
19ba2ba8e5 migration of jinja tempaltes to bootstrap (#30) 2021-09-05 05:27:58 +03:00
b7cff0a19d Auth support (#25)
* 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
2021-09-02 23:36:00 +03:00
284f449225 Release 1.2.6 2021-08-21 16:19:21 +03:00
d18df0935e Release 1.2.5 2021-08-19 02:36:05 +03:00
fc67778e89 Release 1.2.4 2021-08-19 00:45:58 +03:00
bc923b0e8f Release 1.2.3 2021-08-19 00:18:12 +03:00
8f55cc600e add manpage generator 2021-08-17 04:05:18 +03:00
c757554148 Release 1.2.2 2021-08-17 01:03:04 +03:00
899603e4b9 fix typo in log naming 2021-08-17 01:02:42 +03:00
f488105fd2 Release 1.2.1 2021-08-17 00:52:09 +03:00
2e89b9483f logging rethink
* well lets replace f-strings by %s as it is originally recommended
* use syslog handler by default
2021-08-17 00:23:34 +03:00
d9b4015be5 Release 1.2.0 2021-08-11 05:02:23 +03:00
78636c2035 web templates improvements
* enable jinja autoescape by default for jinja raw generator
* allow to search by multiple strings (OR)
* replace test templates by symlink
2021-08-11 02:12:14 +03:00
47c4e5bb42 move web server to loopback by default 2021-08-11 02:02:18 +03:00
aad599be67 Native s3 sync (#23)
* Native S3 sync implementation

* fix imports

* fix paths reading

* install s3 components duriing test stage
2021-08-10 23:18:56 +03:00
f8ff2cbf5b Release 1.1.0 2021-07-05 22:11:14 +03:00
46389b87e7 Release 1.0.0 2021-04-10 01:38:55 +03:00
856a94ff00 import pgp key implementation (#17)
* 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
2021-04-10 01:37:45 +03:00
a416214e5f Move search line inside extended report option 2021-04-06 17:03:34 +03:00
e5966c497f Release 0.22.1 2021-04-06 05:54:04 +03:00
01887ec44b add ability to skip email report generation for empty update list 2021-04-06 05:51:50 +03:00
4d4ddffa8f Release 0.22.0 2021-04-06 05:46:12 +03:00
4729c0ea5f Email report (#11)
* Demo email report implementation

* improved ssl mode

* correct default option spelling and more fields to be hidden for not
extended reports
2021-04-06 05:45:17 +03:00
035a23a8de Release 0.21.4 2021-04-05 02:28:38 +03:00
70465b5044 Release 0.21.3 2021-04-05 02:22:44 +03:00
1b979725a3 Release 0.21.2 2021-04-05 02:01:28 +03:00
a3fe361596 Release 0.21.1 2021-04-05 00:45:12 +03:00
6c96c9e73a Release 0.21.0 2021-04-05 00:38:23 +03:00
1785b0470f more options in setup command 2021-04-04 15:42:06 +03:00
6470b13511 Release 0.20.0 2021-04-01 02:38:59 +03:00
e637a647c5 Release 0.19.0 2021-03-31 02:19:44 +03:00
8d7d508bb2 move rsync and s3 options to configuration 2021-03-30 02:38:18 +03:00
3996055f56 Release 0.18.0 2021-03-29 11:48:54 +03:00
930b47c704 Release 0.17.0 2021-03-29 03:25:43 +03:00
5cb3fd5853 Release 0.16.0 2021-03-28 15:38:12 +03:00
60b8477cde Add tests (#1) (#5)
* 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
2021-03-28 15:30:51 +03:00
3d74b1485a Release 0.15.0 2021-03-20 18:05:36 +03:00
413d3b7509 web service improvements
* load and save web service state to cache file
* disable web reporting to self
* restore console handler settings
* allow to redirect logs to stderr
* verbose http error logging
* update package status by group, not by single package
* split Repository class to several traits
* move json generators/readers to dataclasses
2021-03-20 18:01:57 +03:00
310eba694f Release 0.14.1 2021-03-17 03:35:38 +03:00
47fc5bca57 Release 0.14.0 2021-03-16 20:11:56 +03:00
d4222eca25 add dump config option, change all timestamp objects to int, check git
directory
2021-03-16 05:24:07 +03:00
b5046b787c some improvements
* handle exceptions in multiprocessing
* readme update
* safe logger handler implementation (uses either stderr or
  rotatingfiles)
* user UID check
2021-03-16 04:25:58 +03:00
75c0cc970e Release 0.13.0 2021-03-16 01:40:48 +03:00
504d57b2f5 more package propertieis 2021-03-16 01:39:16 +03:00
8f5af7965e Release 0.12.2 2021-03-15 22:51:07 +03:00
f35278e978 styling (again) 2021-03-15 22:50:58 +03:00
a288986450 allow to run single command for multiple architectures at the same time 2021-03-15 04:57:10 +03:00
2cef540cc0 status bar to build status page 2021-03-15 04:43:10 +03:00
7fd22e9f16 Release 0.12.1 2021-03-15 03:58:25 +03:00
2a0311b042 Release 0.12.0 2021-03-15 03:55:40 +03:00
0fcb46afca add information about installed size 2021-03-15 03:54:52 +03:00