From patchwork Sun Jan 15 12:52:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1726701 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nvw7V07tLz23g1 for ; Sun, 15 Jan 2023 23:53:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 6449640866; Sun, 15 Jan 2023 12:53:23 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 6449640866 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PqmLnqUXWeGI; Sun, 15 Jan 2023 12:53:22 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 560AF403CC; Sun, 15 Jan 2023 12:53:21 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 560AF403CC X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 334DB1BF29D for ; Sun, 15 Jan 2023 12:53:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 0E6714167D for ; Sun, 15 Jan 2023 12:53:08 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0E6714167D X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5Bsg-vxDPAnz for ; Sun, 15 Jan 2023 12:53:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org E34C0415DF Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by smtp4.osuosl.org (Postfix) with ESMTPS id E34C0415DF for ; Sun, 15 Jan 2023 12:53:06 +0000 (UTC) Received: by mail-ej1-x62f.google.com with SMTP id qx13so3895819ejb.13 for ; Sun, 15 Jan 2023 04:53:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yFSOAJw0pGlVv07TmHhcOip2Zgm9qEOwLMCQf3gaYYE=; b=vHGna8tBLEcDiDYXhKf+H/VWOp1UhfXxOrPaoM7mL8uR2VLfP+FtYwQmxHc4CCX98u rTD1iRMCtz/v6znCFk19SGZ92dV02jEKIHfo6U+OmvBNSjKcTO2zvlW4OTD22g5wRnA7 9uVfH7znbaNI+4OQ7VUYBql73920GLnoliQ7wjh8rhe3noth/SaKrEQg1loKRb4tZHYs gTttsUuCG2br6NS8OuwZNNKHjCpzCdqgQeNgvad3It4Q7ColDqygdVkN4/dOT+r7x+Qr vJrK53mxJACQxGUH1jN5ZLQq1ph1eDxjQSigafBALOUuBLhYm5Yx03906XVeBvJU0Azi YRhQ== X-Gm-Message-State: AFqh2krJ1PYk6zsBqOOiRLqmAVymizLalZxM8BN/TidQStGcnp0eOtzr XMTDfNyjP//fkaUoENLgyU5roISjTK0= X-Google-Smtp-Source: AMrXdXvUU568U2xVRhU9pPDNBpWYj3wSai23If3aiMbdjtafkr3aJ23m2TMOREAqmlU6T9rX/LTm0A== X-Received: by 2002:a17:906:1414:b0:78d:f455:b5dd with SMTP id p20-20020a170906141400b0078df455b5ddmr69465886ejc.29.1673787184919; Sun, 15 Jan 2023 04:53:04 -0800 (PST) Received: from debian-noppl.. (84-113-221-34.cable.dynamic.surfer.at. [84.113.221.34]) by smtp.gmail.com with ESMTPSA id r18-20020a1709061bb200b0084cd08e5cb5sm10581673ejg.159.2023.01.15.04.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 04:53:04 -0800 (PST) From: Norbert Lange To: buildroot@buildroot.org Date: Sun, 15 Jan 2023 13:52:46 +0100 Message-Id: <20230115125253.280257-2-nolange79@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230115125253.280257-1-nolange79@gmail.com> References: <20230115125253.280257-1-nolange79@gmail.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yFSOAJw0pGlVv07TmHhcOip2Zgm9qEOwLMCQf3gaYYE=; b=CxHZSIzBE4VDvZr1/iOqLwwBfT6ZsOSsEXhFzPFQbk7NjKdIAJXDIXAcZuJMKH4neN ivWYbg6lxtYKVCJuPpazsQPu7zWhHpdC6/utWlaitF/7OAC+kth2XpROE7xgHOZrTp9c hz4B2+f940S2iI9n+exovxI5fzkj+xbhE7aAHgxDXvc9OyN8QU5nE1oAI5yV6I50kaya IPs/c9lqAs2cyjNY2QgDJrC8s3MHD5AjE9AI1Ay45WnJZcmW/hkBnHyMM/dG+DtgrYZM bRGRudzVjXmDv4fex/42gih5CwWrvSeO69a7FaHrB3Non51hq5mOu7pJtRqNHaF0J39o S1nw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=CxHZSIzB Subject: [Buildroot] [PATCH 1/7] system: introduce a choice for /var management X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Norbert Lange , "Yann E. MORIN" , "Yann E . MORIN" , Romain Naour Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: "Yann E. MORIN" Currently, we have a single solution to handle the /var content on a read-only root filesystem, and users can opt out of using it. We're going to introduce another solution (based on an overlayfs), which is incompatible with using the factory, so we'll have a choice of three mutually exclusive options. Introduce that choice now with just the existing /var factory, and a new option to opt out of it. Signed-off-by: Yann E. MORIN Signed-off-by: Yann E. MORIN Cc: Norbert Lange Cc: Arnout Vandecappelle (Essensium/Mind) Cc: Romain Naour Cc : Jérémy Rosen Acked-by: Norbert Lange --- system/Config.in | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/system/Config.in b/system/Config.in index 806a747315..87df031545 100644 --- a/system/Config.in +++ b/system/Config.in @@ -156,10 +156,16 @@ endchoice if BR2_INIT_SYSTEMD -config BR2_INIT_SYSTEMD_VAR_FACTORY - bool "build a factory to populate a tmpfs on /var" - default y # legacy +choice + bool "/var management" + default BR2_INIT_SYSTEMD_VAR_FACTORY # legacy depends on !BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW + help + Select how Buildroot provides a read-write /var when the + rootfs is not remounted read-write. + +config BR2_INIT_SYSTEMD_VAR_FACTORY + bool "build a factory to populate a tmpfs" help Build a factory of the content of /var as installed by packages, mount a tmpfs on /var at runtime, so that @@ -181,6 +187,16 @@ config BR2_INIT_SYSTEMD_VAR_FACTORY var.mount unit, that overrides the What and Type, and possibly the Options and After, fields. +config BR2_INIT_SYSTEMD_VAR_NONE + bool "do nothing" + help + Choose this if you have custom dispositions (like one or more + of a post-build script, a fakeroot script, systemd units, an + initramfs, or something else) that prepare /var to be writable + on a read-only rootfs. + +endchoice + config BR2_INIT_SYSTEMD_POPULATE_TMPFILES bool "trigger systemd-tmpfiles during build" default y # legacy