From nobody Fri Jun 5 11:18:09 2026 X-Original-To: dev-commits-src-all@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 4gWzSd6zCBz6gt8t for ; Fri, 05 Jun 2026 11:18:09 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gWzSd5CwXz3vyH for ; Fri, 05 Jun 2026 11:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780658289; 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=EOfvABQKSOilWdm9jLMrGgSlMoFQYpi7G5Kw2xiBJuY=; b=th7/bDPbakLmHxrRamRN7Ony7pqqS3UsCPCDR0/z0rxP3ZwESh+GUBXTIEQ3xNMnSS19EV T4w0n0U6bgXTSI+dJye9kRGEfk82t5lXy5x2xWMgEH6c2f0LpZGN7gHqNKzXEg0wge/O9N Ml5bYGV34Z1AryBCB2Avp6MUm671w9pzqhZqqiIIAjfY96/p/PO3yCpL99rp5FZL6ONaX4 tlV+nM6hoFN/g0R5ucqQu7U+66BGYvX6SLxShTnnug8nodaTqZ43Q/oV8B/X77WYET359o iVxVCi0SZFHcKUXEucYmjGEExTjhWl33GVf9XuzbyH+92JNCj/44ZaphxaR8EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780658289; a=rsa-sha256; cv=none; b=mKAkLrPxtTyJqcdJcNx9CvTfAeK+SaPl4Gupiv37UWhEZWFlWoWx+LhO3BKDwoGicDS9qc l0t2mxeh9lx0c7CaAXDIG701uAHqxCVUqz6rq3/8xb+T3hhmS6lWls43rFoaLU2hC73cLk TUwANUUEtZDBJIFSGFEl+XNRO3V1TIym5Tgyg7prDDvs3kAfCp401PhQ1ejD3wujDO8zid vaM1Y7jHO1X1dmwgGLOt0da6jGtxX5ijBrdIGQG6juqF2NRG/uzm7jHCF9bE2i2vxPGlVI k/Dp9AesSPTlNmwiu0ulMwWqpVtZQtD9P0ZMEcR444YBJRlZIosoIOV6cg2tfw== 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=1780658289; 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=EOfvABQKSOilWdm9jLMrGgSlMoFQYpi7G5Kw2xiBJuY=; b=OG4JijHdga8M1279rnuE/T6fln4hdlqTwM/fyLvjzEXM2/GW5CEPeS6sNp5sWFTsw9inPU tIkZGh3QwPA+cqOtetUQk+8k9e8NnNYYCWewvxwF3hm3HsxwFdiVGXzs9svcfskZ3/FxQT DMhxaI+oMHt9nqVMoo2Z0BfY11i74YifseQExWV55j1/Gs7XkFqCTxJ02kP/M4INf3mRYP TIUYAM7/wnF9X5auW0T+v8owlj224XHnoXWhxVEtxYMUwu37Gd6nKYklNeo+AZZHBknXSh Kav8nQcDGlu9WyWS+/N0WToX9FAovDtef24qaSSjJurzL4fHJFy8Mg9rvyNWBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gWzSd4hPNzBkd for ; Fri, 05 Jun 2026 11:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d4ed by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 05 Jun 2026 11:18:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 58184a301a1f - main - nuageinit: implement keyboard support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 58184a301a1f0ef0858689f8dcc608cb468d4644 Auto-Submitted: auto-generated Date: Fri, 05 Jun 2026 11:18:09 +0000 Message-Id: <6a22b071.1d4ed.134492a7@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=58184a301a1f0ef0858689f8dcc608cb468d4644 commit 58184a301a1f0ef0858689f8dcc608cb468d4644 Author: Baptiste Daroussin AuthorDate: 2026-06-05 10:09:51 +0000 Commit: Baptiste Daroussin CommitDate: 2026-06-05 11:17:22 +0000 nuageinit: implement keyboard support --- 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 <