Skip to content

Commit a6e91ae

Browse files
authored
accountsservice: Update to version 23.13.9 (#10766)
1 parent 3525603 commit a6e91ae

5 files changed

Lines changed: 229 additions & 9 deletions

File tree

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From da65bee12d9118fe1a49c8718d428fe61d232339 Mon Sep 17 00:00:00 2001
2+
From: Ray Strode <rstrode@redhat.com>
3+
Date: Tue, 11 Apr 2023 10:09:07 -0400
4+
Subject: [PATCH 1/2] mocklibc: Fix compiler warning
5+
6+
print_indent is defined in one file and used in another without a
7+
forward declaration. That leads to a compiler warning/error.
8+
9+
This commit fixes that.
10+
---
11+
subprojects/mocklibc.wrap | 2 ++
12+
subprojects/packagefiles/mocklibc-print-indent.diff | 13 +++++++++++++
13+
2 files changed, 15 insertions(+)
14+
create mode 100644 subprojects/packagefiles/mocklibc-print-indent.diff
15+
16+
diff --git a/subprojects/mocklibc.wrap b/subprojects/mocklibc.wrap
17+
index af82298..539ee83 100644
18+
--- a/subprojects/mocklibc.wrap
19+
+++ b/subprojects/mocklibc.wrap
20+
@@ -1,10 +1,12 @@
21+
[wrap-file]
22+
directory = mocklibc-1.0
23+
24+
source_url = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mocklibc/mocklibc-1.0.tar.gz
25+
source_filename = mocklibc-1.0.tar.gz
26+
source_hash = b2236a6af1028414783e9734a46ea051916ec226479d6a55a3bb823bff68f120
27+
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
33+
diff --git a/subprojects/packagefiles/mocklibc-print-indent.diff b/subprojects/packagefiles/mocklibc-print-indent.diff
34+
new file mode 100644
35+
index 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+
+
52+
--
53+
2.39.2
54+
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
From 99aa57bfa59e2578c4ef47e84338f7de85c6f61b Mon Sep 17 00:00:00 2001
2+
From: Ray Strode <rstrode@redhat.com>
3+
Date: Tue, 11 Apr 2023 10:11:05 -0400
4+
Subject: [PATCH 2/2] user-manager: Fix another compiler warning
5+
6+
-Wswitch-enum apparently complains about missing entries even if there
7+
is a default:.
8+
9+
This commit ensures ACT_USER_MANAGER_SEAT_STATE_UNLOADED is added to the
10+
default case to fix that warning.
11+
---
12+
src/libaccountsservice/act-user-manager.c | 2 ++
13+
1 file changed, 2 insertions(+)
14+
15+
diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
16+
index 61b4da5..3bbd480 100644
17+
--- a/src/libaccountsservice/act-user-manager.c
18+
+++ b/src/libaccountsservice/act-user-manager.c
19+
@@ -1727,60 +1727,61 @@ unload_seat (ActUserManager *manager)
20+
{
21+
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);
22+
23+
priv->seat.state = ACT_USER_MANAGER_SEAT_STATE_UNLOADED;
24+
25+
g_free (priv->seat.id);
26+
priv->seat.id = NULL;
27+
28+
g_free (priv->seat.session_id);
29+
priv->seat.session_id = NULL;
30+
31+
g_debug ("ActUserManager: seat unloaded, so trying to set loaded property");
32+
maybe_set_is_loaded (manager);
33+
}
34+
35+
static void
36+
load_new_session_incrementally (ActUserManagerNewSession *new_session)
37+
{
38+
switch (new_session->state) {
39+
case ACT_USER_MANAGER_NEW_SESSION_STATE_GET_UID:
40+
get_uid_for_new_session (new_session);
41+
break;
42+
case ACT_USER_MANAGER_NEW_SESSION_STATE_GET_X11_DISPLAY:
43+
get_x11_display_for_new_session (new_session);
44+
break;
45+
case ACT_USER_MANAGER_NEW_SESSION_STATE_MAYBE_ADD:
46+
maybe_add_new_session (new_session);
47+
break;
48+
case ACT_USER_MANAGER_NEW_SESSION_STATE_LOADED:
49+
break;
50+
+ case ACT_USER_MANAGER_NEW_SESSION_STATE_UNLOADED:
51+
default:
52+
g_assert_not_reached ();
53+
}
54+
}
55+
56+
static void
57+
free_fetch_user_request (ActUserManagerFetchUserRequest *request)
58+
{
59+
ActUserManager *manager = request->manager;
60+
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);
61+
62+
if (request->user != NULL) {
63+
g_object_set_data (G_OBJECT (request->user), "fetch-user-request", NULL);
64+
g_object_weak_unref (G_OBJECT (request->user), (GWeakNotify) on_user_destroyed, manager);
65+
}
66+
67+
priv->fetch_user_requests = g_slist_remove (priv->fetch_user_requests, request);
68+
if (request->type == ACT_USER_MANAGER_FETCH_USER_FROM_USERNAME_REQUEST) {
69+
g_free (request->username);
70+
}
71+
72+
g_free (request->object_path);
73+
g_free (request->description);
74+
75+
g_cancellable_cancel (request->cancellable);
76+
g_object_unref (request->cancellable);
77+
78+
79+
g_debug ("ActUserManager: unrefing manager owned by fetch user request");
80+
g_object_unref (manager);
81+
@@ -2243,60 +2244,61 @@ load_users (ActUserManager *manager)
82+
return;
83+
}
84+
85+
load_user_paths (manager, (const char * const *) user_paths);
86+
87+
load_included_usernames (manager);
88+
89+
priv->list_cached_users_done = TRUE;
90+
}
91+
92+
static gboolean
93+
load_seat_incrementally (ActUserManager *manager)
94+
{
95+
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);
96+
97+
priv->seat.load_idle_id = 0;
98+
99+
switch (priv->seat.state) {
100+
case ACT_USER_MANAGER_SEAT_STATE_GET_SESSION_ID:
101+
get_current_session_id (manager);
102+
break;
103+
case ACT_USER_MANAGER_SEAT_STATE_GET_ID:
104+
get_seat_id_for_current_session (manager);
105+
break;
106+
case ACT_USER_MANAGER_SEAT_STATE_GET_SEAT_PROXY:
107+
get_seat_proxy (manager);
108+
break;
109+
case ACT_USER_MANAGER_SEAT_STATE_LOADED:
110+
g_debug ("ActUserManager: Seat loading sequence complete");
111+
break;
112+
+ case ACT_USER_MANAGER_NEW_SESSION_STATE_UNLOADED:
113+
default:
114+
g_assert_not_reached ();
115+
}
116+
117+
if (priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_LOADED) {
118+
load_sessions (manager);
119+
}
120+
121+
maybe_set_is_loaded (manager);
122+
123+
return FALSE;
124+
}
125+
126+
static gboolean
127+
load_idle (ActUserManager *manager)
128+
{
129+
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);
130+
131+
priv->seat.state = ACT_USER_MANAGER_SEAT_STATE_UNLOADED + 1;
132+
load_seat_incrementally (manager);
133+
priv->load_id = 0;
134+
135+
return FALSE;
136+
}
137+
138+
static void
139+
queue_load_seat (ActUserManager *manager)
140+
{
141+
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);
142+
143+
--
144+
2.39.2
145+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"Signatures": {
3-
"accountsservice-0.6.55.tar.xz": "ff2b2419a7e06bd9cb335ffe391c7409b49a0f0130b890bd54692a3986699c9b"
3+
"accountsservice-23.13.9.tar.xz": "adda4cdeae24fa0992e7df3ffff9effa7090be3ac233a3edfdf69d5a9c9b924f"
44
}
55
}

SPECS-EXTENDED/accountsservice/accountsservice.spec

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Distribution: Azure Linux
33
%global _hardened_build 1
44

55
Name: accountsservice
6-
Version: 0.6.55
7-
Release: 4%{?dist}
6+
Version: 23.13.9
7+
Release: 1%{?dist}
88
Summary: D-Bus interfaces for querying and manipulating user account information
9-
License: GPLv3+
9+
License: GPL-3.0-or-later
1010
URL: https://www.freedesktop.org/wiki/Software/AccountsService/
1111

1212
#VCS: git:git://git.freedesktop.org/accountsservice
13-
Source0: http://www.freedesktop.org/software/accountsservice/accountsservice-%{version}.tar.xz
13+
Source0: https://www.freedesktop.org/software/accountsservice/accountsservice-%{version}.tar.xz
1414

1515
BuildRequires: %{_bindir}/xsltproc
1616
BuildRequires: gettext-devel
@@ -22,11 +22,16 @@ BuildRequires: systemd-devel
2222
BuildRequires: gobject-introspection-devel
2323
BuildRequires: git
2424
BuildRequires: meson
25+
BuildRequires: gtk-doc
26+
BuildRequires: vala
2527

2628
Requires: polkit
2729
Requires: shadow-utils
2830
%{?systemd_requires}
2931

32+
Patch10001: 0001-mocklibc-Fix-compiler-warning.patch
33+
Patch10002: 0002-user-manager-Fix-another-compiler-warning.patch
34+
3035
%description
3136
The accountsservice project provides a set of D-Bus interfaces for
3237
querying and manipulating user account information and an implementation
@@ -54,12 +59,15 @@ files needed to build applications that use accountsservice-libs.
5459
%autosetup -S git
5560

5661
%build
57-
%meson -Dgtk_doc=false -Dsystemd=true -Duser_heuristics=true
62+
%meson -Dgtk_doc=True \
63+
-Dadmin_group=wheel
5864
%meson_build
5965

6066
%install
6167
%meson_install
6268

69+
mkdir -p $RPM_BUILD_ROOT%{_datadir}/accountsservice/interfaces/
70+
6371
%find_lang accounts-service
6472

6573
%ldconfig_scriptlets libs
@@ -76,10 +84,13 @@ files needed to build applications that use accountsservice-libs.
7684
%files -f accounts-service.lang
7785
%license COPYING
7886
%doc README.md AUTHORS
79-
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.Accounts.conf
8087
%{_libexecdir}/accounts-daemon
88+
%dir %{_datadir}/accountsservice/
89+
%dir %{_datadir}/accountsservice/interfaces/
90+
%{_datadir}/accountsservice/user-templates/
8191
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.xml
8292
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.User.xml
93+
%{_datadir}/dbus-1/system.d/org.freedesktop.Accounts.conf
8394
%{_datadir}/dbus-1/system-services/org.freedesktop.Accounts.service
8495
%{_datadir}/polkit-1/actions/org.freedesktop.accounts.policy
8596
%dir %{_localstatedir}/lib/AccountsService/
@@ -89,15 +100,25 @@ files needed to build applications that use accountsservice-libs.
89100

90101
%files libs
91102
%{_libdir}/libaccountsservice.so.*
103+
%dir %{_libdir}/girepository-1.0/
92104
%{_libdir}/girepository-1.0/AccountsService-1.0.typelib
93105

94106
%files devel
95107
%{_includedir}/accountsservice-1.0
96108
%{_libdir}/libaccountsservice.so
97109
%{_libdir}/pkgconfig/accountsservice.pc
110+
%dir %{_datadir}/gir-1.0/
98111
%{_datadir}/gir-1.0/AccountsService-1.0.gir
112+
%dir %{_datadir}/gtk-doc/html/libaccountsservice
113+
%{_datadir}/gtk-doc/html/libaccountsservice/*
114+
%dir %{_datadir}/vala/
115+
%dir %{_datadir}/vala/vapi/
116+
%{_datadir}/vala/vapi/accountsservice.*
99117

100118
%changelog
119+
* Thu Oct 17 2024 Jyoti kanase <v-jykanase@microsoft.com> - 23.13.9-1
120+
- Update to version 23.13.9
121+
101122
* Mon Mar 21 2022 Pawel Winogrodzki <pawelwi@microsoft.com> - 0.6.55-4
102123
- Adding BR on '%%{_bindir}/xsltproc'.
103124
- License verified.

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"type": "other",
3636
"other": {
3737
"name": "accountsservice",
38-
"version": "0.6.55",
39-
"downloadUrl": "http://www.freedesktop.org/software/accountsservice/accountsservice-0.6.55.tar.xz"
38+
"version": "23.13.9",
39+
"downloadUrl": "https://www.freedesktop.org/software/accountsservice/accountsservice-23.13.9.tar.xz"
4040
}
4141
}
4242
},

0 commit comments

Comments
 (0)