import dconf-0.28.0-4.el8

This commit is contained in:
CentOS Sources 2021-05-18 02:48:36 -04:00 committed by Andrew Lukoshko
parent 188010fc78
commit 9c74483365
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
--- a/gvdb/gvdb-builder.c
+++ b/gvdb/gvdb-builder.c
@@ -21,6 +21,7 @@
#include "gvdb-format.h"
#include <glib.h>
+#include <glib/gstdio.h>
#include <fcntl.h>
#if !defined(G_OS_WIN32) || !defined(_MSC_VER)
#include <unistd.h>
@@ -509,13 +510,20 @@ gvdb_table_write_contents (GHashTable *table,
gboolean status;
FileBuilder *fb;
GString *str;
+ GStatBuf buf;
+ gint stat_ret;
fb = file_builder_new (byteswap);
file_builder_add_hash (fb, table, &root);
str = file_builder_serialise (fb, root);
+ stat_ret = g_stat (filename, &buf);
+
status = g_file_set_contents (filename, str->str, str->len, error);
g_string_free (str, TRUE);
+ if (stat_ret == 0)
+ g_chmod (filename, buf.st_mode);
+
return status;
}

View File

@ -2,7 +2,7 @@
Name: dconf Name: dconf
Version: 0.28.0 Version: 0.28.0
Release: 3%{?dist} Release: 4%{?dist}
Summary: A configuration system Summary: A configuration system
License: LGPLv2+ and GPLv2+ and GPLv3+ License: LGPLv2+ and GPLv2+ and GPLv3+
@ -17,6 +17,7 @@ Patch4: 0003-Engine-add-g_debug-statements-in-state-changing-inte.patch
Patch5: 0004-Engine-Add-locks-around-access-to-subscription-count.patch Patch5: 0004-Engine-Add-locks-around-access-to-subscription-count.patch
Patch6: 0005-Engine-Add-comprehensive-unit-tests-for-subscription.patch Patch6: 0005-Engine-Add-comprehensive-unit-tests-for-subscription.patch
Patch7: 0001-Engine-Change-overflow-thresholds-in-subscription-co.patch Patch7: 0001-Engine-Change-overflow-thresholds-in-subscription-co.patch
Patch8: dconf-0.28.0-permissions.patch
BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk-doc BuildRequires: gtk-doc
@ -96,6 +97,10 @@ dconf update
%{_datadir}/vala %{_datadir}/vala
%changelog %changelog
* Mon Nov 23 2020 Marek Kasik <mkasik@redhat.com> - 0.28.0-4
- Restore permissions on updated database
- Resolves: #1879722
* Fri Jan 18 2019 Olivier Fourdan <ofourdan@redhat.com> - 0.28.0-3 * Fri Jan 18 2019 Olivier Fourdan <ofourdan@redhat.com> - 0.28.0-3
- Backport fix for emission of spurious changed signals - Backport fix for emission of spurious changed signals
- for all keys at once crashing gnome-shell - for all keys at once crashing gnome-shell