From nobody Mon Jun 8 21:10:06 2026 X-Original-To: dev-commits-src-main@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 4gZ4SG6BLtz6glR3 for ; Mon, 08 Jun 2026 21:10:06 +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 4gZ4SG5M73z3wx3 for ; Mon, 08 Jun 2026 21:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780953006; 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=d5Gu6m6fLiERTXEWQn5quhTFzk3BVQWRYTNOq/bEWkE=; b=KupbCSIbRqPXL9vDZqeaeiy7TnxFwjKMsMs1JkBMtMirgXX4S3BJjFV1cXGtvDkuQbYoFg 8n53OWxePqvgXfM5L4Wivo6LAL06Gr/AXXAVHMKhov+4cXmkPhClAVFy9Hp684uNQJUfB/ cM/noDtaIZYGN+XmxnCv022Kf8WoX7EvIY0FhaX13YyfhsbqqIsm1WmyLQFyEqEjwAXF8F CA0fcFs1HekeIz5miUZ2q325OcquefRtv+aFNCgdSvNXzdsOpj3fEft5r41JdMforz7wBU A5txpxOXSCQz9wrp3jgClLA0GFfGDYVptreqzt9nck3dA/R4s8c/WkcQDqgzWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780953006; a=rsa-sha256; cv=none; b=nAq6pxPJzwOYpG0oDVnDbhHyoOPTxKP5PexclOSMxW2MEIyWmcbBRTaDCPqgq95BksV6GU TXu5dl4jHhQThw5+0l5uK9K8MNCW8ME8Uubqq5/4ahtnTq08IMVpP3e8CaNqTbREhPoyrz onzHCWdzehIfXBKjVhJ7Mkm2nioL/eVgqiBlbxwpJAqwhapf+uppicqfnnEky54eLoL0WL eZGpI3eITVwEXOKQXfNBlzzzH4frGzyHNIb7mMBW5Rc6X08zgWXZfI5N+tM2nIZeyL2iHT Qn8UNI3Zcchn77jgTJEuLOXY3q3WtEd28KPWTEikUZsAFK41i7KE99W6zETmMQ== 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=1780953006; 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=d5Gu6m6fLiERTXEWQn5quhTFzk3BVQWRYTNOq/bEWkE=; b=kcabd+isYejP1mTDq/dr70bov8JGNIhIC45Sss3EOUUeNRHaBb78yNXbBalzECc+yL5keG PwFW0ImxAhl8AisVkK+JYiKwc+iyJi1izqbyC50VU6P5HSrvXS9fDCcvkTufFqn9I9aLDJ MWssL7pX2bAJf1iFhngsX3AfidWO2DHJqD8Dr2BxmkOBfS4SNkNtOAxebekwacOirebcBA fGsWiyrwZqE7cNJA6PnJyRAsPf/9y3aTtvuDoW96rQ+gxDlcry3yEiMkgiCcaRHBJt5NOB ZePyEPQlOf/PxxUOziSUdRcP2z3lOtu4tWMfbFCYthEFH59RDmFi4oda8Ojghw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gZ4SG4bdrz14qv for ; Mon, 08 Jun 2026 21:10:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 181dd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 08 Jun 2026 21:10:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Jes=C3=BAs?= Daniel Colmenares Oviedo Subject: git: ea3426bc80aa - main - nuageinit: Create parent directories in write_files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: dtxdf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea3426bc80aad58e689c144ec6ddee0cda7861cb Auto-Submitted: auto-generated Date: Mon, 08 Jun 2026 21:10:06 +0000 Message-Id: <6a272fae.181dd.56109540@gitrepo.freebsd.org> The branch main has been updated by dtxdf: URL: https://cgit.FreeBSD.org/src/commit/?id=ea3426bc80aad58e689c144ec6ddee0cda7861cb commit ea3426bc80aad58e689c144ec6ddee0cda7861cb Author: Jesús Daniel Colmenares Oviedo AuthorDate: 2026-06-08 21:05:09 +0000 Commit: Jesús Daniel Colmenares Oviedo CommitDate: 2026-06-08 21:05:09 +0000 nuageinit: Create parent directories in write_files Currently, 'write_files' does not create parent directories, and 'runcmd' cannot be used here, since those scripts run after the files have been written. The only workaround is to create the files in an existing directory, such as '/root' or '/tmp', and then move those files using 'runcmd', but this is cumbersome when there are many files, even if they are small. With this change, nuageinit now creates the parent directories for each file using the path field, which mimics the same behavior as in cloud-init. Permissions and ownership can also be configured using 'runcmd'. Reviewed by: bapt@ Approved by: bapt@ Differential Revision: https://reviews.freebsd.org/D57395 --- libexec/nuageinit/nuage.lua | 1 + libexec/nuageinit/nuageinit.7 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index a554553b3e61..cbf92627918c 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -832,6 +832,7 @@ local function addfile(file, defer) root = "" end local filepath = root .. file.path + mkdir_p(dirname(filepath)) local f = assert(io.open(filepath, mode)) if content then f:write(content) diff --git a/libexec/nuageinit/nuageinit.7 b/libexec/nuageinit/nuageinit.7 index e1c4b9d61382..a3d9da2415d9 100644 --- a/libexec/nuageinit/nuageinit.7 +++ b/libexec/nuageinit/nuageinit.7 @@ -3,7 +3,7 @@ .\" Copyright (c) 2025 Baptiste Daroussin .\" Copyright (c) 2025 Jesús Daniel Colmenares Oviedo .\" -.Dd June 6, 2026 +.Dd June 8, 2026 .Dt NUAGEINIT 7 .Os .Sh NAME @@ -615,7 +615,7 @@ and are supported for now. .It Ic path The path of the file to be created. -.Pq Note intermerdiary directories will not be created . +.Pq Note intermerdiary directories will be created . .It Ic permissions A string representing the permission of the file in octal. .It Ic owner