Compare commits

...

2 Commits

Author SHA1 Message Date
9ea3a911f7 update gh actions install script 2023-08-17 16:33:02 +03:00
ca60317750 add dummy type fields for pkgbuild generators
This field is required in order to pass config validation in case if
section name differs from default one. Also by default keyring_generator
and mirrorlist_generator have been renamed to keyring-generator and
mirrorlist-generator respectively for consistence
2023-08-17 16:02:15 +03:00
6 changed files with 18 additions and 12 deletions

View File

@ -34,8 +34,6 @@ pacman --noconfirm -U ahriman-1.0.0-1-any.pkg.tar.zst
# create machine-id which is required by build tools # create machine-id which is required by build tools
systemd-machine-id-setup systemd-machine-id-setup
# special thing for the container, because /dev/log interface is not available there
sed -i "s/handlers = syslog_handler/handlers = console_handler/g" /etc/ahriman.ini.d/logging.ini
# initial setup command as root # initial setup command as root
[[ -z $MINIMAL_INSTALL ]] && WEB_ARGS=("--web-port" "8080") [[ -z $MINIMAL_INSTALL ]] && WEB_ARGS=("--web-port" "8080")
ahriman -a x86_64 service-setup --packager "ahriman bot <ahriman@example.com>" --repository "github" "${WEB_ARGS[@]}" ahriman -a x86_64 service-setup --packager "ahriman bot <ahriman@example.com>" --repository "github" "${WEB_ARGS[@]}"
@ -48,10 +46,8 @@ if [[ -z $MINIMAL_INSTALL ]]; then
# run web service (detached) # run web service (detached)
sudo -u ahriman -- ahriman -a x86_64 web & sudo -u ahriman -- ahriman -a x86_64 web &
WEB_PID=$! WEB_PID=$!
sleep 15s # wait for the web service activation
fi fi
# add the first package # add the first package
# the build itself does not really work in the container
sudo -u ahriman -- ahriman package-add --now yay sudo -u ahriman -- ahriman package-add --now yay
# check if package was actually installed # check if package was actually installed
test -n "$(find "/var/lib/ahriman/repository/x86_64" -name "yay*pkg*")" test -n "$(find "/var/lib/ahriman/repository/x86_64" -name "yay*pkg*")"

View File

@ -126,6 +126,7 @@ Keyring package generator plugin.
Keyring generator plugin Keyring generator plugin
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
* ``type`` - type of the generator, string, optional, must be set to ``keyring-generator`` if exists.
* ``description`` - keyring package description, string, optional, default is ``repo PGP keyring``, where ``repo`` is the repository name. * ``description`` - keyring package description, string, optional, default is ``repo PGP keyring``, where ``repo`` is the repository name.
* ``homepage`` - url to homepage location if any, string, optional. * ``homepage`` - url to homepage location if any, string, optional.
* ``license`` - list of licenses which are applied to this package, space separated list of strings, optional, default is ``Unlicense``. * ``license`` - list of licenses which are applied to this package, space separated list of strings, optional, default is ``Unlicense``.
@ -144,6 +145,7 @@ Mirrorlist package generator plugin.
Mirrorlist generator plugin Mirrorlist generator plugin
^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ``type`` - type of the generator, string, optional, must be set to ``mirrorlist-generator`` if exists.
* ``description`` - mirrorlist package description, string, optional, default is ``repo mirror list for use by pacman``, where ``repo`` is the repository name. * ``description`` - mirrorlist package description, string, optional, default is ``repo mirror list for use by pacman``, where ``repo`` is the repository name.
* ``homepage`` - url to homepage location if any, string, optional. * ``homepage`` - url to homepage location if any, string, optional.
* ``license`` - list of licenses which are applied to this package, space separated list of strings, optional, default is ``Unlicense``. * ``license`` - list of licenses which are applied to this package, space separated list of strings, optional, default is ``Unlicense``.

View File

@ -767,7 +767,7 @@ The application provides special plugin which generates keyring package. This pl
.. code-block:: ini .. code-block:: ini
[keyring] [keyring]
target = keyring_generator target = keyring-generator
By default it will use ``sign.key`` as trusted key and all other keys as packagers ones. For all available options refer to :doc:`configuration <configuration>`. By default it will use ``sign.key`` as trusted key and all other keys as packagers ones. For all available options refer to :doc:`configuration <configuration>`.
@ -802,12 +802,12 @@ The application provides special plugin which generates mirrorlist package also.
.. code-block:: ini .. code-block:: ini
[mirrorlist] [mirrorlist]
target = mirrorlist_generator target = mirrorlist-generator
[mirrorlist_generator] [mirrorlist-generator]
servers = https://repo.example.com/$arch servers = https://repo.example.com/$arch
The ``mirrorlist_generator.servers`` must contain list of available mirrors, the ``$arch`` and ``$repo`` variables are supported. For more options kindly refer to :doc:`configuration <configuration>`. The ``mirrorlist-generator.servers`` must contain list of available mirrors, the ``$arch`` and ``$repo`` variables are supported. For more options kindly refer to :doc:`configuration <configuration>`.
#. #.
Create package source files: Create package source files:

View File

@ -46,9 +46,13 @@ class KeyringTrigger(Trigger):
}, },
}, },
}, },
"keyring_generator": { "keyring-generator": {
"type": "dict", "type": "dict",
"schema": { "schema": {
"type": {
"type": "string",
"allowed": ["keyring-generator"],
},
"description": { "description": {
"type": "string", "type": "string",
}, },

View File

@ -42,9 +42,13 @@ class MirrorlistTrigger(Trigger):
}, },
}, },
}, },
"mirrorlist_generator": { "mirrorlist-generator": {
"type": "dict", "type": "dict",
"schema": { "schema": {
"type": {
"type": "string",
"allowed": ["mirrorlist-generator"],
},
"description": { "description": {
"type": "string", "type": "string",
}, },

View File

@ -64,9 +64,9 @@ def test_schema(configuration: Configuration) -> None:
assert schema.pop("gitremote") assert schema.pop("gitremote")
assert schema.pop("html") assert schema.pop("html")
assert schema.pop("keyring") assert schema.pop("keyring")
assert schema.pop("keyring_generator") assert schema.pop("keyring-generator")
assert schema.pop("mirrorlist") assert schema.pop("mirrorlist")
assert schema.pop("mirrorlist_generator") assert schema.pop("mirrorlist-generator")
assert schema.pop("remote-pull") assert schema.pop("remote-pull")
assert schema.pop("remote-push") assert schema.pop("remote-push")
assert schema.pop("report") assert schema.pop("report")