[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#57168] [PATCH 03/14] gnu: accountsservice: Provide a means to locat
From: |
Maxim Cournoyer |
Subject: |
[bug#57168] [PATCH 03/14] gnu: accountsservice: Provide a means to locate extensions. |
Date: |
Sat, 13 Aug 2022 02:54:22 -0400 |
* gnu/packages/patches/accountsservice-extensions.patch: New patch.
* gnu/packages/freedesktop.scm (accountsservice)[source]: Apply it.
[phases]{wrap-with-xdg-data-dirs}: New phase.
---
gnu/local.mk | 1 +
gnu/packages/freedesktop.scm | 12 +++++++--
.../patches/accountsservice-extensions.patch | 25 +++++++++++++++++++
3 files changed, 36 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/accountsservice-extensions.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 2d32d85d47..c2a33fa7d1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -840,6 +840,7 @@ dist_patch_DATA =
\
%D%/packages/patches/abseil-cpp-fix-strerror_test.patch \
%D%/packages/patches/adb-add-libraries.patch \
%D%/packages/patches/adb-libssl_11-compatibility.patch \
+ %D%/packages/patches/accountsservice-extensions.patch \
%D%/packages/patches/aegis-constness-error.patch \
%D%/packages/patches/aegis-perl-tempdir1.patch \
%D%/packages/patches/aegis-perl-tempdir2.patch \
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 8ebd0e5359..ab6fb480a7 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -1443,7 +1443,8 @@ (define-public accountsservice
"accountsservice/accountsservice-"
version ".tar.xz"))
(sha256
- (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch"))))
+ (base32 "14d3lwik048h62qrzg1djdd2sqmxf3m1r859730pvzhrd6krg6ch"))
+ (patches (search-patches "accountsservice-extensions.patch"))))
(build-system meson-build-system)
(arguments
`(#:configure-flags
@@ -1479,7 +1480,14 @@ (define-public accountsservice
(("/usr/bin/passwd")
(search-input-file inputs "bin/passwd"))
(("/usr/bin/chage")
- (search-input-file inputs "bin/chage"))))))))
+ (search-input-file inputs "bin/chage")))))
+ (add-after 'install 'wrap-with-xdg-data-dirs
+ ;; This is to allow accountsservice finding extensions, which
+ ;; should be installed to the system profile.
+ (lambda* (#:key outputs #:allow-other-keys)
+ (wrap-program (search-input-file outputs
"libexec/accounts-daemon")
+ '("XDG_DATA_DIRS" prefix
+ ("/run/current-system/profile/share"))))))))
(native-inputs
(list docbook-xml-4.1.2
docbook-xsl
diff --git a/gnu/packages/patches/accountsservice-extensions.patch
b/gnu/packages/patches/accountsservice-extensions.patch
new file mode 100644
index 0000000000..2cfab580e3
--- /dev/null
+++ b/gnu/packages/patches/accountsservice-extensions.patch
@@ -0,0 +1,25 @@
+Patch from NixOS retrieved from
+https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/development/libraries/accountsservice/drop-prefix-check-extensions.patch.
+
+diff --git a/src/extensions.c b/src/extensions.c
+index 038dcb2..830465d 100644
+--- a/src/extensions.c
++++ b/src/extensions.c
+@@ -121,16 +121,7 @@ daemon_read_extension_directory (GHashTable *ifaces,
+ continue;
+ }
+
+- /* Ensure it looks like "../../dbus-1/interfaces/${name}" */
+- const gchar * const prefix = "../../dbus-1/interfaces/";
+- if (g_str_has_prefix (symlink, prefix) && g_str_equal
(symlink + strlen (prefix), name)) {
+- daemon_read_extension_file (ifaces, filename);
+- }
+- else {
+- g_warning ("Found accounts service vendor extension
symlink %s, but it must be exactly "
+- "equal to '../../dbus-1/interfaces/%s' for
forwards-compatibility reasons.",
+- filename, name);
+- }
++ daemon_read_extension_file (ifaces, filename);
+ }
+
+ g_dir_close (dir);
--
2.36.1
- [bug#57168] [PATCH 00/14] Add a LightDM service., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 01/14] services: configuration: Add a 'maybe-value-set?' procedure., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 07/14] gnu: lightdm-gtk-greeter: Adjust default config file path., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 02/14] gnu: accountsservice: Update to 22.08.8, enable doc and test suite., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 06/14] gnu: lightdm-gtk-greeter: Enable libklavier support., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 03/14] gnu: accountsservice: Provide a means to locate extensions.,
Maxim Cournoyer <=
- [bug#57168] [PATCH 14/14] services: Add lightdm-service-type., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 08/14] gnu: lightdm-gtk-greeter: Adjust --enable-at-spi-command value., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 12/14] marionette: Improve the error message of 'wait-for-screen-text'., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 10/14] gnu: lightdm: Apply patch to allow using VNC options., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 09/14] gnu: lightdm: Apply patch to fix a problem with VNC integration., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 11/14] gnu: lightdm: Apply patch to fix color depth issue with VNC., Maxim Cournoyer, 2022/08/13
- [bug#57168] [PATCH 04/14] gnu: lightdm-gtk-greeter: Add GDK_PIXBUF_MODULE_FILE to wrapper., Maxim Cournoyer, 2022/08/13