[PATCH gnome-team 0/3] Fix the lightdm testsuite with an older dbus

  • Done
  • quality assurance status badge
Details
3 participants
  • Liliana Marie Prikler
  • Christopher Baines
  • Vivien Kraus
Owner
unassigned
Submitted by
Vivien Kraus
Severity
normal

Debbugs page

Vivien Kraus wrote 12 months ago
(address . guix-patches@gnu.org)
cover.1711139684.git.vivien@planete-kraus.eu
Dear Guix,

Lightdm has a custom test runner that runs its own dbus daemon. Dbus 1.15.0
is unfortunately the latest version that can run the lightdm testsuite. It
should not affect the behavior of the program, as this is just to launch a
dbus daemon to then run the tests.

We have 2 options: remove the tests until lightdm proposes a fix, or provide
an “older” dbus (it’s still newer than what’s on master). It seems that 1.15.2
fixes a CVE too, so maybe we don’t want to provide 1.15.0 actually.

I went with the latter option though because it preserves our test suite, and
I made it a hidden package to avoid exposing it too much.

What do you think?

Best regards,

Vivien

Vivien Kraus (3):
gnu: Add dbus-1.15.0.
gnu: lightdm: Update style.
gnu: lightdm: Run tests with dbus-1.15.0.

gnu/packages/display-managers.scm | 65 ++++++++++++++++---------------
gnu/packages/glib.scm | 15 +++++++
2 files changed, 49 insertions(+), 31 deletions(-)


base-commit: a9951a74a591a9b22ee2d93d8efe0523c6c42c97
--
2.41.0
Vivien Kraus wrote 12 months ago
[PATCH gnome-team 1/3] gnu: Add dbus-1.15.0.
(address . 69948@debbugs.gnu.org)
94c3c0e5658654ed28786918aa76a97b95c7fb99.1711139684.git.vivien@planete-kraus.eu
The NEWS file for 1.15.2 (the next release after 1.15.0) indicates a breaking
change. This is the latest release that the lightdm testsuite can work with.

* gnu/packages/glib.scm (dbus-1.15.0): New variable.

Change-Id: I9c3553b315e6618fbbf19aade6b807ab7120364b
---
gnu/packages/glib.scm | 15 +++++++++++++++
1 file changed, 15 insertions(+)

Toggle diff (28 lines)
diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index bff8bec81f..cf066a8aa6 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -209,6 +209,21 @@ (define-public dbus-for-jami
(("@SYSCONFDIR_FROM_PKGDATADIR@/dbus-1/session-local.conf")
"/var/run/jami/session-local.conf")))))))))))
+(define-public dbus-1.15.0
+ ;; Dbus 1.15.2 has a breaking change.
+ (hidden-package
+ (package/inherit dbus
+ (version "1.15.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://dbus.freedesktop.org/releases/dbus/dbus-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "02k4zm5h24clwp4csp2r3xp2lxib31jlk3xkgdj2c0njkb5whwsh"))
+ (patches (search-patches "dbus-helper-search-path.patch")))))))
+
;;; The reason this is not enabled in the regular dbus package is because it
;;; impacts the performance of D-Bus (including its library) as a whole, even
;;; when the DBUS_VERBOSE environment variable is not set.
--
2.41.0
Vivien Kraus wrote 12 months ago
[PATCH gnome-team 3/3] gnu: lightdm: Run tests with dbus-1.15.0.
(address . 69948@debbugs.gnu.org)
4e4e99c48ca2a4ffb33f131fccfc86af86b2afa7.1711139684.git.vivien@planete-kraus.eu
* gnu/packages/display-managers.scm (lightdm) [native-inputs]: Replace dbus
with dbus-1.15.0.

Change-Id: Icc3b3f7d4589b60220e15aaa02d2203af308d44c
---
gnu/packages/display-managers.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 7b802f1b5f..e3381a1665 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -382,7 +382,9 @@ (define-public lightdm
libtool
vala ;for Vala bindings
;; For tests
- dbus
+ ;; All tests fail with dbus >= 1.15.2, see
+ ;; https://github.com/canonical/lightdm/issues/346
+ dbus-1.15.0
python-wrapper
python-pygobject
which
--
2.41.0
Vivien Kraus wrote 12 months ago
[PATCH gnome-team 2/3] gnu: lightdm: Update style.
(address . 69948@debbugs.gnu.org)
efd514f35069fbbd2eeae2105aa2874108646637.1711139684.git.vivien@planete-kraus.eu
* gnu/packages/display-managers.scm [arguments]: Convert to list of G-Expressions.

Change-Id: I8d7beb73e636be066d2dbe2588a5ebcb2f5afec0
---
gnu/packages/display-managers.scm | 61 ++++++++++++++++---------------
1 file changed, 31 insertions(+), 30 deletions(-)

Toggle diff (74 lines)
diff --git a/gnu/packages/display-managers.scm b/gnu/packages/display-managers.scm
index 2df4e6311b..7b802f1b5f 100644
--- a/gnu/packages/display-managers.scm
+++ b/gnu/packages/display-managers.scm
@@ -330,36 +330,37 @@ (define-public lightdm
"lightdm-vnc-ipv6.patch"))))
(build-system gnu-build-system)
(arguments
- '(#:parallel-tests? #f ; fails when run in parallel
- #:configure-flags
- (list "--localstatedir=/var"
- "--enable-gtk-doc"
- ;; Otherwise the test suite fails on such a warning.
- "CFLAGS=-Wno-error=missing-prototypes")
- #:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'fix-paths
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "src/shared-data-manager.c"
- (("/bin/rm")
- (search-input-file inputs "bin/rm")))
- (substitute* '("data/users.conf"
- "common/user-list.c")
- (("/bin/false")
- (search-input-file inputs "bin/false"))
- (("/usr/sbin/nologin")
- (search-input-file inputs "sbin/nologin")))
- (substitute* "src/seat.c"
- (("/bin/sh")
- (search-input-file inputs "bin/sh")))))
- (add-before 'check 'pre-check
- (lambda _
- (wrap-program "tests/src/test-python-greeter"
- `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
- `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
- ;; Avoid printing locale warnings, which trip up the text
- ;; matching tests.
- (unsetenv "LC_ALL"))))))
+ (list
+ #:parallel-tests? #f ; fails when run in parallel
+ #:configure-flags
+ #~(list "--localstatedir=/var"
+ "--enable-gtk-doc"
+ ;; Otherwise the test suite fails on such a warning.
+ "CFLAGS=-Wno-error=missing-prototypes")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "src/shared-data-manager.c"
+ (("/bin/rm")
+ (search-input-file inputs "bin/rm")))
+ (substitute* '("data/users.conf"
+ "common/user-list.c")
+ (("/bin/false")
+ (search-input-file inputs "bin/false"))
+ (("/usr/sbin/nologin")
+ (search-input-file inputs "sbin/nologin")))
+ (substitute* "src/seat.c"
+ (("/bin/sh")
+ (search-input-file inputs "bin/sh")))))
+ (add-before 'check 'pre-check
+ (lambda _
+ (wrap-program "tests/src/test-python-greeter"
+ `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
+ `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH"))))
+ ;; Avoid printing locale warnings, which trip up the text
+ ;; matching tests.
+ (unsetenv "LC_ALL"))))))
(inputs
(list audit
bash-minimal ;for cross-compilation
--
2.41.0
Liliana Marie Prikler wrote 12 months ago
Re: [PATCH gnome-team 3/3] gnu: lightdm: Run tests with dbus-1.15.0.
62bf744084319d378226f23a9c7d647b13ae13de.camel@gmail.com
Am Freitag, dem 22.03.2024 um 21:32 +0100 schrieb Vivien Kraus:
Toggle quote (5 lines)
> * gnu/packages/display-managers.scm (lightdm) [native-inputs]:
> Replace dbus
> with dbus-1.15.0.
>
> Change-Id: Icc3b3f7d4589b60220e15aaa02d2203af308d44c
LGTM
Christopher Baines wrote 12 months ago
Re: [bug#69948] [PATCH gnome-team 3/3] gnu: lightdm: Run tests with dbus-1.15.0.
(name . Liliana Marie Prikler)(address . liliana.prikler@gmail.com)
87v85bhq8s.fsf@cbaines.net
Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

Toggle quote (8 lines)
> Am Freitag, dem 22.03.2024 um 21:32 +0100 schrieb Vivien Kraus:
>> * gnu/packages/display-managers.scm (lightdm) [native-inputs]:
>> Replace dbus
>> with dbus-1.15.0.
>>
>> Change-Id: Icc3b3f7d4589b60220e15aaa02d2203af308d44c
> LGTM

Thanks both, I've pushed this to gnome-team as
da381e233453b746b77b899b0584a13c41202e4c.

I didn't realise that dbus is just used for the tests, and isn't
actually referenced. I'd assumed it must be a runtime dependency.

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

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYAAeNfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XfUJBAAgUGg1mY1+dVZaBiwZCvtP43arPoVdIM/
ezqt6+8B4tLtkTt/EH6HMGFfK0iIa6TSUniI5eUCTsWyngTAdbSDsEbVUNG6iJV6
RG9OX1RMbrNm8hnJCu80KH4m6cfS39eZAioUw9vZAlhliq1U/w1s4woK2bm9gHui
/U0ExR0GsG1E1B89F8zJpHwNs7DwmlI/acwIgfzJCLGixD3MSFjqYQmjE4LeZiNI
1DyVT9rnRCYJm20HXpe49pufU4chy0tl/ubAc1oum5W3x00pBD+0eofTe4CviGse
AwllGezXkA2PHvDK7oDFW6h/Yv/YGzBwSEaxmgHQ648YTKLMTjWWUwzqYwXJPpLp
xK/2R45KdiPYtK9cUelPp/umSmqDtJ8pppQM4IiY/1O9RL0cSYEI1YHDNyNgUQEW
drhfClE+VkxdN5k7sgfFQ/9bdpvSdVb+efGHYXlxr40mHI+4n+A8G/qFZVYpKioy
vQWruMs+xcuFMyB44YRToC0KW43cQf93UwiR81v4NTvyw+TVfAvSSVNdKn+ojZM0
tBLhXo3GAHqWMN93jAXmKHDTHxkw90QvEAtzehns3+JwPKSXc6zFBYh3KMJdjsFK
UmsLo4C5zFJOhmwlcAKx6womsgp5ZWq8AdOK648NUhj4EvetMJlWxj+JEVK+gyAJ
sW4QbA2w9Uk=
=Ej6g
-----END PGP SIGNATURE-----

Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 69948
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help