summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Volk <f_l_k@t-online.de>2025-02-25 16:58:36 +0100
committerKhem Raj <raj.khem@gmail.com>2025-02-25 09:46:52 -0800
commit996dfcbdd7bfd2933e053780f1761c06b4043e7f (patch)
tree06edbdb82e1211d42ea2d589981b14dc5312da8a
parenta6740baee9f14928abee8a086d4990cf400463fc (diff)
downloadmeta-openembedded-996dfcbdd7bfd2933e053780f1761c06b4043e7f.tar.gz
accountsservice: update 22.08.8 -> 23.13.9
- backport a patch to add meson options for wtmp and tests (needed for musl build) - refresh musl patch - add PACKAGECONFIGS for admin_group and elogind - update dependencies - inherit pkgconfig - add backport patch to fix: | ../accountsservice-23.13.9/subprojects/mocklibc-1.0/src/netgroup-debug.c:25:3: error: implicit declaration of function 'print_indent' [-Wimplicit-function-declaration] | 25 | print_indent(stream, indent); Signed-off-by: Markus Volk <f_l_k@t-online.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-gnome/recipes-support/accountsservice/accountsservice/0001-musl-Hack-to-fix-build.patch36
-rw-r--r--meta-gnome/recipes-support/accountsservice/accountsservice/0002-musl-add-missing-fgetspent_r.patch23
-rw-r--r--meta-gnome/recipes-support/accountsservice/accountsservice/00b6e12ad4044d33cc54c71c75773c5a653dad09.patch115
-rw-r--r--meta-gnome/recipes-support/accountsservice/accountsservice/accountsservice-23.13.9-c99-fixes.patch51
-rw-r--r--meta-gnome/recipes-support/accountsservice/accountsservice_23.13.9.bb (renamed from meta-gnome/recipes-support/accountsservice/accountsservice_22.08.8.bb)25
5 files changed, 197 insertions, 53 deletions
diff --git a/meta-gnome/recipes-support/accountsservice/accountsservice/0001-musl-Hack-to-fix-build.patch b/meta-gnome/recipes-support/accountsservice/accountsservice/0001-musl-Hack-to-fix-build.patch
deleted file mode 100644
index 944d2f9165..0000000000
--- a/meta-gnome/recipes-support/accountsservice/accountsservice/0001-musl-Hack-to-fix-build.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From ff0718174faf1167fb4765ebe4bd280bbe8d2ac6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sun, 8 Dec 2019 23:42:00 +0100
4Subject: [PATCH] musl: Hack to fix configure
5
6Upstream-Status: Inappropriate [Musl Specific]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 meson.build | 11 ++++++++---
10 1 file changed, 8 insertions(+), 3 deletions(-)
11
12diff --git a/meson.build b/meson.build
13index 075776f..dfd7421 100644
14--- a/meson.build
15+++ b/meson.build
16@@ -101,9 +101,14 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
17
18 config_h.set('PATH_WTMP', '_PATH_WTMPX')
19 else
20- path_wtmp = '/var/log/utx.log'
21- assert(run_command('test', '-e', path_wtmp).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
22- config_h.set_quoted('PATH_WTMP', path_wtmp)
23+ # musl: This is just a build fix hack.
24+ # As usual they know better, consider all other projects crap and offer zero
25+ # alternatives: So wtmp is a dead stub only [1] (= /dev/null/wtmp - taken
26+ # from musl sources).
27+ # Maybe a hero comes along and adds utmps [2] to make accountsservice useful for musl
28+ # [1] https://wiki.musl-libc.org/faq.html#Q:-Why-is-the-utmp/wtmp-functionality-only-implemented-as-stubs?
29+ # [2] https://github.com/skarnet/utmps
30+ config_h.set_quoted('PATH_WTMP', '/dev/null/wtmp')
31 endif
32
33 # compiler flags
34--
352.34.1
36
diff --git a/meta-gnome/recipes-support/accountsservice/accountsservice/0002-musl-add-missing-fgetspent_r.patch b/meta-gnome/recipes-support/accountsservice/accountsservice/0002-musl-add-missing-fgetspent_r.patch
index 2b0924b2e4..dfc27b7302 100644
--- a/meta-gnome/recipes-support/accountsservice/accountsservice/0002-musl-add-missing-fgetspent_r.patch
+++ b/meta-gnome/recipes-support/accountsservice/accountsservice/0002-musl-add-missing-fgetspent_r.patch
@@ -1,27 +1,29 @@
1From 7401e682400df87f3258f795bb1d143f64a35a9f Mon Sep 17 00:00:00 2001 1From 87c5c711f6f828053abd754628a0067696cfd54d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> 2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Mon, 9 Dec 2019 00:12:08 +0100 3Date: Mon, 9 Dec 2019 09:36:12 +0100
4Subject: [PATCH] musl: add missing fgetspent_r 4Subject: [PATCH] musl: add missing fgetspent_r
5 5
6From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
7
6Stolen from void-linux 8Stolen from void-linux
7 9
8Upstream-Status: Inappropriate [musl-specific] 10Upstream-Status: Inappropriate [musl-specific]
9
10--- 11---
11 src/daemon.c | 20 ++++++++++++++++++++ 12 src/daemon.c | 22 ++++++++++++++++++++++
12 1 file changed, 20 insertions(+) 13 1 file changed, 22 insertions(+)
13 14
14diff --git a/src/daemon.c b/src/daemon.c 15diff --git a/src/daemon.c b/src/daemon.c
15index c52bda3..a7676fe 100644 16index aa9d050..cc53eae 100644
16--- a/src/daemon.c 17--- a/src/daemon.c
17+++ b/src/daemon.c 18+++ b/src/daemon.c
18@@ -164,6 +164,26 @@ remove_cache_files (const gchar *user_name) 19@@ -215,6 +215,28 @@ remove_cache_files (const gchar *user_name)
19 g_remove (icon_filename); 20 g_remove (icon_filename);
20 } 21 }
21 22
22+/* Musl libc does not support fgetspent_r(), write own 23+#ifndef __GLIBC__
23+ * wrapper 24+ /* Musl libc does not support fgetspent_r(), write own
24+ */ 25+ * wrapper
26+ */
25+static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) { 27+static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) {
26+ struct spwd *shadow_entry = fgetspent(fp); 28+ struct spwd *shadow_entry = fgetspent(fp);
27+ if(!shadow_entry) 29+ if(!shadow_entry)
@@ -38,6 +40,7 @@ index c52bda3..a7676fe 100644
38+ 40+
39+ return 0; 41+ return 0;
40+} 42+}
43+#endif
41+ 44+
42 static struct passwd * 45 static struct passwd *
43 entry_generator_fgetpwent (Daemon *daemon, 46 entry_generator_fgetpwent (Daemon *daemon,
diff --git a/meta-gnome/recipes-support/accountsservice/accountsservice/00b6e12ad4044d33cc54c71c75773c5a653dad09.patch b/meta-gnome/recipes-support/accountsservice/accountsservice/00b6e12ad4044d33cc54c71c75773c5a653dad09.patch
new file mode 100644
index 0000000000..f016057562
--- /dev/null
+++ b/meta-gnome/recipes-support/accountsservice/accountsservice/00b6e12ad4044d33cc54c71c75773c5a653dad09.patch
@@ -0,0 +1,115 @@
1From 747d781c1ccf3b8112ec6a098f23f26ccadc5880 Mon Sep 17 00:00:00 2001
2From: oreo639 <oreo6391@gmail.com>
3Date: Sun, 9 Feb 2025 23:24:08 -0800
4Subject: [PATCH] build: Disable tests when cross compiling and allow
5
6 specifying path_wtmp
7
8 Upstream-Status: Backport [https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/00b6e12ad4044d33cc54c71c75773c5a653dad09]
9
10Signed-off-by: Markus Volk <f_l_k@t-online.de>
11---
12 meson.build | 64 ++++++++++++++++++++++++++---------------------
13 meson_options.txt | 2 ++
14 2 files changed, 38 insertions(+), 28 deletions(-)
15
16diff --git a/meson.build b/meson.build
17index 4a509e7..2a56627 100644
18--- a/meson.build
19+++ b/meson.build
20@@ -77,34 +77,40 @@ foreach func: check_functions
21 config_h.set('HAVE_' + func.underscorify().to_upper(), cc.has_function(func))
22 endforeach
23
24-if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURCE')
25- code = '''#define _GNU_SOURCE
26- #include <stdio.h>
27- #include <utmpx.h>
28- int main (int argc, char **argv) {
29- printf ("%s\n", WTMPX_FILENAME);
30- return 0;
31- }
32- '''
33- result = cc.run(code, name : 'value of WTMPX_FILENAME')
34- path_wtmp = result.stdout().strip()
35-
36- config_h.set('PATH_WTMP', 'WTMPX_FILENAME')
37-elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
38- code = '''#include <paths.h>
39- #include <stdio.h>
40- int main (int argc, char **argv) {
41- printf ("%s\n", _PATH_WTMPX);
42- return 0;
43- }
44- '''
45- result = cc.run(code, name : 'value of _PATH_WTMPX')
46- path_wtmp = result.stdout().strip()
47-
48- config_h.set('PATH_WTMP', '_PATH_WTMPX')
49+path_wtmp = get_option('wtmpfile')
50+if path_wtmp == ''
51+ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURCE') and meson.can_run_host_binaries()
52+ code = '''#define _GNU_SOURCE
53+ #include <stdio.h>
54+ #include <utmpx.h>
55+ int main (int argc, char **argv) {
56+ printf ("%s\n", WTMPX_FILENAME);
57+ return 0;
58+ }
59+ '''
60+ result = cc.run(code, name : 'value of WTMPX_FILENAME')
61+ path_wtmp = result.stdout().strip()
62+
63+ config_h.set('PATH_WTMP', 'WTMPX_FILENAME')
64+ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX') and meson.can_run_host_binaries()
65+ code = '''#include <paths.h>
66+ #include <stdio.h>
67+ int main (int argc, char **argv) {
68+ printf ("%s\n", _PATH_WTMPX);
69+ return 0;
70+ }
71+ '''
72+ result = cc.run(code, name : 'value of _PATH_WTMPX')
73+ path_wtmp = result.stdout().strip()
74+
75+ config_h.set('PATH_WTMP', '_PATH_WTMPX')
76+ else
77+ assert(not meson.is_cross_build(), 'Cannot determine wtmp for this cross compile, please specify -Dwtmpfile=')
78+ path_wtmp = '/var/log/utx.log'
79+ assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
80+ config_h.set_quoted('PATH_WTMP', path_wtmp)
81+ endif
82 else
83- path_wtmp = '/var/log/utx.log'
84- assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
85 config_h.set_quoted('PATH_WTMP', path_wtmp)
86 endif
87
88@@ -232,7 +238,9 @@ if get_option('gtk_doc')
89 subdir('doc/libaccountsservice')
90 endif
91
92-subdir('tests')
93+if get_option('tests') and meson.can_run_host_binaries()
94+ subdir('tests')
95+endif
96
97 configure_file(
98 output: 'config.h',
99diff --git a/meson_options.txt b/meson_options.txt
100index b34a0fa..e25c61e 100644
101--- a/meson_options.txt
102+++ b/meson_options.txt
103@@ -1,6 +1,7 @@
104 option('systemdsystemunitdir', type: 'string', value: '', description: 'custom directory for systemd system units')
105 option('gdmconffile', type: 'string', value: '/etc/gdm/custom.conf', description: 'GDM configuration file')
106 option('lightdmconffile', type: 'string', value: '/etc/lightdm/lightdm.conf', description: 'LightDM configuration file')
107+option('wtmpfile', type: 'string', value: '', description: 'override filepath of wtmp file')
108
109 option('admin_group', type: 'string', value: '', description: 'Set group for administrative accounts')
110 option('extra_admin_groups', type: 'array', value: [], description: 'Comma-separated list of extra groups that administrator users are part of')
111@@ -13,3 +14,4 @@ option('vapi', type: 'boolean', value: true, description : 'Enable Vala bindings
112
113 option('docbook', type: 'boolean', value: false, description: 'build documentation (requires xmlto)')
114 option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
115+option('tests', type: 'boolean', value: true, description: 'run accountservice tests if possible')
diff --git a/meta-gnome/recipes-support/accountsservice/accountsservice/accountsservice-23.13.9-c99-fixes.patch b/meta-gnome/recipes-support/accountsservice/accountsservice/accountsservice-23.13.9-c99-fixes.patch
new file mode 100644
index 0000000000..ffb6ffca18
--- /dev/null
+++ b/meta-gnome/recipes-support/accountsservice/accountsservice/accountsservice-23.13.9-c99-fixes.patch
@@ -0,0 +1,51 @@
1From 97ff4512ea17600d390d67b59e6d0058d1b0b7d5 Mon Sep 17 00:00:00 2001
2From: Ray Strode <rstrode@redhat.com>
3Date: Tue, 11 Apr 2023 10:09:07 -0400
4Subject: [PATCH] mocklibc: Fix compiler warning
5
6https://bugs.gentoo.org/930715
7https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/da65bee12d9118fe1a49c8718d428fe61d232339
8
9print_indent is defined in one file and used in another without a
10forward declaration. That leads to a compiler warning/error.
11
12This commit fixes that.
13
14Upstream-Status: Backport [https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/accountsservice/files/accountsservice-23.13.9-c99-fixes.patch]
15
16Signed-off-by: Markus Volk <f_l_k@t-online.de>
17---
18 subprojects/mocklibc.wrap | 2 ++
19 subprojects/packagefiles/mocklibc-print-indent.diff | 13 +++++++++++++
20 2 files changed, 15 insertions(+)
21 create mode 100644 subprojects/packagefiles/mocklibc-print-indent.diff
22
23diff --git a/subprojects/mocklibc.wrap b/subprojects/mocklibc.wrap
24index af82298..539ee83 100644
25--- a/subprojects/mocklibc.wrap
26+++ b/subprojects/mocklibc.wrap
27@@ -8,3 +8,5 @@ source_hash = b2236a6af1028414783e9734a46ea051916ec226479d6a55a3bb823bff68f120
28 patch_url = https://wrapdb.mesonbuild.com/v1/projects/mocklibc/1.0/2/get_zip
29 patch_filename = mocklibc-1.0-2-wrap.zip
30 patch_hash = 0280f96a2eeb3c023e5acf4e00cef03d362868218d4a85347ea45137c0ef6c56
31+
32+diff_files = mocklibc-print-indent.diff
33diff --git a/subprojects/packagefiles/mocklibc-print-indent.diff b/subprojects/packagefiles/mocklibc-print-indent.diff
34new file mode 100644
35index 0000000..4aaed40
36--- /dev/null
37+++ b/subprojects/packagefiles/mocklibc-print-indent.diff
38@@ -0,0 +1,13 @@
39+diff -up mocklibc-1.0/src/netgroup-debug.c.print-indent mocklibc-1.0/src/netgroup-debug.c
40+--- mocklibc-1.0/src/netgroup-debug.c.print-indent 2023-04-11 10:20:53.717381559 -0400
41++++ mocklibc-1.0/src/netgroup-debug.c 2023-04-11 10:21:02.296270333 -0400
42+@@ -21,6 +21,9 @@
43+ #include <stdio.h>
44+ #include <stdlib.h>
45+
46++void print_indent (FILE *stream,
47++ unsigned int indent);
48++
49+ void netgroup_debug_print_entry(struct entry *entry, FILE *stream, unsigned int indent) {
50+ print_indent(stream, indent);
51+
diff --git a/meta-gnome/recipes-support/accountsservice/accountsservice_22.08.8.bb b/meta-gnome/recipes-support/accountsservice/accountsservice_23.13.9.bb
index 439958c7d2..e3dfcfffff 100644
--- a/meta-gnome/recipes-support/accountsservice/accountsservice_22.08.8.bb
+++ b/meta-gnome/recipes-support/accountsservice/accountsservice_23.13.9.bb
@@ -5,24 +5,35 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
5 5
6DEPENDS = " \ 6DEPENDS = " \
7 dbus \ 7 dbus \
8 glib-2.0 \
9 json-c \
8 polkit \ 10 polkit \
11 virtual/crypt \
9" 12"
10 13
11inherit meson gobject-introspection gtk-doc features_check systemd vala 14inherit meson gobject-introspection gtk-doc features_check systemd vala pkgconfig
12 15
13REQUIRED_DISTRO_FEATURES = "polkit" 16REQUIRED_DISTRO_FEATURES = "polkit"
14 17
15SRC_URI = "https://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz" 18SRC_URI = " \
19 https://www.freedesktop.org/software/${BPN}/${BPN}-${PV}.tar.xz \
20 file://accountsservice-23.13.9-c99-fixes.patch \
21 file://00b6e12ad4044d33cc54c71c75773c5a653dad09.patch \
22"
16SRC_URI:append:libc-musl = " \ 23SRC_URI:append:libc-musl = " \
17 file://0001-musl-Hack-to-fix-build.patch \ 24 file://0002-musl-add-missing-fgetspent_r.patch \
18 file://0002-musl-add-missing-fgetspent_r.patch \
19" 25"
20SRC_URI[sha256sum] = "909997a76919fe7dc138a9a01cea70bd622d5a932dbc9fb13010113023a7a391" 26
27EXTRA_OEMESON:libc-musl += "-Dwtmpfile=/var/log/wtmp -Dtests=false"
28
29SRC_URI[sha256sum] = "adda4cdeae24fa0992e7df3ffff9effa7090be3ac233a3edfdf69d5a9c9b924f"
21 30
22GTKDOC_MESON_OPTION = "gtk_doc" 31GTKDOC_MESON_OPTION = "gtk_doc"
23 32
24PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" 33PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} admin_group"
25PACKAGECONFIG[systemd] = ", -Dsystemdsystemunitdir='no', systemd" 34PACKAGECONFIG[systemd] = ",,systemd"
35PACKAGECONFIG[elogind] = "-Delogind=true,-Delogind=false,elogind"
36PACKAGECONFIG[admin_group] = "-Dadmin_group=wheel"
26 37
27SYSTEMD_SERVICE:${PN} = "accounts-daemon.service" 38SYSTEMD_SERVICE:${PN} = "accounts-daemon.service"
28 39