From nobody Sun Jun 28 18:40:42 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gpJBg2M6Zz6jklC for ; Sun, 28 Jun 2026 18:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gpJBf3NPDz3YC1 for ; Sun, 28 Jun 2026 18:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782672042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21p4huA7ZuSVjn2UeyR0I4L+Of4qbYah+xleDWdI4Hg=; b=fkL5CS9d1OOdIrppsdF0UUdxAJ1S9f6CpwIofFO2z5OxtHszpQowIGq4v7bW8bUpLEpBwQ v9nre2xEZs9EvbXpySYPExerzkvl1EE5Nqe9Y68uLv47aC0qmP3SWkpxxXl1jV65O8NfeN /PjF/gcjVrT2jXh14Ytw0ACWU0wRMHFu3m2m34s+wFQWg/KsLAI4SEFvU757jc3tPnqDDN EM0GTw0lbqKcpt6epB0vzUtwfl6vPq1WuMSlAfVFW1KIa9EouEE9+hM00T0LOrGliHD7Sy WHgVjpJSkIQgFk0Cr4Z9jvtLewh97r8hZRfQUIwC/EG1zKyIdL+llUpu1YuDaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782672042; a=rsa-sha256; cv=none; b=iHIDITOWq751bsSP6l+dackrVqyNV0cM33LMmF/GpxCejphiYgimm5igqJ+wJ0qiWSf38t 3134CdeVo4ll9fKtpJ35suqvSPOxO/JvmAbQEXYUzjnb9qhKqMHpOgUtDKmvMh6uL4O/cb qGm8++N14DTayDtfch9iJ1VadKdBl+s9zx7EcmJlLr6AjIAQERzq0WVClRlkJ8CoV/nfgs 9J6cXgahIG+tl/aSHY98992sPO3nHVoe+JY8bBX/IJ3VxrEvxsskBLt4UX4FlTkUDgdzt+ mVVzKmBhMU7TjGcrxUlKyuGjUKBJqao3bU3McuJDmzZ3rgd+pf+QMgUghIFecw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782672042; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21p4huA7ZuSVjn2UeyR0I4L+Of4qbYah+xleDWdI4Hg=; b=TejTgN+qvu/2kr3wpwjn6QGTWgTdSZ6y6nkCm9EhI0PBTA7gua7ZYjzW7MjHc5E8H8NoeX DWtSj6trVG88KRfcm4k67OGMWtlfOgPUlK+vIXbs0ifdS0DYQnjvucANEgbl9Ql5VVNUT7 MmGdeyW6N0qEfUX6NFkbjc+rhYlMH1LKmAq5Ho09TfermJ3A4cgSoq+UQOEK+uU9qsYikb TQMJ1mk56pt1DFjTypECjPesNnpuAl0UEee+hVmWGVODU8UOdOckwCbPwpKcWWtBjpnnkM H4uHSVeUmSyM0LQUdl7z5CAKrapFn5BSKZNZrY0BE7vRtI9EfjEPzbf2RekBjw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gpJBf2RKrz6TC for ; Sun, 28 Jun 2026 18:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c43e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 28 Jun 2026 18:40:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Baptiste Daroussin Subject: git: 8c4d8934cc00 - stable/15 - nuageinit: implement keyboard support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 8c4d8934cc00e085e87b6e6ee719b70b9294b79c Auto-Submitted: auto-generated Date: Sun, 28 Jun 2026 18:40:42 +0000 Message-Id: <6a416aaa.1c43e.6083ca53@gitrepo.freebsd.org> The branch stable/15 has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=8c4d8934cc00e085e87b6e6ee719b70b9294b79c commit 8c4d8934cc00e085e87b6e6ee719b70b9294b79c Author: Baptiste Daroussin AuthorDate: 2026-06-05 10:09:51 +0000 Commit: Baptiste Daroussin CommitDate: 2026-06-28 18:32:28 +0000 nuageinit: implement keyboard support (cherry picked from commit 58184a301a1f0ef0858689f8dcc608cb468d4644) --- libexec/nuageinit/nuageinit | 24 ++++++++++++++++++++++++ libexec/nuageinit/nuageinit.7 | 20 ++++++++++++++++++++ libexec/nuageinit/tests/nuageinit.sh | 30 +++++++++++++++++++++++++++++- 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/libexec/nuageinit/nuageinit b/libexec/nuageinit/nuageinit index 8fef3bb662d1..033aa7861f6b 100755 --- a/libexec/nuageinit/nuageinit +++ b/libexec/nuageinit/nuageinit @@ -536,6 +536,29 @@ local function resolv_conf(obj) nuage.write_resolv_conf(root, obj.resolv_conf) end +local function keyboard(obj) + if obj.keyboard == nil then return end + local layout = obj.keyboard.layout + local variant = obj.keyboard.variant + if layout == nil then + warnmsg("keyboard: missing layout") + return + end + local keymap = layout + if variant then + keymap = layout .. "." .. variant + end + local path = root .. "/etc/rc.conf.d/keymap" + nuage.mkdir_p(root .. "/etc/rc.conf.d") + local f = io.open(path, "w") + if not f then + warnmsg("unable to open " .. path .. " for writing") + return + end + f:write('keymap="' .. keymap .. '"\n') + f:close() +end + local function mounts(obj) if obj.mounts == nil then return end for _, m in ipairs(obj.mounts) do @@ -876,6 +899,7 @@ elseif line == "#cloud-config" then ssh_keys, network_config, resolv_conf, + keyboard, disable_root, ssh_pwauth, runcmd, diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index 8ef9d8b284ea..9a20df0787ba 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -212,6 +212,26 @@ A list of IP/netmask sortlist entries. .It options A dictionary of resolver options. .El +.It Ic keyboard +An object configuring the keyboard layout. +.Pp +Sets the +.Va keymap +variable in +.Pa /etc/rc.conf.d/keymap . +.Pp +The following keys are recognized: +.Bl -tag -width "variant" +.It layout +The keyboard layout (e.g., +.Qq fr , +.Qq de , +.Qq us ) . +.It variant +The keyboard variant (e.g., +.Qq acc , +.Qq nodeadkeys ) . +.El .It Ic timezone Sets the system timezone based on the value provided. .Pp diff --git a/libexec/nuageinit/tests/nuageinit.sh b/libexec/nuageinit/tests/nuageinit.sh index 0f758bcac1cd..22b002ae2440 100644 --- a/libexec/nuageinit/tests/nuageinit.sh +++ b/libexec/nuageinit/tests/nuageinit.sh @@ -36,6 +36,7 @@ atf_test_case config2_userdata_bootcmd atf_test_case config2_userdata_manage_etc_hosts atf_test_case config2_userdata_mounts atf_test_case config2_userdata_resolv_conf +atf_test_case config2_userdata_keyboard atf_test_case config2_userdata_fqdn_and_hostname atf_test_case config2_userdata_write_files @@ -1167,7 +1168,33 @@ resolv_conf: - 192.168.1.0/255.255.255.0 EOF atf_check -o empty /usr/libexec/nuageinit "${PWD}"/media/nuageinit config-2 - atf_check -o inline:"domain mydomain.local\nsearch example.com test.local\nsortlist 192.168.1.0/255.255.255.0\noptions timeout:1 attempts:2\nnameserver 9.9.9.9\nnameserver 149.112.112.112\n" cat etc/resolv.conf + atf_check -o match:"domain mydomain.local" cat etc/resolv.conf + atf_check -o match:"search example.com test.local" cat etc/resolv.conf + atf_check -o match:"sortlist 192.168.1.0/255.255.255.0" cat etc/resolv.conf + atf_check -o match:"nameserver 9.9.9.9" cat etc/resolv.conf + atf_check -o match:"nameserver 149.112.112.112" cat etc/resolv.conf + atf_check -o match:"options.*timeout:1" cat etc/resolv.conf + atf_check -o match:"options.*attempts:2" cat etc/resolv.conf + true +} + +config2_userdata_keyboard_head() +{ + atf_set "require.user" root +} +config2_userdata_keyboard_body() +{ + mkdir -p media/nuageinit + setup_test_adduser + printf "{}" > media/nuageinit/meta_data.json + cat > media/nuageinit/user_data <