This commit reorganizes build-package.yaml in several ways:
- Follow name change of the called workflow
The reusable workflow used by build-package.yaml changed name and
location, and this commit follows the move. It was located at
ci/action-build-package before and has moved to ci/workflows,
because what it provides is semantically more of a workflow than
an action.
- Limit CI runs
The commit also adds safeguards against too many CI runs. It
limits them to PR events opened, re-opened or pushed-to, and to
push events hitting branches master, main and release.
- Rename workflow itself to standard-tests.yaml
That name reflects better what it represents: The entry point to
janware's standard set of CI tests. All of them happen to run in
the context of building and packaging at this point, but that
might not be the only standard test this repo chooses to
subscribe to in the future, and if so, they will be better off in
one file with defined order, so give that file a better umbrella
name.
Forgejo versions before 15 didn't support workflow expansion, and "runs-on" was necessary in callers of reusable workflows. janware.com now runs Forgejo 15.x, and the requirement is gone, so remove the config option.
runs-on is typically a required field. However, if a job defines jobs.<job_id>.uses in order to reference a reusable workflow, then it is optional. See jobs.<job_id>.uses for more information on this behaviour.
[...]
It is recommended that jobs.<job_id>.runs-on is omitted when using uses, as this will allow Forgejo to perform workflow expansion. Workflow expansion results in the target workflow’s jobs appearing in the UI as separate jobs. This provides an easier to understand experience for accessing the logs of each job, and permits the jobs to run on separate runners with their own runs-on fields.
Depend on python3-networkx because ldap.Connection.object_class_tree needs it. Note that this is a relatively weak necessity which installed 1.7 GB worth of 500 new packages on talmix.david.jannet. Maybe this can be solved in a less costly way.
The entry instance passed to the walk callback contains raw results of LDAP search operations, i.e. all attribute values are lists, and all attribute values are bytes. Add the boolean parameters decode and unroll to walk() as a convenience method to get decoded values. They default to False, representing current behaviour.
Currently the configuration passed to the Connection constructor needs to contain an ldap_uri entry. Add "uri" as alias, because ldap_uri for the LDAP config in many contexts represents a tautology and is left out.
update_symlink(target, link_name) does the equivalent of ln -sf, i.e. force replacement of link_name with a new sysmlink, if it existed before the call.
An application based on Cmds will now try to read StringTree formatted config data from a file $HOME/.<name>rc, and make the data available via the newly added conf_value() method.
log.add_log_file(path) allows to pass a file path log messages will be written into. Special characters (e.g. console color codes) will be removed from the messages.
Do "from . import log" instead of "from jwutils import log". It works and looks cleaner than a module referencing itself. Not entirely sure if that's the way to go, I must admit.
Commit 72d56d9 (Move type argument into config) swapped the order of arguments in Auth.load(), but the ctor of ldap.Auth didn't follow the change, fix that.
Auth.load() takes a "tp" argument, specifying the Auth module name to load. In case of jw-devops, this is part of the configuration, which is also passed as an argument. Make taking 'type' from the config the default. Note that this changes the prototype.
jw-client-devops configures its databases with a set of config keys which are identical - except for the 'bind_pw' key, which is called 'password'. Allow that, too.
ldap.Auth lost a lot of code when jwutils.ldap was introduced, and rightfully so, because jwutils.ldap contains most of it. OTOH, it was used wrongly, fix that.