From unknown Mon Aug 18 03:05:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43332 <43332@debbugs.gnu.org> To: bug#43332 <43332@debbugs.gnu.org> Subject: Status: [PATCH] build-system: linux-module: Delete some huge items that we probably don't need. Reply-To: bug#43332 <43332@debbugs.gnu.org> Date: Mon, 18 Aug 2025 10:05:38 +0000 retitle 43332 [PATCH] build-system: linux-module: Delete some huge items th= at we probably don't need. reassign 43332 guix-patches submitter 43332 Danny Milosavljevic severity 43332 normal tag 43332 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 07:07:43 2020 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 To: guix-patches@gnu.org Subject: [PATCH] build-system: linux-module: Delete some huge items that we probably don't need. 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-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * 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) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 07:46:51 2020 Received: (at 43332) by debbugs.gnu.org; 11 Sep 2020 11:46:51 +0000 Received: from localhost ([127.0.0.1]:42725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhVz-000336-1m for submit@debbugs.gnu.org; Fri, 11 Sep 2020 07:46:51 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:46750) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhVw-00032w-32 for 43332@debbugs.gnu.org; Fri, 11 Sep 2020 07:46:49 -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 5B65E3365399; Fri, 11 Sep 2020 13:46:46 +0200 (CEST) From: Danny Milosavljevic To: 43332@debbugs.gnu.org Subject: [PATCH v2] build-system: linux-module: Delete some huge items that we probably don't need. Date: Fri, 11 Sep 2020 13:46:43 +0200 Message-Id: <20200911114643.19958-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200911110735.8208-1-dannym@scratchpost.org> References: <20200911110735.8208-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43332 Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * 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 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.scm index 1077215671..14ff774fca 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -68,9 +68,37 @@ (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 + ;"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 + ;; Reinstate arch/**/dts since "scripts/dtc" depends on it. + ;; Reinstate arch/**/include directories. + ;; Reinstate arch/**/Makefile. + (for-each + (lambda (name) + (mkdir-p (dirname (string-append out-lib-build "/" name))) + (copy-recursively name + (string-append out-lib-build "/" name))) + (append (find-files "arch" "^(dts|include)$" #:directories? #t) + (find-files "arch" "Makefile"))) (let* ((linux (assoc-ref inputs "linux"))) (install-file (string-append linux "/System.map") out-lib-build) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 07:52:01 2020 Received: (at 43332) by debbugs.gnu.org; 11 Sep 2020 11:52:02 +0000 Received: from localhost ([127.0.0.1]:42729 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhaz-0003AV-KW for submit@debbugs.gnu.org; Fri, 11 Sep 2020 07:52:01 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:47216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhax-0003AF-IH for 43332@debbugs.gnu.org; Fri, 11 Sep 2020 07:51:59 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 81E3A336083C for <43332@debbugs.gnu.org>; Fri, 11 Sep 2020 13:51:58 +0200 (CEST) Date: Fri, 11 Sep 2020 13:51:57 +0200 From: Danny Milosavljevic To: 43332@debbugs.gnu.org Subject: Re: [PATCH v2] build-system: linux-module: Delete some huge items that we probably don't need. Message-ID: <20200911135157.20e8810a@scratchpost.org> In-Reply-To: <20200911114643.19958-1-dannym@scratchpost.org> References: <20200911110735.8208-1-dannym@scratchpost.org> <20200911114643.19958-1-dannym@scratchpost.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/a5gHO/YlXrzOVKB5fTMzw8n"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43332 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/a5gHO/YlXrzOVKB5fTMzw8n Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable v2 reduces the size of linux-module-builder to 176 MiB (from 255 MiB in v1). However, it needs to do some invasive stuff that is a little more difficult= to maintain than v1. With v2, the biggest remaining toplevel directories in linux-module-builder= are the following (including sizes in MB as first column): 6 ./lib/modules/build/arch/powerpc 6 ./lib/modules/build/include/uapi/linux 6 ./lib/modules/build/lib 6 ./lib/modules/build/scripts 7 ./lib/modules/build/arch/mips 8 ./lib/modules/build/arch/arm64/boot 8 ./lib/modules/build/arch/arm64/boot/dts 8 ./lib/modules/build/include/uapi 9 ./lib/modules/build/arch/arm64 11 ./lib/modules/build/kernel 13 ./lib/modules/build/tools 14 ./lib/modules/build/include/config 19 ./lib/modules/build/arch/arm/boot 19 ./lib/modules/build/arch/arm/boot/dts 22 ./lib/modules/build/include/linux 23 ./lib/modules/build/arch/arm 59 ./lib/modules/build/include 62 ./lib/modules/build/arch The total is 176 MiB. --Sig_/a5gHO/YlXrzOVKB5fTMzw8n Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9bZN0ACgkQ5xo1VCww uqXkDwf/d13DRznDqiGEx/3UnCR9v8jzqrnZ0f1sD6oY4lKhBSScgTs1/ZEQjEcU smm6HqSU0f3wKfB16+kzFdkk2zqoaSevSV9hNHOTyINQEHpXpPeI/hIQVzjP7nYA fqLqnnF4iTLDte5bitj/4qbZE+v4Fn54T289qC9hM3PW/dsqH7yYtCATynqBqGMG N5643AwEvBA6Oy027G6OranMFehwICLydXNeh0ZTgzQ9ULZXMmulACat3GEU6ae6 218GVtYTpTeYs7s/55YxNGOwnIgw8Y7ScxxNq8wgKVZGU4wiiOnqzVxjhceZfNDe 6wrERlPTZgTP72nWmb/gqcKGlL9Mhw== =QZLw -----END PGP SIGNATURE----- --Sig_/a5gHO/YlXrzOVKB5fTMzw8n-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 17:25:54 2020 Received: (at 43332) by debbugs.gnu.org; 13 Sep 2020 21:25:54 +0000 Received: from localhost ([127.0.0.1]:51945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHZVR-00067d-VX for submit@debbugs.gnu.org; Sun, 13 Sep 2020 17:25:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHZVP-00067N-Ls for 43332@debbugs.gnu.org; Sun, 13 Sep 2020 17:25:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38708) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHZVJ-0004CT-V0; Sun, 13 Sep 2020 17:25:45 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48038 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kHZVJ-0004l3-5t; Sun, 13 Sep 2020 17:25:45 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: [bug#43332] [PATCH] build-system: linux-module: Delete some huge items that we probably don't need. References: <20200911110735.8208-1-dannym@scratchpost.org> Date: Sun, 13 Sep 2020 23:25:35 +0200 In-Reply-To: <20200911110735.8208-1-dannym@scratchpost.org> (Danny Milosavljevic's message of "Fri, 11 Sep 2020 13:07:35 +0200") Message-ID: <874ko19xo0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43332 Cc: 43332@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi Danny, Danny Milosavljevic skribis: > * guix/build-system/linux-module.scm (make-linux-module-builder): Delete > some huge items that we probably don't need. Yay! I=E2=80=99m fine with either v1 or v2, with one nit: > + (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 "a= rch". > + ;"tools" ; 44 MB ; Note: is built by our 'build phas= e. > + "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 Usually the first argument to =E2=80=98map=E2=80=99 and =E2=80=98for-each= =E2=80=99 is on the same line: (for-each (lambda =E2=80=A6) If you=E2=80=99re afraid of hitting the 80 char limit or something, then I suggest defining a local procedure. Also, use =E2=80=98when=E2=80=99 instead of a one-arm =E2=80=98if=E2=80=99,= for clarity. Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 04:31:43 2020 Received: (at 43332-done) by debbugs.gnu.org; 14 Sep 2020 08:31:43 +0000 Received: from localhost ([127.0.0.1]:52436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHjtn-0003Sw-DN for submit@debbugs.gnu.org; Mon, 14 Sep 2020 04:31:43 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:43322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHjti-0003Si-Ac for 43332-done@debbugs.gnu.org; Mon, 14 Sep 2020 04:31:42 -0400 Received: from localhost (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 9CC5B3361AD1; Mon, 14 Sep 2020 10:31:36 +0200 (CEST) Date: Mon, 14 Sep 2020 10:30:51 +0200 From: Danny Milosavljevic To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Subject: Re: [bug#43332] [PATCH] build-system: linux-module: Delete some huge items that we probably don't need. Message-ID: <20200914103051.0c7d0e54@scratchpost.org> In-Reply-To: <874ko19xo0.fsf@gnu.org> References: <20200911110735.8208-1-dannym@scratchpost.org> <874ko19xo0.fsf@gnu.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/JKeEoiA0z2NI/iXU64LHb1/"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 43332-done Cc: 43332-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/JKeEoiA0z2NI/iXU64LHb1/ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Pushed v2 to guix master as commit 2be5c2652a5fd79089048905ff6be60d74244d7b. --Sig_/JKeEoiA0z2NI/iXU64LHb1/ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl9fKjsACgkQ5xo1VCww uqWCFAf7BvZLHMoHEBd3m+1QRAKLA1QhyFue+RavYREWCQW3vCPw0pF65246Tf9M Sgk7NyEjX+MCMZJYJF9psvyXX0zSyhricDCMnuqT0/OORa6O0/mPz/Ayor8lU2Qe HW51e7OdT+n4e4akoo6TlYjdVVoKXTBr+YzPz0geuO+LD4bTTQq9S8JQ3JPOlP9s zV22JHBEq1S3ZtTIMMSMbuQtpGn7VN8gE6+NsRy95W6lgeRrYtaTXJWBAU4OPxf6 HYWZgBOEAI7xFpfsFPXxy4puP1U5YM2UonqE3BlldavZ2lIDUkMFvjbegEYtMEO1 tAa0jcRbrePtoTG02HIQBtm/CHatVg== =ktHw -----END PGP SIGNATURE----- --Sig_/JKeEoiA0z2NI/iXU64LHb1/-- From unknown Mon Aug 18 03:05:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 12 Oct 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator