diff --git a/.dconf.metadata b/.dconf.metadata new file mode 100644 index 0000000..f57b4b5 --- /dev/null +++ b/.dconf.metadata @@ -0,0 +1 @@ +4845e185a63297830c49a1889a72290337968b22 SOURCES/dconf-0.16.0.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/0001-DConfChangeset-expose-concept-of-sealing.patch b/SOURCES/0001-DConfChangeset-expose-concept-of-sealing.patch new file mode 100644 index 0000000..76b6557 --- /dev/null +++ b/SOURCES/0001-DConfChangeset-expose-concept-of-sealing.patch @@ -0,0 +1,136 @@ +From 40f887db43dc89e546ecef9c2d2f31a61858badc Mon Sep 17 00:00:00 2001 +From: Ryan Lortie +Date: Tue, 25 Jun 2013 14:39:26 -0400 +Subject: [PATCH 1/2] DConfChangeset: expose concept of "sealing" + +DConfChangeset is a partially threadsafe type. + +when first created, it is mutable and can only be used from one thread. +After it is filled in, the intention is that it can be shared between +threads as long as it isn't changed. + +Previously, this transition was made when dconf_changeset_describe() was +called. After that, it was not possible to make any more changes. + +Formalise and document this concept and add an explicit call for it: +dconf_changeset_seal(). + +https://bugzilla.gnome.org/show_bug.cgi?id=703073 +--- + common/dconf-changeset.c | 49 ++++++++++++++++++++++++++++++++++++++++++------ + common/dconf-changeset.h | 2 ++ + 2 files changed, 45 insertions(+), 6 deletions(-) + +diff --git a/common/dconf-changeset.c b/common/dconf-changeset.c +index d9b9f41..54be719 100644 +--- a/common/dconf-changeset.c ++++ b/common/dconf-changeset.c +@@ -54,7 +54,8 @@ + struct _DConfChangeset + { + GHashTable *table; +- gboolean is_database; ++ guint is_database : 1; ++ guint is_sealed : 1; + gint ref_count; + + gchar *prefix; +@@ -195,7 +196,7 @@ dconf_changeset_set (DConfChangeset *changeset, + const gchar *path, + GVariant *value) + { +- g_return_if_fail (changeset->prefix == NULL); ++ g_return_if_fail (!changeset->is_sealed); + g_return_if_fail (dconf_is_path (path, NULL)); + + /* Check if we are performing a path reset */ +@@ -366,12 +367,44 @@ dconf_changeset_string_ptr_compare (gconstpointer a_p, + return strcmp (*a, *b); + } + +-static void +-dconf_changeset_build_description (DConfChangeset *changeset) ++/** ++ * dconf_changeset_seal: ++ * @changeset: a #DConfChangeset ++ * ++ * Seals @changeset. ++ * ++ * When a #DConfChangeset is first created, it is mutable and ++ * non-threadsafe. Once the changeset is populated with the required ++ * changes, it can be shared between multiple threads, but only by ++ * making it immutable by "sealing" it. ++ * ++ * After the changeset is sealed, you cannot call dconf_changeset_set() ++ * or any other functions that would modify it. It is safe, however, to ++ * share it between multiple threads. ++ * ++ * All changesets are unsealed on creation, including those that are ++ * made by copying changesets that are sealed. ++ * dconf_changeset_describe() will implicitly seal a changeset. ++ * ++ * This function is idempotent. ++ * ++ * Since: 0.18 ++ **/ ++void ++dconf_changeset_seal (DConfChangeset *changeset) + { + gsize prefix_length; + gint n_items; + ++ if (changeset->is_sealed) ++ return; ++ ++ changeset->is_sealed = TRUE; ++ ++ /* This function used to be called dconf_changeset_build_description() ++ * because that's basically what sealing is... ++ */ ++ + n_items = g_hash_table_size (changeset->table); + + /* If there are no items then what is there to describe? */ +@@ -501,6 +534,9 @@ dconf_changeset_build_description (DConfChangeset *changeset) + * The @paths array is returned in an order such that dir will always + * come before keys contained within those dirs. + * ++ * If @changeset is not already sealed then this call will implicitly ++ * seal it. See dconf_changeset_seal(). ++ * + * Returns: the number of changes (the length of @changes and @values). + **/ + guint +@@ -513,8 +549,7 @@ dconf_changeset_describe (DConfChangeset *changeset, + + n_items = g_hash_table_size (changeset->table); + +- if (n_items && !changeset->prefix) +- dconf_changeset_build_description (changeset); ++ dconf_changeset_seal (changeset); + + if (prefix) + *prefix = changeset->prefix; +@@ -664,6 +699,8 @@ dconf_changeset_change (DConfChangeset *changeset, + gsize prefix_len; + gint i; + ++ g_return_if_fail (!changeset->is_sealed); ++ + /* Handling resets is a little bit tricky... + * + * Consider the case that we have @changeset containing a key /a/b and +diff --git a/common/dconf-changeset.h b/common/dconf-changeset.h +index 7228105..8a9cb48 100644 +--- a/common/dconf-changeset.h ++++ b/common/dconf-changeset.h +@@ -70,4 +70,6 @@ void dconf_changeset_change (DConfCh + DConfChangeset * dconf_changeset_diff (DConfChangeset *from, + DConfChangeset *to); + ++void dconf_changeset_seal (DConfChangeset *changeset); ++ + #endif /* __dconf_changeset_h__ */ +-- +1.8.3.1 + diff --git a/SOURCES/0002-engine-seal-changesets-on-changes.patch b/SOURCES/0002-engine-seal-changesets-on-changes.patch new file mode 100644 index 0000000..e1b2cb7 --- /dev/null +++ b/SOURCES/0002-engine-seal-changesets-on-changes.patch @@ -0,0 +1,42 @@ +From ba512dc4225a043b94ef13718f1cbe8a806f5b55 Mon Sep 17 00:00:00 2001 +From: Ryan Lortie +Date: Tue, 25 Jun 2013 14:43:58 -0400 +Subject: [PATCH 2/2] engine: seal changesets on changes + +When we do change operations, make sure we seal our DConfChangeset +before sharing it between threads. + +This will ensure it gets sealed in only one thread instead of being +implicitly sealed in two different threads at the same time when each of +them calls dconf_changeset_describe(). + +https://bugzilla.gnome.org/show_bug.cgi?id=703073 +--- + engine/dconf-engine.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c +index 446619e..7beff95 100644 +--- a/engine/dconf-engine.c ++++ b/engine/dconf-engine.c +@@ -1035,6 +1035,8 @@ dconf_engine_change_fast (DConfEngine *engine, + if (!dconf_engine_changeset_changes_only_writable_keys (engine, changeset, error)) + return FALSE; + ++ dconf_changeset_seal (changeset); ++ + /* Check for duplicates in the pending queue. + * + * Note: order doesn't really matter here since "similarity" is an +@@ -1105,6 +1107,8 @@ dconf_engine_change_sync (DConfEngine *engine, + if (!dconf_engine_changeset_changes_only_writable_keys (engine, changeset, error)) + return FALSE; + ++ dconf_changeset_seal (changeset); ++ + /* we know that we have at least one source because we checked writability */ + reply = dconf_engine_dbus_call_sync_func (engine->sources[0]->bus_type, + engine->sources[0]->bus_name, +-- +1.8.3.1 + diff --git a/SPECS/dconf.spec b/SPECS/dconf.spec new file mode 100644 index 0000000..6e25184 --- /dev/null +++ b/SPECS/dconf.spec @@ -0,0 +1,328 @@ +%define glib2_version 2.27.2 +%define vala_version 0.11.7 + +Name: dconf +Version: 0.16.0 +Release: 3%{?dist} +Summary: A configuration system + +Group: System Environment/Base +License: LGPLv2+ and GPLv2+ and GPLv3+ +URL: http://live.gnome.org/dconf +#VCS: git:git://git.gnome.org/dconf +Source0: http://download.gnome.org/sources/dconf/0.16/dconf-%{version}.tar.xz + +# upstream fixes +Patch0: 0001-DConfChangeset-expose-concept-of-sealing.patch +Patch1: 0002-engine-seal-changesets-on-changes.patch + +BuildRequires: glib2-devel >= %{glib2_version} +BuildRequires: gtk3-devel +BuildRequires: libxml2-devel +BuildRequires: dbus-devel +BuildRequires: vala-devel >= %{vala_version} +BuildRequires: gtk-doc +BuildRequires: intltool + +Requires: dbus + +%description +dconf is a low-level configuration system. Its main purpose is to provide a +backend to the GSettings API in GLib. + +%package devel +Summary: Header files and libraries for dconf development +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +dconf development package. Contains files needed for doing software +development using dconf. + +%package editor +Summary: Configuration editor for dconf +Group: Applications/System +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description editor +dconf-editor allows you to browse and modify dconf databases. + + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%configure --disable-static +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dconf/profile +cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/dconf/profile/user +user-db:user +system-db:local +system-db:site +system-db:distro +EOF + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dconf/db/local.d/locks +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dconf/db/site.d/locks +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dconf/db/distro.d/locks + +%find_lang dconf + +%post +/sbin/ldconfig +gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules +dconf update + +%postun +/sbin/ldconfig +if [ $1 -eq 0 ] ; then + gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules + glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +fi + +%posttrans +glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : + + +%post editor +for d in hicolor HighContrast ; do + touch --no-create %{_datadir}/icons/$d &>/dev/null || : +done + +%postun editor +if [ $1 -eq 0 ] ; then + for d in hicolor HighContrast ; do + touch --no-create %{_datadir}/icons/$d &>/dev/null || : + gtk-update-icon-cache %{_datadir}/icons/$d &>/dev/null || : + done +fi + +%posttrans editor +for d in hicolor HighContrast ; do + gtk-update-icon-cache %{_datadir}/icons/$d &>/dev/null || : +done + + +%files -f dconf.lang +%doc COPYING +%{_libdir}/gio/modules/libdconfsettings.so +%{_libexecdir}/dconf-service +%{_datadir}/dbus-1/services/ca.desrt.dconf.service +%{_bindir}/dconf +%{_libdir}/libdconf.so.* +%{_libdir}/libdconf-dbus-1.so.* +%{_datadir}/bash-completion/completions/dconf +%{_datadir}/glib-2.0/schemas/ca.desrt.dconf-editor.gschema.xml +%{_mandir}/man1/dconf-service.1.gz +%{_mandir}/man1/dconf.1.gz +%{_mandir}/man7/dconf.7.gz +%config(noreplace) %{_sysconfdir}/dconf/profile/user +%dir %{_sysconfdir}/dconf +%dir %{_sysconfdir}/dconf/profile +%dir %{_sysconfdir}/dconf/db +%dir %{_sysconfdir}/dconf/db/local.d +%dir %{_sysconfdir}/dconf/db/local.d/locks +%dir %{_sysconfdir}/dconf/db/site.d +%dir %{_sysconfdir}/dconf/db/site.d/locks +%dir %{_sysconfdir}/dconf/db/distro.d +%dir %{_sysconfdir}/dconf/db/distro.d/locks + +%files devel +%{_includedir}/dconf +%{_libdir}/libdconf.so +%{_libdir}/pkgconfig/dconf.pc +%{_includedir}/dconf-dbus-1 +%{_libdir}/libdconf-dbus-1.so +%{_libdir}/pkgconfig/dconf-dbus-1.pc +%{_datadir}/gtk-doc/html/dconf +%{_datadir}/vala + +%files editor +%{_bindir}/dconf-editor +%{_datadir}/applications/dconf-editor.desktop +%dir %{_datadir}/dconf-editor +%{_datadir}/dconf-editor/dconf-editor.ui +%{_datadir}/dconf-editor/dconf-editor-menu.ui +%{_datadir}/icons/hicolor/*/apps/dconf-editor.png +%{_datadir}/icons/HighContrast/*/apps/dconf-editor.png +%{_mandir}/man1/dconf-editor.1.gz + +%changelog +* Wed Jul 31 2013 Ray Strode 0.16.0-3 +- Add system dbs for distro, site, and machine local dconf databases + Resolves: #990630 + +* Tue Jun 25 2013 Matthias Clasen - 0.16.0-2 +- Fix a frequent crash (#975687) + +* Mon Mar 25 2013 Kalev Lember - 0.16.0-1 +- Update to 0.16.0 + +* Mon Feb 11 2013 Kalev Lember - 0.15.3-1 +- Update to 0.15.3 +- Install the HighContrast icons and update the icon cache scriptlets to take + this into account + +* Sat Dec 22 2012 Rex Dieter - 0.15.2-2 +- -devel: drop Requires: glib2-devel, already gets pulled in via pkgconfig deps +- -editor: add icon scriptlets +- tighten subpkg deps via %%{_isa} + +* Tue Nov 20 2012 Richard Hughes - 0.15.2-1 +- Update to 0.15.2 + +* Fri Nov 09 2012 Kalev Lember - 0.15.0-3 +- Move some of the rpm scriptlets back to %%posttrans + (glib-compile-schemas, icon cache) + +* Thu Nov 8 2012 Marek Kasik - 0.15.0-2 +- Move dconf-editor's man page to the dconf-editor sub-package + +* Wed Nov 7 2012 Marek Kasik - 0.15.0-1 +- Update to 0.15.0 +- Remove upstreamed patch + +* Wed Nov 7 2012 Marek Kasik - 0.14.0-4 +- Move %%posttrans commands to %%post (rpmlint related) + +* Wed Nov 7 2012 Marek Kasik - 0.14.0-3 +- Update License field +- Update Source URL +- Add link of corresponding bug for the memory leak patch + +* Wed Nov 7 2012 Marek Kasik - 0.14.0-2.1 +- Merge spec-file fixes from f18 branch + +* Sun Oct 21 2012 Matthias Clasen - 0.14.0-2 +- Fix a memory leak +- Update to 0.14.0 + +* Wed Jul 18 2012 Fedora Release Engineering - 0.13.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 17 2012 Richard Hughes - 0.13.4-1 +- Update to 0.13.4 + +* Thu Jun 07 2012 Richard Hughes - 0.13.0-2 +- Add missing file to file list. + +* Thu Jun 07 2012 Richard Hughes - 0.13.0-1 +- Update to 0.13.0 + +* Sat May 05 2012 Kalev Lember - 0.12.1-1 +- Update to 0.12.1 + +* Tue Mar 27 2012 Kalev Lember - 0.12.0-1 +- Update to 0.12.0 + +* Tue Mar 20 2012 Kalev Lember - 0.11.7-1 +- Update to 0.11.7 + +* Fri Mar 9 2012 Matthias Clasen - 0.11.6-1 +- Update to 0.11.6 + +* Mon Feb 6 2012 Matthias Clasen - 0.11.5-1 +- Update to 0.11.5 + +* Fri Jan 13 2012 Fedora Release Engineering - 0.11.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Nov 21 2011 Matthias Clasen - 0.11.2-1 +- Update to 0.11.2 + +* Fri Nov 4 2011 Matthias Clasen - 0.11.0-2 +- Fix a typo (#710700) + +* Wed Nov 2 2011 Matthias Clasen - 0.11.0-1 +- Update to 0.11.0 + +* Mon Sep 26 2011 Ray - 0.10.0-1 +- Update to 0.10.0 + +* Mon Sep 19 2011 Matthias Clasen - 0.9.1-1 +- Update to 0.9.1 + +* Tue Jul 26 2011 Matthias Clasen - 0.9.0-1 +- Update to 0.9.0 + +* Wed May 11 2011 Tomas Bzatek - 0.7.5-1 +- Update to 0.7.5 + +* Fri May 6 2011 Matthias Clasen - 0.7.4-1 +- Update to 0.7.4 + +* Wed Apr 6 2011 Matthias Clasen - 0.7.3-2 +- Fix a crash in dconf-editor + +* Tue Mar 22 2011 Tomas Bzatek - 0.7.3-1 +- Update to 0.7.3 + +* Thu Feb 10 2011 Matthias Clasen - 0.7.2-3 +- Rebuild for newer gtk + +* Tue Feb 08 2011 Fedora Release Engineering - 0.7.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sat Feb 5 2011 Matthias Clasen - 0.7.2-1 +- Update to 0.7.2 + +* Wed Feb 2 2011 Matthias Clasen - 0.7.1-1 +- Update to 0.7.1 + +* Mon Jan 17 2011 Matthias Clasen - 0.7-1 +- Update to 0.7 + +* Wed Sep 29 2010 jkeating - 0.5.1-2 +- Rebuilt for gcc bug 634757 + +* Tue Sep 21 2010 Matthias Clasen - 0.5.1-1 +- Update to 0.5.1 + +* Thu Aug 5 2010 Matthias Clasen - 0.5-2 +- Fix up shared library symlinks (#621733) + +* Tue Aug 3 2010 Matthias Clasen - 0.5-1 +- Update to 0.5 + +* Mon Jul 12 2010 Matthias Clasen - 0.4.2-1 +- Update to 0.4.2 + +* Wed Jun 30 2010 Colin Walters - 0.4.1-2 +- Changes to support snapshot builds + +* Sat Jun 26 2010 Matthias Clasen 0.4.1-1 +- Update to 0.4.1 +- Include dconf-editor (in a subpackage) + +* Wed Jun 23 2010 Matthias Clasen 0.4-2 +- Rebuild against glib 2.25.9 + +* Sat Jun 12 2010 Matthias Clasen 0.4-1 +- Update to 0.4 + +* Tue Jun 08 2010 Richard Hughes 0.3.2-0.1.20100608 +- Update to a git snapshot so that users do not get a segfault in every + application using GSettings. + +* Wed Jun 02 2010 Bastien Nocera 0.3.1-2 +- Rebuild against latest glib2 + +* Tue May 24 2010 Matthias Clasen 0.3.1-1 +- Update to 0.3.1 +- Add a -devel subpackage + +* Fri May 21 2010 Matthias Clasen 0.3-3 +- Make batched writes (e.g. with delayed settings) work + +* Thu May 20 2010 Matthias Clasen 0.3-2 +- Make the registration of the backend work + +* Wed May 19 2010 Matthias Clasen 0.3-1 +- Initial packaging