From patchwork Fri Nov 4 05:49:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hilton Chain X-Patchwork-Id: 44290 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 22A9627BBEB; Fri, 4 Nov 2022 05:50:11 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 98F3E27BBE9 for ; Fri, 4 Nov 2022 05:50:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqpae-0005Vq-Ia; Fri, 04 Nov 2022 01:50:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqpac-0005Vh-WF for guix-patches@gnu.org; Fri, 04 Nov 2022 01:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oqpac-0007Ly-ND for guix-patches@gnu.org; Fri, 04 Nov 2022 01:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oqpac-0006YB-AS for guix-patches@gnu.org; Fri, 04 Nov 2022 01:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#59010] [PATCH] gnu: Add modprobed-db. Resent-From: Hilton Chain Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Nov 2022 05:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59010 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59010@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166754098425144 (code B ref -1); Fri, 04 Nov 2022 05:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2022 05:49:44 +0000 Received: from localhost ([127.0.0.1]:51417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqpaK-0006XU-HC for submit@debbugs.gnu.org; Fri, 04 Nov 2022 01:49:44 -0400 Received: from lists.gnu.org ([209.51.188.17]:40308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oqpaG-0006XK-Af for submit@debbugs.gnu.org; Fri, 04 Nov 2022 01:49:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqpaG-0005JF-5T for guix-patches@gnu.org; Fri, 04 Nov 2022 01:49:40 -0400 Received: from mail.boiledscript.com ([144.168.59.46]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqpaE-0007JD-BG for guix-patches@gnu.org; Fri, 04 Nov 2022 01:49:39 -0400 Date: Fri, 04 Nov 2022 13:49:16 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ultrarare.space; s=dkim; t=1667540973; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FvyoX0QFETvfdVY6elpNXZ6NnfmvujjQJsju4ZfGVl0=; b=Uyi5ei/3XrwGPYVUCxlPRg8LFb4Jr6DqvFGB9MEhRxzmqRLKZ2hCwf4cbBNxPR85cs6G3n Jcmzc0z7iJw69zfAHHjJ3N1wYmaDR4oHz8iTh8IDHLm2Tld7BEISKM3HGyh4791x7qpNIf jNPK9L3G3P8h+ln+itdct9vp0GTUcY+A8GbkYjlDz1LNp2epLQyud3/xkf6jjpqSv+CnrM jg84SG8jJl3qwmORTP33SW1ODqYIAIHOV9axmnkVLVeKo9MK9Qpoy45tSUYDFW+0ezpSTt 5YXscEbmzVWjJMe4ezdGU6hR1j/vmMZkzhPXD4/YPrtnFFQ7v7O3Og3jVsS7qw== Message-ID: MIME-Version: 1.0 Authentication-Results: mail.boiledscript.com; auth=pass smtp.mailfrom=hako@ultrarare.space X-Spamd-Bar: / Received-SPF: pass client-ip=144.168.59.46; envelope-from=hako@ultrarare.space; helo=mail.boiledscript.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Sender: "Guix-patches" Reply-to: Hilton Chain X-ACL-Warn: , Hilton Chain via Guix-patches X-Patchwork-Original-From: Hilton Chain via Guix-patches via From: Hilton Chain Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/linux.scm (modprobed-db): New variable. --- gnu/packages/linux.scm | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) base-commit: e3280ae8b5c4aaf28eb6de8406215927923a4dff diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 1690957954..5637511964 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -9512,3 +9512,64 @@ (define-public tp-smapi-module @acronym{SMAPI, System Management Application Program Interface} and direct access to the embedded controller.") (license license:gpl2+))) + +(define-public modprobed-db + (package + (name "modprobed-db") + (version "2.46") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/graysky2/modprobed-db") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "017w9czm31f5c7wjyrl5fy6cw7ji681jjc7s913nbc0r43j080qr")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;no tests + #:make-flags + #~(list (string-append "PREFIX=" #$output) + "INITDIR_SYSTEMD=no-thanks") + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-after 'install 'fix-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* (string-append #$output "/bin/modprobed-db") + (("/usr") #$output) + (((string-append "(" (string-join (list "awk" + "cp" + "cut" + "getent" + "grep" + "logname" + "md5sum" + "mkdir" + "mv" + "sed" + "sort" + "uniq" + "wc") + "|") ")") m) + (search-input-file inputs (string-append "/bin/" m))) + (("modprobe ") + (string-append + (search-input-file inputs "/bin/modprobe") " ")))))))) + (inputs (list coreutils kmod gawk glibc grep sed)) + (home-page "https://wiki.archlinux.org/index.php/Modprobed-db") + (synopsis "Keep track of EVERY kernel module that has ever been probed") + (description + "@code{Modprobed-db} is a useful utility for users wishing to build a +minimal kernel via a @code{make localmodconfig}. In a nutshell, this make +target creates a config based on the current config and a list of modules you +define (@code{modprobed-db} keeps for you). It then disables any module +option that is not needed thus not building hundreds/potentially thousands of +extraneous modules. This results in a system-specific, streamlined kernel +package and footprint as well as reduced compilation times. + +@code{Modprobed-db} simply logs every module ever probed on the target system +to a text-based database (@code{$XDG_CONFIG_HOME/modprobed-db}) which can be +read directly by @code{make localmodconfig} as described above.") + (license license:expat)))