From patchwork Fri Sep 11 11:07:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 24002 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0144E27BBE8; Fri, 11 Sep 2020 12:08:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C74F027BBE7 for ; Fri, 11 Sep 2020 12:08:08 +0100 (BST) Received: from localhost ([::1]:43656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGguV-0005o7-QF for patchwork@mira.cbaines.net; Fri, 11 Sep 2020 07:08:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41650) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGguQ-0005o1-C8 for guix-patches@gnu.org; Fri, 11 Sep 2020 07:08:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59321) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGguQ-0006FL-3G for guix-patches@gnu.org; Fri, 11 Sep 2020 07:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGguP-0008Lp-VN for guix-patches@gnu.org; Fri, 11 Sep 2020 07:08:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43332] [PATCH] build-system: linux-module: Delete some huge items that we probably don't need. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 11 Sep 2020 11:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43332 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43332@debbugs.gnu.org Cc: Danny Milosavljevic X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159982246332073 (code B ref -1); Fri, 11 Sep 2020 11:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Sep 2020 11:07:43 +0000 Received: from localhost ([127.0.0.1]:42634 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGgu7-0008LF-1L for submit@debbugs.gnu.org; Fri, 11 Sep 2020 07:07:43 -0400 Received: from lists.gnu.org ([209.51.188.17]:37580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGgu6-0008L8-3Y for submit@debbugs.gnu.org; Fri, 11 Sep 2020 07:07:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGgu5-0005Ur-Ui for guix-patches@gnu.org; Fri, 11 Sep 2020 07:07:41 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:47082) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGgu3-0006Dq-GK for guix-patches@gnu.org; Fri, 11 Sep 2020 07:07:41 -0400 Received: from dayas.lan (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 67A0433687FB; Fri, 11 Sep 2020 13:07:36 +0200 (CEST) From: Danny Milosavljevic Date: Fri, 11 Sep 2020 13:07:35 +0200 Message-Id: <20200911110735.8208-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Tags: patch Received-SPF: none client-ip=85.13.145.193; envelope-from=dannym@scratchpost.org; helo=dd26836.kasserver.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/11 07:07:37 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/build-system/linux-module.scm (make-linux-module-builder): Delete some huge items that we probably don't need. --- guix/build-system/linux-module.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index 1077215671..ba47817596 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -68,9 +68,27 @@ (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (out-lib-build (string-append out "/lib/modules/build"))) + ;; Delete some huge items that we probably don't need. ;; TODO: Only preserve the minimum, i.e. [Kbuild], Kconfig, ;; scripts, include, ".config". (copy-recursively "." out-lib-build) + (for-each + (lambda (name) + (if (file-exists? name) + (delete-file-recursively name))) + (map + (lambda (name) + (string-append out-lib-build "/" name)) + '(;"arch" ; 137 MB ; Note: "scripts/dtc" depends on "arch". + ;"tools" ; 44 MB ; Note: is built by our 'build phase. + "tools/testing" ; 14 MB + "tools/perf" ; 17 MB + "drivers" ; 600 MB + "Documentation" ; 52 MB + "fs" ; 43 MB + "net" ; 33 MB + "samples" ; 2 MB + "sound"))) ; 40 MB (let* ((linux (assoc-ref inputs "linux"))) (install-file (string-append linux "/System.map") out-lib-build)