From patchwork Thu Mar 8 21:15:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 883343 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="awycISir"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zy3Fy6vdMz9slP for ; Fri, 9 Mar 2018 08:15:50 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 1FE22226AD; Thu, 8 Mar 2018 21:15:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6KFTDbmRTX3M; Thu, 8 Mar 2018 21:15:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 374CE226BC; Thu, 8 Mar 2018 21:15:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 84BF01BFD7B for ; Thu, 8 Mar 2018 21:15:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7EBA4226AD for ; Thu, 8 Mar 2018 21:15:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jYqgySh1nK6H for ; Thu, 8 Mar 2018 21:15:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by silver.osuosl.org (Postfix) with ESMTPS id D2C75226BC for ; Thu, 8 Mar 2018 21:15:43 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id 188so381902wme.1 for ; Thu, 08 Mar 2018 13:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=E7NTwYA9LxgKxMmR9g2Y4EswCms3U8qwKnF85RfCdHc=; b=awycISirz16bCPNKqEphFOgHRyfBn3wZ/Pc/vzyVPK/K5QCR8piQtGw4Uia5CCfOXH TRENxXggEkwUdS33w9rKfNAGpmODhxEYdAMb3YtWmfT1TECu5WKdm5HplAffkTlXhW03 S2wu6mzxZ9zqajyZ/vqAwfZqafs5KPTcElXzUDjArErUaNZHbd4P2qXwmfIrOcE6+Nw7 GIuOGlNNIw+tpspAznu2MMk93wH0daWS4On23mjrSM2OAeuqsvRATYMK0uWyBN2y8nJ9 FCdC0qT2m1Pi5efLzYvIkfyg8Y+xXrNm1EjCgy6vAF43OwNbu0wHCKEIVbmB4BmqpSaO rmkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=E7NTwYA9LxgKxMmR9g2Y4EswCms3U8qwKnF85RfCdHc=; b=UYlbZh9Uhz5DshyZMPEF6Pwd49UzHTx3JSwRGYuO2xW4ayNbKrSJH8VbDx5emplV0U aoSWnUpk5f6mxFeaXxskWjpyaRyuaO39rdjPjJCNmupb4lgPXHD9y4Tr4urmbu5RC0Ka NFuZjMqQERuT/WQqmFIM9atKEpLrP1EMAVoAK60aM+A30iYL3DNN0bFlkuUrdnkOcQU9 xB7wM8ikHWzZ5GgzRSh7St9YEA/mQm+G/5nv+mBlJuSjkqTBa3GnRiZotKDAICV+l93P GTd4U1U7zf50V+qL4423QjS9ur73hIyCLTjTomqED891HpiO3WCWFANNp14G9Gf3Safw eeew== X-Gm-Message-State: AElRT7GTUb+lFDdCIYgBLKeaXKchWcq4VeSbYNe+OV+0YckN9ZR2XrSX KrtzshmpO58JV0vtRItO3p7INg== X-Google-Smtp-Source: AG47ELtJvB6f8WZAlDWrAOw4A/VyCjND6z+na1t6x0Bgl2ECd9OyYnsq4s118Rad8essYiDzP0Jvsg== X-Received: by 10.28.111.145 with SMTP id c17mr161580wmi.74.1520543742219; Thu, 08 Mar 2018 13:15:42 -0800 (PST) Received: from scaer.bzh.lan (2a01cb0886107300cdb563d68552a6f1.ipv6.abo.wanadoo.fr. [2a01:cb08:8610:7300:cdb5:63d6:8552:a6f1]) by smtp.gmail.com with ESMTPSA id a72sm14458233wme.28.2018.03.08.13.15.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 13:15:41 -0800 (PST) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Thu, 8 Mar 2018 22:15:26 +0100 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 02/15 v3] fs/cpio: don't extend packages' permissions table X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently, when we build a cpio filesystem without static devices, we shoehorn the /dev/console node as if it were specified by a package. This means that this device is added for all filesystems as well, not just the cpio. But if we disable cpio, that device is not created for other filesystems. This is not very clean, and may break expectations. Instead, use an explicit mknod as part of the _CMD, as we know it's going to run under fakeroot. This is still visible to all filesystems built after cpio, and not to those built before it, though. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Arnout Vandecappelle --- fs/cpio/cpio.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk index aa4d947fa5..505976512b 100644 --- a/fs/cpio/cpio.mk +++ b/fs/cpio/cpio.mk @@ -15,14 +15,15 @@ endef else # devtmpfs does not get automounted when initramfs is used. # Add a pre-init script to mount it before running init +# We must have /dev/console very early, even before /init runs, so +# that it can at least open its stdin/stdout/stderr filedescriptors. define ROOTFS_CPIO_ADD_INIT if [ ! -e $(TARGET_DIR)/init ]; then \ $(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \ fi + mknod -m 0622 $(TARGET_DIR)/dev/console c 5 1 endef -PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep) - endif # BR2_ROOTFS_DEVICE_CREATION_STATIC ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT