Backport patch for permissions restore
Indicate bundle of GVDB Resolves: RHEL-71949
This commit is contained in:
parent
7d45d26650
commit
0244b8eef4
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: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
Summary: A configuration system
|
||||
|
||||
License: LGPL-2.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-or-later AND GPL-3.0-or-later
|
||||
@ -11,6 +11,7 @@ Source0: https://download.gnome.org/sources/dconf/0.40/dconf-%{version}.t
|
||||
|
||||
Patch1: dconf-override.patch
|
||||
Patch2: dconf-0.40.0-tests-profile.patch
|
||||
Patch3: dconf-0.40.0-permissions.patch
|
||||
|
||||
BuildRequires: bash-completion
|
||||
BuildRequires: dbus-devel
|
||||
@ -25,6 +26,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.
|
||||
@ -105,6 +109,11 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dconf/db/distro.d/locks
|
||||
%{_datadir}/vala
|
||||
|
||||
%changelog
|
||||
* Fri Jan 10 2025 Marek Kasik <mkasik@redhat.com> - 0.40.0-16
|
||||
- Backport patch for permissions restore
|
||||
- Indicate bundle of GVDB
|
||||
- Resolves: RHEL-71949
|
||||
|
||||
* Wed Nov 20 2024 Marek Kasik <mkasik@redhat.com> - 0.40.0-15
|
||||
- Do not use system profile for tests
|
||||
- Resolves: RHEL-65653
|
||||
|
Loading…
Reference in New Issue
Block a user