From patchwork Fri Jun 5 22:48:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1304433 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=crQbvyAA; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49dyXB0G7Qz9sRR for ; Sat, 6 Jun 2020 08:50:01 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 3DB4587367; Fri, 5 Jun 2020 22:49:59 +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 FdN4bZaRS7_o; Fri, 5 Jun 2020 22:49:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 88CF187344; Fri, 5 Jun 2020 22:49:57 +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 1B0211BF9C1 for ; Fri, 5 Jun 2020 22:49:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0F5D725AB7 for ; Fri, 5 Jun 2020 22:49:54 +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 UWEEDKWuODbr for ; Fri, 5 Jun 2020 22:49:52 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by silver.osuosl.org (Postfix) with ESMTPS id B2C0A25A72 for ; Fri, 5 Jun 2020 22:49:51 +0000 (UTC) Received: by mail-ej1-f42.google.com with SMTP id k11so11797354ejr.9 for ; Fri, 05 Jun 2020 15:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P2HLW9vUZu2MSkcmSjtff+e1jy4/ZwCBAdoxbjPSEZs=; b=crQbvyAAo1RDajJ1SVcxE+A6/NIpMZ3QIK/BSzMzL59YdgKdJR+Kkn/B8Sek/LE65H +sQoB5+BLl3mwuU2ulUIRRyBfOc0djkB+8MPwWUkHVhE1jm0KwnbOL/8jpTOH9/tehQ4 ulD7UuJMjfMTmlfaClMRLW75FNYeHvznrYoDKHVQuOEqRHMs2V9raglvDRs+Ndepuv07 vlEPAz2NKsEl9ZrHlt3vJPCQx1hVxCP1f4dgn+5rRHXsSUyPl4SHwVJiSvicyZf2JwkQ CNGTao7BEKJ/M4+ayZg0L06+iQJo4LXPeT+qA0VXwVO2GtJfNZ04HZsvOP33rHTGyLq3 qEyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=P2HLW9vUZu2MSkcmSjtff+e1jy4/ZwCBAdoxbjPSEZs=; b=lQ0K6rt16GKemlr98FDJxRoIOcwA4Ka2rIRuqypksUslfLj1VosEMIBSnnN2xHmRUg 3m2fkWlzSxJyNlHgLBNRj0czLy05VRIstlXNbKXV/n02x2U5oEKM7Cyep3tE0ep3qyQD sf9weumyjJ2J1iTYg/CNpVjRCJElEfMl26r8eOBEXvmZAx+Gvfv8RI9v4gGc5VNWM3SI WL2HazKRqwmiL4opjP/qw097wxrXrf2lzAjqPKfQhympxq0/En5CMoQTYEvUf2W1a0zm D4cj83TkgGfmWmOlC7PIJVzkVPDDEn78o6jJsOiy0KB1t5J5pplyJy9pyGXlgVVcMWU4 wSeg== X-Gm-Message-State: AOAM5327yywrdt//w7gHmXrmePWn3pbn1CdadeRZB9DP+FtmC6o/K7sZ 26gSm9vUbV8xfnZ2bA0/I2sEKuW6MRo= X-Google-Smtp-Source: ABdhPJykXFnN5W5TlqsJKpS/EjI82discW9dEWd2S9E1Y1YKwt7xKETsx90KG0CRjxeXsd0YI7VuVg== X-Received: by 2002:a17:906:4ec1:: with SMTP id i1mr8391299ejv.152.1591397389774; Fri, 05 Jun 2020 15:49:49 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id j3sm5891830edr.87.2020.06.05.15.49.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:49:49 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Sat, 6 Jun 2020 00:48:56 +0200 Message-Id: <20200605224858.12870-1-nolange79@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] Makefile: remove /usr/lib/rpm directory on target X-BeenThere: buildroot@busybox.net 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 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" this is only relevant for staging (if at all) Signed-off-by: Norbert Lange --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ce1c08a6f6..6a76e87b5e 100644 --- a/Makefile +++ b/Makefile @@ -748,7 +748,7 @@ target-finalize: $(PACKAGES) $(TARGET_DIR) host-finalize rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \ $(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \ $(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake \ - $(TARGET_DIR)/usr/doc + $(TARGET_DIR)/usr/lib/rpm $(TARGET_DIR)/usr/doc find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f find $(TARGET_DIR)/lib/ $(TARGET_DIR)/usr/lib/ $(TARGET_DIR)/usr/libexec/ \ \( -name '*.a' -o -name '*.la' -o -name '*.prl' \) -print0 | xargs -0 rm -f From patchwork Fri Jun 5 22:48:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1304432 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=pXIyIMFx; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49dyX74KkYz9sRR for ; Sat, 6 Jun 2020 08:49:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0951D88CEA; Fri, 5 Jun 2020 22:49:57 +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 QooixrmIMpqz; Fri, 5 Jun 2020 22:49:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id AB0DC88D58; Fri, 5 Jun 2020 22:49:55 +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 E9E551BF3A9 for ; Fri, 5 Jun 2020 22:49:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E169687344 for ; Fri, 5 Jun 2020 22:49:53 +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 z1nIF-UCfWGW for ; Fri, 5 Jun 2020 22:49:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ej1-f65.google.com (mail-ej1-f65.google.com [209.85.218.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 3E6748730F for ; Fri, 5 Jun 2020 22:49:53 +0000 (UTC) Received: by mail-ej1-f65.google.com with SMTP id z5so11818539ejb.3 for ; Fri, 05 Jun 2020 15:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wtwFQvz7UQQXpy6UEOpAO4LAq2obHk8uQNiABGXg/G8=; b=pXIyIMFxX44TJigLGNM2YKHwctYO+dgrBeaE5F10xwSvC9DPzv5J4q4kw1T8YjR4D5 0ATkAw4smOhEDMnQLkANA8JJmvDtbXz1NvIVN/y2JN2+66I5//bDS49PDb4t3DJD8JJi T5Dz0GvwMzdL207HrE1KHsPqOhtkQ8p652kBq8+WzvwXmEvG84UJSCtshveB6gEfOUdK xbEzGl5EUnL3v1ehWJpBq13WijrPCPTuPWSf+t7Pyrnrr9Jo3ZNK6zr7cW2Nhc0lVbgl 9ig4wh1wjyc9zlN7zb3LOT1BjaAwCkLDU7Y2PQ2m8GRihLqxUAbs0os0rYoNwPn2nzTM 6h8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wtwFQvz7UQQXpy6UEOpAO4LAq2obHk8uQNiABGXg/G8=; b=qG3GdSZBJMSXh0FwTFy4pwkSqJahd5ANEKnQ29gdleLZJTAESA+dotLE6cmD2ki9xG S5+vFCFUeflvcmpVkIFHnLD1jBrCYZdv1dyTnfYVB5esXQoYbHcVWOpBuflVLgXsfWPJ TdmvNE8q+d1kioV7PXEKG4Cc4KgocHMoxiqUNIi+v3Hja8fD7ti5BjO5zBRGCBIaRp0i XFnYzsTOPjkfu8pSgwCMy679jjuV7gqr3IQX8f/YwizWSLpCfXiKw8NvUiDqmkLHDycA ATqqoB3c0zyCplbkZfqCbp5X6noGn5HKAXzDWBNt98kn96UUaiYF8+NBgn6aeXokvQHR 4CgA== X-Gm-Message-State: AOAM532npyiVNCexIYskOIGHN8eLv2gLQd601owb1Dc+XjBeSAgDjUr2 mZ2TBx49tMuR/6btSblpq2UFyNOD1AE= X-Google-Smtp-Source: ABdhPJz+O+HM6cXB/uqWEteMiSOfRvhPxDG36Y0oLas3Q1Hn88gCSbEKqZCyq9FtMhQuxPyPgzSLjw== X-Received: by 2002:a17:906:2a4d:: with SMTP id k13mr11378607eje.253.1591397391328; Fri, 05 Jun 2020 15:49:51 -0700 (PDT) Received: from localhost.localdomain (84-114-45-16.cable.dynamic.surfer.at. [84.114.45.16]) by smtp.gmail.com with ESMTPSA id j3sm5891830edr.87.2020.06.05.15.49.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 15:49:50 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Sat, 6 Jun 2020 00:48:57 +0200 Message-Id: <20200605224858.12870-2-nolange79@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200605224858.12870-1-nolange79@gmail.com> References: <20200605224858.12870-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] fs: clean the volatile /run and /tmp directories X-BeenThere: buildroot@busybox.net 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 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Scripts in the fakeroot environment could call tools preparing the early environment, leaving traces in /run or /tmp. mkusers might create home directories in /run for example. Signed-off-by: Norbert Lange --- fs/common.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/common.mk b/fs/common.mk index 842ea924a5..a5c6b4ea96 100644 --- a/fs/common.mk +++ b/fs/common.mk @@ -171,6 +171,7 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES) $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),\ $$(call PRINTF,$$($$(hook))) >> $$(FAKEROOT_SCRIPT)$$(sep)) + echo "rm -rf $$(TARGET_DIR)/run/* $$(TARGET_DIR)/run/.[^.]* $$(TARGET_DIR)/tmp/* $$(TARGET_DIR)/tmp/.[^.]*" >> $$(FAKEROOT_SCRIPT) $$(call PRINTF,$$(ROOTFS_REPRODUCIBLE)) >> $$(FAKEROOT_SCRIPT) $$(call PRINTF,$$(ROOTFS_$(2)_CMD)) >> $$(FAKEROOT_SCRIPT) chmod a+x $$(FAKEROOT_SCRIPT)