summaryrefslogtreecommitdiff
path: root/meson_options.txt
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-09-28 10:12:36 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-09-28 14:22:40 +0200
commit681cb84a63c14410449469c580ea3cc54f590ca4 (patch)
treecd11ee4f402c27f501c36671b37e238b07a9f1fb /meson_options.txt
parent77faadfdd3d2d934f52d1d35b60e774c494d84b8 (diff)
downloadsystemd-681cb84a63c14410449469c580ea3cc54f590ca4.tar.gz
meson: allow extra net naming schemes to be defined during configuration
In upstream, we have a linearly-growing list of net-naming-scheme defines; we add a new one for every release where we make user-visible changes to the naming scheme. But the general idea was that downstream distributions could define their own combinations (or even just their own names for existing combinations), so provide stability for their users. So far this required patching of the netif-naming-scheme.c and .h files to add the new lines. With this patch, patching is not required: $ meson configure build \ -Dextra-net-naming-schemes=gargoyle=v238+npar_ari+allow_rerenames,gargoyle2=gargoyle+nspawn_long_hash \ -Ddefault-net-naming-scheme=gargoyle2 or even $ meson configure build \ -Dextra-net-naming-schemes=gargoyle=v238+npar_ari+allow_rerenames,gargoyle2=gargoyle+nspawn_long_hash,latest=v249 \ -Ddefault-net-naming-scheme=gargoyle2 The syntax is a comma-separated list of NAME=name+name+… This syntax is a bit scary, but any typos result in compilation errors, so I think it should be OK in practice. With this approach, we don't allow users to define arbitrary combinations: what is allowed is still defined at compilation time, so it's up to the distribution maintainers to provide reasonable combinations. In this regard, the only difference from status quo is that it's much easier to do (and harder to do incorrectly, for example by forgetting to add a name to one of the maps).
Diffstat (limited to 'meson_options.txt')
-rw-r--r--meson_options.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/meson_options.txt b/meson_options.txt
index 15be1959d1..c09a23dc03 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -200,6 +200,8 @@ option('fallback-hostname', type : 'string', value : 'localhost',
option('default-hierarchy', type : 'combo',
choices : ['legacy', 'hybrid', 'unified'], value : 'unified',
description : 'default cgroup hierarchy')
+option('extra-net-naming-schemes', type : 'string',
+ description : 'comma-separated list of extra net.naming-scheme= definitions')
option('default-net-naming-scheme', type : 'string', value : 'latest',
description : 'default net.naming-scheme= value')
option('status-unit-format-default', type : 'combo',