From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sGNqNplaW19rHgAA0tVLHw (envelope-from ) for ; Fri, 11 Sep 2020 11:08:09 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4LmoMJlaW1/IEgAA1q6Kng (envelope-from ) for ; Fri, 11 Sep 2020 11:08:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 86A689404C5 for ; Fri, 11 Sep 2020 11:08:09 +0000 (UTC) Received: from localhost ([::1]:43656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGguW-0005o7-H7 for larch@yhetil.org; Fri, 11 Sep 2020 07:08:08 -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 Content-Transfer-Encoding: 8bit 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-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: lzf3ToSmN/Ch * 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)