From 1ec65c8b0960bbf6ee10c96043c561e1fb5534af Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Mon, 14 Feb 2022 10:16:52 -0500 Subject: [PATCH] Update for non-deprecated subscription management API Resolves: #2049734 --- gnome-settings-daemon.spec | 6 +++++- subscription-manager-support.patch | 16 +++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/gnome-settings-daemon.spec b/gnome-settings-daemon.spec index a9ea634..1d2d892 100644 --- a/gnome-settings-daemon.spec +++ b/gnome-settings-daemon.spec @@ -11,7 +11,7 @@ Name: gnome-settings-daemon Version: 40.0.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The daemon sharing settings from GNOME to GTK+/KDE applications License: GPLv2+ @@ -194,6 +194,10 @@ cp %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/glib-2.0/schemas %{_libdir}/pkgconfig/gnome-settings-daemon.pc %changelog +* Mon Feb 14 2022 Ray Strode - 40.0.1-6 +- Update for non-deprecated subscription management API + Resolves: #2049734 + * Wed Sep 08 2021 Kalev Lember - 40.0.1-5 - Fix the icon shown for subscription manager notifications - Related: #1937113 diff --git a/subscription-manager-support.patch b/subscription-manager-support.patch index 83a5cdd..5624f0a 100644 --- a/subscription-manager-support.patch +++ b/subscription-manager-support.patch @@ -210,7 +210,7 @@ new file mode 100644 index 00000000..182f7190 --- /dev/null +++ b/plugins/subman/gsd-subman-helper.c -@@ -0,0 +1,378 @@ +@@ -0,0 +1,372 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- + * + * Copyright (C) 2019 Richard Hughes @@ -477,9 +477,11 @@ index 00000000..182f7190 + return G_IO_ERROR_NOT_FOUND; + } + -+ /* no options */ ++ /* enable_content=1 auto attaches the subscription */ + subman_options = g_variant_builder_new (G_VARIANT_TYPE("a{ss}")); + ++ g_variant_builder_add (subman_options, "{ss}", "enable_content", "1"); ++ + /* set registration server */ + if (hostname == NULL || hostname[0] == '\0') + hostname = g_strdup ("subscription.rhsm.redhat.com"); @@ -578,17 +580,9 @@ index 00000000..182f7190 + return G_IO_ERROR_NOT_INITIALIZED; + } + -+ /* wait for rhsmd to notice the new config */ -+ g_usleep (G_USEC_PER_SEC * 5); -+ -+ /* auto-attach */ -+ if (!_helper_auto_attach (&error)) { -+ g_printerr ("Failed to AutoAttach: %s\n", error->message); -+ return G_IO_ERROR_NOT_INITIALIZED; -+ } -+ + return EXIT_SUCCESS; +} ++ diff --git a/plugins/subman/gsd-subscription-manager.c b/plugins/subman/gsd-subscription-manager.c new file mode 100644 index 00000000..08b13fa6