Backport patch for permissions restore
Indicate bundle of GVDB Resolves: #1974362
This commit is contained in:
parent
aa8cd9b67a
commit
8199d323bd
31
dconf-0.40.0-permissions.patch
Normal file
31
dconf-0.40.0-permissions.patch
Normal 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;
|
||||
}
|
11
dconf.spec
11
dconf.spec
@ -2,7 +2,7 @@
|
||||
|
||||
Name: dconf
|
||||
Version: 0.40.0
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: A configuration system
|
||||
|
||||
License: LGPLv2+ and GPLv2+ and GPLv3+
|
||||
@ -10,6 +10,7 @@ URL: https://wiki.gnome.org/Projects/dconf
|
||||
Source0: https://download.gnome.org/sources/dconf/0.40/dconf-%{version}.tar.xz
|
||||
|
||||
Patch1: dconf-override.patch
|
||||
Patch2: dconf-0.40.0-permissions.patch
|
||||
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: dbus-devel
|
||||
@ -23,6 +24,9 @@ BuildRequires: vala
|
||||
Requires: dbus
|
||||
Requires: glib2%{?_isa} >= %{glib2_version}
|
||||
|
||||
# gvdb code is intended to be copy-pasted into projects
|
||||
Provides: bundled(gvdb)
|
||||
|
||||
%description
|
||||
dconf is a low-level configuration system. Its main purpose is to provide a
|
||||
backend to the GSettings API in GLib.
|
||||
@ -103,6 +107,11 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dconf/db/distro.d/locks
|
||||
%{_datadir}/vala
|
||||
|
||||
%changelog
|
||||
* Tue Jun 22 2021 Marek Kasik <mkasik@redhat.com> - 0.40.0-5
|
||||
- Backport patch for permissions restore
|
||||
- Indicate bundle of GVDB
|
||||
- Resolves: #1974362
|
||||
|
||||
* Mon Apr 19 2021 Kalev Lember <klember@redhat.com> - 0.40.0-4
|
||||
- Use full path for dconf in posttrans script (#1950829)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user