summaryrefslogtreecommitdiff
path: root/service
Commit message (Collapse)AuthorAgeFilesLines
* tests: Add tests for dconf utility toolTomasz Miąsko2018-11-131-1/+1
|
* Revert "Revert "Declare libdconf_service as a dependency""Daniel Playfair Cal2018-08-271-1/+9
| | | | This reverts commit b799b08ec4e5978ab8db233a9da1532bf7918324.
* Revert "Declare libdconf_service as a dependency"Daniel Playfair Cal2018-08-271-9/+1
| | | | This reverts commit bf103302332603a637f1c33e603c93b82aa1dc0b.
* Declare libdconf_service as a dependencyEmmanuele Bassi2018-08-211-1/+9
| | | | | | | | | | | | | | | | The dconf-service internal static library depends on generated files, and we need to make sure that those files are available by the time we build the tests that depend on them, as Meson builds everything in parallel. If we don't do that, in cases of massive parallelised builders, we will end up with errors like: ``` ccache cc -Itests/tests@@writer@exe -Itests -I../tests -I. -I../ -Itests/../service -I../tests/../service -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O0 -g '-DSYSCONFDIR="/etc"' -fno-common -Wmissing-prototypes -Wwrite-strings -O2 -g -m64 -mtune=generic '-DSRCDIR="/ostbuild/source/dconf/tests"' -MD -MQ 'tests/tests@@writer@exe/writer.c.o' -MF 'tests/tests@@writer@exe/writer.c.o.d' -o 'tests/tests@@writer@exe/writer.c.o' -c ../tests/writer.c ../tests/writer.c:24:37: fatal error: service/dconf-generated.h: No such file or directory ``` Reviewed-by: nobody Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* service: Rename a method to make its behaviour more apparentPhilip Withnall2018-08-203-5/+5
| | | | | | | It’s a little counterintuitive that a function called ‘read’ could sometimes move a file (which could be considered a write). Signed-off-by: Philip Withnall <withnall@endlessm.com>
* build: Enable G_LOG_USE_STRUCTURED=1Philip Withnall2018-08-161-0/+2
| | | | | | | This enables structured logging for all parts of dconf, which will make it easier to check for certain log messages in the unit tests. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* service: Split most code into a static helper libraryPhilip Withnall2018-08-161-9/+17
| | | | | | This will make unit testing the code easier. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* service: Add some initial g_autoptr() supportPhilip Withnall2018-08-161-0/+3
| | | | | | | This doesn’t bump our GLib dependency, since we already depend on GLib 2.44. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* service: Allow opening corrupt GVDB files when writingPhilip Withnall2018-08-161-1/+33
| | | | | | | | | | | | | | | | | If a GVDB file cannot be opened due to being corrupt, move it out of the way, warn, and open a new blank database instead. This prevents the situation where a corrupt database stops the entire desktop session from loading. Note that the dconf_gvdb_utils_read_file() code path is only taken inside DConfWriter. The DConf engine sources (such as dconf-engine-source-system.c) open the GVDB tables separately, and already all handle errors gracefully. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://gitlab.gnome.org/GNOME/glib/issues/1454
* Namespace the dependencies variablesEmmanuele Bassi2018-08-111-2/+2
| | | | | | | | | | | | | The build currently, unintentionally, depends on side effects, namely: that a variable defined in a meson.build file will be valid for any other included meson.build file, until it gets re-defined. We use the same `deps` variable in many places, and we end up depending on the inclusion order when we get to the client library, which depends on the gsettings backend defining the `deps` variable. Reviewed-by: nobody Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
* build: Add trailing commas where necessaryIñigo Martínez2018-08-111-4/+4
| | | | | | Having trailing commas in place means that if another source file or parameter is added to the end of the list or function, there won't be noise when adding the comma to the line above.
* build: Fix parameters orderIñigo Martínez2018-08-111-2/+2
| | | | | | | | The install parameters should be the last parameters when calling a function. The `configuration` parameter has been moved leaving install parameters at the end.
* build: Fix internal dependenciesIñigo Martínez2018-08-111-6/+8
| | | | | | | | | meson is able to generate internal dependencies for handling built libraries. These internal dependencies depend on other dependencies as well, based on the includes exposed by their headers. This have been fixed by using proper internal dependencies for these libraries.
* build: Retrieve D-Bus and gio paths from pkg-config filesIñigo Martínez2018-08-111-11/+1
| | | | | | | | | | | | | | | D-Bus' session bus services' paths and gio's module's paths are hardcoded. However, these directories can be retrieved by checking this information from their pkgconfig files. This patch retrieves the paths for their correspondant pkgconfig files and uses those paths as installation directories. The options to set different directories for these options are not necessary anymore, so they have been removed. Finally, the post install script does not depend anymore on the existence of `gio-querymodules` and is always executed.
* build: Rename build optionsIñigo Martínez2018-08-111-2/+2
| | | | | | | | | | Following the new meson porting guidelines, this patch renames the build options. The list of changes is as follows: - Remove the enable prefix from boolean options. - Remove the with prefix from string options. - The character separator from multi-word options has been changed to underscore.
* service: Port from g_type_class_add_private() to G_ADD_PRIVATE()Philip Withnall2018-08-011-3/+2
| | | | | | The former has been deprecated for a long time. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Don't create the user config dir as world readableSebastien Bacher2018-04-172-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=792677
* Remove .gitignore filesIñigo Martínez2017-10-221-4/+0
| | | | | | | | | | meson does not allow to build source code inside the source code tree, for this reason there is no need for .gitignore files to ignore built files. This patch removes .gitignore files which are no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* build: Remove autotoolsIñigo Martínez2017-10-171-44/+0
| | | | | | | To avoid the burden of maintaining multiple build systems, this patch removes autotools support. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* build: Port to meson build systemIñigo Martínez2017-10-173-1/+57
| | | | | | | | meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=784910
* service: Don't hang during shutdownMarek Kasik2014-04-041-1/+6
| | | | | | | Remember whether a signal was signalled to dconf-service so we don't call g_application_release() more than once. https://bugzilla.gnome.org/show_bug.cgi?id=727549
* Updated FSF's addressDaniel Mustieles2014-01-3111-33/+11
|
* Add missing "config.h" include everywhereRyan Lortie2013-11-247-0/+14
| | | | We ought to be including this from each .c file.
* service: rewrite a line to avoid a gcc warningRyan Lortie2013-07-121-1/+2
| | | | gcc doesn't like 'a && b;' so use 'if (a) b;'.
* service: fix some harmless compile warningsRyan Lortie2013-07-124-7/+8
| | | | Mostly missing 'static'.
* service: fix a couple of leaksRyan Lortie2013-02-112-0/+2
| | | | | Fairly harmless leaks. One only happens in an error case (like the disk being full) and the other only happens on startup.
* writer: ignore empty changesetsRyan Lortie2013-02-111-7/+14
| | | | | | | | | | | | When emitting change signals, we call dconf_changeset_describe() to enumerate the keys to send the signal for. When the changeset is empty, this function returns NULL for the path vector. We pass that NULL into the signal emitter and the service crashes. We can avoid this situation by refusing to handle empty changesets in the first place.
* keyfile: explicitly use local GVfsRyan Lortie2013-01-121-1/+2
| | | | | | | | Avoid initialising all of GVfs for dconf-service in order to monitor a local file for changes. See https://bugzilla.gnome.org/show_bug.cgi?id=691618 for the possibility of a better fix.
* keyfile: implement list()Ryan Lortie2013-01-111-0/+21
|
* keyfile: add advisory lockingRyan Lortie2013-01-111-2/+62
| | | | | | | | | | | Use fcntl() on a lockfile when accessing a keyfile. Now reading the keyfile, notifying local processes of changes in it, applying changes from local request and rewriting it is all done under a single acquire of the lock. This effectively means that concurrent changes made to the database across several machines sharing a home directory over NFS will be seen by all machines as having occurred in the same order (decided by who won the race to the lock).
* keyfile: many improvementsRyan Lortie2013-01-112-13/+86
| | | | | | | | | | | | | Store the keyfile in ~/.config/dconf/$(name).txt instead of ~/.config/dconf-keyfile/name. Adjust the base writer not to pick up filenames with dots in them (so we will skip the .txt files the keyfile writer puts into the same directory). Add file change monitoring and reload the file if anyone changes it. Fix a crasher on the first write of a file if it does not yet exist. Add proper finalize handling.
* service: remove some debug printfRyan Lortie2013-01-111-1/+0
|
* keyfile: don't rewrite if there are no changesRyan Lortie2013-01-111-16/+32
|
* writer: avoid spurious rewrites on InitRyan Lortie2013-01-113-1/+27
| | | | | Don't rewrite the gvdb file unless an actual change has been applied to the database (unless creating a non-native database for the first time).
* service: add a keyfile writerRyan Lortie2013-01-114-2/+368
| | | | It is now possible to have keyfile-based dconf databases.
* writer: fix headerRyan Lortie2013-01-111-1/+2
| | | | Fix two mistakes in the dconf-writer.h header.
* service: add a diff() operation on writersRyan Lortie2013-01-112-0/+9
| | | | | | | This diffs the given changeset with the uncommited changes in the writer. The result is effectively the changeset that would have to be applied to the writer to cause it to be equal to the passed-in changeset.
* service: add a "shm" service-db subtypeRyan Lortie2013-01-094-0/+49
| | | | | | | | | Add a shm service-db that does nothing. In effect this provides us with a database maintained in the user runtime dir that never gets synced to any permanent storage. It can be used by putting a line like "service-db:shm/temp" in the dconf profile.
* service: add support for service-dbRyan Lortie2013-01-093-16/+110
| | | | | | Add support for service-db to the service. New types of service-dbs can be implemented via a GIOExtensionPoint.
* service: fix some harmless warningsRyan Lortie2013-01-094-1/+5
|
* service: include list() results in enumerationRyan Lortie2013-01-081-0/+2
| | | | | Add the results of dconf_writer_list() to the output of the enumerate() function on the subtree introspection interface.
* writer: add list class virtual methodRyan Lortie2013-01-082-0/+39
| | | | | This populates a set with the names of databases available for a given writer class.
* service: add new 'string set' utility pseudoclassRyan Lortie2013-01-081-9/+41
| | | | | | Add a thin wrapper around GHashTable for dealing with sets of strings. Port the subtree introspection enumeration code to use it.
* writer: add @type argument to constructorRyan Lortie2013-01-083-4/+8
| | | | | dconf_writer_new() now takes a type so we can create subtypes of DConfWriter.
* writer: move instance and class struct into headerRyan Lortie2013-01-082-48/+67
| | | | | | | ...and add a lot of ->priv. This is not a public API because this header doesn't get installed, but it can now be used by other things in-tree.
* service: try mkdir_with_parents() on failed writesRyan Lortie2013-01-021-0/+16
| | | | | | | If we fail to write the database file, try g_mkdir_with_parents() to create the parent directory and try again. https://bugzilla.gnome.org/show_bug.cgi?id=689136
* service/: don't call g_hash_table_unref on changesetRyan Lortie2013-01-021-1/+1
| | | | | | | | | | | | 4fce559d81bdd3841cfe16fd3a3e6b8e6e9e60f2 changed from using GHashTable to database-mode changesets for caching the state of the database in the service but we missed a case of g_hash_table_unref being called. Fix that now. Problem reported and fix suggested by Philippe Coval. https://bugzilla.gnome.org/show_bug.cgi?id=691013
* writer: Fix typo causing segfaults on service shutdownColin Walters2012-12-171-1/+1
| | | | | | Was seeing crashes in the latest gnome-ostree on login. https://bugzilla.gnome.org/show_bug.cgi?id=690316
* dist the D-Bus interface descriptionRyan Lortie2012-11-191-0/+3
| | | | | | Also make sure the generated files get cleaned. 'make distcheck' fixing.
* Remove calls to g_type_init()Ryan Lortie2012-11-191-2/+0
| | | | Since we now have a hard dependency on the newer GLib anyway.