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
This commit is contained in:
Evgenii Alekseev 2023-08-17 16:02:15 +03:00
parent c37f67c558
commit 42fccb76ef
5 changed files with 18 additions and 8 deletions

View File

@ -126,6 +126,7 @@ Keyring package 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.
* ``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``.
@ -144,6 +145,7 @@ Mirrorlist package 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.
* ``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``.

View File

@ -767,7 +767,7 @@ The application provides special plugin which generates keyring package. This pl
.. code-block:: ini
[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>`.
@ -802,12 +802,12 @@ The application provides special plugin which generates mirrorlist package also.
.. code-block:: ini
[mirrorlist]
target = mirrorlist_generator
target = mirrorlist-generator
[mirrorlist_generator]
[mirrorlist-generator]
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:

View File

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

View File

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

View File

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