From patchwork Sat Jun 12 21:24:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 30198 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 9CF7B27BC83; Sat, 12 Jun 2021 22:25:14 +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,SPF_HELO_PASS,URIBL_BLOCKED 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 8636027BC81 for ; Sat, 12 Jun 2021 22:25:12 +0100 (BST) Received: from localhost ([::1]:57208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsB7v-0005J3-AO for patchwork@mira.cbaines.net; Sat, 12 Jun 2021 17:25:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsB7n-0005HB-55 for guix-patches@gnu.org; Sat, 12 Jun 2021 17:25:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58932) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsB7m-0002MF-Ts for guix-patches@gnu.org; Sat, 12 Jun 2021 17:25:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsB7m-0008R4-Rm for guix-patches@gnu.org; Sat, 12 Jun 2021 17:25:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48984] [PATCH] gnu: ddcutil: Patch kernel modules paths. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Jun 2021 21:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48984 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48984@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162353307532328 (code B ref -1); Sat, 12 Jun 2021 21:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 Jun 2021 21:24:35 +0000 Received: from localhost ([127.0.0.1]:42234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsB7E-0008P8-I3 for submit@debbugs.gnu.org; Sat, 12 Jun 2021 17:24:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:44658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsB7D-0008Or-42 for submit@debbugs.gnu.org; Sat, 12 Jun 2021 17:24:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34428) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsB7C-0005Fa-Tv for guix-patches@gnu.org; Sat, 12 Jun 2021 17:24:26 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:44205) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsB7A-0001zY-Vi for guix-patches@gnu.org; Sat, 12 Jun 2021 17:24:26 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5971A20002 for ; Sat, 12 Jun 2021 21:24:22 +0000 (UTC) From: Brice Waegeneire Date: Sat, 12 Jun 2021 23:24:22 +0200 Message-Id: <20210612212422.13271-1-brice@waegenei.re> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.200; envelope-from=brice@waegenei.re; helo=relay7-d.mail.gandi.net 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Without it "ddcutil detect" complain: “Module i2c-dev is not loaded and ddcutil can't determine if it is built into the kernel”. * gnu/packages/patches/ddcutil-modules-location.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/hardware.scm (ddcutil)[source]: Apply it. --- gnu/local.mk | 1 + gnu/packages/hardware.scm | 6 ++-- .../patches/ddcutil-modules-location.patch | 32 +++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/ddcutil-modules-location.patch diff --git a/gnu/local.mk b/gnu/local.mk index 26b3e86e22..aa06cac37f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -941,6 +941,7 @@ dist_patch_DATA = \ %D%/packages/patches/dbus-CVE-2020-12049.patch \ %D%/packages/patches/dbus-c++-gcc-compat.patch \ %D%/packages/patches/dbus-c++-threading-mutex.patch \ + %D%/packages/patches/ddcutil-modules-location.patch \ %D%/packages/patches/dbxfs-remove-sentry-sdk.patch \ %D%/packages/patches/debops-constants-for-external-program-names.patch \ %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \ diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm index ecbcca79b1..0612e4a068 100644 --- a/gnu/packages/hardware.scm +++ b/gnu/packages/hardware.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen -;;; Copyright © 2020 Brice Waegeneire +;;; Copyright © 2020, 2021 Brice Waegeneire ;;; Copyright © 2021 Evgeny Pisemsky ;;; Copyright © 2021 Léo Le Bouter ;;; @@ -21,6 +21,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages hardware) + #:use-module (gnu packages) #:use-module (gnu packages admin) #:use-module (gnu packages autotools) #:use-module (gnu packages bash) @@ -68,7 +69,8 @@ (uri (string-append "https://www.ddcutil.com/tarballs/" "ddcutil-" version ".tar.gz")) (sha256 - (base32 "19kkwb9ijzn6ya3mvjanggh1c96fcc0lkbk7xnyi2qp6wsr4nhxp")))) + (base32 "19kkwb9ijzn6ya3mvjanggh1c96fcc0lkbk7xnyi2qp6wsr4nhxp")) + (patches (search-patches "ddcutil-modules-location.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/ddcutil-modules-location.patch b/gnu/packages/patches/ddcutil-modules-location.patch new file mode 100644 index 0000000000..c36fe5f2d7 --- /dev/null +++ b/gnu/packages/patches/ddcutil-modules-location.patch @@ -0,0 +1,32 @@ +From https://github.com/NixOS/nixpkgs/blob/nixos-21.05/pkgs/tools/misc/ddcutil/nixos-paths.diff + +--- a/src/util/linux_util.c ++++ b/src/util/linux_util.c +@@ -125,6 +125,7 @@ + "lib64", + "lib32", + "usr/lib", // needed for arch? ++ "run/booted-system/kernel/lib", // Guix System + NULL}; + int result = -1; + int ndx = 0; +@@ -204,14 +205,15 @@ + if (debug) + printf("(%s) machine: %s", __func__, utsbuf.machine); + +- char * libdirs[3]; ++ char * libdirs[4]; + libdirs[0] = "lib"; ++ libdirs[1] = "run/booted-system/kernel/lib"; + if (streq(utsbuf.machine, "amd_64")){ +- libdirs[1] = "lib64"; +- libdirs[2] = NULL; ++ libdirs[2] = "lib64"; ++ libdirs[3] = NULL; + } + else +- libdirs[1] = NULL; ++ libdirs[2] = NULL; + + int libsndx = 0; + bool found = false;