Commit Graph
100 Commits
Author SHA1 Message Date
arcanisandGitHub 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
arcanis 04a52f759d sort unsafe commands response 2023-01-04 18:00:10 +02:00
arcanis 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
arcanis ab650b7417 copyright update 2023-01-04 03:43:10 +02:00
arcanis 7ca5b3a363 Release 2.5.4 2023-01-03 01:59:25 +02:00
arcanis 666fa98075 add notes about documentation and methods inside class
Because I always forget which way I used before
2023-01-03 01:53:10 +02:00
arcanis 684ef33dbc Correct way to allow setting context with existing
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 :(
2023-01-03 00:48:14 +02:00
arcanis cf35addaa5 Release 2.5.3 2023-01-02 03:24:11 +02:00
arcanis 11732a8609 allow setting context with existing
In case of running command from web interface, it will raise exception
because context has been copied with subprocesses
2023-01-02 03:21:15 +02:00
arcanis 64cc8fd6b0 Release 2.5.2 2023-01-02 01:57:09 +02:00
arcanis 4202751e9c remote all gitfiles in git remote trigger
In case if there is .gitignore file with asterics, the pkgbuild upload
would not appear
2023-01-02 01:45:50 +02:00
arcanis 41515f6c95 Release 2.5.1 2022-12-31 14:58:37 +02:00
arcanis ac92b506e0 remote log for calculate version as it cleans logs 2022-12-31 14:48:21 +02:00
arcanis 5bbd1ad9a9 fully lazy handle load
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
2022-12-31 14:48:21 +02:00
arcanis 541d8d9b39 Release 2.5.0 2022-12-31 02:02:37 +02:00
arcanis e41dd09a8a force upgrade sphinx documentation 2022-12-30 22:58:13 +02:00
arcanis 8e65263b90 add completion files generated by shtab 2022-12-30 21:19:23 +02:00
arcanis afc488255c allow 3 symbols for package search 2022-12-30 21:19:23 +02:00
arcanis 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
arcanis 4b27e102ef change another boolean info option to boolean action 2022-12-29 03:15:48 +02:00
arcanis e0126bb811 add repo-structure subcommand
This commit also changes Tree class, replacing load method by resolve
2022-12-27 10:35:03 +02:00
arcanis 8c04dc4c2a fix property description in docs 2022-12-26 02:32:14 +02:00
arcanisandGitHub 83e9d7c523 write patches via gitremote push trigger (#79)
* write patches via gitremote push trigger

* implement context variables intead of custom database class
2022-12-25 02:10:38 +03:00
arcanis 9be4a89c08 Release 2.4.1 2022-12-11 05:17:10 +02:00
arcanis 0f8596db1e replace alert bodals with toasts 2022-12-09 11:33:19 +02:00
arcanis c403c45d72 remove badges from status page 2022-12-09 00:58:03 +02:00
arcanis 00dbd90953 check that package has been created during setup workflow 2022-12-06 11:09:56 +02:00
arcanis 3e299d9685 Release 2.4.0 2022-12-05 00:25:53 +02:00
arcanis e20637f7ad do not update database via pacman, use ahriman's own databses 2022-12-04 23:45:10 +02:00
arcanis 5a09d46f9a Some minor documentation related fixes
* Improve some wording (again)
* Change default type for refresh option to False (does not affect
  behavior)
* Update docstrings to reflect last changes
* Configuration.__convert_path has been replaced by shlex
* aiosecurity functions support kwargs now
2022-12-04 02:10:46 +02:00
arcanis 90be3276dd improve wording in documentation 2022-12-02 15:45:01 +02:00
arcanis a4f646eb2a do not trigger update on sign command 2022-12-02 01:41:23 +02:00
arcanis ebd06cb443 improve setup command by --makeflags-jobs argument and fix repository sign on creation 2022-12-02 01:41:23 +02:00
arcanis 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
arcanis bba58352e0 do not invoke configuration write in case if no salt or user was written 2022-12-02 01:41:23 +02:00
arcanis 41cc58ed31 add rebuild implementation to interface 2022-12-02 01:41:23 +02:00
arcanis 20e45845ba make package actions as dropdown 2022-12-02 01:41:23 +02:00
arcanis 9fa1fa108f add key-import button to interface 2022-12-02 01:41:23 +02:00
arcanis 577bd9e5f8 add demos links 2022-11-24 02:38:33 +02:00
arcanis 20b9c1fa4a add security notes 2022-11-24 02:38:33 +02:00
arcanis a7c9183aa0 add curl examples to web views 2022-11-24 02:38:33 +02:00
arcanis 9e0dd3ae97 build docs together with web views 2022-11-24 02:38:33 +02:00
arcanis f4e4e88e82 change respone for service requests 2022-11-24 02:38:33 +02:00
arcanis 2684e4b3f4 add fallback for copying to clipboard 2022-11-24 02:38:33 +02:00
arcanis 45f5006db3 add show/hide password button 2022-11-24 02:38:33 +02:00
arcanis b26aa2145f update web preview picture 2022-11-24 02:38:33 +02:00
arcanis 4462eba860 render httpunauthorized as html in plain http requests 2022-11-22 23:40:27 +02:00
arcanis f2c23bad17 allow scrolling with fixed copy button position 2022-11-22 22:20:21 +02:00
arcanis 1603086b96 change logging module imports 2022-11-22 22:20:21 +02:00
arcanis b6f6ee8c76 change wording for package actions 2022-11-22 15:46:49 +02:00
arcanis b71d1f6e3d fix login and logout buttons decorations 2022-11-22 11:17:59 +02:00
arcanis 7883746e53 add more notes about docker 2022-11-22 10:49:46 +02:00
arcanis ae9118654d check log record in handler instead of client 2022-11-22 02:30:37 +02:00
arcanis 81fa73f725 ask users to repeat password
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
2022-11-22 02:19:37 +02:00
arcanisandGitHub 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
arcanis 2eb93a6090 Release 2.3.0 2022-11-16 00:53:48 +02:00
arcanis 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
arcanis 415dc42313 Release 2.3.0rc4 2022-11-14 01:02:27 +02:00
arcanis 3e1af17796 fix case when no files were commited in remote push trigger
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.
2022-11-14 00:59:43 +02:00
arcanis 880cebe54f Release 2.3.0rc3 2022-11-11 21:20:55 +02:00
arcanis cbcc796a3a rollback cwd parameter for clone 2022-11-11 21:19:27 +02:00
arcanis dc8a52f6c0 Release 2.3.0rc2 2022-11-11 17:25:11 +02:00
arcanis 34c93e53cc Fix issue when there is no cached source directory yet (closes #75) 2022-11-11 17:23:15 +02:00
arcanis f7ec24523b Release 2.3.0rc1 2022-11-11 16:36:13 +02:00
arcanis f817b32976 use intersection of from_database and depends_on filters for the rebuild subcommand
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
2022-11-11 16:02:19 +02:00
arcanis 9fc2b681d4 limit max module size and improve some help messages 2022-11-11 16:01:54 +02:00
arcanis 59ff0589ab speedup docker build command by adding dockerignore listing 2022-11-11 12:47:31 +02:00
arcanis 1b53de6f2b man update 2022-11-10 20:10:07 +02:00
arcanis 41080c5ff8 add exec to shell subcommand 2022-11-10 18:52:55 +02:00
arcanis 791ce4f242 make exception optional argument for check_output method 2022-11-10 18:05:32 +02:00
arcanisandGitHub b75bd30658 replace several store_true keys to booleanoptionalaction alternative (#74) 2022-11-10 18:34:01 +03:00
arcanis b3b3cad706 write .makepkg.conf to home dir instead of repository root (#72) 2022-11-08 17:02:13 +02:00
arcanisandGitHub 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
arcanis 45fb2f3c46 improve repo-setup command
* 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
2022-11-06 14:25:44 +02:00
arcanis 4a5b9d9fa1 fix case in which if no source PKGBUILDs were updated, an exception will occur 2022-11-03 03:39:54 +02:00
arcanis 2f8316ecb0 faq update 2022-11-02 17:15:17 +02:00
arcanis 77ad35fce8 docs update 2022-11-02 04:17:26 +02:00
arcanis 48da4646cf change gitremote api to be same as report and upload
These changes are keeping fallback to old settings, but will allow to
run multiple git targets with different settings
2022-11-02 04:09:42 +02:00
arcanis 3d98dd267a fix update handler tests
If daemon tests are run before the update handler it causes test
failure, because there are other calls
2022-10-31 11:51:12 +02:00
arcanis 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
arcanis 8e2732f6fe add daemon subcommand
This command emulates default systemd timer and can be useful in docker
container in order to run 24/7
2022-10-31 01:38:01 +02:00
arcanisandGitHub 73e311a41c implement single-function patches (#69) 2022-10-30 03:11:03 +03:00
arcanis 1e8388af5d drop ahriman.core.triggers.Trigger.run method
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
2022-10-19 20:07:31 +03:00
arcanis c1d74726b7 fix rtd docs building
Commit 9d016f51b5 introduced kw_only
dataclasess which require python 3.10+
2022-10-18 02:24:18 +03:00
arcanis f2ddcc6d23 disallow no values in configuration
This option could lead to missing warnings about missing or invalid
configuration values because code usually expects that values are exists
and not empty unless it is explicitly specified.

However, pacman configuration still requires this option in order to be
able to deal with boolean values
2022-10-18 02:13:01 +03:00
arcanisandGitHub a5ce6b78dd Add gitremote triggers (#68)
* add gitremote pull trigger

* add push gitremote trigger

* docs update
2022-10-18 01:46:27 +03:00
arcanis 1a83dd6f5a extend triggers to on_start and on_stop methods
This commit also replaces old run method to new on_result
2022-09-26 01:22:54 +03:00
arcanis 16a33f7729 add minimal install step to workflow 2022-09-17 14:52:08 +03:00
arcanis fb21b1da53 make sqlite import consistent 2022-09-17 14:32:21 +03:00
arcanis 8394004943 Release 2.2.2 2022-09-17 04:05:06 +03:00
arcanis 75c6bf6119 skip architecture list patching in case if any architecture is set 2022-09-17 04:04:28 +03:00
arcanis 7e20ff5184 Release 2.2.1 2022-09-14 04:49:08 +03:00
arcanis 757614f5a0 docs update 2022-09-14 04:48:11 +03:00
arcanis 43166e5f94 Release 2.2.0 2022-09-14 03:28:28 +03:00
arcanis 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
arcanisandGitHub 8befee58fe patch architecture list in runtime (#66) 2022-08-09 15:18:20 +03:00
arcanis 9d016f51b5 frozen dataclasses 2022-07-26 14:40:28 +03:00
arcanis c5fbccd519 reduce docker image size a bit 2022-07-18 11:42:26 +03:00
arcanis eae5748a30 Release 2.1.0 2022-07-02 15:42:39 +03:00
arcanis 695ef708b6 simplify tmpdir method 2022-06-28 19:11:38 +03:00