From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 12 17:24:35 2021 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 To: guix-patches@gnu.org Subject: [PATCH] gnu: ddcutil: Patch kernel modules paths. 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-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit 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: -0.3 (/) 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 13 06:34:58 2021 Received: (at 48984) by debbugs.gnu.org; 13 Jun 2021 10:34:58 +0000 Received: from localhost ([127.0.0.1]:42716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsNSD-0006nR-Sv for submit@debbugs.gnu.org; Sun, 13 Jun 2021 06:34:58 -0400 Received: from tobias.gr ([80.241.217.52]:44310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsNSC-0006nH-7p for 48984@debbugs.gnu.org; Sun, 13 Jun 2021 06:34:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=YIaDrlaZlz35XFkBUStjc02d4BjLaYzQmjbX5Iu3xv8=; h=date:in-reply-to: subject:cc:to:from:references; b=PqsrSBFhpWn5dFZtCqcn5NcXCTYTw80aw0+53 U26qvUot4S/edJLpO2x4yoge6KZ6ToYvaIfYfDde1IsQMF5GrQS9pUINHsmTGgijgPBGKG QnE2loZJZV9qfQ/p3xY1jaQsGQj57rhTY7q5AXV3utRNg9d5QPYjRwG4tqduM5ZZHTXeuG HlEDEN5HGbWTBwSXhosliL/N8X+srSfrH1t5pR6n3hB6i1E+bK82LoLIHL3pYnp0iy4WP0 H9SPruYVM77z/FIc9c+VcNwWZVEeYyb5UN2CjOEy8zKql1Xp2cf0PF9NH5lWtOZycg0pTJ DLIrUkp+zXYbWwvxNE1IBzB5w== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 006858e6 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Sun, 13 Jun 2021 10:34:52 +0000 (UTC) References: <20210612212422.13271-1-brice@waegenei.re> From: Tobias Geerinckx-Rice To: Brice Waegeneire Subject: Re: [bug#48984] [PATCH] gnu: ddcutil: Patch kernel modules paths. In-reply-to: <20210612212422.13271-1-brice@waegenei.re> BIMI-Selector: v=BIMI1; s=default; Date: Sun, 13 Jun 2021 12:35:30 +0200 Message-ID: <87tum2xdal.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 48984 Cc: guix-patches@gnu.org, 48984@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.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Brice, Thanks for the patch! Does it affect more than =E2=80=98ddcutil=20 detect/environment=E2=80=99? Anything =E2=80=98real=E2=80=99? Working around one of many bugs in a broken diagnostic subtool=20 isn't worth maintaining a 32-line patch. Brice Waegeneire =E5=86=99=E9=81=93=EF=BC=9A > Without it "ddcutil detect" complain: =E2=80=9CModule i2c-dev is not=20 > loaded and > ddcutil can't determine if it is built into the kernel=E2=80=9D. With it, it still complains: ~ =CE=BB ddcutil detect Module i2c-dev is not loaded and not built into the kernel. ddcutil requires module i2c-dev It doesn't address the built-in case either, AFAICS. The very idea of ddcutil's linux_util.c is flawed and can't be=20 fixed: you don't look in /etc for the running kernel version; you=20 don't use that ill-gotten string to start scanning random system=20 directories for .ko files; you don't check for built-in modules by=20 looking for possibly installed build leftovers. None of that=20 makes sense. You ask kmod. You ask the kernel! Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYMXfcg0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW154yUA+gIzNLf8OQaN0K4cDWZG4lKvGh08oUm8NzhPuSoS Zp9XAP9ofj60PgwubFgHss4bcQnA0UYxEVIIUxs2BswdLh7rBg== =mmOo -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 13 09:07:14 2021 Received: (at 48984) by debbugs.gnu.org; 13 Jun 2021 13:07:14 +0000 Received: from localhost ([127.0.0.1]:42987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsPpa-0000oc-AL for submit@debbugs.gnu.org; Sun, 13 Jun 2021 09:07:14 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:59619) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsPpX-0000oK-J6 for 48984@debbugs.gnu.org; Sun, 13 Jun 2021 09:07:13 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D216E60002; Sun, 13 Jun 2021 13:07:04 +0000 (UTC) From: Brice Waegeneire To: Tobias Geerinckx-Rice Subject: Re: bug#48984: [PATCH] gnu: ddcutil: Patch kernel modules paths. References: <20210612212422.13271-1-brice@waegenei.re> <87tum2xdal.fsf@nckx> Date: Sun, 13 Jun 2021 15:07:01 +0200 In-Reply-To: <87tum2xdal.fsf@nckx> (Tobias Geerinckx-Rice's message of "Sun, 13 Jun 2021 12:35:30 +0200") Message-ID: <871r95gbgq.fsf_-_@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48984 Cc: 48984@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 (-) Tobias, Thank you for the review! Tobias Geerinckx-Rice writes: > Thanks for the patch! Does it affect more than =E2=80=98ddcutil > detect/environment=E2=80=99? Anything =E2=80=98real=E2=80=99? AFAIK no, this patch only get rid off that error message. > Working around one of many bugs in a broken diagnostic subtool isn't worth > maintaining a 32-line patch. Fair enough, it's just a stop gap until 1.1.1 is released tho. > Brice Waegeneire =E5=86=99=E9=81=93=EF=BC=9A >> Without it "ddcutil detect" complain: =E2=80=9CModule i2c-dev is not loa= ded and >> ddcutil can't determine if it is built into the kernel=E2=80=9D. > > With it, it still complains: > > ~ =CE=BB ddcutil detect > Module i2c-dev is not loaded and not built into the kernel. > ddcutil requires module i2c-dev It's not the same error. > It doesn't address the built-in case either, AFAICS. I wasn't clear enough in the git message. Here is the output wihtout that patch and with it: --8<---------------cut here---------------start------------->8--- $ modinfo i2c-dev | grep '^filename:' filename: (builtin) $ guix environment --ad-hoc ddcutil -- ddcutil detect Unable to read modules.builtin Module i2c-dev is not loaded and ddcutil can't determine if it is built int= o the kernel Display 1 [...] $ ./pre-inst-env guix environment --ad-hoc ddcutil -- ddcutil detect Display 1 [...] --8<---------------cut here---------------end--------------->8-- With a built-in i2c-dev module, this patch remove that pesky error message. > The very idea of ddcutil's linux_util.c is flawed and can't be fixed: you > don't look in /etc for the running kernel version; you don't use that > ill-gotten string to start scanning random system directories for .ko > files; you don't check for built-in modules by looking for possibly > installed build leftovers. None of that makes sense. You ask kmod. You > ask the kernel! I agreed it is flawed, but it was fixed by upstream in the 1.1.1-dev branch=C2=B9 by using libkmod as you are suggesting. I proposed that solut= ion to upstream some days ago in inssue #178=C2=B2; he implementeded right away. Since it's a development branch I tought it wasn't wise to update the package to the latest commit. Maybe you would you prefer such patch instead? =C2=B9 https://github.com/rockowitz/ddcutil/tree/1.1.1-dev =C2=B2 https://github.com/rockowitz/ddcutil/issues/178#issuecomment-8562971= 12 Cheers, - Brice From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 21 18:21:18 2022 Received: (at 48984-close) by debbugs.gnu.org; 21 Jan 2022 23:21:18 +0000 Received: from localhost ([127.0.0.1]:35317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nB3DZ-0001xs-Qs for submit@debbugs.gnu.org; Fri, 21 Jan 2022 18:21:17 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:56593) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nB3DX-0001xd-Mf for 48984-close@debbugs.gnu.org; Fri, 21 Jan 2022 18:21:16 -0500 Received: (Authenticated sender: brice@waegenei.re) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 30D40200005 for <48984-close@debbugs.gnu.org>; Fri, 21 Jan 2022 23:21:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=waegenei.re; s=gm1; t=1642807269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=eaq5SvQuBZElnlzsY4UdCww89WLCA7LCj4luRfwV1hc=; b=VpGHiw03JTzYIbMhVjjsQ4jj5OjwfB79h6UsMm0y+WZrLiUzIgjmucguXZFbPoFUQKqq5u p3M5lr3OZL9cwct4Gz+haLQiZuoP27bFnzuk6VTtybO2ZrbgIdOUvHZ1K++fLZJmcO4x/v gKkePKRb2JuBg1ug19MeYZRl07eXAqRz3Bsk84oWQZU21SazYj+umROxsW6V+xSFnbqj8m 4OYkT/TV3Tl4uAh4altUXUPqy4adsrEPCtFXNIPKUOsVsokhBNYwaPbHnZizYFAViJ+bap qeiF37VaViotZfWhXcY1Jk3rw8ngHLWjqe/7FPrILn+lEljyqEwew5Ae0dfhfw== From: Brice Waegeneire To: 48984-close@debbugs.gnu.org Subject: Re: bug#48984: [PATCH] gnu: ddcutil: Patch kernel modules paths. References: <20210612212422.13271-1-brice@waegenei.re> Date: Sat, 22 Jan 2022 00:21:05 +0100 In-Reply-To: <20210612212422.13271-1-brice@waegenei.re> (Brice Waegeneire's message of "Sat, 12 Jun 2021 23:24:22 +0200") Message-ID: <87o844smji.fsf@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48984-close 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 (-) Brice Waegeneire writes: > * 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. Upstream released a new version. This patch is superseded by . From unknown Wed Aug 20 00:02:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 19 Feb 2022 12:24:10 +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