From patchwork Mon May 7 14:44:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 909790 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=datacom.ind.br 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 40fll66tYnz9s34 for ; Tue, 8 May 2018 00:44:50 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DBFBD26387; Mon, 7 May 2018 14:44:47 +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 5AEH+vEYBMpM; Mon, 7 May 2018 14:44:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C3CA6227B5; Mon, 7 May 2018 14:44:46 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id C689A1C2AB3 for ; Mon, 7 May 2018 14:44:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C33F485F18 for ; Mon, 7 May 2018 14:44:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5ZohhMQKRzWC for ; Mon, 7 May 2018 14:44:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4038D85EDA for ; Mon, 7 May 2018 14:44:42 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 856F41BA1DE8; Mon, 7 May 2018 11:44:40 -0300 (-03) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 61EF91BA1E07; Mon, 7 May 2018 11:44:40 -0300 (-03) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id TFKFvba8dfSk; Mon, 7 May 2018 11:44:40 -0300 (-03) Received: from pedeld202344.datacom.net (pedeld202344.datacom.net [10.0.120.87]) by mail.datacom.ind.br (Postfix) with ESMTPSA id 30AB31BA1DE8; Mon, 7 May 2018 11:44:40 -0300 (-03) From: Carlos Santos To: buildroot@buildroot.org Date: Mon, 7 May 2018 11:44:26 -0300 Message-Id: <20180507144431.14488-1-casantos@datacom.ind.br> X-Mailer: git-send-email 2.14.3 Subject: [Buildroot] [PATCH v3 0/5] Improve verification of custom rootfs skeletons and overlays 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 Morin , Thomas De Schampheleire MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This series makes some improvements in the verification of custom rootfs skeletons and overlays, regarding mergerd /usr: Patch 1 adds a script to check if a given path complies to the merged /usr requirements and makes skeleton-custom.mk use it instead of a bunch of variables filled by $(shell ...) macros. Patch 2 ensures that /bin, /lib and /sbin are created for custom skeletons, either as directories or symlinks, according to BR2_ROOTFS_MERGED_USR. Patch 3 uses the script added in patch 1 to check rootfs overlays, in target-finalize. Patch 4 allows rootfs overlays to override symbolic links on purpose (e.g. /var/log, to persist system logs). Patch 5 removes the restriction of using merged /usr only with the default skeleton or when systemd is selected. Carlos Santos (5): skeleton-custom: use a script to check merged usr structure skeleton-custom: install /bin, /lib, and /sbin Makefile: check rootfs overlays with BR2_ROOTFS_MERGED_USR enabled Makefile: allow rootfs overlays to override symbolic links system: allow selecting merged /usr along with custom rootfs skeleton Makefile | 20 ++++++++++++--- docs/manual/customize-rootfs.txt | 17 +++++++++++++ package/skeleton-custom/skeleton-custom.mk | 25 +++---------------- support/scripts/check-merged-usr.sh | 39 ++++++++++++++++++++++++++++++ system/Config.in | 8 ++---- 5 files changed, 78 insertions(+), 31 deletions(-) create mode 100755 support/scripts/check-merged-usr.sh