[PATCH] gnu: Add clight

  • Open
  • quality assurance status badge
Details
4 participants
  • Florian
  • Tobias Geerinckx-Rice
  • (
  • zimoun
Owner
unassigned
Submitted by
Florian
Severity
normal
F
F
Florian wrote on 12 Dec 2022 17:53
(address . guix-patches@gnu.org)
87edt47ecz.fsf@posteo.net

Z
Z
zimoun wrote on 12 Dec 2022 20:16
87k02wo2jh.fsf@gmail.com
Hi,

On Mon, 12 Dec 2022 at 16:53, Florian <florhizome@posteo.net> wrote:

It seems empty. :-)


Cheers,
simon
F
F
florhizome wrote on 12 Dec 2022 21:31
[PATCH 2/3] gnu: Add clightd
(address . 60013@debbugs.gnu.org)(name . florhizome)(address . florhizome@posteo.net)
5004a8b824881df48dbf6304de630d07709ada12.1670876889.git.florhizome@posteo.net
From: florhizome <florhizome@posteo.net>

* gnu/packages/wm.scm (clightd): New variable.
---
gnu/packages/wm.scm | 69 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)

Toggle diff (117 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 86573658f4..919bcc9400 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -61,6 +61,7 @@
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
;;;
+;;; Copyright © 2022 florhizome <florhizome@posteo.net>
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
@@ -102,6 +103,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages calendar)
#:use-module (gnu packages check)
#:use-module (gnu packages cpp)
+ #:use-module (gnu packages c)
#:use-module (gnu packages datastructures)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
@@ -114,6 +116,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages gperf)
#:use-module (gnu packages gtk)
#:use-module (gnu packages gnome)
+ #:use-module (gnu packages hardware)
#:use-module (gnu packages haskell-check)
#:use-module (gnu packages haskell-web)
#:use-module (gnu packages haskell-xyz)
@@ -121,6 +124,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
+ #:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages lisp-check)
#:use-module (gnu packages lisp-xyz)
@@ -132,6 +136,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages mpd)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages polkit)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages pulseaudio)
@@ -188,6 +193,70 @@ (define-public bspwm
the leaves of a full binary tree.")
(license license:bsd-2)))
+
+(define-public clightd
+ (package
+ (name "clightd")
+ (version "5.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FedeDP/clightd")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1b6hc98vk0nm06plld4rgk70f825g8kakcxrv2prsxxvkvlqrmp1"))))
+ (build-system cmake-build-system)
+ (native-inputs (list pkg-config libmodule))
+ (inputs (list elogind
+ eudev
+ dbus
+ ddcutil
+ libdrm
+ libjpeg-turbo
+ libmodule
+ libxrandr
+ libdrm
+ libusb
+ libx11
+ libxext
+ polkit-duktape
+ wayland
+ wayland-protocols))
+ (arguments
+ (list
+ #:tests? #f ;;;tests not found
+ #:configure-flags #~(list "-DENABLE_GAMMA=1"
+ "-DENABLE_DPMS=1"
+ "-DENABLE_DDC=1"
+ "-DENABLE_SCREEN=1"
+ "-DENABLE_YOCTOLIGHT=1"
+ (string-append "-DMODULE_LOAD_DIR=" #$output
+ "/etc/modprobe.d")
+ (string-append "-DDBUS_CONFIG_DIR=" #$output
+ "/share/dbus-1/system.d"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after
+ 'patch-source-shebangs 'patch-target-dirs
+ (lambda _
+ (substitute* "./CMakeLists.txt"
+ (("DESTINATION \\$\\{SYSTEM_BUS_DIR\\}")
+ (string-append "DESTINATION "
+ #$output "/share/dbus-1/system-services"))
+ (("DESTINATION \\$\\{POLKIT_ACTION_DIR\\}")
+ (string-append "DESTINATION "
+ #$output "/share/polkit-1/actions"))))))))
+ (home-page "https://github.com/FedeDP/Clightd")
+ (description "Bus interface for many display capabilities")
+ (synopsis "Clightd is a bus interface that lets you easily set/get screen
+ brightness, gamma temperature and display dpms state. Moreover, it enables
+ getting ambient brightness through webcam frames capture or ALS devices.
+
+ It works on X, Wayland and tty.")
+ (license license:gpl3)))
+
(define-public herbstluftwm
(package
(name "herbstluftwm")
--
2.38.1
F
F
florhizome wrote on 12 Dec 2022 21:31
[PATCH 1/3] gnu: Add libmodule
(address . 60013@debbugs.gnu.org)(name . florhizome)(address . florhizome@posteo.net)
91575b0f95b5a71b18108b57fa1a366e0f6044c9.1670876889.git.florhizome@posteo.net
From: florhizome <florhizome@posteo.net>

zimoun: yes I usually send an empty mail before a patchset wit multiple patches

* gnu/packages/wm.scm (libmodule): New variable.
---
gnu/packages/c.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (53 lines)
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index fb876eeb71..3afdaa995a 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -1300,6 +1300,28 @@ (define-public libdispatch
will take care of dispatching tasks to available cores.")
(license license:asl2.0)))
+
+(define-public libmodule
+ (package
+ (name "libmodule")
+ (version "5.0.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FedeDP/libmodule")
+ (commit version)))
+ (sha256
+ (base32 "1j48gkj6zlifrmx9qh37ijmqjvdvgmpvxah7j2qlrhdxcc6n4i62"))))
+ (build-system cmake-build-system)
+ (native-inputs (list pkg-config))
+ (arguments '(#:tests? #f)) ;tests not found
+ (home-page "https://github.com/FedeDP/libmodule")
+ (synopsis "Simple and elegant implementation of an actor library in C")
+ (description "Libmodule offers a small and simple C implementation of an
+ actor library that aims to let developers easily create modular C projects.")
+ (license license:expat)))
+
(define-public utf8-h
;; The latest tag is used as there is no release.
(let ((commit "500d4ea9f4c3449e5243c088d8af8700f7189734")

base-commit: 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0
prerequisite-patch-id: 36ae907c0ae2cbc001f774c0514ab217855270c2
prerequisite-patch-id: f85768858f3a8b1ef44b6e355dcd7f9254c07d24
prerequisite-patch-id: 2c99b804c1a929fc9d74b4c3d92263cbd296f785
prerequisite-patch-id: 2525aea715c2eb5be5f61e2e14296a36898413ca
prerequisite-patch-id: f7afbf36e2776eced1e69090ec127a40456efca4
prerequisite-patch-id: ba73cf06ab2610e36d03df1f6b6a1c4b8f271cda
prerequisite-patch-id: 9ac4b32603488e776af63831ff13406c649a8686
prerequisite-patch-id: 1cec3e6ed7a13938c53c24f816056d98b2b005c7
prerequisite-patch-id: 011ca6e0eaf4ea7077787d7030f193836c30aa82
prerequisite-patch-id: 4243cf3f6370445e6d583f03231e87921f541cc2
prerequisite-patch-id: 6c88bfec7b2fa53face9523329de4a9102149772
prerequisite-patch-id: d1bed6e8da46c3d6f4017546f7a00c001e814fe1
prerequisite-patch-id: 1ff1bcd9503a2b38ca7cc59ebdcebb45f970cf1a
prerequisite-patch-id: 4aa5ec94c128f5b6b6b6709c25baa49fffa571f6
prerequisite-patch-id: cb8f4f83e84db03ffa3c6be6c6b0df2ef0b59422
prerequisite-patch-id: 709b4522fd225f3c28bb2721e5dd9a20014ce131
--
2.38.1
F
F
florhizome wrote on 12 Dec 2022 21:31
[PATCH 3/3] gnu: Add clight
(address . 60013@debbugs.gnu.org)(name . florhizome)(address . florhizome@posteo.net)
8aaa5bfe2bdb7b409ae0ba210437d9b4c5063359.1670876889.git.florhizome@posteo.net
From: florhizome <florhizome@posteo.net>

* gnu/packages/wm.scm (clight): New variable.
---
gnu/packages/wm.scm | 56 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)

Toggle diff (76 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 919bcc9400..f7435e69f8 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -137,6 +137,7 @@ (define-module (gnu packages wm)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (gnu packages polkit)
+ #:use-module (gnu packages popt)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pretty-print)
#:use-module (gnu packages pulseaudio)
@@ -194,6 +195,61 @@ (define-public bspwm
(license license:bsd-2)))
+(define-public clight
+ (package
+ (name "clight")
+ (version "4.9")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/FedeDP/clight")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "09hf80kb01xwzr8p87d5r8rw1dq9jqdibyc7k2xc4z5v5j7hlnlv"))))
+ (build-system cmake-build-system)
+ (native-inputs (list pkg-config))
+ (inputs (list clightd
+ dbus
+ ddcutil
+ elogind
+ gsl
+ geoclue
+ libconfig
+ libmodule
+ popt
+ upower))
+ (arguments
+ (list
+ #:tests? #f ;no rule to make target test
+ #:configure-flags
+ #~(list (string-append "-DBASH_COMPLETIONS_DIR="
+ #$output "/share/bash-completion/completions")
+ (string-append "-DFISH_COMPLETIONS_DIR="
+ #$output "/share/fish/completions"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after
+ 'patch-source-shebangs 'patch-target-dirs
+ (lambda _
+ (substitute*
+ "./CMakeLists.txt"
+ (("DESTINATION \\$\\{SESSION_BUS_DIR\\}")
+ (string-append "DESTINATION " #$output "/share/dbus-1/services"))
+ (("DESTINATION /etc/xdg/autostart")
+ (string-append "DESTINATION " #$output "/etc/xdg/autostart"))
+ (("DESTINATION /usr/share/*")
+ (string-append "DESTINATION " #$output "/share/*")))
+ #t)))))
+ (home-page "https://github.com/FedeDP/Clight")
+ (synopsis "User daemon utility to fully manage screens")
+ (description "Clight is a tiny C utility that can turn your webcam
+into a light sensor; moreover it supports a redshift-like gamma
+control, a screen dimmer and dpms settings.
+It is the userspace interface for clightd.")
+ (license license:gpl3)))
+
(define-public clightd
(package
(name "clightd")
--
2.38.1
T
T
Tobias Geerinckx-Rice wrote on 12 Dec 2022 21:51
Re: [bug#60013] [PATCH] gnu: Add clight
(name . zimoun)(address . zimon.toutoune@gmail.com)
87zgbscplo.fsf@nckx
zimoun ???
Toggle quote (2 lines)
> It seems empty. :-)

They were probably waiting for a bug number and it (or their
patches) haven't arrived yet.

Ah, debbugs,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCY5eUYw0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15vCkBAKjap2fZFPh7DF/7JVluuGcE/OcCmOLE2xaIbp8Z
HolnAP0c0QrtdsjxSfe90ynnFN7beGwbRNd+QnsW+S2nP0D9Ag==
=6pnp
-----END PGP SIGNATURE-----

(
Re: [bug#60013] [PATCH 1/3] gnu: Add libmodule
CP0547KC2GSW.REG9A8KPX713@guix-framework
Heya,

On Mon Dec 12, 2022 at 8:31 PM GMT, wrote:
Toggle quote (2 lines)
> zimoun: yes I usually send an empty mail before a patchset wit multiple patches

There's a better way, using ``--cover-letter'':

* gnu/packages/wm.scm (libmodule): New variable.

--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm

@@ -1300,6 +1300,28 @@ (define-public libdispatch

+ (uri (git-reference
+ (commit version)))

Please add a ``file-name'':

(file-name (git-file-name name version))

+ (arguments '(#:tests? #f)) ;tests not found

Use ``list'':

(list #:tests? #f)

+ (description "Libmodule offers a small and simple C implementation of an
+ actor library that aims to let developers easily create modular C projects.")

There should be indentation between ``description'' and ``"..."''; also, some of
it seems a wee bit markety. How about this?

(description
"Libmodule provides a C implementation of the actor model, aiming to help
with the creation of modular C projects.")

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

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOXlnsACgkQ7ImHg/nq
I23p7Qv+NsUIOCYEaey4PV9BOFA/I5tAv71Sq0sJqcJOC9c5sKOfsTzxPvvXgBux
DuBF1K3HC+d/mAnRLugYMMozzxbFja2D06iyvoHBSfHeL62CxuvIcacK+usxi59q
OG9S6fbrWEh5v3hMUA9rxhlRznTdtDE3+rnGt5wBxpSs4inDfJlGIY5wmyQgoS3s
P6Tg5agtMyfRHMYGLCiMbZBKq/tYA2Kx5tEgx5fAS403o+WfTOuLOkBx7aic0TVb
ngAmQNZJlU/rv67dCMJlnn04J6M4H4BxBQ3mtJzHzJzINt7f8aEyfYDCM6s4Pwdp
OPfsw9zJ6+bHvRq51UE8UhaWQpUy3J0ZquI0BPnyuCxqecyVkFOUzn7xu0TM+kn6
0ZikIdVCu+kFArSEQ1NT6kSEjXuGqmtxbh+Nv537vAIsfQSA4naZusZr4fLl1a/+
fC5Db2rvwAJtqBQ4Jh/6qhbzqlbJQTipZDwLinE5QyWCoUVXIhh3PGbMWT1X1lH+
IEH8EYR7
=fWCq
-----END PGP SIGNATURE-----


(
Re: [bug#60013] [PATCH 2/3] gnu: Add clightd
CP068ELG98OJ.4MBUHA3BRE8@guix-framework
Heya,

* gnu/packages/wm.scm (clightd): New variable.

--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm

@@ -188,6 +193,70 @@ (define-public bspwm

+ #:tests? #f ;;;tests not found

If there *are* actually tests, could you try to patch it to make them
work?

+ (lambda _
+ (substitute* "./CMakeLists.txt"
+ (("DESTINATION \\$\\{SYSTEM_BUS_DIR\\}")
+ (string-append "DESTINATION "
+ #$output "/share/dbus-1/system-services"))
+ (("DESTINATION \\$\\{POLKIT_ACTION_DIR\\}")
+ (string-append "DESTINATION "
+ #$output "/share/polkit-1/actions"))))

Maybe add these configure flags instead?

(string-append "-DSYSTEM_BUS_DIR="
#$output "/share/dbus-1/system-services")
(string-append "-DPOLKIT_ACTION_DIR="
#$output "/share/polkit-1/actions")

I'm not sure if that'll even work, I don't do CMake :)

+ (description "Bus interface for many display capabilities")
+ (synopsis "Clightd is a bus interface that lets you easily set/get screen
+ brightness, gamma temperature and display dpms state. Moreover, it enables
+ getting ambient brightness through webcam frames capture or ALS devices.

I think you got "description" and "synopsis" the wrong way round :)

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

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOXoskACgkQ7ImHg/nq
I23QXgwAtMd2Jmllxiuq6QJm7n/MtmeyPpUCvgQvddgHr3qBUF9DJ8A4Sd1PRbu/
TJeu3ps42DHf+CPA12tCRBAUjOQFzNPgCucR/9d2uuaAiLoGnCv7/w4jNSreb/lf
7Sptcfz5VTNRrP8gvA0AWeAMR35Yw/Pm+zYDTZ8JfdfYl5kSb+j8BPKF+1xN5IuH
3uYQrlCqSqb5OrRoxxdgslfTsO3kM0bfxRBI8BMMF0qx0KXcExn42LNCbV8naVlg
Ww0FGsm5eTF8tVLs8wDXgZLIDO4RLM8DRlzsd8zfj4fm5WwaXbY53PoPz2XxUju7
SVX2MEDCSntAVRmbdIPhtgbyg4C8UxMwbPN1i3L7WmA+JheLWJfbQI2DC5DCelMl
kSH/JxySmtFoe61BLmJgb7RIoj0ozTxYh4VHvltJraLiAUNrO6oZcM16RdOix8Sq
a8kSHQTqIF4u4RuTYnjraa2UPybfypIM/Ebve3lMLDDI9JcH4xW8f+ej+dESuniL
7zSW6TqP
=xEps
-----END PGP SIGNATURE-----


(
Re: [bug#60013] [PATCH 3/3] gnu: Add clight
CP06BFUVS8UM.1EXAA8C1MKGIF@guix-framework
Heya,

* gnu/packages/wm.scm (clight): New variable.

--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm

@@ -194,6 +195,61 @@ (define-public bspwm

+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after
+ 'patch-source-shebangs 'patch-target-dirs
+ (lambda _
+ (substitute*
+ "./CMakeLists.txt"
+ (("DESTINATION \\$\\{SESSION_BUS_DIR\\}")
+ (string-append "DESTINATION " #$output "/share/dbus-1/services"))
+ (("DESTINATION /etc/xdg/autostart")
+ (string-append "DESTINATION " #$output "/etc/xdg/autostart"))
+ (("DESTINATION /usr/share/*")
+ (string-append "DESTINATION " #$output "/share/*")))
+ #t)))))

Same here; couldn't these be -D flags, except for the /usr/share/*
replacement? Also, #T at the end isn't necessary anymore :)

+ (synopsis "User daemon utility to fully manage screens")

(synopsis "Daemon for managing screens")

+ (description "Clight is a tiny C utility that can turn your webcam
+into a light sensor; moreover it supports a redshift-like gamma
+control, a screen dimmer and dpms settings.
+It is the userspace interface for clightd.")

(description
"@command{clight} is the interface to @command{clightd}. It implements
gamma control akin to @command{redshift}, a screen dimmer, and dpms settings.
It can also turn your webcam into a light sensor.")

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

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOXo7YACgkQ7ImHg/nq
I23gUQwAq/p1zvjJLG2gcsxyQ7s0w9WS0R12PN7cOkiVVhkihrDG88AVtE9p5wma
J32CpFp7r+oDuN9nzf1z0g+5E8lcQY2IVAtUnULfHqiLKaM+/7X/pFM0CWFlRXue
QvZ+hHwY25Z57zm7v78ZWxlZQWrVKHHtEDtlOb6iytYq86RAyEgfY2tkEpyw6O8H
jsS1zfNS9ngfh0PHEbOwdsQz7RGzjDN1ggPE0+nwPUiN37pc6PWPdmisXYoQCk8j
BpxPP/0d6JzrRGDcCPyTRjwxKbNbwLaWUdTCZRCX7u3eKfsQVnF5AB4F+PTCfPhL
+ESwXs4fFJWXFaBUOtAYFbg2Txj3AQhkzMXxjqhmbsGTqkXM8UiY7pIoWScl/AYA
ubybjnmay9B/3PN1iZv++0EzXUVwzvMxOf/O1Tvq4dWhxCCpsaoEryk32SOlI5L/
jsiDmxxRBgtogBvosU53Ac1U7DH61UT7+xFxpk9RLv+C94658D3JZhWPaVW+SMtO
eWwROvDE
=Gl3/
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 13 Dec 2022 00:48
Re: [bug#60013] [PATCH 1/3] gnu: Add libmodule
(name . florhizome)(address . florhizome@posteo.net)
86tu20b2uu.fsf@gmail.com
Hi,

On Mon, 12 Dec 2022 at 20:31, florhizome@posteo.net wrote:

Toggle quote (3 lines)
> zimoun: yes I usually send an empty mail before a patchset wit
> multiple patches

Two minor opinionated comments. :-) Maybe instead of an empty mail
before a patch set, you could send a cover letter. For instance, the
most simple as template is provided by:

git format-patch --cover-letter -3 --base=origin/master

which creates 0000-cover-letter.patch; and it looks like:

Toggle snippet (24 lines)
From e84042fdd4ac2f903224e1b5f366537a22b4d593 Mon Sep 17 00:00:00 2001
From: zimoun <zimon.toutoune@gmail.com>
Date: Tue, 13 Dec 2022 00:42:04 +0100
Subject: [PATCH 0/3] *** SUBJECT HERE ***

*** BLURB HERE ***

Ricardo Wurmus (3):
gnu: python-flasgger: Update to 0.9.5.
gnu: seqmagick: Update to 0.8.4.
gnu: cnvkit: Update to 0.9.9.

gnu/packages/bioinformatics.scm | 31 +++++++++++++++++++---------
gnu/packages/python-xyz.scm | 36 +++++++++++++++++++--------------
2 files changed, 42 insertions(+), 25 deletions(-)


base-commit: 8c197f990b7ab60e4524567d628d78ea62973c11
--
2.35.1



Last, just to point that,

Toggle quote (3 lines)
> base-commit: 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0
> prerequisite-patch-id: 36ae907c0ae2cbc001f774c0514ab217855270c2

[...]

Toggle quote (2 lines)
> prerequisite-patch-id: 709b4522fd225f3c28bb2721e5dd9a20014ce131

these prerequisite could lead to trouble when applying this patch set.


Anyway, thanks for the patch set. :-)

Cheers,
simon
F
F
Florian wrote on 13 Dec 2022 12:51
(address . 60013@debbugs.gnu.org)
87tu1zr072.fsf@posteo.net
Hi all,
thanks for your comments.
A revamped patch-set should be on the way soon, depending mostly on
your's truly input on how to go on with the tests, but see below :)

T B-R: That's how it was! Although these days my mails were as fast as a
couple hours to appear on the mailing list, who could complain ;)

unmatched-paren: I checked the projects for configure flags before I
sent them. Unfortunately I am pretty sure, the remaining patches are not
avoidable, since the variables are set by cmakes pkg-config
queries, but correct me if wrong! I am no expert in any build system,
but these things are often detectable I think :). (btw if there was an effort to write a blog post to document
problems for nix/guix packaging, the use of pkg-config queries those should be explicitly
mentioned, it's a pest!).

About tests:
I also can't find any tests in clight and clightd's repos. At least for
libmodule I found how to build and enable tests
So by setting this flag and packing valgrind and cmocka into
'native-inputs', two tests will be built and run. The one using valgrind
will fail though:

starting phase `check'
Running tests...
/gnu/store/j65q3aw414010gdfvmsynwpzfb2jyyd3-cmake-minimal-3.21.4/bin/ctest --force-new-ctest-process
Test project /tmp/guix-build-libmodule-5.0.1.drv-0/build
Start 1: ModuleTest
1/2 Test #1: ModuleTest ....................... Passed 1.21 sec
Start 2: ModuleTest_valgrind
2/2 Test #2: ModuleTest_valgrind ..............***Failed 0.02 sec
==258== Memcheck, a memory error detector
==258== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==258== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==258== Command: ./ModuleTest
==258==

valgrind: Fatal error at startup: a function redirection
valgrind: which is mandatory for this platform-tool combination
valgrind: cannot be set up. Details of the redirection are:
valgrind:
valgrind: A must-be-redirected function
valgrind: whose name matches the pattern: strlen
valgrind: in an object with soname matching: ld-linux-x86-64.so.2
valgrind: was not found whilst processing
valgrind: symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
valgrind: Possible fixes: (1, short term): install glibc's debuginfo
valgrind: package on this machine. (2, longer term): ask the packagers
valgrind: for your Linux distribution to please in future ship a non-
valgrind: stripped ld.so (or whatever the dynamic linker .so is called)
valgrind: that exports the above-named function using the standard
valgrind: calling conventions for this platform. The package you need
valgrind: to install for fix (1) is called
valgrind:
valgrind: On Debian, Ubuntu: libc6-dbg
valgrind: On SuSE, openSuSE, Fedora, RHEL: glibc-debuginfo
valgrind:
valgrind: Note that if you are debugging a 32 bit process on a
valgrind: 64 bit system, you will need a corresponding 32 bit debuginfo
valgrind: package (e.g. libc6-dbg:i386).
valgrind:
valgrind: Cannot continue -- exiting now. Sorry.



50% tests passed, 1 tests failed out of 2

Total Test time (real) = 1.23 sec

And I'm not sure how to help with that. including (list glibc "debug")
didn't do it. Do we need really need this test?
The next question is then if the tests that are automatically run are
those mentioned in the README on the projects wiki (see url
above). Chime-in!

zimoun: I think I have been leaving that indentation after (description
in everything I contributed so far. I seriously hope I don't need to rework all of
those just for that. But for the future, I know now ;)
These also would be those "prerequisite-patch-ids" hanging around, that
are generated by the --base=auto flag I use with git send-email like a
good manual follower. I don't want to operate on multiple guix repos or branches, I find
the workflow to keep one updated time-consuming enough so far... So I
guess, to be frank, what can I actually do about that?

Side Note: Of course this list would become smaller the more previous patches are
actually merged *cough cough* most of whom are simple, one-hunk patches
that should require the least amount of time :)
Z
Z
zimoun wrote on 15 Dec 2022 12:31
86pmckdhts.fsf@gmail.com
Hi Florian,

On Tue, 13 Dec 2022 at 11:51, Florian <florhizome@posteo.net> wrote:

Toggle quote (6 lines)
> These also would be those "prerequisite-patch-ids" hanging around, that
> are generated by the --base=auto flag I use with git send-email like a
> good manual follower. I don't want to operate on multiple guix repos or branches, I find
> the workflow to keep one updated time-consuming enough so far... So I
> guess, to be frank, what can I actually do about that?

I understand. My point is just that it can be hard to be sure that the
patch set correctly applies; because some prerequisite-patch-ids could
modifies something without being included. For instance, I think it is
what is happening with this current patch set. On the top of,

base-commit: 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0

from the master branch, PATCH 1/3 correctly applies but I am failing to
apply PATCH 2/3.

Toggle snippet (7 lines)
error: patch failed: gnu/packages/wm.scm:102
error: gnu/packages/wm.scm: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: gnu: Add clightd
Patch failed at 0001 gnu: Add clightd

Well, I understand your workflow, I guess. My point is just to mention
that creating a branch with Git costs nothing. For instance,

Toggle snippet (8 lines)
git checkout -d example
git reset --soft 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0
git cherry-pick 5ad571d5a145a7a33ec9241bf75f25cf4864e629
git format-patch -1 --cover-letter --base=0ce1f82e5aaac951b21d579eb46bf75cfe6713c0
git checkout master
git branch -D example

where 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0 is ’origin/master’ when
you created this patch set. And where
5ad571d5a145a7a33ec9241bf75f25cf4864e629 is the commit adding libmodule.

From my point of view, it changes almost nothing for you and, IMHO, it
helps the review, both the human and the automated [1] ones.

Obviously, it is an opinionated minor comment. :-) And for sure, the
most important is that you send your contributions–meaning, the way that
is comfortable for you.


Cheers,
simon
F
F
Florian wrote on 20 Dec 2022 17:33
871qounifm.fsf@posteo.net
On 2022-12-15, 12:31 +0100, zimoun <zimon.toutoune@gmail.com> wrote:

Toggle quote (3 lines)
> Well, I understand your workflow, I guess. My point is just to mention
> that creating a branch with Git costs nothing.

Creating a branch, yes, but continuously rebasing them all and recompiling before
working on each single commission: yes (building guix is pretty time
intensive). This is where I think guix lacks a proper CI/CD. That contributors
even have to check if a patch applies, if it builds and run guix lint
seems paradox to me, especially with the capacity problems that already exist
when accepting submissions.

I think the problem you have comes from multiple patches of mine being in
wm.scm which has also made rebasing more complicated. Git really seems
to struggle when patches have hunks in one file that might touch each other,
that I haven't really understood how to avoid. but I can check
one more time. Maybe we could have a look at how the patch is failing?
(
CP7GG4W28DGU.NEW4FW3EAU7Q@guix-framework
On Tue Dec 20, 2022 at 4:33 PM GMT, Florian wrote:
Toggle quote (5 lines)
> On 2022-12-15, 12:31 +0100, zimoun <zimon.toutoune@gmail.com> wrote:
> Creating a branch, yes, but continuously rebasing them all and recompiling before
> working on each single commission: yes (building guix is pretty time
> intensive).

Maybe try using ``guix worktree'' to create new directories for each branch checkout.

Toggle quote (5 lines)
> This is where I think guix lacks a proper CI/CD. That contributors
> even have to check if a patch applies, if it builds and run guix lint
> seems paradox to me, especially with the capacity problems that already exist
> when accepting submissions.

Have you seen https://qa.guix.gnu.org? :)

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

iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOi7GEACgkQ7ImHg/nq
I23RdAv8D1c3o/9eUQziTVJCJbDeoK6mzeUIZdYth4RnbvPviKXsJG94/Y7nhSOh
DkeNYtvtgu5hkNNcH/VCtyODJWnr4t9LJakx9iCnHo4MOQ2kzQILHL73maiiwxKz
W0w3EQgs+nvZs0fpRAjSZbBgpebihui7X00tTaiD8UBEviep/1H7yZKYIQuqhzKO
Y4ShYqe7Wy+SrLyIkDuAT2OZ32PuUnUUgiYkDK/IZOe9uEQLTbPtn5gjUigEcJv/
/mbgODz9HC6qmLCKJOc4HsPNe4HfNHye8CqmkNFeXpR/4VyZiLLAOQmQGeUGpQvU
N37YjaFyb1YrJMmpCeWQbUrsf8FQfnkrfXrFJdCoIn2UujcVfCfwbdm+hkvKGM3p
sc5hYF7MyFecsYbEwtnGGKS8bvISjYPvn0n4sITK5Uhi/p2OHKVuzke2Xjr5ekh5
pGCu3Tgh+C59wjuL4+g4gtbXqvMtiDNK2C1j1s1IFKM6Y6Jhynuyu92imH13s5L7
apTZ6Sen
=jpDO
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 30 Dec 2022 13:45
87k029kql1.fsf@gmail.com
Hi,

On Tue, 20 Dec 2022 at 16:33, Florian <florhizome@posteo.net> wrote:

Toggle quote (7 lines)
> Creating a branch, yes, but continuously rebasing them all and recompiling before
> working on each single commission: yes (building guix is pretty time
> intensive). This is where I think guix lacks a proper CI/CD. That contributors
> even have to check if a patch applies, if it builds and run guix lint
> seems paradox to me, especially with the capacity problems that already exist
> when accepting submissions.

Are you aware about https://qa.guix.gnu.org/patches?

And for what it is worth, your submission [1] fails with the Guix CI/CD.
Probably because your patches do not apply correctly.


What I was suggesting is not to rebase and not to rebuild but instead to
cherry-pick and then correctly format patches. Please note that this
comment applies equally for any workflow – even for some PR workflow à
la Git{Hub,Lab}.


Toggle quote (6 lines)
> I think the problem you have comes from multiple patches of mine being in
> wm.scm which has also made rebasing more complicated. Git really seems
> to struggle when patches have hunks in one file that might touch each other,
> that I haven't really understood how to avoid. but I can check
> one more time. Maybe we could have a look at how the patch is failing?

As pointed in [1], the patch just does not apply,

Toggle snippet (7 lines)
error: patch failed: gnu/packages/wm.scm:102
error: gnu/packages/wm.scm: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: gnu: Add clightd
Patch failed at 0001 gnu: Add clightd

because of gnu/packages/wm.scm:102. From my understanding, it is not
about rebasing, it is about which state of the file the diff must apply
against.

What I was suggesting is to extract these 3 patches using cherry-pick
and so format the patches against a clean origin/master. For instance,

Toggle snippet (10 lines)
git checkout -d example
git reset --soft 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0
git cherry-pick 5ad571d5a145a7a33ec9241bf75f25cf4864e629
git cherry-pick <commit-hash-adding-clightd>
git cherry-pick <commit-hash-adding-clight>
git format-patch -3 --cover-letter --base=0ce1f82e5aaac951b21d579eb46bf75cfe6713c0
git checkout master
git branch -D example

where 0ce1f82e5aaac951b21d579eb46bf75cfe6713c0 is a clean
’origin/master’ when you created this patch set. And where
5ad571d5a145a7a33ec9241bf75f25cf4864e629 is the commit adding libmodule.

It changes nothing for you, IMHO, and it helps for having patches which
correctly apply; although you still have other unreleated patches.



Cheers,
simon
?