GNU bug report logs - #48984
[PATCH] gnu: ddcutil: Patch kernel modules paths.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Brice Waegeneire <brice@HIDDEN>; Keywords: patch; dated Sat, 12 Jun 2021 21:25:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 48984 <at> debbugs.gnu.org:


Received: (at 48984) by debbugs.gnu.org; 13 Jun 2021 13:07:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 09:07:14 2021
Received: from localhost ([127.0.0.1]:42987 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lsPpa-0000oc-AL
	for submit <at> 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 <brice@HIDDEN>) id 1lsPpX-0000oK-J6
 for 48984 <at> debbugs.gnu.org; Sun, 13 Jun 2021 09:07:13 -0400
Received: (Authenticated sender: brice@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id D216E60002;
 Sun, 13 Jun 2021 13:07:04 +0000 (UTC)
From: Brice Waegeneire <brice@HIDDEN>
To: Tobias Geerinckx-Rice <me@HIDDEN>
Subject: Re: bug#48984: [PATCH] gnu: ddcutil: Patch kernel modules paths.
References: <20210612212422.13271-1-brice@HIDDEN> <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_-_@HIDDEN>
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 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Tobias,

Thank you for the review!

Tobias Geerinckx-Rice <me@HIDDEN> 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




Information forwarded to guix-patches@HIDDEN:
bug#48984; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Jun 2021 10:35:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 06:35:02 2021
Received: from localhost ([127.0.0.1]:42719 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lsNSI-0006ns-45
	for submit <at> debbugs.gnu.org; Sun, 13 Jun 2021 06:35:02 -0400
Received: from lists.gnu.org ([209.51.188.17]:46920)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1lsNSH-0006nb-4r
 for submit <at> debbugs.gnu.org; Sun, 13 Jun 2021 06:35:01 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43496)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1lsNSG-0000Ku-TO
 for guix-patches@HIDDEN; Sun, 13 Jun 2021 06:35:00 -0400
Received: from tobias.gr ([2a02:c205:2020:6054::1]:49434)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1lsNSE-000635-Vy
 for guix-patches@HIDDEN; Sun, 13 Jun 2021 06:35:00 -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@HIDDEN>
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Brice Waegeneire <brice@HIDDEN>
Subject: Re: [bug#48984] [PATCH] gnu: ddcutil: Patch kernel modules paths.
In-reply-to: <20210612212422.13271-1-brice@HIDDEN>
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"
Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@HIDDEN;
 helo=tobias.gr
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_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: guix-patches@HIDDEN, 48984 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
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-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#48984; Package guix-patches. Full text available.

Message received at 48984 <at> debbugs.gnu.org:


Received: (at 48984) by debbugs.gnu.org; 13 Jun 2021 10:34:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 13 06:34:58 2021
Received: from localhost ([127.0.0.1]:42716 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lsNSD-0006nR-Sv
	for submit <at> 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 <me@HIDDEN>) id 1lsNSC-0006nH-7p
 for 48984 <at> 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@HIDDEN>
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Brice Waegeneire <brice@HIDDEN>
Subject: Re: [bug#48984] [PATCH] gnu: ddcutil: Patch kernel modules paths.
In-reply-to: <20210612212422.13271-1-brice@HIDDEN>
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@HIDDEN, 48984 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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-----
--=-=-=--




Information forwarded to guix-patches@HIDDEN:
bug#48984; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Jun 2021 21:24:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 12 17:24:35 2021
Received: from localhost ([127.0.0.1]:42234 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lsB7E-0008P8-I3
	for submit <at> 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 <brice@HIDDEN>) id 1lsB7D-0008Or-42
 for submit <at> 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 <brice@HIDDEN>) id 1lsB7C-0005Fa-Tv
 for guix-patches@HIDDEN; 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 <brice@HIDDEN>) id 1lsB7A-0001zY-Vi
 for guix-patches@HIDDEN; Sat, 12 Jun 2021 17:24:26 -0400
Received: (Authenticated sender: brice@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5971A20002
 for <guix-patches@HIDDEN>; Sat, 12 Jun 2021 21:24:22 +0000 (UTC)
From: Brice Waegeneire <brice@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: ddcutil: Patch kernel modules paths.
Date: Sat, 12 Jun 2021 23:24:22 +0200
Message-Id: <20210612212422.13271-1-brice@HIDDEN>
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@HIDDEN;
 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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
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 <me@HIDDEN>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@HIDDEN>
-;;; Copyright © 2020 Brice Waegeneire <brice@HIDDEN>
+;;; Copyright © 2020, 2021 Brice Waegeneire <brice@HIDDEN>
 ;;; Copyright © 2021 Evgeny Pisemsky <evgeny@HIDDEN>
 ;;; Copyright © 2021 Léo Le Bouter <lle-bout@HIDDEN>
 ;;;
@@ -21,6 +21,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (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





Acknowledgement sent to Brice Waegeneire <brice@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#48984; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 13 Jun 2021 13:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.