From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kM5COzkmxWDu4QAAgWs5BA (envelope-from ) for ; Sat, 12 Jun 2021 23:25:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4F+TNjkmxWC8OgAAbx9fmQ (envelope-from ) for ; Sat, 12 Jun 2021 21:25:13 +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 96E332DD7F for ; Sat, 12 Jun 2021 23:25:13 +0200 (CEST) Received: from localhost ([::1]:57208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsB7w-0005J3-KU for larch@yhetil.org; Sat, 12 Jun 2021 17:25:12 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1623533113; h=from:from:sender:sender: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:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=r3JBI1wx42vOQomYNDVe15Mgp0g6I/s2s/2bN+pRIto=; b=Fs7bvq82RvrWUhUfNOUFOvVGUw/iwOmN7HgtMz3XFiCTPQnsrO2/KKQ80efF4nOcljG0z3 1UH0deBmGud9PUXAKp+bqIQ9HdeleqikAmQhHeOoIkHLzag3JvvvKWO5AB1Kb6a2ovHt9R Qpd63kigDgBGGzrgzledhdLwGNHhz1epXA7J3xN+w7+sa16+7yiA7Z4jeggZG/2JPIBvrg H61Vy0DvEEOvVnAYjEk+jEJMaV9nBNfs4Uz/MxQABD1I8VKohfx+MWcr2jIU1/gw8bujm9 a6mb1nVAJBRfrQ05kVeZgelLsl/AcHCmasVPFnjYBbZ77WmLMTbewQdsTRa8zg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623533113; a=rsa-sha256; cv=none; b=RhyY43+brrmMAeeieQ3qWMx89KHZm8V6PI7UAyaZRBCPcNqlyMO4psUvUGhhHv58FNpty7 lIkg/w6Cl25zedhg9Zzko/lLXjxVPDFEXsNI4A1PsyBt5OdIwwL3BicFD7agUXL8zWQRIu 2ppRAIwUPpnR8ZACvXlwfNSr+3b/erfoGsliEQLe/5Ju+t9aX33G0S9qBwPA6dgxtOfQc2 pJlpeOb94NJyVHxIO8LCKMMPaZeLNzYkZrycV2stqpghw7MQEZSup3gQxV+VuuTVVOWj1o CB6XWaOVvsWysrJZyYkSlrQdNyvUI79KzKPGW557L4rYTnfenS6iwSDrXhqA+Q== ARC-Authentication-Results: i=1; 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-Migadu-Spam-Score: 0.07 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-Migadu-Queue-Id: 96E332DD7F X-Spam-Score: 0.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: cY3yW4rMSkoG 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; -- 2.31.1