Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accountsservice: Update to version 23.13.9 #10766

Merged
merged 2 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From da65bee12d9118fe1a49c8718d428fe61d232339 Mon Sep 17 00:00:00 2001
From: Ray Strode <[email protected]>
Date: Tue, 11 Apr 2023 10:09:07 -0400
Subject: [PATCH 1/2] 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
@@ -1,10 +1,12 @@
[wrap-file]
directory = mocklibc-1.0

source_url = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/mocklibc/mocklibc-1.0.tar.gz
source_filename = mocklibc-1.0.tar.gz
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);
+
--
2.39.2

Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
From 99aa57bfa59e2578c4ef47e84338f7de85c6f61b Mon Sep 17 00:00:00 2001
From: Ray Strode <[email protected]>
Date: Tue, 11 Apr 2023 10:11:05 -0400
Subject: [PATCH 2/2] user-manager: Fix another compiler warning

-Wswitch-enum apparently complains about missing entries even if there
is a default:.

This commit ensures ACT_USER_MANAGER_SEAT_STATE_UNLOADED is added to the
default case to fix that warning.
---
src/libaccountsservice/act-user-manager.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/src/libaccountsservice/act-user-manager.c b/src/libaccountsservice/act-user-manager.c
index 61b4da5..3bbd480 100644
--- a/src/libaccountsservice/act-user-manager.c
+++ b/src/libaccountsservice/act-user-manager.c
@@ -1727,60 +1727,61 @@ unload_seat (ActUserManager *manager)
{
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);

priv->seat.state = ACT_USER_MANAGER_SEAT_STATE_UNLOADED;

g_free (priv->seat.id);
priv->seat.id = NULL;

g_free (priv->seat.session_id);
priv->seat.session_id = NULL;

g_debug ("ActUserManager: seat unloaded, so trying to set loaded property");
maybe_set_is_loaded (manager);
}

static void
load_new_session_incrementally (ActUserManagerNewSession *new_session)
{
switch (new_session->state) {
case ACT_USER_MANAGER_NEW_SESSION_STATE_GET_UID:
get_uid_for_new_session (new_session);
break;
case ACT_USER_MANAGER_NEW_SESSION_STATE_GET_X11_DISPLAY:
get_x11_display_for_new_session (new_session);
break;
case ACT_USER_MANAGER_NEW_SESSION_STATE_MAYBE_ADD:
maybe_add_new_session (new_session);
break;
case ACT_USER_MANAGER_NEW_SESSION_STATE_LOADED:
break;
+ case ACT_USER_MANAGER_NEW_SESSION_STATE_UNLOADED:
default:
g_assert_not_reached ();
}
}

static void
free_fetch_user_request (ActUserManagerFetchUserRequest *request)
{
ActUserManager *manager = request->manager;
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);

if (request->user != NULL) {
g_object_set_data (G_OBJECT (request->user), "fetch-user-request", NULL);
g_object_weak_unref (G_OBJECT (request->user), (GWeakNotify) on_user_destroyed, manager);
}

priv->fetch_user_requests = g_slist_remove (priv->fetch_user_requests, request);
if (request->type == ACT_USER_MANAGER_FETCH_USER_FROM_USERNAME_REQUEST) {
g_free (request->username);
}

g_free (request->object_path);
g_free (request->description);

g_cancellable_cancel (request->cancellable);
g_object_unref (request->cancellable);


g_debug ("ActUserManager: unrefing manager owned by fetch user request");
g_object_unref (manager);
@@ -2243,60 +2244,61 @@ load_users (ActUserManager *manager)
return;
}

load_user_paths (manager, (const char * const *) user_paths);

load_included_usernames (manager);

priv->list_cached_users_done = TRUE;
}

static gboolean
load_seat_incrementally (ActUserManager *manager)
{
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);

priv->seat.load_idle_id = 0;

switch (priv->seat.state) {
case ACT_USER_MANAGER_SEAT_STATE_GET_SESSION_ID:
get_current_session_id (manager);
break;
case ACT_USER_MANAGER_SEAT_STATE_GET_ID:
get_seat_id_for_current_session (manager);
break;
case ACT_USER_MANAGER_SEAT_STATE_GET_SEAT_PROXY:
get_seat_proxy (manager);
break;
case ACT_USER_MANAGER_SEAT_STATE_LOADED:
g_debug ("ActUserManager: Seat loading sequence complete");
break;
+ case ACT_USER_MANAGER_NEW_SESSION_STATE_UNLOADED:
default:
g_assert_not_reached ();
}

if (priv->seat.state == ACT_USER_MANAGER_SEAT_STATE_LOADED) {
load_sessions (manager);
}

maybe_set_is_loaded (manager);

return FALSE;
}

static gboolean
load_idle (ActUserManager *manager)
{
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);

priv->seat.state = ACT_USER_MANAGER_SEAT_STATE_UNLOADED + 1;
load_seat_incrementally (manager);
priv->load_id = 0;

return FALSE;
}

static void
queue_load_seat (ActUserManager *manager)
{
ActUserManagerPrivate *priv = act_user_manager_get_instance_private (manager);

--
2.39.2

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Signatures": {
"accountsservice-0.6.55.tar.xz": "ff2b2419a7e06bd9cb335ffe391c7409b49a0f0130b890bd54692a3986699c9b"
"accountsservice-23.13.9.tar.xz": "adda4cdeae24fa0992e7df3ffff9effa7090be3ac233a3edfdf69d5a9c9b924f"
}
}
33 changes: 27 additions & 6 deletions SPECS-EXTENDED/accountsservice/accountsservice.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Distribution: Azure Linux
%global _hardened_build 1

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

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

BuildRequires: %{_bindir}/xsltproc
BuildRequires: gettext-devel
Expand All @@ -22,11 +22,16 @@ BuildRequires: systemd-devel
BuildRequires: gobject-introspection-devel
BuildRequires: git
BuildRequires: meson
BuildRequires: gtk-doc
BuildRequires: vala

Requires: polkit
Requires: shadow-utils
%{?systemd_requires}

Patch10001: 0001-mocklibc-Fix-compiler-warning.patch
Patch10002: 0002-user-manager-Fix-another-compiler-warning.patch

%description
The accountsservice project provides a set of D-Bus interfaces for
querying and manipulating user account information and an implementation
Expand Down Expand Up @@ -54,12 +59,15 @@ files needed to build applications that use accountsservice-libs.
%autosetup -S git

%build
%meson -Dgtk_doc=false -Dsystemd=true -Duser_heuristics=true
%meson -Dgtk_doc=True \
-Dadmin_group=wheel
%meson_build

%install
%meson_install

mkdir -p $RPM_BUILD_ROOT%{_datadir}/accountsservice/interfaces/

%find_lang accounts-service

%ldconfig_scriptlets libs
Expand All @@ -76,10 +84,13 @@ files needed to build applications that use accountsservice-libs.
%files -f accounts-service.lang
%license COPYING
%doc README.md AUTHORS
%{_sysconfdir}/dbus-1/system.d/org.freedesktop.Accounts.conf
%{_libexecdir}/accounts-daemon
%dir %{_datadir}/accountsservice/
%dir %{_datadir}/accountsservice/interfaces/
%{_datadir}/accountsservice/user-templates/
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.xml
%{_datadir}/dbus-1/interfaces/org.freedesktop.Accounts.User.xml
%{_datadir}/dbus-1/system.d/org.freedesktop.Accounts.conf
%{_datadir}/dbus-1/system-services/org.freedesktop.Accounts.service
%{_datadir}/polkit-1/actions/org.freedesktop.accounts.policy
%dir %{_localstatedir}/lib/AccountsService/
Expand All @@ -89,15 +100,25 @@ files needed to build applications that use accountsservice-libs.

%files libs
%{_libdir}/libaccountsservice.so.*
%dir %{_libdir}/girepository-1.0/
%{_libdir}/girepository-1.0/AccountsService-1.0.typelib

%files devel
%{_includedir}/accountsservice-1.0
%{_libdir}/libaccountsservice.so
%{_libdir}/pkgconfig/accountsservice.pc
%dir %{_datadir}/gir-1.0/
%{_datadir}/gir-1.0/AccountsService-1.0.gir
%dir %{_datadir}/gtk-doc/html/libaccountsservice
%{_datadir}/gtk-doc/html/libaccountsservice/*
%dir %{_datadir}/vala/
%dir %{_datadir}/vala/vapi/
%{_datadir}/vala/vapi/accountsservice.*

%changelog
* Thu Oct 17 2024 Jyoti kanase <[email protected]> - 23.13.9-1
- Update to version 23.13.9

* Mon Mar 21 2022 Pawel Winogrodzki <[email protected]> - 0.6.55-4
- Adding BR on '%%{_bindir}/xsltproc'.
- License verified.
Expand Down
4 changes: 2 additions & 2 deletions cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"type": "other",
"other": {
"name": "accountsservice",
"version": "0.6.55",
"downloadUrl": "http://www.freedesktop.org/software/accountsservice/accountsservice-0.6.55.tar.xz"
"version": "23.13.9",
"downloadUrl": "https://www.freedesktop.org/software/accountsservice/accountsservice-23.13.9.tar.xz"
}
}
},
Expand Down
Loading