From patchwork Sat Mar 31 09:06:01 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: 893746 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.133; helo=hemlock.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="EBKh1HdQ"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40Ct0D1LNRz9s1S for ; Sat, 31 Mar 2018 20:06:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8D5F984043; Sat, 31 Mar 2018 09:06:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cx5gSlWmjSbG; Sat, 31 Mar 2018 09:06:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 8BA0E8ADEF; Sat, 31 Mar 2018 09:06:36 +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 D76871C062E for ; Sat, 31 Mar 2018 09:06:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id D23D289200 for ; Sat, 31 Mar 2018 09:06:24 +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 CKdU6D2Udwz4 for ; Sat, 31 Mar 2018 09:06:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by fraxinus.osuosl.org (Postfix) with ESMTPS id E5C0A8922B for ; Sat, 31 Mar 2018 09:06:23 +0000 (UTC) Received: by mail-wr0-f172.google.com with SMTP id f14so9604300wre.8 for ; Sat, 31 Mar 2018 02:06:23 -0700 (PDT) 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=5jsYfsHFUakbsa9Vc7fAKYYbrDxGkDiggZHlLboNsmA=; b=EBKh1HdQNe2/VbjwDatBCNIlCfgQGR8wOn+sKJ+tm0GsQr9oxvxj8gB0BobgpFxsxa GVKe9l3Sppf8BQdWVSnVnGHsUcIwOs35wPcPMeegPcLUX5/vkdjqnYQHg+kKes4r/UDt jEz4rgSfP8lq6iTRhtxMNufHRG3wtY2fLexDZk/vYE+y9xcm7MMxDgJmodKRAJ8BVNwV d6nuS/JvCi9qVzu7d3v2igJoblAKfZDeE+fYo0jRx13r7dQScklWn0rXk8PjPrxZGcUO GImIAUqIBXe1/sn8C5qbSpNfA2or6NqjK4SHYQ/zkX+iPmaNEEryTxZHzJ7ClBFojvvd 95qQ== 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=5jsYfsHFUakbsa9Vc7fAKYYbrDxGkDiggZHlLboNsmA=; b=qrAuQZ34JlD5nmI0DtV4a78ZZwblT4IYb2A62QULbtwVKnjSLxdc0WPC/VxZ+U+Sx8 maNT1y19upnr9j56zLjzt7OVGuHQwGDj8Tq0gEDaHBeatszAQg5LM9zgJ3fDaIa5ye2M Y6GjTHc2Q4qbCm8Pj3i3waWiEhfvlLhIlI0W6ID8Pv3YTLfuvGAIotVdbqyw9E2rgPZ2 UrZfik2/x8S8IbeoDufsmkxEy/Osz9j2HygClEcJlsgrE/JxTr5LEJzi1KCQAdn44WRI LLPlmgq9Qrj3qrEoduJTSx1qvMKWRvBqQKOKQUJoldjVyYDYW1VVMugnCPWl+tMG64vK 6KhA== X-Gm-Message-State: AElRT7HxYIpToeTlTo7LRaFLQs4RZ9l1t36cfYvEh8/E7qqfr4JMyML7 S7TNZmWZbxN85yyUZQaLxuZZYA== X-Google-Smtp-Source: AIpwx4/cZreh12+7XWcjXEhXwe+0lPrBQr+V+/HFHV3nOmks0CJ0/v7GOHf7RaKkAumaNu4zeMwMNA== X-Received: by 10.223.159.79 with SMTP id f15mr1524160wrg.115.1522487182173; Sat, 31 Mar 2018 02:06:22 -0700 (PDT) Received: from scaer.online.net (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id u110sm18111490wrc.72.2018.03.31.02.06.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 31 Mar 2018 02:06:21 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Sat, 31 Mar 2018 11:06:01 +0200 Message-Id: X-Mailer: git-send-email 2.14.1 In-Reply-To: References: Subject: [Buildroot] [PATCH 15/15 v4] fs: remove intermediate artefacts 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" Each of the intermediate, per-rootfs target directories, as well as the intermediate tarball, can take quite some place, and is mostly a duplication of what's already in target/. The only delta, if any, would be the tweaks made by the filesystem image generations, but those tweaks are most probably only meaningfull when seen as root. We normally do not remove intermediate files, but those can be quite large, and are not directly usable by, nor accessible to the user. So, get rid of them once the filesystem has been generated. This does not need to be done in fakeroot. Signed-off-by: "Yann E. MORIN" Cc: Thomas Petazzoni Cc: Arnout Vandecappelle Tested-by: Matt Weber --- Makefile | 1 + fs/common.mk | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 9fba7a3ed8..96c2d200a3 100644 --- a/Makefile +++ b/Makefile @@ -756,6 +756,7 @@ endif .PHONY: target-post-image target-post-image: $(TARGETS_ROOTFS) target-finalize + @rm -f $(ROOTFS_COMMON_TAR) @$(foreach s, $(call qstrip,$(BR2_ROOTFS_POST_IMAGE_SCRIPT)), \ $(call MESSAGE,"Executing post-image script $(s)"); \ $(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep)) diff --git a/fs/common.mk b/fs/common.mk index bacc98ec68..2ee130ee08 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -96,6 +96,7 @@ endif $(call PRINTF,$(ROOTFS_COMMON_TAR_CMD)) >> $(FAKEROOT_SCRIPT) chmod a+x $(FAKEROOT_SCRIPT) PATH=$(BR_PATH) $(HOST_DIR)/bin/fakeroot -- $(FAKEROOT_SCRIPT) + $(Q)rm -rf $(TARGET_DIR) rootfs-common-show-depends: @echo $(ROOTFS_COMMON_DEPENDENCIES) @@ -154,6 +155,7 @@ $$(BINARIES_DIR)/rootfs.$(1): $$(ROOTFS_$(2)_DEPENDENCIES) $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT) chmod a+x $$(FAKEROOT_SCRIPT) PATH=$$(BR_PATH) $$(HOST_DIR)/bin/fakeroot -- $$(FAKEROOT_SCRIPT) + $(Q)rm -rf $$(TARGET_DIR) ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),) PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT) endif