[PATCH] gnu: sdbus-c++: Update to 2.0.0.

  • Open
  • quality assurance status badge
Details
3 participants
  • John Kehayias
  • Ludovic Courtès
  • Sisiutl
Owner
unassigned
Submitted by
Sisiutl
Severity
normal
S
S
Sisiutl wrote on 8 Nov 2024 13:30
(address . guix-patches@gnu.org)(name . Sisiutl)(address . sisiutl@egregore.fun)
20241108123050.23571-1-sisiutl@egregore.fun
* gnu/packages/glib.scm (sdbus-c++): Update to 2.0.0.

Change-Id: I7f2fb86e72fc536fe2fb92672fc38d2444b1bbb5
---
gnu/packages/glib.scm | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)

Toggle diff (52 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index a15a7ce58a..bcb1c39ea3 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1299,7 +1299,7 @@ (define-public sdbus-c++
;; file.
(package
(name "sdbus-c++")
- (version "1.4.0")
+ (version "2.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1308,31 +1308,23 @@ (define-public sdbus-c++
(file-name (git-file-name name version))
(sha256
(base32
- "111l2rl0pg9r5cdrhqpac4v22cnq41skxxfk3cng81l0n05v1sh0"))))
+ "1s6vhzln0rvac2r3v8nq08hsjhyz3y46fsy18i23ppjm30apkiav"))))
(build-system cmake-build-system)
(arguments
(list
;; Avoid the integration test, which requires a system bus.
#:test-target "sdbus-c++-unit-tests"
- #:configure-flags #~(list "-DBUILD_CODE_GEN=ON"
- "-DBUILD_TESTS=ON"
+ #:configure-flags #~(list "-DSDBUS_CPP_BUILD_CODE_GEN=ON"
+ "-DSDBUS_CPP_BUILD_TESTS=ON"
;; Do not install tests.
- "-DTESTS_INSTALL_PATH=/tmp"
+ "-DSDBUS_CPP_TESTS_INSTALL_PATH=/tmp"
"-DCMAKE_VERBOSE_MAKEFILE=ON")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'do-not-install-tests
(lambda _
(substitute* "tests/CMakeLists.txt"
- (("/etc/dbus-1/system.d") "/tmp"))))
- (add-after 'unpack 'fix-elogind-requirement
- (lambda _
- ;; sdbus-c++.pc requires 'elogind', but it should
- ;; require 'libelogind'. Fixed after 1.4.0 with
- ;; fb9e4ae37152648a67814458d3ff673b1d3ca089
- (substitute* "pkgconfig/sdbus-c++.pc.in"
- (("@LIBSYSTEMD@")
- "libelogind")))))))
+ (("/etc/dbus-1/system.d") "/tmp")))))))
(native-inputs (list googletest pkg-config))
(inputs (list expat))
(propagated-inputs (list elogind)) ;required by sdbus-c++.pc
--
2.46.0
L
L
Ludovic Courtès wrote 6 days ago
(name . Sisiutl)(address . sisiutl@egregore.fun)(address . 74256@debbugs.gnu.org)
87msgenlm5.fsf@gnu.org
Hi,

Sisiutl <sisiutl@egregore.fun> skribis:

Toggle quote (4 lines)
> * gnu/packages/glib.scm (sdbus-c++): Update to 2.0.0.
>
> Change-Id: I7f2fb86e72fc536fe2fb92672fc38d2444b1bbb5

Sorry for the logn delay.

Building fails with:

Toggle snippet (11 lines)
starting phase `check'
make: *** No rule to make target 'sdbus-c++-unit-tests'. Stop.

Test suite failed, dumping logs.
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("sdbus-c++-unit-tests" "-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
phase `check' failed after 0.0 seconds
command "make" "sdbus-c++-unit-tests" "-j" "4" failed with status 2
build process 6 exited with status 256

Could you take a look?

Thanks,
Ludo’.
J
J
John Kehayias wrote 3 days ago
Re: [bug#74256] [PATCH V2 1/2] gnu: sdbus-c++: Update to 2.0.0.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87msg9iwzx.fsf_-_@protonmail.com
Hello,

On Sun, Dec 29, 2024 at 11:57 PM, Ludovic Courtès wrote:

Toggle quote (9 lines)
> Hi,
>
> Sisiutl <sisiutl@egregore.fun> skribis:
>
>> * gnu/packages/glib.scm (sdbus-c++): Update to 2.0.0.
>>
>> Change-Id: I7f2fb86e72fc536fe2fb92672fc38d2444b1bbb5
>

I was just looking to update this package as well (to add hypridle, an
idle helper for the Hyprland compositor system). I tried to go to the
latest version but I think it needs a newer googletest (there is a
pending patch for it) which will require a branch for rebuilding.

Toggle quote (17 lines)
> Sorry for the logn delay.
>
> Building fails with:
>
> starting phase `check'
> make: *** No rule to make target 'sdbus-c++-unit-tests'. Stop.
>
> Test suite failed, dumping logs.
> error: in phase 'check': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("sdbus-c++-unit-tests" "-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
> phase `check' failed after 0.0 seconds
> command "make" "sdbus-c++-unit-tests" "-j" "4" failed with status 2
> build process 6 exited with status 256
>
> Could you take a look?
>

The problem is the configure flags changed and now have a prefix of
"SDBUSCPP_" (note the extra underscores in the original patch here).
Also, the underscore was removed in "CODE_GEN".

I fixed this in the v2 patch (attached) and would have just pushed it,
but found out that libjami fails to build with this update (the other
dependent xdg-desktop-portal-hyprland also fails but is fixed with a
trivial version update).

I didn't see an easier way than just adding back the older sdbus-c++
version for use by libjami, in a followup patch in the next email. Since
this is a less trivial change I send it for review here.

Toggle quote (3 lines)
> Thanks,
> Ludo’.

Thanks both!
John
From 63e209d7f6d0faf41852a8c889d23d7bcc8459e7 Mon Sep 17 00:00:00 2001
Message-ID: <63e209d7f6d0faf41852a8c889d23d7bcc8459e7.1735797062.git.john.kehayias@protonmail.com>
From: Sisiutl <sisiutl@egregore.fun>
Date: Fri, 8 Nov 2024 13:30:43 +0100
Subject: [PATCH 1/2] gnu: sdbus-c++: Update to 2.0.0.
* gnu/packages/glib.scm (sdbus-c++): Update to 2.0.0.
[arguments]<#:configure-flags>: Update to upstream names, prefixing with
"SDBUSCPP_" and changing "CODE_GEN" to "CODEGEN".
<#:phases>: Remove fix-elogind-requirement phase (no longer needed).
Change-Id: I7f2fb86e72fc536fe2fb92672fc38d2444b1bbb5
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
Co-authored-by: John Kehayias <john.kehayias@protonmail.com>
---
gnu/packages/glib.scm | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
Toggle diff (58 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 0effc87f45..71e1fde36d 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1301,11 +1301,9 @@ (define-public dbus-cxx
(license (list license:lgpl3+ license:bsd-3)))) ;dual licensed
(define-public sdbus-c++
- ;; Use the latest commit, which includes unreleased fixes to the pkg-config
- ;; file.
(package
(name "sdbus-c++")
- (version "1.4.0")
+ (version "2.0.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -1314,31 +1312,23 @@ (define-public sdbus-c++
(file-name (git-file-name name version))
(sha256
(base32
- "111l2rl0pg9r5cdrhqpac4v22cnq41skxxfk3cng81l0n05v1sh0"))))
+ "1s6vhzln0rvac2r3v8nq08hsjhyz3y46fsy18i23ppjm30apkiav"))))
(build-system cmake-build-system)
(arguments
(list
;; Avoid the integration test, which requires a system bus.
#:test-target "sdbus-c++-unit-tests"
- #:configure-flags #~(list "-DBUILD_CODE_GEN=ON"
- "-DBUILD_TESTS=ON"
+ #:configure-flags #~(list "-DSDBUSCPP_BUILD_CODEGEN=ON"
+ "-DSDBUSCPP_BUILD_TESTS=ON"
;; Do not install tests.
- "-DTESTS_INSTALL_PATH=/tmp"
+ "-DSDBUSCPP_TESTS_INSTALL_PATH=/tmp"
"-DCMAKE_VERBOSE_MAKEFILE=ON")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'do-not-install-tests
(lambda _
(substitute* "tests/CMakeLists.txt"
- (("/etc/dbus-1/system.d") "/tmp"))))
- (add-after 'unpack 'fix-elogind-requirement
- (lambda _
- ;; sdbus-c++.pc requires 'elogind', but it should
- ;; require 'libelogind'. Fixed after 1.4.0 with
- ;; fb9e4ae37152648a67814458d3ff673b1d3ca089
- (substitute* "pkgconfig/sdbus-c++.pc.in"
- (("@LIBSYSTEMD@")
- "libelogind")))))))
+ (("/etc/dbus-1/system.d") "/tmp")))))))
(native-inputs (list googletest pkg-config))
(inputs (list expat))
(propagated-inputs (list elogind)) ;required by sdbus-c++.pc
base-commit: ce44a0922979d2ade902638afb9b0d28b160def0
--
2.47.1
J
J
John Kehayias wrote 3 days ago
Re: [bug#74256] [PATCH V2 2/2] gnu: Add sdbus-c++-1.4.0.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87jzbdiwt7.fsf_-_@protonmail.com
Followup patch to add older sdbus-c++ for libjami.

Note: my first email with my v2 of the original patch bounced on trying
to reach the original author: "Host found but no data record of
requested type" error. Will still include in the CC here though.
From e1a3c490d2f54779b6c48ff626b895f381c90cd0 Mon Sep 17 00:00:00 2001
Message-ID: <e1a3c490d2f54779b6c48ff626b895f381c90cd0.1735797062.git.john.kehayias@protonmail.com>
In-Reply-To: <63e209d7f6d0faf41852a8c889d23d7bcc8459e7.1735797062.git.john.kehayias@protonmail.com>
References: <63e209d7f6d0faf41852a8c889d23d7bcc8459e7.1735797062.git.john.kehayias@protonmail.com>
From: John Kehayias <john.kehayias@protonmail.com>
Date: Wed, 1 Jan 2025 18:04:05 -0500
Subject: [PATCH 2/2] gnu: Add sdbus-c++-1.4.0.
* gnu/packages/glib.scm (sdbus-c++-1.4.0): New variable.
* gnu/packages/jami.scm (libjami)[inputs]: Replace sdbus-c++ with
sdbus-c++-1.4.0.
Change-Id: Idb189f80212351cef6b5c8722982880bf5b51fe9
---
gnu/packages/glib.scm | 34 ++++++++++++++++++++++++++++++++++
gnu/packages/jami.scm | 2 +-
2 files changed, 35 insertions(+), 1 deletion(-)
Toggle diff (60 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 71e1fde36d..e3ab6d7641 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -1339,6 +1339,40 @@ (define-public sdbus-c++
of abstraction on top of @code{sd-bus}, the C D-Bus implementation by systemd.")
(license license:lgpl2.1+)))
+;; TODO: Remove once libjami can use newer sdbus-c++.
+(define-public sdbus-c++-1.4.0
+ (package
+ (inherit sdbus-c++)
+ (name "sdbus-c++")
+ (version "1.4.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Kistler-Group/sdbus-cpp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "111l2rl0pg9r5cdrhqpac4v22cnq41skxxfk3cng81l0n05v1sh0"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments sdbus-c++)
+ ((#:configure-flags flags ''())
+ #~(list "-DBUILD_CODE_GEN=ON"
+ "-DBUILD_TESTS=ON"
+ ;; Do not install tests.
+ "-DTESTS_INSTALL_PATH=/tmp"
+ "-DCMAKE_VERBOSE_MAKEFILE=ON"))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'fix-elogind-requirement
+ (lambda _
+ ;; sdbus-c++.pc requires 'elogind', but it should
+ ;; require 'libelogind'. Fixed after 1.4.0 with
+ ;; fb9e4ae37152648a67814458d3ff673b1d3ca089
+ (substitute* "pkgconfig/sdbus-c++.pc.in"
+ (("@LIBSYSTEMD@")
+ "libelogind"))))))))))
+
(define-public appstream-glib
(package
(name "appstream-glib")
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index 25510b9df5..db45c9973e 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -215,7 +215,7 @@ (define-public libjami
openssl
pjproject-jami
pulseaudio
- sdbus-c++
+ sdbus-c++-1.4.0
speex
speexdsp
webrtc-audio-processing/jami
--
2.47.1
L
L
Ludovic Courtès wrote 2 hours ago
Re: [bug#74256] [PATCH V2 1/2] gnu: sdbus-c++: Update to 2.0.0.
(name . John Kehayias)(address . john.kehayias@protonmail.com)
874j2ep82s.fsf@gnu.org
Hello,

John Kehayias <john.kehayias@protonmail.com> skribis:

Toggle quote (5 lines)
> I fixed this in the v2 patch (attached) and would have just pushed it,
> but found out that libjami fails to build with this update (the other
> dependent xdg-desktop-portal-hyprland also fails but is fixed with a
> trivial version update).

[...]

Toggle quote (2 lines)
> Followup patch to add older sdbus-c++ for libjami.

Both LGTM. I would suggest pushing them as a single commit, so that the
change is self-contained and libjami works both before and after.

Thanks,
Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74256@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74256
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch