Needed for pyproject based build after setup.cfg introduced the license
field to avoid _MissingDynamic error.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Copy metadata and options from pyproject.toml to align installation on
legacy Python/pip/setuptools stacks with the modern pyproject based one.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
File suffix was changed, reference was forgotten to be updated.
Fixes: eaf8f6085e ("Add proper README")
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Use function names which are both more uniform and more easily
understandable by humans.
Drop parsefromfile_throughstring() as it does not serve a good use
case, if still needed, it can be easily constructed by the user.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Instead of parsing a string representation, parse the native ACL entries
to construct the ACL mapping. This should yield better reliability.
Keep the existing logic in a renamed function, as it might still be useful
to parse existing string representations.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Add basic functionality for writing ACLs with user and group permissions
to a file.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Simplify YAML structure and parsing by removing the superfluous list
layer.
Add additional matrix entries to cover more user ACL constellations.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
The large amount of test data can be managed more easily if it is
contained in a separate file instead of being in the test code.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Map input ACLs for setfacl with expected pyacl output to allow for
an easily expandable test matrix.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
To make the logic more resilient towards potential errors or future
output changes, not only consider the string index but also validate
it against a set of expected positions.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
Remove superfluous "acl_" prefix from function names, the module
is already called "acl".
Replace hardcoded test path with functions to parse a given file.
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
For a better code style:
- consistent trailing commas
- use constant instead of repeated "magic" values
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>