[gnutls-devel] GnuTLS | Draft: lib/priority: add a [includes] section and file-optional/file-required keys (!1849)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Tue Jul 9 12:37:21 CEST 2024



adrien created a merge request: https://gitlab.com/gnutls/gnutls/-/merge_requests/1849

Project:Branches: adrien-n/gnutls:includes-in-configuration to gnutls/gnutls:master
Author:   adrien




This extends the configuration with "include" directives:

```
[includes]
file-required = /etc/foo
file-optional = /etc/bar
```

I'm marking this as a draft because I think this requires discussion first.
Solves #1300 AFAIU.

I see this is as basically introducing a new API and there are all the same questions:

- is it needed?
- is it enough?
- is it not too much?
- is the approach good?
- is the structure appropriate?
- are the names appropriate?

## Needed
I think there is a need, especially for distributions.

## Enough
I initially wanted to support directories of files to include but I'm not sure there is actually a use for that. The gnutls configuration is not that big. Moreover, it is unclear that would be immediately needed.

## Not too much
File includes is the minimum but are two keys required?

I think included files have to exist: it should be an error otherwise. As for the optional includes, I have to admit I'm using that as a ersatz for directories; this makes it possible for distros to offer a file for user customization.

## Approach
I first wanted to mirror the current configuration location at build-time. That was much more involved however. There would also have been two locations for configuration and no rule as to which one would take precedence. Re-using the same location but making it a directory maybe would also have been confusing.

## Structure
I'm not entirely happy about how the configuration file becomes structured but it's explicit for users and easy to implement.

## Names
Not completely happy about that either. I'm open to changes.

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1849
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20240709/3ad6abe0/attachment.html>


More information about the Gnutls-devel mailing list