GNU bug report logs - #37853
[PATCH] gnu: Add ddcci-driver-linux.

Previous Next

Package: guix-patches;

Reported by: Brice Waegeneire <brice <at> waegenei.re>

Date: Mon, 21 Oct 2019 15:17:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <m.othacehe <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37853 in the body.
You can then email your comments to 37853 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Mon, 21 Oct 2019 15:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Brice Waegeneire <brice <at> waegenei.re>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 21 Oct 2019 15:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add ddcci-driver-linux.
Date: Mon, 21 Oct 2019 17:16:28 +0200
* gnu/packages/linux.scm (ddcci-driver-linux): Add variable.
---
 gnu/packages/linux.scm | 59 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 989d55f8aa..4a98c9e60e 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -968,6 +968,65 @@ and should be used with caution, especially on untested models.")
 between the CDemu userspace daemon and linux kernel.")
     (license license:gpl2+)))
 
+
+(define-public ddcci-driver-linux
+  (package
+    (name "ddcci-driver-linux")
+    (version "0.3.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f"))))
+    (build-system linux-module-build-system)
+    (arguments
+     `(#:tests? #f                               ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda* (#:key inputs #:allow-other-keys)
+             (for-each (lambda (module)
+                         (invoke "make" "-C"
+                                 (string-append (assoc-ref inputs "linux-module-builder")
+                                                "/lib/modules/build")
+                                 (string-append "M=" (getcwd) "/" module)))
+                       (list "ddcci" "ddcci-backlight"))
+             #t))
+         (replace 'install
+           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (moddir (string-append out "/lib/modules"))
+                    (kmod (assoc-ref (or native-inputs inputs) "kmod")))
+               ;; Install kernel modules
+               (mkdir-p moddir)
+               (for-each (lambda (module)
+                           (invoke "make" "-C"
+                                   (string-append
+                                    (assoc-ref inputs "linux-module-builder")
+                                    "/lib/modules/build")
+                                   (string-append "M=" (getcwd) "/" module)
+                                   (string-append "DEPMOD=" kmod "/bin/depmod")
+                                   (string-append "MODULE_DIR=" moddir)
+                                   (string-append "INSTALL_PATH=" out)
+                                   (string-append "INSTALL_MOD_PATH=" out)
+                                   "INSTALL_MOD_STRIP=1"
+                                   "modules_install"))
+                         (list "ddcci" "ddcci-backlight")))
+             #t)))))
+    (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux")
+    (synopsis "A pair of Linux kernel drivers for DDC/CI monitors")
+    (description "Two Linux kernel drivers, ddcci and ddcci-backlight, that
+allow the control of DDC/CI monitors through the sysfs interface. ddcci create
+a character device for each DDC/CI monitors in @file{/dev/bus/ddcci/[I²C bus number]}.
+ddcci-backlight allow the control of the backlight level or luminance property when supported
+under @file{/sys/class/backlight/}.")
+    (license license:gpl2+)))
+
 
 ;;;
 ;;; Pluggable authentication modules (PAM).
-- 
2.19.2





Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Tue, 22 Oct 2019 09:44:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: 37853 <at> debbugs.gnu.org
Subject: Re: [bug#37853] [PATCH] gnu: Add ddcci-driver-linux.
Date: Tue, 22 Oct 2019 11:42:58 +0200
Hello Brice,

> +             (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")

This line is too long. You can add a line break after "uri" so that it
fits under 78 columns.

> +         (replace 'build
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (for-each (lambda (module)
> +                         (invoke "make" "-C"
> +                                 (string-append (assoc-ref inputs "linux-module-builder")
> +                                                "/lib/modules/build")
> +                                 (string-append "M=" (getcwd) "/" module)))
> +                       (list "ddcci" "ddcci-backlight"))

It is a bit sad that we have to replicate 'build and 'install phases
because of those two subfolders. However, I can't see an easy way to
overcome this. Anyone?

> +a character device for each DDC/CI monitors in @file{/dev/bus/ddcci/[I²C bus number]}.
> +ddcci-backlight allow the control of the backlight level or luminance property when supported

As reported by guix lint, this line is too long. Also make sure that the
description starts by a full sentence, for instance: "This package
provides a pair of ...".

Can you send an updated patch?

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Tue, 22 Oct 2019 09:44:04 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Tue, 22 Oct 2019 13:07:01 GMT) Full text and rfc822 format available.

Message #14 received at 37853 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: 37853 <at> debbugs.gnu.org, Brice Waegeneire <brice <at> waegenei.re>
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>
Subject: Re: [bug#37853] [PATCH] gnu: Add ddcci-driver-linux.
Date: Tue, 22 Oct 2019 15:06:39 +0200
[Message part 1 (text/plain, inline)]
Hi,

On Tue, 22 Oct 2019 11:42:58 +0200
Mathieu Othacehe <m.othacehe <at> gmail.com> wrote:

> It is a bit sad that we have to replicate 'build and 'install phases
> because of those two subfolders. However, I can't see an easy way to
> overcome this. Anyone?

You could get the existing phase via (assoc-ref %standard-phases 'build) and call
it twice (and I would).

Also, you could create two packages and chdir in an extra phase before "build"
(I wouldn't do that).

The former:

(define-public ddcci-driver-linux
  (package
    (name "ddcci-driver-linux")
    (version "0.3.3")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32
         "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f"))))
    (build-system linux-module-build-system)
    (arguments
     `(#:tests? #f                               ; no tests
       #:phases
       (modify-phases %standard-phases
         (replace 'build
           (lambda args
             (for-each (lambda (module)
                         (with-directory-excursion module
                           (apply (assoc-ref %standard-phases 'build) args)))
                       '("ddcci" "ddcci-backlight"))
             #t))
         (replace 'install
           (lambda args
             (for-each (lambda (module)
                         (with-directory-excursion module
                           (apply (assoc-ref %standard-phases 'install) args)))
                       '("ddcci" "ddcci-backlight"))
             #t)))))
    (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux")
    (synopsis "Linux kernel drivers for DDC/CI monitors")
    (description "Two Linux kernel drivers, ddcci and ddcci-backlight, that
allow the control of DDC/CI monitors through the sysfs interface. ddcci create
a character device for each DDC/CI monitors in @file{/dev/bus/ddcci/[I²C bus number]}.
ddcci-backlight allow the control of the backlight level or luminance property when supported
under @file{/sys/class/backlight/}.")
    (license license:gpl2+)))

@Brice:

Could you send an updated patch along those lines?
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 09:33:02 GMT) Full text and rfc822 format available.

Message #17 received at 37853 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 37853 <at> debbugs.gnu.org
Date: Fri, 25 Oct 2019 11:32:22 +0200
In this patch version I have taken into account the remarks of Mathieu on
line lenght and description phrasing. And followed Danny's take on the
modified phases; it's *much* nicer than my copy/paste from the
linux-module-build-system.





Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 09:33:02 GMT) Full text and rfc822 format available.

Message #20 received at 37853 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 37853 <at> debbugs.gnu.org
Subject: [PATCH v2] gnu: Add ddcci-driver-linux.
Date: Fri, 25 Oct 2019 11:32:23 +0200
* gnu/packages/linux.scm (ddcci-driver-linux): Add variable.
---
 gnu/packages/linux.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 989d55f8aa..ce448d9940 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -968,6 +968,52 @@ and should be used with caution, especially on untested models.")
 between the CDemu userspace daemon and linux kernel.")
     (license license:gpl2+)))
 
+(define-public ddcci-driver-linux
+  (package
+    (name "ddcci-driver-linux")
+    (version "0.3.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f"))))
+    (build-system linux-module-build-system)
+    (arguments
+     `(#:tests? #f                               ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda args
+             (for-each
+              (lambda (module)
+                (with-directory-excursion module
+                  (apply (assoc-ref %standard-phases 'build) args)))
+              '("ddcci" "ddcci-backlight"))
+             #t))
+         (replace 'install
+           (lambda args
+             (for-each
+              (lambda (module)
+                (with-directory-excursion module
+                  (apply (assoc-ref %standard-phases 'install) args)))
+              '("ddcci" "ddcci-backlight"))
+             #t)))))
+    (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux")
+    (synopsis "A pair of Linux kernel drivers for DDC/CI monitors")
+    (description "This package provide two Linux kernel drivers, ddcci and
+ddcci-backlight, that allow the control of DDC/CI monitors through the sysfs
+interface. The ddcci module create a character device for each DDC/CI monitors
+in @file{/dev/bus/ddcci/[I²C busnumber]}. While the ddcci-backlight module
+allow the control of the backlight level or luminance property when supported
+under @file{/sys/class/backlight/}.")
+    (license license:gpl2+)))
+
 
 ;;;
 ;;; Pluggable authentication modules (PAM).
-- 
2.19.2





Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 09:51:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: 37853 <at> debbugs.gnu.org
Subject: Re: [bug#37853] [PATCH v2] gnu: Add ddcci-driver-linux.
Date: Fri, 25 Oct 2019 11:50:29 +0200
Hey Brice,

That's indeed much better this way ;) You still have two small guix lint
warnings to fix:

gnu/packages/linux.scm:979:17: ddcci-driver-linux <at> 0.3.3: sentences in description should be followed by two spaces; possible infractions at 143, 253
gnu/packages/linux.scm:978:14: ddcci-driver-linux <at> 0.3.3: no article allowed at the beginning of the synopsis

Otherwise this LGTM.

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 09:51:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 10:25:01 GMT) Full text and rfc822 format available.

Message #29 received at 37853 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 37853 <at> debbugs.gnu.org
Date: Fri, 25 Oct 2019 12:24:02 +0200
Hopefully this version is the last one needed.

Sorry for the trivial lint issue Mathieu. I have troble running it on my
forgin distro (NixOS), it always complain about certificates and stop
abruptly without reporting relevant information.





Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 10:25:02 GMT) Full text and rfc822 format available.

Message #32 received at 37853 <at> debbugs.gnu.org (full text, mbox):

From: Brice Waegeneire <brice <at> waegenei.re>
To: 37853 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: Add ddcci-driver-linux.
Date: Fri, 25 Oct 2019 12:24:03 +0200
* gnu/packages/linux.scm (ddcci-driver-linux): Add variable.
---
 gnu/packages/linux.scm | 46 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 989d55f8aa..d061f866d9 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -968,6 +968,52 @@ and should be used with caution, especially on untested models.")
 between the CDemu userspace daemon and linux kernel.")
     (license license:gpl2+)))
 
+(define-public ddcci-driver-linux
+  (package
+    (name "ddcci-driver-linux")
+    (version "0.3.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git")
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f"))))
+    (build-system linux-module-build-system)
+    (arguments
+     `(#:tests? #f                               ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'build
+           (lambda args
+             (for-each
+              (lambda (module)
+                (with-directory-excursion module
+                  (apply (assoc-ref %standard-phases 'build) args)))
+              '("ddcci" "ddcci-backlight"))
+             #t))
+         (replace 'install
+           (lambda args
+             (for-each
+              (lambda (module)
+                (with-directory-excursion module
+                  (apply (assoc-ref %standard-phases 'install) args)))
+              '("ddcci" "ddcci-backlight"))
+             #t)))))
+    (home-page "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux")
+    (synopsis "Pair of Linux kernel drivers for DDC/CI monitors")
+    (description "This package provide two Linux kernel drivers, ddcci and
+ddcci-backlight, that allow the control of DDC/CI monitors through the sysfs
+interface.  The ddcci module create a character device for each DDC/CI monitors
+in @file{/dev/bus/ddcci/[I²C busnumber]}.  While the ddcci-backlight module
+allow the control of the backlight level or luminance property when supported
+under @file{/sys/class/backlight/}.")
+    (license license:gpl2+)))
+
 
 ;;;
 ;;; Pluggable authentication modules (PAM).
-- 
2.19.2





Information forwarded to guix-patches <at> gnu.org:
bug#37853; Package guix-patches. (Fri, 25 Oct 2019 11:36:01 GMT) Full text and rfc822 format available.

Message #35 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: 37853-done <at> debbugs.gnu.org
Subject: Re: [bug#37853]
Date: Fri, 25 Oct 2019 13:34:53 +0200
> Sorry for the trivial lint issue Mathieu. I have troble running it on my
> forgin distro (NixOS), it always complain about certificates and stop
> abruptly without reporting relevant information.

No problem, I fixed some typos in description and pushed this patch.

Thanks,

Mathieu





Reply sent to Mathieu Othacehe <m.othacehe <at> gmail.com>:
You have taken responsibility. (Fri, 25 Oct 2019 11:36:02 GMT) Full text and rfc822 format available.

Notification sent to Brice Waegeneire <brice <at> waegenei.re>:
bug acknowledged by developer. (Fri, 25 Oct 2019 11:36:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Nov 2019 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 157 days ago.

Previous Next


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