summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/accountsservice')
-rw-r--r--sys-apps/accountsservice/Manifest2
-rw-r--r--sys-apps/accountsservice/accountsservice-23.13.9.ebuild (renamed from sys-apps/accountsservice/accountsservice-22.08.8.ebuild)24
-rw-r--r--sys-apps/accountsservice/files/accountsservice-23.13.9-c99-fixes.patch50
-rw-r--r--sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch30
-rw-r--r--sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch52
-rw-r--r--sys-apps/accountsservice/files/accountsservice-23.13.9-test-fix.patch41
-rw-r--r--sys-apps/accountsservice/metadata.xml19
7 files changed, 204 insertions, 14 deletions
diff --git a/sys-apps/accountsservice/Manifest b/sys-apps/accountsservice/Manifest
index 0e7fae0fd2e2..144f62adb755 100644
--- a/sys-apps/accountsservice/Manifest
+++ b/sys-apps/accountsservice/Manifest
@@ -1 +1 @@
-DIST accountsservice-22.08.8.tar.xz 102672 BLAKE2B 7c9436d3845fc1883772b434c4f9e2fba934d17e6d4452a6be65e1d790a23b331eaaa64b0e6eff6fefe79587a40cf1749a0f3de09f323b10740046bd9d145c9d SHA512 2ca3ceb1b44338d9924b86788256d4eef7ec10e0c2197bfb8cc6c31ae224fab3051f03cb406a526f90057684965bef4ba0f2cc01b26198ec1fc6baec36ad3ff8
+DIST accountsservice-23.13.9.tar.xz 636064 BLAKE2B 74dbbe816937e626ba0f6524b4293466ac2905f474396f5d23633e966d46e013de110671abcbfe2911fffa1e98872e2525b61594a967f917975ebf18d39b8547 SHA512 c6eb543ce2e07b61bbdfa454e388949bc688517be0536b14f30c66383ed105b15d3fab8b6c62b1eaa08f67d9bdc29b928729d9f7c704f47de4decf0de8e12f89
diff --git a/sys-apps/accountsservice/accountsservice-22.08.8.ebuild b/sys-apps/accountsservice/accountsservice-23.13.9.ebuild
index 40e0dad498bc..a838cde02688 100644
--- a/sys-apps/accountsservice/accountsservice-22.08.8.ebuild
+++ b/sys-apps/accountsservice/accountsservice-23.13.9.ebuild
@@ -1,8 +1,8 @@
-# Copyright 2011-2022 Gentoo Authors
+# Copyright 2011-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-PYTHON_COMPAT=( python3_{8..10} )
+EAPI=8
+PYTHON_COMPAT=( python3_{9..12} )
inherit meson python-any-r1 systemd
DESCRIPTION="D-Bus interfaces for querying and manipulating user account information"
@@ -11,7 +11,7 @@ SRC_URI="https://www.freedesktop.org/software/${PN}/${P}.tar.xz"
LICENSE="GPL-3+"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~ia64 ~loong ppc ppc64 ~riscv ~sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~loong ppc ppc64 ~riscv ~sparc x86"
IUSE="doc elogind gtk-doc +introspection selinux systemd test"
RESTRICT="!test? ( test )"
@@ -25,10 +25,13 @@ CDEPEND="
introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
systemd? ( >=sys-apps/systemd-186:0= )
"
-DEPEND="${CDEPEND}"
+DEPEND="${CDEPEND}
+ sys-apps/dbus
+"
BDEPEND="
dev-libs/libxslt
dev-util/gdbus-codegen
+ dev-util/glib-utils
sys-devel/gettext
virtual/pkgconfig
doc? (
@@ -51,6 +54,12 @@ RDEPEND="${CDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-22.04.62-gentoo-system-users.patch
+ "${FILESDIR}"/${PN}-23.13.9-generate-version.patch #905770
+ # From Alpine Linux
+ # https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/97
+ "${FILESDIR}"/${PN}-23.13.9-musl-fixes.patch
+ "${FILESDIR}"/${PN}-23.13.9-c99-fixes.patch #930715
+ "${FILESDIR}"/${PN}-23.13.9-test-fix.patch
)
python_check_deps() {
@@ -60,6 +69,11 @@ python_check_deps() {
}
src_configure() {
+ # No option to disable tests
+ if ! use test; then
+ sed -e "/subdir('tests')/d" -i meson.build || die
+ fi
+
local emesonargs=(
--localstatedir="${EPREFIX}/var"
-Dsystemdsystemunitdir="$(systemd_get_systemunitdir)"
diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-c99-fixes.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-c99-fixes.patch
new file mode 100644
index 000000000000..28f82fc5a87f
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-c99-fixes.patch
@@ -0,0 +1,50 @@
+https://bugs.gentoo.org/930715
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/da65bee12d9118fe1a49c8718d428fe61d232339
+
+From da65bee12d9118fe1a49c8718d428fe61d232339 Mon Sep 17 00:00:00 2001
+From: Ray Strode <rstrode@redhat.com>
+Date: Tue, 11 Apr 2023 10:09:07 -0400
+Subject: [PATCH] mocklibc: Fix compiler warning
+
+print_indent is defined in one file and used in another without a
+forward declaration. That leads to a compiler warning/error.
+
+This commit fixes that.
+---
+ subprojects/mocklibc.wrap | 2 ++
+ subprojects/packagefiles/mocklibc-print-indent.diff | 13 +++++++++++++
+ 2 files changed, 15 insertions(+)
+ create mode 100644 subprojects/packagefiles/mocklibc-print-indent.diff
+
+diff --git a/subprojects/mocklibc.wrap b/subprojects/mocklibc.wrap
+index af82298..539ee83 100644
+--- a/subprojects/mocklibc.wrap
++++ b/subprojects/mocklibc.wrap
+@@ -8,3 +8,5 @@ source_hash = b2236a6af1028414783e9734a46ea051916ec226479d6a55a3bb823bff68f120
+ patch_url = https://wrapdb.mesonbuild.com/v1/projects/mocklibc/1.0/2/get_zip
+ patch_filename = mocklibc-1.0-2-wrap.zip
+ patch_hash = 0280f96a2eeb3c023e5acf4e00cef03d362868218d4a85347ea45137c0ef6c56
++
++diff_files = mocklibc-print-indent.diff
+diff --git a/subprojects/packagefiles/mocklibc-print-indent.diff b/subprojects/packagefiles/mocklibc-print-indent.diff
+new file mode 100644
+index 0000000..4aaed40
+--- /dev/null
++++ b/subprojects/packagefiles/mocklibc-print-indent.diff
+@@ -0,0 +1,13 @@
++diff -up mocklibc-1.0/src/netgroup-debug.c.print-indent mocklibc-1.0/src/netgroup-debug.c
++--- mocklibc-1.0/src/netgroup-debug.c.print-indent 2023-04-11 10:20:53.717381559 -0400
+++++ mocklibc-1.0/src/netgroup-debug.c 2023-04-11 10:21:02.296270333 -0400
++@@ -21,6 +21,9 @@
++ #include <stdio.h>
++ #include <stdlib.h>
++
+++void print_indent (FILE *stream,
+++ unsigned int indent);
+++
++ void netgroup_debug_print_entry(struct entry *entry, FILE *stream, unsigned int indent) {
++ print_indent(stream, indent);
++
+--
+GitLab
+
diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch
new file mode 100644
index 000000000000..162b914b1828
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-generate-version.patch
@@ -0,0 +1,30 @@
+https://bugs.gentoo.org/905770
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/merge_requests/136
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/c9c16b3c47e13e90bb2213141f6f309e2d474396
+
+From c9c16b3c47e13e90bb2213141f6f309e2d474396 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Fri, 5 May 2023 07:43:48 -0700
+Subject: [PATCH] generate-version.sh: fix script inside of a tarball
+
+---
+ generate-version.sh | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/generate-version.sh b/generate-version.sh
+index 3f88bff..8375c86 100755
+--- a/generate-version.sh
++++ b/generate-version.sh
+@@ -4,11 +4,10 @@ exec 3>&2 2> /dev/null
+ SRCDIR=$(dirname "$0")
+ cd "$SRCDIR"
+ CWD=$(realpath "$PWD")
+-TOPLEVEL_WORKING_DIR=$(realpath "$(git rev-parse --show-toplevel)")
+ exec 2>&3
+
+ # If it's not from a git checkout, assume it's from a tarball
+-if [ "$TOPLEVEL_WORKING_DIR" != "$CWD" ]; then
++if ! git rev-parse --is-inside-git-dir > /dev/null 2>&1; then
+ VERSION_FROM_DIR_NAME=$(basename "$CWD" | sed -n 's/^accountsservice-\([^-]*\)$/\1/p')
+
+ if [ -n "$VERSION_FROM_DIR_NAME" ]; then
diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch
new file mode 100644
index 000000000000..abb59a137bfd
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-musl-fixes.patch
@@ -0,0 +1,52 @@
+From 962a66aa12932c7899cda78c4cbda0f581947285 Mon Sep 17 00:00:00 2001
+From: germ <germtoo@outlook.com>
+Date: Mon, 30 Oct 2023 06:16:16 -0400
+Subject: [PATCH 1/1] This applies two apatches to sys-apps/accountsserice
+ https://gitlab.alpinelinux.org/alpine/aports/-/raw/75528d8dc4206a74501799f6a6042be20b80801d/community/accountsservice/musl-fgetspent_r.patch
+ https://gitlab.alpinelinux.org/alpine/aports/-/raw/75528d8dc4206a74501799f6a6042be20b80801d/community/accountsservice/musl-wtmp.patch
+
+--- a/meson.build
++++ b/meson.build
+@@ -103,8 +103,7 @@ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
+
+ config_h.set('PATH_WTMP', '_PATH_WTMPX')
+ 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')
++ path_wtmp = '/var/log/wtmp'
+ config_h.set_quoted('PATH_WTMP', path_wtmp)
+ endif
+
+--- a/src/daemon.c
++++ b/src/daemon.c
+@@ -215,6 +215,27 @@ remove_cache_files (const gchar *user_name)
+ g_remove (icon_filename);
+ }
+
++#ifndef __GLIBC__
++/* Musl libc does not support fgetspent_r(), write own
++* wrapper
++*/
++static int fgetspent_r(FILE *fp, struct spwd *spbuf, char *buf, size_t buflen, struct spwd **spbufp) {
++ struct spwd *shadow_entry = fgetspent(fp);
++ if(!shadow_entry)
++ return -1;
++ size_t namplen = strlen(shadow_entry->sp_namp);
++ size_t pwdplen = strlen(shadow_entry->sp_pwdp);
++
++ if(namplen + pwdplen + 2 > buflen)
++ return -1;
++ *spbufp = memcpy(spbuf, shadow_entry, sizeof(struct spwd));
++ spbuf->sp_namp = strncpy(buf, shadow_entry->sp_namp, namplen + 1);
++ spbuf->sp_pwdp = strncpy(buf + namplen + 1, shadow_entry->sp_pwdp, pwdplen + 1);
++
++ return 0;
++}
++#endif
++
+ static struct passwd *
+ entry_generator_fgetpwent (Daemon *daemon,
+ GHashTable *users,
+--
+2.42.0
+
diff --git a/sys-apps/accountsservice/files/accountsservice-23.13.9-test-fix.patch b/sys-apps/accountsservice/files/accountsservice-23.13.9-test-fix.patch
new file mode 100644
index 000000000000..a0f8346ce802
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-23.13.9-test-fix.patch
@@ -0,0 +1,41 @@
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/ad0365b77b583da06bcd1e8da4c1bed74129895a
+
+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
+
diff --git a/sys-apps/accountsservice/metadata.xml b/sys-apps/accountsservice/metadata.xml
index 1394e6dc5f5a..a5e0c3471d4e 100644
--- a/sys-apps/accountsservice/metadata.xml
+++ b/sys-apps/accountsservice/metadata.xml
@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>gnome@gentoo.org</email>
- <name>Gentoo GNOME Desktop</name>
- </maintainer>
- <use>
- <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking</flag>
- <flag name="systemd">Use <pkg>sys-apps/systemd</pkg> for session tracking</flag>
- </use>
+ <maintainer type="project">
+ <email>gnome@gentoo.org</email>
+ <name>Gentoo GNOME Desktop</name>
+ </maintainer>
+ <use>
+ <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking</flag>
+ <flag name="systemd">Use <pkg>sys-apps/systemd</pkg> for session tracking</flag>
+ </use>
+ <upstream>
+ <remote-id type="freedesktop-gitlab">accountsservice/accountsservice</remote-id>
+ </upstream>
</pkgmetadata>