<!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 class="details" style="font-style: italic; color: #737278;">
<a href="https://gitlab.com/adrien-n">adrien</a> created a merge request: <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1849">!1849</a>
</p>
<div class="branch">
Project:Branches: adrien-n/gnutls:includes-in-configuration to gnutls/gnutls:master
</div>
<div class="author">
Author: adrien
</div>
<div class="assignee">
Assignees:
</div>
<div class="reviewer">
Reviewers:
</div>
<div class="approvers">
</div>
<div class="md gl-mt-5" style="color: #333238; word-wrap: break-word; margin-top: 1rem;">
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">This extends the configuration with "include" directives:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #333238; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 16px; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: .25rem; white-space: pre; margin-top: 0; font-family: var(--default-mono-font, "GitLab Mono"),"JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; vertical-align: bottom; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">[includes]</span>
<span id="LC2" class="line" lang="plaintext">file-required = /etc/foo</span>
<span id="LC3" class="line" lang="plaintext">file-optional = /etc/bar</span></code></pre>
<copy-code></copy-code>
</div>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">I'm marking this as a draft because I think this requires discussion first.
Solves <a href="https://gitlab.com/gnutls/gnutls/-/issues/1300" data-reference-type="issue" data-original="#1300" data-link="false" data-link-reference="false" data-issue="98727835" data-project="179611" data-iid="1300" data-namespace-path="gnutls/gnutls" data-project-path="gnutls/gnutls" data-issue-type="issue" data-container="body" data-placement="top" title="Allow merging of configuration files" class="gfm gfm-issue" style="margin-top: 0;">#1300</a> AFAIU.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">I see this is as basically introducing a new API and there are all the same questions:</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0 0 16px; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">is it needed?</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">is it enough?</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">is it not too much?</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">is the approach good?</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">is the structure appropriate?</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">are the names appropriate?</li>
</ul>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#needed" aria-hidden="true" class="anchor" id="user-content-needed" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Needed</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">I think there is a need, especially for distributions.</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#enough" aria-hidden="true" class="anchor" id="user-content-enough" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Enough</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">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.</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#not-too-much" aria-hidden="true" class="anchor" id="user-content-not-too-much" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Not too much</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">File includes is the minimum but are two keys required?</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">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.</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#approach" aria-hidden="true" class="anchor" id="user-content-approach" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Approach</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">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.</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#structure" aria-hidden="true" class="anchor" id="user-content-structure" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Structure</h2>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">I'm not entirely happy about how the configuration file becomes structured but it's explicit for users and easy to implement.</p>
<h2 dir="auto" style="font-size: 1.5em; font-weight: 600; padding-bottom: .3em; border-bottom-width: 1px; border-bottom-color: #bfbfc3; border-bottom-style: solid; color: #333238; margin: 24px 0 16px;" align="initial">
<a href="#names" aria-hidden="true" class="anchor" id="user-content-names" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Names</h2>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">Not completely happy about that either. I'm open to changes.</p>
</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">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/1512e121752458fdf1b81eeeacdfef64/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"}}</script>
</p>
</div>
</body>
</html>