GNU bug report logs - #57537
[PATCH] gnu: Add ec

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: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>; Keywords: patch; dated Fri, 2 Sep 2022 02:03:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 57537) by debbugs.gnu.org; 24 Sep 2022 13:28:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 24 09:28:48 2022
Received: from localhost ([127.0.0.1]:42730 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oc5D6-0004B2-CB
	for submit <at> debbugs.gnu.org; Sat, 24 Sep 2022 09:28:48 -0400
Received: from cyberdimension.org ([80.67.179.20]:33338
 helo=gnutoo.cyberdimension.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1oc5D1-0004AX-7n
 for 57537 <at> debbugs.gnu.org; Sat, 24 Sep 2022 09:28:44 -0400
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id a4e1114d;
 Sat, 24 Sep 2022 13:27:19 +0000 (UTC)
Received: from localhost.localdomain (localhost [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id ba422571;
 Sat, 24 Sep 2022 13:27:18 +0000 (UTC)
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: 57537 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Add ec.
Date: Sat, 24 Sep 2022 15:28:15 +0200
Message-Id: <20220924132815.1603-1-GNUtoo@HIDDEN>
X-Mailer: git-send-email 2.37.3
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57537
Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
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 (-)

* gnu/packages/linux.scm (ec): New variable.
---
 gnu/packages/linux.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 306c18e398..0b38bc03f8 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -64,6 +64,7 @@
 ;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@HIDDEN>
 ;;; Copyright © 2022 Rene Saavedra <nanuui@HIDDEN>
 ;;; Copyright © 2022 muradm <mail@HIDDEN>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
 
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1342,6 +1343,31 @@ (define-public librem-ec-acpi-linux-module
 and the notification, WiFi, and Bluetooth LED.")
     (license license:gpl2)))
 
+(define-public ec
+  (package
+    (name "ec")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:make-flags #~(list (string-append "sbindir="
+                                               #$output "/sbin")
+                                "INSTALL=install" "STRIPCMD=true")
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'enter-subdirectory
+                          (lambda _
+                            (chdir "tools/power/acpi/tools/ec")))
+                        (delete 'configure)) ;no configure script
+           #:tests? #f)) ;no tests
+    (home-page (package-home-page linux-libre))
+    (synopsis
+     "Low level utility for reading or writing @acronym{EC, Embedded Controller} registers")
+    (description
+     "This utility can read or write specific registers or all the available
+registers of the @acronym{EC, Embedded Controller} supported by the
+@code{ec_sys} Linux driver")
+    (license license:gpl2)))
+
 (define-public lkrg
   (package
     (name "lkrg")

base-commit: dc7191302e6d099a26673e08b78eb5f4b2a2b17b
-- 
2.37.3





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

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


Received: (at 57537) by debbugs.gnu.org; 6 Sep 2022 12:04:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 06 08:04:55 2022
Received: from localhost ([127.0.0.1]:49967 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oVXK2-0006AT-SA
	for submit <at> debbugs.gnu.org; Tue, 06 Sep 2022 08:04:55 -0400
Received: from cyberdimension.org ([80.67.179.20]:52446
 helo=gnutoo.cyberdimension.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1oVXJz-0006AI-SM
 for 57537 <at> debbugs.gnu.org; Tue, 06 Sep 2022 08:04:53 -0400
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id d1a03a9f;
 Tue, 6 Sep 2022 12:03:14 +0000 (UTC)
Received: from primary_laptop (localhost [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id bc255537;
 Tue, 6 Sep 2022 12:03:14 +0000 (UTC)
Date: Tue, 6 Sep 2022 06:29:07 +0200
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: Tobias Geerinckx-Rice <me@HIDDEN>
Subject: Re: [bug#57537] [PATCH v2] gnu: Add ec
Message-ID: <20220906062907.59f2f8bf@primary_laptop>
In-Reply-To: <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>
References: <20220902020049.15420-1-GNUtoo@HIDDEN>
 <20220902023239.26540-1-GNUtoo@HIDDEN>
 <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>
X-Mailer: Claws Mail 4.1.0 (GTK 3.24.30; i686-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/VzacTFFvbqcl2X_FR3p30O/";
 protocol="application/pgp-signature"; micalg=pgp-sha256
X-Spam-Score: 1.1 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  On Fri, 02 Sep 2022 06:47:39 +0200 Tobias Geerinckx-Rice <me@HIDDEN>
    wrote: > Hi Denis, Hi, > This tool has come in handy a few times. (But did
    I package it? > Nope…) Thank you for doing so! Thanks for the review and
    sorry to have left so many issues in the patch. 
 
 Content analysis details:   (1.1 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -0.0 SPF_PASS               SPF: sender matches SPF record
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
  1.1 DATE_IN_PAST_06_12     Date: is 6 to 12 hours before Received: date
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: 57537
Cc: 57537 <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: 0.1 (/)

--Sig_/VzacTFFvbqcl2X_FR3p30O/
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Fri, 02 Sep 2022 06:47:39 +0200
Tobias Geerinckx-Rice <me@HIDDEN> wrote:

> Hi Denis,
Hi,

> This tool has come in handy a few times.  (But did I package it?
> Nope=E2=80=A6) Thank you for doing so!
Thanks for the review and sorry to have left so many issues in the
patch.

> Don't forget to add a copyright line for yourself at the top of the=20
> file.
I thought I already had it but apparently I forgot to add it in the
commit f16e6b505d5d2630b786a0477ec73b42e77b04e4 ("gnu: Add
usbip-utils"). So I'll add it in the v3 of this ec patch.

> > gnu: Add ec
>=20
> We =E2=99=A5 full stops, even here.
Fixed.

> > +(define-public ec
> > +  (package
> > +    (name "ec")
> > +    (version (package-version linux-libre))
> > +    (source (package-source linux-libre))
> > +    (build-system gnu-build-system)
> > +    (native-inputs (list coreutils))
>=20
> I doubt this has any effect?
It indeed still works without it. I added it because it didn't find
true, and then I added the substitute after that. And I forgot to test
without (native-inputs (list coreutils)).

> > +    (arguments
> > +     '(#:make-flags (list (string-append "DESTDIR=3D"
> > +                                         (assoc-ref %outputs
> > "out"))
>=20
> The magical %output{s,} is fragile and almost never necessary in new=20
> code.  Make the arguments a list of keywords/gexps and use #$output=20
> instead.
Thanks I've now fixed it.

>=20
> > +                          "sbindir=3D/sbin")
> > +       #:phases (modify-phases %standard-phases
> > +                  (delete 'configure) ;no configure script
>=20
> It makes no difference to Guix, but for the sake of humans:
> manipulate phases in their original order when there's no reason not
> to.
Thanks, I've also fixed that.

> > +                  (add-after 'unpack 'patch-Makefile
> > +                    (lambda _
> > +                      (substitute*
> > "tools/power/acpi/Makefile.config"
> > +                        (("/bin/true")
> > +                         (which "true")))
> > +                      (substitute*
> > "tools/power/acpi/Makefile.config"
> > +                        (("/usr/bin/install")
> > +                         (which "install"))) #t))
>=20
> Aside: no need to call substitute* twice on the exact same (list of)=20
> file(s).
Thanks. Here I forgot to try to do something like that.

> Nor is it necessary to look up binaries in PATH =E2=80=98by hand=E2=80=99=
.  Most
> tools do that already.
>=20
>                        (substitute* "Makefile.config"
>                          (("/bin/true") "true")
>                          (("/usr/bin/install") "install"))
Thanks for the tip, that's indeed way better.

> However, substitution is overkill as that Makefile doesn't hard-code=20
> either name.
Right, it works if I do STRIPCMD=3Dtrue and INSTALL=3Dinstall. I should
re-read the GNU make manual on variables assignments (I assumed '=3D' was
like ':=3D').

> > +                  (add-after 'patch-Makefile 'enter-subdirectory
> > +                    (lambda _
> > +                      (chdir "tools/power/acpi/tools/ec") #t)))
>=20
> I'm happy to be the one to inform you that trailing #ts are=20
> long-obsolete.
Nice!

> > +       #:tests? #f)) ;no tests
> > +    (home-page (package-home-page linux-libre))
> > +    (synopsis
> > +     "Low level utility for reading or writing Embedded Controller=20
> > registers")
> > +    (description
> > +     "This utility can read or write specific registers or all the
> > +available registers of the Embedded Controllers supported by the
> > Linux
>=20
> The =E2=80=98ec=E2=80=99 description should probably mention the word =E2=
=80=98EC=E2=80=99
> *somewhere*=E2=80=A6 ;-)
>=20
>    =E2=86=92 =E2=80=98@acronym{EC, Embedded Controller}=E2=80=99
> > +kernel.  To work it needs to run as root, to have the ec_sys driver
> > +loaded, and to have the debugfs filesystem mounted at
> > +/sys/kernel/debug/.
>=20
> =E2=80=98@code{ec_sys} module loaded=E2=80=99, =E2=80=98@code{debugfs} fi=
le system=E2=80=99,
> =E2=80=98@file{/sys/kernel/debug}=E2=80=99.
>
> >                       To make write support work, the ec_sys module
> > +needs to be loaded with the write_support=3D1 parameter.  Write
> > support +can also be enabled after loading the module with
> > +the 'echo 1 > /sys/module/ec_sys/parameters/write_support'
> > command.")
>=20
> Using @code{}/@file{}/@samp{}=E2=80=A6 also applies here
Thanks I've now fixed that.

> do you know if=20
> there's *any* documentation we could install?
There is Documentation/ABI/testing/debugfs-ec, that mention the ec
program, but it doesn't really tell how to use it. Though it has a very
useful warnings.

I also wonder if it's that useful to have a complete HOWTO as this tool
is only useful for advanced users that know what they are doing or for
reuse in other programs/scripts that do the necessary checks.

In my case I use it in a userspace program to force the detection of the
Thinkpad X200 dock in userspace and also for leds (though here I could
also upstream better Linux support for that, but that requires time).

> This kind of highly-specific how-to isn't a great package
> description.
The issue here is that I've been trying to make two different thing fit
inside the package description.

Since Guix also has experimental support for HURD and that it can also
cross compile binaries for Windows through mingw, I think it's a good
idea to at least mention the dependencies of that utility.

If I use the word "driver" instead of module, to make sure that people
do understand that the ec_sys is not an out of tree module, and that I
remove the HOWTO part I can shrink it to that:
> This utility can read or write specific registers or all the available
> registers of the @acronym{EC, Embedded Controller} supported by the
> @code{ec_sys} Linux driver.")

Denis.

--Sig_/VzacTFFvbqcl2X_FR3p30O/
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmMWzJQACgkQX138wUF3
4mMuVA//SrypHOmcqoZi+95x+Nw9JI33JB+kcZbw0wnlNZo5tZ4Ijkh2h/qa7mtq
KTVEqgqt8EgKPZxxeF8E1Rq7e/DptKvyigxmEMvAUIbmV/YfjJsTrJGOsulCpQFa
Qf7MzM3c07O9Z5ZEOt139HyL1+qLpfgq9hb55KL+izdwxKzxrjN2xcbFA1KCzNZ4
UkfAy8zNX+KT3UeGyByYGbWjiWKa2oRDR2G3vCceMIIpOP22oBfQddGekFoaAeR9
YRtL2mHjk0Hp31ZZtvhmFJAN8ZTmrru0c1MV5RIkV+gQs2C5C7dfitYSd8ZBixoq
fakx/eyeu1A5ddiPNiOKivMoZeAbZgK3Oai8yhURpuc+2pz4bldtPJgM1MW1Njk5
Z1zdTE/oiU7NuJG+NIT34rTJc+n03Vr6OPfl3wXOVxFyoWJFMz/f0LnD/GETBZlN
6cbmlA0clCj6n6km09nAubbi5VelP31PacCxxExk/5IQEAb9Ps2s3YZYlKElx3gz
oyV/BKVwjz38idAIHPJvESwQT/aJT7dnjHIz3fwnTkURnLIijOxFM/vZo9lbxeXo
KD1qzdVe6BhKJto9LOtQNwPEVnFiUFUpFRN164pD0OuogtyLelGaDgpv7Mvu28Bf
P1EZPAYe4GxbeHhCFyyWtpVJq7o71/8HLuhfBLUUl/FflNXgKw0=
=oTvo
-----END PGP SIGNATURE-----

--Sig_/VzacTFFvbqcl2X_FR3p30O/--




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

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


Received: (at 57537) by debbugs.gnu.org; 3 Sep 2022 20:33:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 03 16:33:02 2022
Received: from localhost ([127.0.0.1]:43134 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oUZp7-0001is-QY
	for submit <at> debbugs.gnu.org; Sat, 03 Sep 2022 16:33:02 -0400
Received: from baptiste.telenet-ops.be ([195.130.132.51]:55972)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maximedevos@HIDDEN>) id 1oUZp5-0001iS-KP
 for 57537 <at> debbugs.gnu.org; Sat, 03 Sep 2022 16:33:00 -0400
Received: from [IPV6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]
 ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16])
 by baptiste.telenet-ops.be with bizsmtp
 id FYYu2800220ykKC01YYucu; Sat, 03 Sep 2022 22:32:56 +0200
Message-ID: <ef9899f0-3e6d-2305-9d74-df5b0b4e3145@HIDDEN>
Date: Sat, 3 Sep 2022 22:32:54 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.12.0
Subject: Re: [bug#57537] [PATCH v2] gnu: Add ec
Content-Language: en-US
To: Tobias Geerinckx-Rice <me@HIDDEN>,
 Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
References: <20220902020049.15420-1-GNUtoo@HIDDEN>
 <20220902023239.26540-1-GNUtoo@HIDDEN>
 <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>
From: Maxime Devos <maximedevos@HIDDEN>
In-Reply-To: <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="------------D02z1qTxybNgJeoitJ2BkgxE"
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22;
 t=1662237176; bh=JfG+h7f5HfyjTwmUmBy9nBrRxjT8jSAhzlV/YRZCsAc=;
 h=Date:Subject:To:Cc:References:From:In-Reply-To;
 b=UmG++D2mRqE4R2QMX0L307flFQaPZUC9SQ3ju2XORn06nog9yLMOPxIhuSJXBxTet
 +gj5pAc/EqXU7PEe9Iuj+MNHugQ6TQ88AXQQCE3EotrBwZMkFtI3DVon7XX5egU/F2
 vcI8ZLpdTz3N35/FkOwdQObOFH9bhOzRQH/iMqvjhfhXOKrA+OnH3WUZ4fmGht8Ndg
 SY01wnm7NeMe25L+osApW1uNupnLSc58VKILqd4OOYY/7FSay0lMgONnDeqTcjx16y
 nGdI6DGSimGe09r2pEU5CTr/u/YMXjpYYQP6dfU0FnuKwm9rHDrlea1s0uFmPSai3P
 ztoD7EJ5GgRgQ==
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 57537
Cc: 57537 <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 (-)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--------------D02z1qTxybNgJeoitJ2BkgxE
Content-Type: multipart/mixed; boundary="------------VgZvPoHwRhTBzCXEMND5QIDq";
 protected-headers="v1"
From: Maxime Devos <maximedevos@HIDDEN>
To: Tobias Geerinckx-Rice <me@HIDDEN>,
 Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
Cc: 57537 <at> debbugs.gnu.org
Message-ID: <ef9899f0-3e6d-2305-9d74-df5b0b4e3145@HIDDEN>
Subject: Re: [bug#57537] [PATCH v2] gnu: Add ec
References: <20220902020049.15420-1-GNUtoo@HIDDEN>
 <20220902023239.26540-1-GNUtoo@HIDDEN>
 <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>
In-Reply-To: <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>

--------------VgZvPoHwRhTBzCXEMND5QIDq
Content-Type: multipart/mixed; boundary="------------2brAVSZ4rGOKeLkvIxKtjb59"

--------------2brAVSZ4rGOKeLkvIxKtjb59
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64

DQpPbiAwMi0wOS0yMDIyIDA2OjQ3LCBUb2JpYXMgR2VlcmluY2t4LVJpY2UgdmlhIEd1aXgt
cGF0Y2hlcyB2aWEgd3JvdGU6DQo+ICN+KGxpc3QgKHN0cmluZy1hcHBlbmQgInNiaW5kaXI9
IiAjJG91dHB1dCAiL3NiaW4iKQ0KPiDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCAiSU5T
VEFMTD1pbnN0YWxsIiAiU1RSSVBDTUQ9dHJ1ZSIpIA0KDQpGb3IgY3Jvc3MtY29tcGlsYXRp
b24sIHlvdSBwcm9iYWJseSBuZWVkIHRvIGFkZCAoc3RyaW5nLWFwcGVuZCAiQ0M9IiANCiMk
KGNjLWZvci10YXJnZXQpKSBhcyB3ZWxsLCBhc3N1bWluZyBpdCdzIHRoZSBzYW1lIHN5c3Rl
bSBhcyBmb3IgJ3Rtb24nLg0KDQpHcmVldGluZ3MsDQpNYXhpbWUuDQoNCg==
--------------2brAVSZ4rGOKeLkvIxKtjb59
Content-Type: application/pgp-keys; name="OpenPGP_0x49E3EE22191725EE.asc"
Content-Disposition: attachment; filename="OpenPGP_0x49E3EE22191725EE.asc"
Content-Description: OpenPGP public key
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP PUBLIC KEY BLOCK-----

xjMEX4ch6BYJKwYBBAHaRw8BAQdANPb/d6MrGnGi5HyvODCkBUJPRjiFQcRU5V+m
xvMaAa/NL01heGltZSBEZXZvcyA8bWF4aW1lLmRldm9zQHN0dWRlbnQua3VsZXV2
ZW4uYmU+wpAEExYIADgWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCX4ch6AIbAwUL
CQgHAwUVCgkICwUWAgMBAAIeAQIXgAAKCRBJ4+4iGRcl7japAQC3opZ2KGWzWmRc
/gIWSu0AAcfMwyinFEEPa/QhUt2CogD/e2RdF4CYAgaRHJJmZ9WU7piKbLZ7llB4
LzgezVDHggzNJU1heGltZSBEZXZvcyA8bWF4aW1lZGV2b3NAdGVsZW5ldC5iZT7C
kAQTFggAOBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJf56ycAhsDBQsJCAcDBRUK
CQgLBRYCAwEAAh4BAheAAAoJEEnj7iIZFyXujpQBAKV1SwDDl4f24rXciDlB9L8W
ycZt30CgbewMSRQk4mvbAP9dFMbVVixYBd6C8cfhR+NsOBGiOJnQABlUmgNuqGFJ
Dc44BF+HIegSCisGAQQBl1UBBQEBB0BOlzIWiJzgobMF6/cqwLaLk7jIcFSZ++c0
k9cCNT6YXwMBCAfCeAQYFggAIBYhBMHzPuIMUo/bfdcBH0nj7iIZFyXuBQJfhyHo
AhsMAAoJEEnj7iIZFyXuMr0BAJc8cl5PGvVmVuSQVKjleNl4DK1/XAaPAYPe34AE
fZJPAP9IqLCQhH/FeJanHqBP8gNdGNI2qn8RnnLVfRJgUjZ1BA=3D=3D
=3DOVqp
-----END PGP PUBLIC KEY BLOCK-----

--------------2brAVSZ4rGOKeLkvIxKtjb59--

--------------VgZvPoHwRhTBzCXEMND5QIDq--

--------------D02z1qTxybNgJeoitJ2BkgxE
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature"

-----BEGIN PGP SIGNATURE-----

wnsEABYIACMWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYxO59gUDAAAAAAAKCRBJ4+4iGRcl7gcM
AP4+slrPtgU/dBkrZnBn0KSxOe5Md9jHL/H+lL08TuhBRQD+KHHpP4I+qJPkp063yKtYZH4hD0EB
L1zM//knFORscA8=
=vMCf
-----END PGP SIGNATURE-----

--------------D02z1qTxybNgJeoitJ2BkgxE--




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

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


Received: (at 57537) by debbugs.gnu.org; 2 Sep 2022 04:47:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 02 00:47:50 2022
Received: from localhost ([127.0.0.1]:44599 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTyas-00045e-6I
	for submit <at> debbugs.gnu.org; Fri, 02 Sep 2022 00:47:50 -0400
Received: from tobias.gr ([80.241.217.52]:57570)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <me@HIDDEN>) id 1oTyao-000450-NM
 for 57537 <at> debbugs.gnu.org; Fri, 02 Sep 2022 00:47:48 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=g7TkzGhifzSFH
 VxE+Y6v58kWn0N1p/KinqNZAgyfsmY=;
 h=references:in-reply-to:subject:cc:
 to:from:date; d=tobias.gr; b=FR/sOk6T0pTR1XW2ywz1PyvOgNp3Tp/SSoyNTe+1T
 gvBQyxUheFngPjEG3P7xKsHS5UDeEQ3ieBVklUnuWVghLJJd+gIR666KTgTes+Won2OYDu
 A159GKnuN0Srezozi1fENlkpJllc60CMpYamT95LAtE7tZDgAIBi1+Igzid8QNeo7YecEp
 cxNlkxgxvztxaJ6cfx15YSN9deGCO1AAvWeTUBFv/DKo2zaWQNWyuyqrgZ4N/u1sPQlouJ
 ED+l8Kh9BvqFzTxE4AMU+We6iDHpN/K80Vx0nlgdaccl5NJjbNp11BuRZEg6jz3kkYH7sf
 ghDNc76OpO/eAcL77T3Cw==
Received: by submission.tobias.gr (OpenSMTPD) with ESMTP id 7490a88c;
 Fri, 2 Sep 2022 04:47:40 +0000 (UTC)
MIME-Version: 1.0
Date: Fri, 02 Sep 2022 06:47:39 +0200
From: Tobias Geerinckx-Rice <me@HIDDEN>
To: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
Subject: Re: [bug#57537] [PATCH v2] gnu: Add ec
In-Reply-To: <20220902023239.26540-1-GNUtoo@HIDDEN>
References: <20220902020049.15420-1-GNUtoo@HIDDEN>
 <20220902023239.26540-1-GNUtoo@HIDDEN>
Message-ID: <5f8e53d3d302729b6bf61823b2c5139b@HIDDEN>
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57537
Cc: 57537 <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 (-)

Hi Denis,

This tool has come in handy a few times.  (But did I package it?  Nope…) 
  Thank you for doing so!

Don't forget to add a copyright line for yourself at the top of the 
file.

Denis 'GNUtoo' Carikli 写道:
> This installs the 'ec' binary in DESTDIR/usr/sbin which is wrong.

Indeed, using ‘DESTDIR’ is almost always a mistake.

There are a handful of occurrences in Guix, as a hack to get a buggy 
Makefile to work, but those are (thankfully) rare.

Your v2 still has the ‘DESTDIR’ in it, though.  Missed when committing?

> gnu: Add ec

We ♥ full stops, even here.

> +(define-public ec
> +  (package
> +    (name "ec")
> +    (version (package-version linux-libre))
> +    (source (package-source linux-libre))
> +    (build-system gnu-build-system)
> +    (native-inputs (list coreutils))

I doubt this has any effect?

> +    (arguments
> +     '(#:make-flags (list (string-append "DESTDIR="
> +                                         (assoc-ref %outputs "out"))

The magical %output{s,} is fragile and almost never necessary in new 
code.  Make the arguments a list of keywords/gexps and use #$output 
instead.

> +                          "sbindir=/sbin")
> +       #:phases (modify-phases %standard-phases
> +                  (delete 'configure) ;no configure script

It makes no difference to Guix, but for the sake of humans: manipulate 
phases in their original order when there's no reason not to.

Here, 'configure runs after 'unpack.

> +                  (add-after 'unpack 'patch-Makefile
> +                    (lambda _
> +                      (substitute* "tools/power/acpi/Makefile.config"
> +                        (("/bin/true")
> +                         (which "true")))
> +                      (substitute* "tools/power/acpi/Makefile.config"
> +                        (("/usr/bin/install")
> +                         (which "install"))) #t))

Aside: no need to call substitute* twice on the exact same (list of) 
file(s).
Nor is it necessary to look up binaries in PATH ‘by hand’.  Most tools 
do that already.

                       (substitute* "Makefile.config"
                         (("/bin/true") "true")
                         (("/usr/bin/install") "install"))

However, substitution is overkill as that Makefile doesn't hard-code 
either name.

Instead, let's just use the make-flags upstream provides:

   λ grep '= /.*bin' Makefile*
   Makefile.config:INSTALL = /usr/bin/install -c
   Makefile.config:      STRIPCMD = /bin/true -Since_we_are_debugging

> +                  (add-after 'patch-Makefile 'enter-subdirectory
> +                    (lambda _
> +                      (chdir "tools/power/acpi/tools/ec") #t)))

I'm happy to be the one to inform you that trailing #ts are 
long-obsolete.

Feel free to remove them whenever you encounter them.  It is very 
satisfying.

> +       #:tests? #f)) ;no tests
> +    (home-page (package-home-page linux-libre))
> +    (synopsis
> +     "Low level utility for reading or writing Embedded Controller 
> registers")
> +    (description
> +     "This utility can read or write specific registers or all the
> +available registers of the Embedded Controllers supported by the Linux

The ‘ec’ description should probably mention the word ‘EC’ *somewhere*… 
;-)

   → ‘@acronym{EC, Embedded Controller}’

> +kernel.  To work it needs to run as root, to have the ec_sys driver
> +loaded, and to have the debugfs filesystem mounted at
> +/sys/kernel/debug/.

‘@code{ec_sys} module loaded’, ‘@code{debugfs} file system’,
‘@file{/sys/kernel/debug}’.

>                       To make write support work, the ec_sys module
> +needs to be loaded with the write_support=1 parameter.  Write support
> +can also be enabled after loading the module with
> +the 'echo 1 > /sys/module/ec_sys/parameters/write_support' command.")

Using @code{}/@file{}/@samp{}… also applies here, but do you know if 
there's *any* documentation we could install?  This kind of 
highly-specific how-to isn't a great package description.

I wanted to send back a proper patch but this (below) is all I have time 
for.  I can't push yet anyway, so no rush.

Thanks again,

T G-R

(define-public ec
   (package
     (name "ec")
     (version (package-version linux-libre))
     (source (package-source linux-libre))
     (build-system gnu-build-system)
     (arguments
      (list
       #:tests? #f                      ; no tests
       #:make-flags
       #~(list (string-append "sbindir=" #$output "/sbin")
               "INSTALL=install" "STRIPCMD=true")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'enter-subdirectory
             (lambda _
               (chdir "tools/power/acpi/tools/ec")))
           (delete 'configure))))       ; no configure script
     (home-page (package-home-page linux-libre))
     (synopsis "Low level utility to read or write Embedded Controller 
registers")
     (description
      "…")
     (license license:gpl2)))




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

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


Received: (at 57537) by debbugs.gnu.org; 2 Sep 2022 02:32:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 01 22:32:51 2022
Received: from localhost ([127.0.0.1]:44539 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTwUF-0000kC-7s
	for submit <at> debbugs.gnu.org; Thu, 01 Sep 2022 22:32:51 -0400
Received: from cyberdimension.org ([80.67.179.20]:55628
 helo=gnutoo.cyberdimension.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1oTwUC-0000k2-Qc
 for 57537 <at> debbugs.gnu.org; Thu, 01 Sep 2022 22:32:49 -0400
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id ed2616e6;
 Fri, 2 Sep 2022 02:31:51 +0000 (UTC)
Received: from localhost.localdomain (localhost [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id e75f9335;
 Fri, 2 Sep 2022 02:31:51 +0000 (UTC)
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: 57537 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Add ec
Date: Fri,  2 Sep 2022 04:32:39 +0200
Message-Id: <20220902023239.26540-1-GNUtoo@HIDDEN>
X-Mailer: git-send-email 2.35.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 57537
Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
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 (-)

* gnu/packages/linux.scm (ec): New variable.
---
 gnu/packages/linux.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5254b20dc4..dd91ca60fc 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1375,6 +1375,45 @@ (define-public librem-ec-acpi-linux-module
 and the notification, WiFi, and Bluetooth LED.")
     (license license:gpl2)))
 
+(define-public ec
+  (package
+    (name "ec")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (native-inputs (list coreutils))
+    (arguments
+     '(#:make-flags (list (string-append "DESTDIR="
+                                         (assoc-ref %outputs "out"))
+                          "sbindir=/sbin")
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure) ;no configure script
+                  (add-after 'unpack 'patch-Makefile
+                    (lambda _
+                      (substitute* "tools/power/acpi/Makefile.config"
+                        (("/bin/true")
+                         (which "true")))
+                      (substitute* "tools/power/acpi/Makefile.config"
+                        (("/usr/bin/install")
+                         (which "install"))) #t))
+                  (add-after 'patch-Makefile 'enter-subdirectory
+                    (lambda _
+                      (chdir "tools/power/acpi/tools/ec") #t)))
+       #:tests? #f)) ;no tests
+    (home-page (package-home-page linux-libre))
+    (synopsis
+     "Low level utility for reading or writing Embedded Controller registers")
+    (description
+     "This utility can read or write specific registers or all the
+available registers of the Embedded Controllers supported by the Linux
+kernel.  To work it needs to run as root, to have the ec_sys driver
+loaded, and to have the debugfs filesystem mounted at
+/sys/kernel/debug/.  To make write support work, the ec_sys module
+needs to be loaded with the write_support=1 parameter.  Write support
+can also be enabled after loading the module with
+the 'echo 1 > /sys/module/ec_sys/parameters/write_support' command.")
+    (license license:gpl2)))
+
 (define-public lkrg
   (package
     (name "lkrg")

base-commit: 4d361a6b5147e3f91573e9d3c8c540a233e7e142
-- 
2.37.2





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

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


Received: (at submit) by debbugs.gnu.org; 2 Sep 2022 02:14:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 01 22:14:41 2022
Received: from localhost ([127.0.0.1]:44496 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTwCf-0000Fg-Dv
	for submit <at> debbugs.gnu.org; Thu, 01 Sep 2022 22:14:41 -0400
Received: from lists.gnu.org ([209.51.188.17]:50000)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1oTwCe-0000FY-Ku
 for submit <at> debbugs.gnu.org; Thu, 01 Sep 2022 22:14:40 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:49018)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1oTwCe-00053h-Bh
 for guix-patches@HIDDEN; Thu, 01 Sep 2022 22:14:40 -0400
Received: from cyberdimension.org ([2001:910:1314:ffff::1]:55972
 helo=gnutoo.cyberdimension.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1oTwCX-0000pQ-WA
 for guix-patches@HIDDEN; Thu, 01 Sep 2022 22:14:40 -0400
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id 605b8005
 for <guix-patches@HIDDEN>; Fri, 2 Sep 2022 02:13:34 +0000 (UTC)
Received: from primary_laptop (localhost [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 466af5cd
 for <guix-patches@HIDDEN>; Fri, 2 Sep 2022 02:13:34 +0000 (UTC)
Date: Fri, 2 Sep 2022 04:14:18 +0200
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: guix-patches@HIDDEN
Subject: Re: [PATCH] gnu: Add ec
Message-ID: <20220902041418.2339b1ad@primary_laptop>
In-Reply-To: <20220902020049.15420-1-GNUtoo@HIDDEN>
References: <20220902020049.15420-1-GNUtoo@HIDDEN>
X-Mailer: Claws Mail 4.1.0 (GTK 3.24.30; i686-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="Sig_/LcXAIUPLCiJ.ms2lP25zUt/";
 protocol="application/pgp-signature"; micalg=pgp-sha256
Received-SPF: pass client-ip=2001:910:1314:ffff::1;
 envelope-from=GNUtoo@HIDDEN; helo=gnutoo.cyberdimension.org
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
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: -2.4 (--)

--Sig_/LcXAIUPLCiJ.ms2lP25zUt/
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hi,

On Fri,  2 Sep 2022 04:00:49 +0200
Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN> wrote:
> +     '(#:make-flags (list (string-append "DESTDIR=3D"
> +                                         (assoc-ref %outputs "out")))
This installs the 'ec' binary in DESTDIR/usr/sbin which is wrong.

I'll fix it and send a v2.

Denis.

--Sig_/LcXAIUPLCiJ.ms2lP25zUt/
Content-Type: application/pgp-signature
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmMRZvsACgkQX138wUF3
4mOtrQ/+PbxhQkmzcDF3kh3f5/zb6PZQmaQgez8uzYJojVOIKmEPKIZ9Ovf9J/18
9JaoiEvpKuoL+tTJk8D6wCHbHz2iE+Pb13ZFcfZ6/vYgd3oxg0hBUxoI5lYF6EOg
JUSUiM5GI7128XWAt13fbNKqzVKbWfzAfUO8g5ijL3YDUfZUflq7+o2JRgEd4+dx
eMuK3l0A/ioe5BTyCa/ZvtHynhN507R8XetJDW03ZPWS4HjMnunjBBXZVPvSN0tG
ndhoOoj9EYCazEho4OoaYr9S/HJPFyRyDAZjHTfgHqquuv7X4i2/PkZdcee6ft8m
rLpLdPcZNecg/R4rxZYC3YxMHnkL4S84Jr9XfHkGRYHrhjfnUyf2DfTZxXROrjmS
cPgNKKGBcejaatqNd4dPgRNzoWMeYHtaUaeWCRGMXWtHrsI2nUjmsfW+W9c1BAoA
Gieij1WRG6ndsKo6ziUKrP4SiAq+nwnhizA/6csaflUZZXk9RtDKA/+D4GJuCXSh
U64p6Qhoi0kzT06SMaRGe3lcCp4vOXldj/PaFBnaFtg0i5iZOslyxWE/7M9cz2Qp
/a9g/hdq1K8EQrUH4tNs4Ss+wiQEVg8wR05fYgnu3t+Z4KjHUsAbxjmI90Imu9S5
8UjT8RBb3BbHDM3V7K1Vr3Hr1uyi5esxsAzbjvMHY8uFC1h4fqg=
=xjwS
-----END PGP SIGNATURE-----

--Sig_/LcXAIUPLCiJ.ms2lP25zUt/--




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

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


Received: (at submit) by debbugs.gnu.org; 2 Sep 2022 02:02:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 01 22:02:50 2022
Received: from localhost ([127.0.0.1]:44458 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oTw1C-0008OV-8N
	for submit <at> debbugs.gnu.org; Thu, 01 Sep 2022 22:02:50 -0400
Received: from lists.gnu.org ([209.51.188.17]:51924)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <GNUtoo@HIDDEN>) id 1oTw1A-0008ON-5S
 for submit <at> debbugs.gnu.org; Thu, 01 Sep 2022 22:02:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40620)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1oTw19-0001A1-ST
 for guix-patches@HIDDEN; Thu, 01 Sep 2022 22:02:47 -0400
Received: from cyberdimension.org ([80.67.179.20]:36150
 helo=gnutoo.cyberdimension.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <GNUtoo@HIDDEN>)
 id 1oTw17-000133-TJ
 for guix-patches@HIDDEN; Thu, 01 Sep 2022 22:02:47 -0400
Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1])
 by cyberdimension.org (OpenSMTPD) with ESMTP id 299c4804;
 Fri, 2 Sep 2022 02:00:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [::1])
 by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 593aa157;
 Fri, 2 Sep 2022 02:00:02 +0000 (UTC)
From: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Add ec
Date: Fri,  2 Sep 2022 04:00:49 +0200
Message-Id: <20220902020049.15420-1-GNUtoo@HIDDEN>
X-Mailer: git-send-email 2.35.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=80.67.179.20;
 envelope-from=GNUtoo@HIDDEN; helo=gnutoo.cyberdimension.org
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
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 (--)

* gnu/packages/linux.scm (ec): New variable.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
---
 gnu/packages/linux.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5254b20dc4..bf71dad722 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1375,6 +1375,44 @@ (define-public librem-ec-acpi-linux-module
 and the notification, WiFi, and Bluetooth LED.")
     (license license:gpl2)))
 
+(define-public ec
+  (package
+    (name "ec")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (native-inputs (list coreutils))
+    (arguments
+     '(#:make-flags (list (string-append "DESTDIR="
+                                         (assoc-ref %outputs "out")))
+       #:phases (modify-phases %standard-phases
+                  (delete 'configure) ;no configure script
+                  (add-after 'unpack 'patch-Makefile
+                    (lambda _
+                      (substitute* "tools/power/acpi/Makefile.config"
+                        (("/bin/true")
+                         (which "true")))
+                      (substitute* "tools/power/acpi/Makefile.config"
+                        (("/usr/bin/install")
+                         (which "install"))) #t))
+                  (add-after 'patch-Makefile 'enter-subdirectory
+                    (lambda _
+                      (chdir "tools/power/acpi/tools/ec") #t)))
+       #:tests? #f)) ;no tests
+    (home-page (package-home-page linux-libre))
+    (synopsis
+     "Low level utility for reading or writing Embedded Controller registers")
+    (description
+     "This utility can read or write specific registers or all the
+available registers of the Embedded Controllers supported by the Linux
+kernel.  To work it needs to run as root, to have the ec_sys driver
+loaded, and to have the debugfs filesystem mounted at
+/sys/kernel/debug/.  To make write support work, the ec_sys module
+needs to be loaded with the write_support=1 parameter.  Write support
+can also be enabled after loading the module with
+the 'echo 1 > /sys/module/ec_sys/parameters/write_support' command.")
+    (license license:gpl2)))
+
 (define-public lkrg
   (package
     (name "lkrg")

base-commit: 4d361a6b5147e3f91573e9d3c8c540a233e7e142
-- 
2.37.2





Acknowledgement sent to Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#57537; 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: Sat, 24 Sep 2022 13:30:02 UTC

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