From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CDw5BUYDxmD10AAAgWs5BA (envelope-from ) for ; Sun, 13 Jun 2021 15:08:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KFPyAEYDxmAKRQAAB5/wlQ (envelope-from ) for ; Sun, 13 Jun 2021 13:08:22 +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 5C0C312833 for ; Sun, 13 Jun 2021 15:08:21 +0200 (CEST) Received: from localhost ([::1]:35456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsPqe-0000p1-3X for larch@yhetil.org; Sun, 13 Jun 2021 09:08:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsPqN-0000of-28 for guix-patches@gnu.org; Sun, 13 Jun 2021 09:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59674) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsPqM-0002TW-OM for guix-patches@gnu.org; Sun, 13 Jun 2021 09:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lsPqM-0000pk-I4 for guix-patches@gnu.org; Sun, 13 Jun 2021 09:08: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: Sun, 13 Jun 2021 13:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48984 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 48984@debbugs.gnu.org Received: via spool by 48984-submit@debbugs.gnu.org id=B48984.16235896343143 (code B ref 48984); Sun, 13 Jun 2021 13:08:02 +0000 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 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-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=1623589701; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=2A5NxCogd7/Mqr++K2WYFnFwGOgiIfh6pMW+uSN6ik8=; b=Sb5bka34kxxKxgnzwWe299meq8s63rXZ7MXOGVFkgpZhA2zicb/xIJLhVQVpfonZKvQGJq Bk2uwRnIrtyFG13l2xiv8EiXfroWoAuA8/dIejJkC69eHXRhhSMjFWD75EgEXlyxbmtJMX kkGqQYDgPrW2CB5rnW0NJ/B1xOZZx0yvlvbNSg5h8cm7hdXmLCcOIcwH8nyhHW4qn9jO07 jVMs7vdOzq8SrUppqIliQOOJZnvWW5SauadtaMbTclz705V0MQmBBusSdobgZO1D79gtQH 3uMcbN5WP5UWbwhfd2rW/yBY2/20c16TzX5p35mn/iTA7dYCY5yl+GHmrwmT2A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1623589701; a=rsa-sha256; cv=none; b=Zyj314sviHeh5+UObN6JUDrrcDFg1wgKKTAsejds277Ceh0PeTMDn/dsfo+y5TARM2eqwI rCf9MvK7IptujWT1v4ieug6QMNBt6tT4OcxGnezUcTQR2sO6A3RzIor4wjhX3z+XXKgdGm VJPI6+Blr6d/138LXMKWT5ByO2CNFVyiwKpmvansxFh96QtFOANwKw5esIJbYzPsE6VHOq 16rFEv5q9e6hrVNh0Mc3cI/ID4v4DQMWUxbsd+P2KauES68gQQfPC3zNp15vQrsXA3Rl95 WYLPJJnMFenvwlTArdyR6mfj6AvBPxtdvQBTt7RTMYy96y+/btOlXpB98b3mYg== 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: -2.42 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: 5C0C312833 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: n/d6EGDe/eH0 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