summaryrefslogtreecommitdiff
path: root/metadata
Commit message (Collapse)AuthorAgeFilesLines
* Add PartOf= to all systemd unitsHenri Chain2021-10-011-0/+1
| | | | | | | | | | | | | The `PartOf` directive sets up a one-way dependency between `graphical-session.target` and our services, so that when `graphical-session.target` is stopped or restarted, our services also get stopped or restarted. This ensures that gvfs daemons that were started in the context of a GUI login session (through dbus activation) do not continue to run after the user has logged out. See `systemd.unit(5)` for more info.
* Move systemd services to session sliceHenri Chain2021-10-011-0/+1
| | | | | | | | | | | | | | | | This puts all gvfs systemd services (which are all dbus-activated through `SystemdService=`) inside of the `session` slice that was introduced in v249 (https://github.com/systemd/systemd/pull/16603) and described in https://systemd.io/DESKTOP_ENVIRONMENTS/ and `systemd.special(7)` This allows sysadmins or OS integrators to assign higher-priority `systemd.resource-control(5)` on `session.slice` and have it propagate down to important session services such as gvfs, so that the gvfs daemons receive sufficient priority for resource allocations to keep the session running smoothly under load. Note that it still works on older systemd (the slice, which is just a cgroup inner directory, is created on demand)
* Drop use of volatile qualifierOndrej Holy2021-02-121-1/+1
| | | | | | | GVfs build with --werror fails currently because of glib!1719. Let's drop the volatile qualifier as it doesn't help with atomicity anyway. Relates: https://gitlab.gnome.org/GNOME/glib/-/issues/600
* build: Link libgvfscommon to libmetadataIñigo Martínez2020-08-111-9/+4
| | | | | | | | `gvfsd-metadata` uses the `gvfs_randomize_string` function by including `gvfsutils.h` header file from `libgvfscommon`. However, the library is not linked, only the directory is included. This has been fixed by linking `libgvfscommon` to `libmetadata`.
* metadata: check for mmap failureTobias Mueller2020-06-221-1/+1
| | | | | mmap returns MAP_FAILED if, well, it failed. Thus, checking for NULL does not catch errors.
* Notify changes in metadataSergio Costas2020-05-192-3/+90
| | | | | | | | | | | | | | | | | | | | | | | | | When a program (like Nautilus) modifies the metadata in a file (like metadata::custom-icon) there is no way of detecting that change from other programs: neither inotify generates an event in the file or the directory holding it, nor is possible to use it in the files at, or the folder itself, ~/.local/share/gvfs-metadata, because writting in them is delayed for nearly a minute. Unfortunately, there are cases where it is needed to be able to detect that. An example (and the reason for this patch) is when Nautilus (or another file manager) modifies the custom icon in a file from the desktop, and the desktop is managed by a different program (in this case, Desktop Icons NG), because the later can't detect the change made by the former and, thus, the file will keep the old icon until the whole desktop is refreshed. To fix this, this patch proposes to add a signal to the org.gtk.vfs.Metadata DBus interface, which will be triggered whenever a key is modified. To avoid saturating the system in case of modifying a lot of keys, it is triggered up to once per second.
* metadata: Replace usage of deprecated GTimeVal by GDateTimeOndrej Holy2019-09-201-3/+4
| | | | | GTimeVal is deprecated. Let's replace it by GDateTime in order to prevent the deprecation warnings.
* build: Use path strings in include_directoriesIñigo Martínez2019-05-161-1/+1
| | | | | | | | | | Since meson 0.50.0, plain strings can be used rather than include directory objects[0]. Taking advantage of this feature, some include directory objects have been replaced. [0] http://mesonbuild.com/Release-notes-for-0-50-0.html#include_directories-accepts-a-string
* build: Use dictionaries in configuration_data objectsIñigo Martínez2019-05-161-4/+5
| | | | | | | | | | Since 0.49.0[0], a dictionary could be used as a replacement for each key/value pair as if `set` method was called for each of them. Almost all of the `configuration_data` objects have been changed to use a dictionary. [0] http://mesonbuild.com/Reference-manual.html#configuration_data
* build: Do not use prefix on directory variablesIñigo Martínez2019-01-211-2/+2
| | | | | | | | | Although usually directory variables are set by using the `prefix` directory, this might cause issues due to parameters that need relative directories. In order to ease the transition `prefix` directory has been stripped from directory variables and only has been appended when necessary.
* build: Remove gdbus codegen workaroundIñigo Martínez2019-01-211-10/+6
| | | | | | | | | | | When gvfs was ported to meson `gdbus-codegen` was not able to generate the source and header files independently, and this caused issues on highly parallelized build. To avoid this issue a workaround was placed by using an external script. However, recently glib and meson acquired support for generating source and header files independently, so the workaround has been removed.
* build: Use generators placeholdersIñigo Martínez2019-01-211-1/+1
| | | | | | | | | | Functions derived from generators as `configure_file`, `custom_target` and `i18n.merge_file` can use placeholders like `@BASENAME@` that removes the extension from the input filename string. The output string has been replaced by this placeholder that allows in some cases the use of less variables.
* build: Fix the parameter order in configure_fileIñigo Martínez2019-01-211-2/+2
| | | | | | | The `install` and `install_dir` parameters must be the last parameters in the `configure_file` function. The paremeters have been reordered to fix this issue.
* build: Fix the use of pkg-config file variablesIñigo Martínez2019-01-211-3/+3
| | | | | | | | | The names of the variables in meson corresponding to the variables obtained from the pkg-config files has been fixed by using a pattern. The pattern uses the dependency name as the prefix and the obtained variable as the suffix.
* build: Use / instead of join_pathsIñigo Martínez2019-01-211-1/+1
| | | | | | | Since meson 0.49, the `/` character can be used to join paths[0], so all the instances of `join_paths` have been replaced. [0] http://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-
* build: Add trailing commasIñigo Martínez2019-01-211-15/+15
| | | | | | | Add missing trailing commas that avoids getting noise when another file/parameter is added and eases reviewing changes[0]. [0] https://gitlab.gnome.org/GNOME/dconf/merge_requests/11#note_291585
* Revert "build: Add trailing commas"Ondrej Holy2019-01-071-15/+15
| | | | This reverts commit f4ee93b06cfc4d9f727f9174e40d08097a25d571.
* Revert "build: Use / instead of join_paths"Ondrej Holy2019-01-071-1/+1
| | | | This reverts commit 9523d8e09e0088c8cd58ace494d47cc3083151fc.
* Revert "build: Fix the use of pkg-config file variables"Ondrej Holy2019-01-071-3/+3
| | | | This reverts commit 22e9f7721b891b17cd726f1bf92b15a35be34d22.
* Revert "build: Fix the parameter order in configure_file"Ondrej Holy2019-01-071-2/+2
| | | | This reverts commit 12f4c5a98e1b4a1a0b5fba45439dab74d12519bb.
* Revert "build: Use generators placeholders"Ondrej Holy2019-01-071-1/+1
| | | | This reverts commit dc34f1be6a3c1fa6d5615ad5d647003e7ce3196f.
* Revert "build: Remove gdbus codegen workaround"Ondrej Holy2019-01-071-6/+10
| | | | This reverts commit 32bde011b2522d302d72506884866bd809ef5bda.
* Revert "build: Do not use prefix on directory variables"Ondrej Holy2019-01-071-2/+2
| | | | This reverts commit db31059d1b7b11b597b03064329fb1e8899b11f2.
* build: Do not use prefix on directory variablesIñigo Martínez2019-01-041-2/+2
| | | | | | | | | Although usually directory variables are set by using the `prefix` directory, this might cause issues due to parameters that need relative directories. In order to ease the transition `prefix` directory has been stripped from directory variables and only has been appended when necessary.
* build: Remove gdbus codegen workaroundIñigo Martínez2019-01-041-10/+6
| | | | | | | | | | | When gvfs was ported to meson `gdbus-codegen` was not able to generate the source and header files independently, and this caused issues on highly parallelized build. To avoid this issue a workaround was placed by using an external script. However, recently glib and meson acquired support for generating source and header files independently, so the workaround has been removed.
* build: Use generators placeholdersIñigo Martínez2019-01-041-1/+1
| | | | | | | | | | Functions derived from generators as `configure_file`, `custom_target` and `i18n.merge_file` can use placeholders like `@BASENAME@` that removes the extension from the input filename string. The output string has been replaced by this placeholder that allows in some cases the use of less variables.
* build: Fix the parameter order in configure_fileIñigo Martínez2019-01-041-2/+2
| | | | | | | The `install` and `install_dir` parameters must be the last parameters in the `configure_file` function. The paremeters have been reordered to fix this issue.
* build: Fix the use of pkg-config file variablesIñigo Martínez2019-01-041-3/+3
| | | | | | | | | The names of the variables in meson corresponding to the variables obtained from the pkg-config files has been fixed by using a pattern. The pattern uses the dependency name as the prefix and the obtained variable as the suffix.
* build: Use / instead of join_pathsIñigo Martínez2019-01-041-1/+1
| | | | | | | Since meson 0.49, the `/` character can be used to join paths[0], so all the instances of `join_paths` have been replaced. [0] http://mesonbuild.com/Release-notes-for-0-49-0.html#joining-paths-with-
* build: Add trailing commasIñigo Martínez2019-01-041-15/+15
| | | | | | | Add missing trailing commas that avoids getting noise when another file/parameter is added and eases reviewing changes[0]. [0] https://gitlab.gnome.org/GNOME/dconf/merge_requests/11#note_291585
* metadata: Prevent usage of NULL if GUdevDevice is not foundOndrej Holy2018-04-131-6/+8
| | | | | | | | | | | | | | Code to determine tree name from device has been recently ported from udev to gudev by commit c2d8564. Unfortunately, the gudev code floods logs by the following messages if device is not found (it can happen e.g. for tmpfs): g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed Udev code silently returned if NULL device was used, however, corresponding gudev code prints the mentioned messages. Let's prevent usage of NULL device in order to prevent those messages. https://bugzilla.gnome.org/show_bug.cgi?id=795191
* build: Remove autotoolsIñigo Martínez2018-04-062-97/+0
| | | | | | | To avoid the burden of maintaining multiple build systems, this patch removes autotools support. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Revise dependenciesIñigo Martínez2018-04-031-10/+15
| | | | | | | | | | | | | | | gvfs is using a set of glib libraries (gio-2.0, gio-unix-2.0, glib, gobject-2.0) in almost all the created objects. However, these dependencies are not always necessary. gvfs' meson port also uses some internal dependencies formed by built libraries. This internal dependencies depend on other dependendecies as well. These both issues have been fixed by reviewing all the internal dependencies and built objects. https://bugzilla.gnome.org/show_bug.cgi?id=794365
* build: Apply a workaround for D-Bus code generationIñigo Martínez2018-03-261-7/+12
| | | | | | | | | | | | | | | | | meson uses `gdbus-codegen` for D-Bus code generation. However, both files are generated implicitly, so meson is not able to know how many files are generated, so it does generate only one opaque target that represents the two files. A new script has been created only to call `gdbus-codegen` and simulate the generation of the source code and header as different targets. Please see: https://bugzilla.gnome.org/show_bug.cgi?id=791015 https://github.com/mesonbuild/meson/pull/2930 https://bugzilla.gnome.org/show_bug.cgi?id=794365
* build: Fix gvfsd-metadata build when gudev is disabledTing-Wei Lan2018-01-241-7/+12
| | | | | | | The order of dependencies of gvfsd-metadata is reversed to workaround undefined reference error on FreeBSD when -Wl,--as-needed is used. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Make SystemdService entry conditionalIñigo Martínez2017-11-071-9/+18
| | | | | | | | | | | | When systemd user units installation is disabled, SystemdService entry should also not be present on D-Bus service files. This patch adds a common D-Bus service file template allowing, an homogeneus D-Bus service file generation and also a SystemService entry conditioned to the systemd user units installation option. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* metadata: Remove udev dependency in favor of gudevOndrej Holy2017-11-013-28/+22
| | | | | | | GVfs uses udev and also gudev. Let's use just gudev and remove corresponding --enable-udev option. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Improve installation on system pathsIñigo Martínez2017-10-311-3/+3
| | | | | | | | | | | | Instead of being hardcoded, D-Bus, systemd and GIO modules paths can be checked by using the information in their correspondant pkg-config files. This patch uses the information on pkg-config files by default, and also allows the user to provide this information to avoid overwriting system files. https://bugzilla.gnome.org/show_bug.cgi?id=786149
* build: Port to meson build systemIñigo Martínez2017-10-312-0/+107
| | | | | | | | 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=786149
* metadata: Use static keyword for private functionOndrej Holy2017-09-291-1/+1
| | | | | | | | | More warnings are printed when building thanks to meson port. Let's add static keyword for private metafile_key_lookup_iter function in order to prevent the following warning: warning: no previous prototype for ‘metafile_key_lookup_iter’ https://bugzilla.gnome.org/show_bug.cgi?id=786149
* metadata: Include headers for device number functionalityOndrej Holy2017-01-062-0/+12
| | | | | | | | The implicit sys/sysmacros.h (resp. sys/mkdev.h) includes via sys/types.h is being deprecated. Use AC_HEADER_MAJOR and include necessary header files for major(), minor(), and makedev() functions. https://bugzilla.gnome.org/show_bug.cgi?id=776213
* metadata: Fix bogus conditionOndrej Holy2016-11-241-1/+1
| | | | | | | | | The file->children condition is always true at this point, child->children should be there instead in order to speed up processing. This fix doesn't affect the functionality, it just slightly improves processing. https://bugzilla.gnome.org/show_bug.cgi?id=757747
* metadata: Use queues instead of listsRazvan Chitu2016-11-241-27/+35
| | | | | | | | | | Some of the lists used by the metabuilder have items appended to them. Appending to a list is done in linear time and this highly affects efficiency. In order to fix this, use GQueue which supports appending in constant time. Modified by Ondrej Holy <oholy@redhat.com>. https://bugzilla.gnome.org/show_bug.cgi?id=757747
* metadata: Use sequences instead of listsRazvan Chitu2016-11-242-77/+122
| | | | | | | | | | | The metabuilder stores files and data in sorted lists. An insertion into a sorted list is done in linear time, which highly affects efficiency. In order to fix this, use GSequence instead which does insertion and deletion in logarithmic time. Modified by Ondrej Holy <oholy@redhat.com>. https://bugzilla.gnome.org/show_bug.cgi?id=757747
* Use Unicode in translatable stringsPiotr Drąg2016-10-031-4/+4
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772219
* build: Add --with-systemduserunitdir optionYaroslav Shmelev2016-01-221-1/+2
| | | | | | | | | | | This option allows maintainers to specify the directory that contain a systemd user units, or disable it. Default location for these units is /usr/lib/systemd/user. This patch will switch from hard-coded path to configurable one. The patch was modified by Ondrej Holy <oholy@redhat.com>. https://bugzilla.gnome.org/show_bug.cgi?id=760293
* metadata: Avoid endless recursion when copying meta filesOndrej Holy2015-12-141-2/+8
| | | | | | | | | | meta_builder_copy is traversing the tree while at the same time possibly writing to it. This might leads to endless recursion and consequent segmentation fault. Do the entire copy into a new MetaFile that is not inserted into the source tree and consequently insert the MetaFile once the copy is done. https://bugzilla.gnome.org/show_bug.cgi?id=759341
* Add a corresponding systemd user service for every D-Bus session serviceSimon McVittie2015-09-303-0/+14
| | | | | | | | When using "systemd --user" in conjunction with "dbus-daemon --session --systemd-activation", this ensures that each daemon is correctly placed in its own cgroup, instead of being treated as part of dbus.service. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=755760
* Use conventional naming for D-Bus session servicesSimon McVittie2015-09-302-6/+4
| | | | | | | | | | | | | | | | | | | | | This naming is mandatory for the system bus, but is also recommended for the session bus. The D-Bus maintainers recommend that all activatable session services' service files are named according to the bus name, so that any conflict is resolved in a deterministic way. If the services are in different directories (precedence levels) the result is the same as it is now: the higher precedence "wins". If the services are in the same directory, either one overwrites the other and consistently "wins", or a packaging system like dpkg prevents co-installation. If the service files were named differently, it would be possible to have two implementations for the same name. dbus-daemon resolves this by choosing one arbitrarily, not necessarily the same one every time. systemd's kdbus support is more strict (or less concerned with backwards compatibility), and treats this situation as an error. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=755760
* metatree: Don't g_warning if the running gvfs daemon is olderAlexander Larsson2015-06-081-1/+2
| | | | This was breaking the build for me due to warnings-as-errors