mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
accountservice: update to 23.13.9.
This commit is contained in:
parent
5b079aeb44
commit
b359478ea9
5 changed files with 196 additions and 53 deletions
|
@ -0,0 +1,39 @@
|
||||||
|
From ad0365b77b583da06bcd1e8da4c1bed74129895a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Thu, 28 Sep 2023 09:29:07 -0400
|
||||||
|
Subject: [PATCH] tests: s/assertEquals/assertEqual/
|
||||||
|
|
||||||
|
CI is currently failing with:
|
||||||
|
|
||||||
|
Traceback (most recent call last):
|
||||||
|
File "/home/user/accountsservice/_build/../tests/test-libaccountsservice.py", line 118, in test_multiple_inflight_get_user_by_id_calls
|
||||||
|
self.assertEquals(user.get_user_name(), 'pizza')
|
||||||
|
^^^^^^^^^^^^^^^^^
|
||||||
|
AttributeError: 'TestAccountsServicePreExistingUser' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?
|
||||||
|
|
||||||
|
I have no idea if assertEquals was dropped, or if CI has been failing
|
||||||
|
all this time or what.
|
||||||
|
|
||||||
|
This commit makes the suggested change.
|
||||||
|
---
|
||||||
|
tests/test-libaccountsservice.py | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test-libaccountsservice.py b/tests/test-libaccountsservice.py
|
||||||
|
index f0261b1..f2fcbc2 100644
|
||||||
|
--- a/tests/test-libaccountsservice.py
|
||||||
|
+++ b/tests/test-libaccountsservice.py
|
||||||
|
@@ -115,8 +115,8 @@ class TestAccountsServicePreExistingUser(AccountsServiceTestBase):
|
||||||
|
self.assertTrue(user_objects[instance].is_loaded())
|
||||||
|
|
||||||
|
for user in user_objects:
|
||||||
|
- self.assertEquals(user.get_user_name(), 'pizza')
|
||||||
|
- self.assertEquals(user.get_uid(), 2001)
|
||||||
|
+ self.assertEqual(user.get_user_name(), 'pizza')
|
||||||
|
+ self.assertEqual(user.get_uid(), 2001)
|
||||||
|
|
||||||
|
@unittest.skipUnless(have_accounts_service,
|
||||||
|
'AccountsService gi introspection not available')
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
142
srcpkgs/accountsservice/patches/fix-build.patch
Normal file
142
srcpkgs/accountsservice/patches/fix-build.patch
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
Submitted upstream: https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/163
|
||||||
|
|
||||||
|
From 00b6e12ad4044d33cc54c71c75773c5a653dad09 Mon Sep 17 00:00:00 2001
|
||||||
|
From: oreo639 <oreo6391@gmail.com>
|
||||||
|
Date: Sun, 9 Feb 2025 23:24:08 -0800
|
||||||
|
Subject: [PATCH 1/2] build: Disable tests when cross compiling and allow
|
||||||
|
specifying path_wtmp
|
||||||
|
|
||||||
|
---
|
||||||
|
meson.build | 64 ++++++++++++++++++++++++++---------------------
|
||||||
|
meson_options.txt | 2 ++
|
||||||
|
2 files changed, 38 insertions(+), 28 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 34a9d3d..7bfaf8c 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -82,34 +82,40 @@ if cc.has_member('struct passwd', 'pw_expire', prefix : '#include <pwd.h>')
|
||||||
|
config_h.set('HAVE_STRUCT_PASSWD_PW_EXPIRE', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
-if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURCE')
|
||||||
|
- code = '''#define _GNU_SOURCE
|
||||||
|
- #include <stdio.h>
|
||||||
|
- #include <utmpx.h>
|
||||||
|
- int main (int argc, char **argv) {
|
||||||
|
- printf ("%s\n", WTMPX_FILENAME);
|
||||||
|
- return 0;
|
||||||
|
- }
|
||||||
|
- '''
|
||||||
|
- result = cc.run(code, name : 'value of WTMPX_FILENAME')
|
||||||
|
- path_wtmp = result.stdout().strip()
|
||||||
|
-
|
||||||
|
- config_h.set('PATH_WTMP', 'WTMPX_FILENAME')
|
||||||
|
-elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
|
||||||
|
- code = '''#include <paths.h>
|
||||||
|
- #include <stdio.h>
|
||||||
|
- int main (int argc, char **argv) {
|
||||||
|
- printf ("%s\n", _PATH_WTMPX);
|
||||||
|
- return 0;
|
||||||
|
- }
|
||||||
|
- '''
|
||||||
|
- result = cc.run(code, name : 'value of _PATH_WTMPX')
|
||||||
|
- path_wtmp = result.stdout().strip()
|
||||||
|
-
|
||||||
|
- config_h.set('PATH_WTMP', '_PATH_WTMPX')
|
||||||
|
+path_wtmp = get_option('wtmpfile')
|
||||||
|
+if path_wtmp == ''
|
||||||
|
+ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURCE') and meson.can_run_host_binaries()
|
||||||
|
+ code = '''#define _GNU_SOURCE
|
||||||
|
+ #include <stdio.h>
|
||||||
|
+ #include <utmpx.h>
|
||||||
|
+ int main (int argc, char **argv) {
|
||||||
|
+ printf ("%s\n", WTMPX_FILENAME);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ '''
|
||||||
|
+ result = cc.run(code, name : 'value of WTMPX_FILENAME')
|
||||||
|
+ path_wtmp = result.stdout().strip()
|
||||||
|
+
|
||||||
|
+ config_h.set('PATH_WTMP', 'WTMPX_FILENAME')
|
||||||
|
+ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX') and meson.can_run_host_binaries()
|
||||||
|
+ code = '''#include <paths.h>
|
||||||
|
+ #include <stdio.h>
|
||||||
|
+ int main (int argc, char **argv) {
|
||||||
|
+ printf ("%s\n", _PATH_WTMPX);
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
+ '''
|
||||||
|
+ result = cc.run(code, name : 'value of _PATH_WTMPX')
|
||||||
|
+ path_wtmp = result.stdout().strip()
|
||||||
|
+
|
||||||
|
+ config_h.set('PATH_WTMP', '_PATH_WTMPX')
|
||||||
|
+ else
|
||||||
|
+ assert(not meson.is_cross_build(), 'Cannot determine wtmp for this cross compile, please specify -Dwtmpfile=')
|
||||||
|
+ path_wtmp = '/var/log/utx.log'
|
||||||
|
+ assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
|
||||||
|
+ config_h.set_quoted('PATH_WTMP', path_wtmp)
|
||||||
|
+ endif
|
||||||
|
else
|
||||||
|
- path_wtmp = '/var/log/utx.log'
|
||||||
|
- assert(run_command('test', '-e', path_wtmp, check: false).returncode() == 0, 'Do not know which filename to watch for wtmp changes')
|
||||||
|
config_h.set_quoted('PATH_WTMP', path_wtmp)
|
||||||
|
endif
|
||||||
|
|
||||||
|
@@ -250,7 +256,9 @@ if get_option('gtk_doc')
|
||||||
|
subdir('doc/libaccountsservice')
|
||||||
|
endif
|
||||||
|
|
||||||
|
-subdir('tests')
|
||||||
|
+if get_option('tests') and meson.can_run_host_binaries()
|
||||||
|
+ subdir('tests')
|
||||||
|
+endif
|
||||||
|
|
||||||
|
configure_file(
|
||||||
|
output: 'config.h',
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index 592e961..5524ea0 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -1,6 +1,7 @@
|
||||||
|
option('systemdsystemunitdir', type: 'string', value: '', description: 'custom directory for systemd system units')
|
||||||
|
option('gdmconffile', type: 'string', value: '/etc/gdm/custom.conf', description: 'GDM configuration file')
|
||||||
|
option('lightdmconffile', type: 'string', value: '/etc/lightdm/lightdm.conf', description: 'LightDM configuration file')
|
||||||
|
+option('wtmpfile', type: 'string', value: '', description: 'override filepath of wtmp file')
|
||||||
|
|
||||||
|
option('admin_group', type: 'string', value: '', description: 'Set group for administrative accounts')
|
||||||
|
option('extra_admin_groups', type: 'array', value: [], description: 'Comma-separated list of extra groups that administrator users are part of')
|
||||||
|
@@ -13,3 +13,4 @@ option('vapi', type: 'boolean', value: t
|
||||||
|
|
||||||
|
option('docbook', type: 'boolean', value: false, description: 'build documentation (requires xmlto)')
|
||||||
|
option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
|
||||||
|
+option('tests', type: 'boolean', value: true, description: 'run accountservice tests if possible')
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
|
|
||||||
|
From 0095351cbf8cd2b26db19bf95e615070df8b4eeb Mon Sep 17 00:00:00 2001
|
||||||
|
From: oreo639 <oreo6391@gmail.com>
|
||||||
|
Date: Mon, 10 Feb 2025 00:11:34 -0800
|
||||||
|
Subject: [PATCH 2/2] build: Fix skipping tests when they are unable to be run
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/meson.build | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/meson.build b/tests/meson.build
|
||||||
|
index 854fea6..8928fff 100644
|
||||||
|
--- a/tests/meson.build
|
||||||
|
+++ b/tests/meson.build
|
||||||
|
@@ -46,7 +46,7 @@ if python3_test_modules_found
|
||||||
|
base_args = test_file
|
||||||
|
suite = ['accounts-service']
|
||||||
|
|
||||||
|
- r = run_command(unittest_inspector, test_file, check: true)
|
||||||
|
+ r = run_command(unittest_inspector, test_file, check: false)
|
||||||
|
unit_tests = r.stdout().strip().split('\n')
|
||||||
|
|
||||||
|
if r.returncode() == 0 and unit_tests.length() > 0
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
From ac9b14f1c1bbca413987d0bbfeaad05804107e9a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Luca Boccassi <bluca@debian.org>
|
|
||||||
Date: Sun, 31 Oct 2021 12:29:14 +0000
|
|
||||||
Subject: Fix build with meson 0.60
|
|
||||||
|
|
||||||
Positional parameters to merge_file() were never allowed and always
|
|
||||||
ignored, so just drop it.
|
|
||||||
See: https://github.com/mesonbuild/meson/issues/9441
|
|
||||||
|
|
||||||
Fixes #97
|
|
||||||
---
|
|
||||||
data/meson.build | 1 -
|
|
||||||
1 file changed, 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/data/meson.build b/data/meson.build
|
|
||||||
index 70edf89..9e80299 100644
|
|
||||||
--- a/data/meson.build
|
|
||||||
+++ b/data/meson.build
|
|
||||||
@@ -33,7 +33,6 @@ configure_file(
|
|
||||||
policy = act_namespace.to_lower() + '.policy'
|
|
||||||
|
|
||||||
i18n.merge_file(
|
|
||||||
- policy,
|
|
||||||
input: policy + '.in',
|
|
||||||
output: policy,
|
|
||||||
po_dir: po_dir,
|
|
||||||
--
|
|
||||||
cgit v1.2.1
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
Reason: fix build on musl
|
|
||||||
Tidy up and send upstream soon...
|
|
||||||
--- a/meson.build
|
|
||||||
+++ b/meson.build
|
|
||||||
@@ -82,8 +82,7 @@ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURC
|
|
||||||
elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
|
|
||||||
config_h.set('PATH_WTMP', '_PATH_WTMPX')
|
|
||||||
else
|
|
||||||
- assert(run_command('test', '-e', '/var/log/utx.log').returncode() == 0, 'Do not know which filename to watch for wtmp changes')
|
|
||||||
- config_h.set_quoted('PATH_WTMP', '/var/log/utx.log')
|
|
||||||
+ config_h.set_quoted('PATH_WTMP', '/var/log/wtmp')
|
|
||||||
endif
|
|
||||||
|
|
||||||
# compiler flags
|
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
# Template file for 'accountsservice'
|
# Template file for 'accountsservice'
|
||||||
pkgname=accountsservice
|
pkgname=accountsservice
|
||||||
version=0.6.55
|
version=23.13.9
|
||||||
revision=3
|
revision=1
|
||||||
build_style=meson
|
build_style=meson
|
||||||
build_helper="gir"
|
build_helper="gir"
|
||||||
configure_args="-Dsystemdsystemunitdir=no -Duser_heuristics=false
|
configure_args="-Dsystemdsystemunitdir=/usr/lib/systemd/system
|
||||||
$(vopt_bool gir introspection) $(vopt_bool elogind elogind)"
|
-Dwtmpfile=/var/log/wtmp $(vopt_bool gir introspection)"
|
||||||
hostmakedepends="glib-devel pkg-config polkit gettext"
|
hostmakedepends="glib-devel pkg-config polkit gettext $(vopt_if gir vala)
|
||||||
makedepends="polkit-devel $(vopt_if elogind elogind-devel)"
|
python3-dbus python3-gobject python3-dbusmock"
|
||||||
|
makedepends="polkit-devel elogind-devel"
|
||||||
short_desc="D-Bus interfaces for querying and manipulating user account information"
|
short_desc="D-Bus interfaces for querying and manipulating user account information"
|
||||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://www.freedesktop.org/wiki/Software/AccountsService/"
|
homepage="https://www.freedesktop.org/wiki/Software/AccountsService/"
|
||||||
distfiles="${FREEDESKTOP_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
|
distfiles="${FREEDESKTOP_SITE}/${pkgname}/${pkgname}-${version}.tar.xz"
|
||||||
checksum=ff2b2419a7e06bd9cb335ffe391c7409b49a0f0130b890bd54692a3986699c9b
|
checksum=adda4cdeae24fa0992e7df3ffff9effa7090be3ac233a3edfdf69d5a9c9b924f
|
||||||
make_dirs="
|
make_dirs="
|
||||||
/var/lib/AccountsService/users 755 root root
|
/var/lib/AccountsService/users 755 root root
|
||||||
/var/lib/AccountsService/icons 755 root root"
|
/var/lib/AccountsService/icons 755 root root"
|
||||||
|
@ -23,8 +24,13 @@ if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Package build options
|
# Package build options
|
||||||
build_options="elogind gir"
|
build_options="gir"
|
||||||
build_options_default="elogind gir"
|
build_options_default="gir"
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
# Assumes system locale is en_IE
|
||||||
|
vsed -e 's/test_languages/disabled_test_languages/g' -i tests/test-daemon.py
|
||||||
|
}
|
||||||
|
|
||||||
accountsservice-devel_package() {
|
accountsservice-devel_package() {
|
||||||
depends="${sourcepkg}>=${version}_${revision}"
|
depends="${sourcepkg}>=${version}_${revision}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue