<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: var(--default-regular-font, "GitLab Sans"),-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<p style="color: #777777;">
<a href="https://gitlab.com/adrien-n">adrien</a>
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1849#note_1990397829">commented</a>:
</p>
<div class="md" style="color: #333238; word-wrap: break-word;">
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial"><a href="https://gitlab.com/tomato42" data-reference-type="user" data-user="258094" data-container="body" data-placement="top" class="gfm gfm-project_member js-user-link" title="Hubert Kario (@mention me if you need reply)" style="background-color: #cbe2f9; border-radius: .25rem; color: #0b5cad; margin-top: 0; padding: 0 2px;">@tomato42</a> My goal is also to avoid having change the main file: with the above, distros would "include" the tool-managed file from the main config file but not package it.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">I think the implementation for a whole directory could be pretty similar to this one; listing a directory in memory or in the configuration file are two ways to do the same thing.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">There is an issue with the global section however as it could appear in an included file and it's supposed to be parsed first. We could use ini_parse_stream to feed all files at once. There would be some inefficiencies in opening and closing files silently twice in the callback but that sounds very minor for an uncommon operation which will involve a few files only.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">So far, my main concern with introducing a directory is its location. I don't feel like creating something out of the blue and adding new build-time and runtime variables. What about the following?</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">Use the directory at GNUTLS_SYSTEM_PRIORITY_FILE + ".d"; on Debian and Ubuntu, that would be /etc/gnutls/config.d which I find pretty good.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">From a parsing point-of-view, read files in one go through ini_parse_stream as outlined above; these files could contain the same lines as the current configuration but spread over several files</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">List files in alphabetical order.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">Don't add specific variable/directive to include other files.</li>
</ul>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1849#note_1990397829">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/5e8b134eb191b1d1759ed08a5df5426d/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1849#note_1990397829"}}</script>
</p>
</div>
</body>
</html>