diff --git a/dconf-0.40.0-permissions.patch b/dconf-0.40.0-permissions.patch new file mode 100644 index 0000000..151b790 --- /dev/null +++ b/dconf-0.40.0-permissions.patch @@ -0,0 +1,31 @@ +--- a/gvdb/gvdb-builder.c ++++ b/gvdb/gvdb-builder.c +@@ -21,6 +21,7 @@ + #include "gvdb-format.h" + + #include ++#include + #include + #if !defined(G_OS_WIN32) || !defined(_MSC_VER) + #include +@@ -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; + } diff --git a/dconf.spec b/dconf.spec index c9a875f..b246fd3 100644 --- a/dconf.spec +++ b/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 - 0.40.0-5 +- Backport patch for permissions restore +- Indicate bundle of GVDB +- Resolves: #1974362 + * Mon Apr 19 2021 Kalev Lember - 0.40.0-4 - Use full path for dconf in posttrans script (#1950829)