Skip to content

Geoclue 2.7.1 - Failed to query location: Query location SOUP Error due to outdated PKGBUILD and patch

Description:

The Arch Linux package for Geoclue 2.7.1 includes outdated patches for meson.build and gclue-config.c, which result in the following error: Failed to query location: Query location SOUP Error - Unknown Error. The issue stems from mismatches between the applied patch and the updated upstream configuration.

Additional info:

  • package version(s): geoclue 2.7.1-3
  • config and/or log files: Output of journalctl that shows the error: MMM DD HH:MM:SS hostname geoclue[1791]: Failed to query location: Query location SOUP error: Unknown Error

Steps to reproduce:

When Geoclue systemd daemon is started, it fails in the background with this error.

Cause of error

The error is due to outdated patches in the Arch Linux package for Geoclue.

Previous use of 0001-WIP-Use-Google-Maps-Platform-by-default.patch to add Google Cloud Geolocation API is incompatible with the current upstream configuration. In upstream, the use of the 'MOZILLA_API_KEY' in meson.build has been replaced in favor of a more generic name of 'DEFAULT_WIFI_URL', and has also removed the line for '#define DEFAULT_WIFI_URL' from gclue-config.c in favor of passing the URL directly via the meson options.

This means that the build time configuration of the geolocation URL for Geoclue 2.7.1 is broken using this current PKGBUILD and patch, as it is being set to a meson option that has been removed altogether.

This has been validated by manually setting the url in /etc/geoclue/geoclue.conf at runtime after the package is installed, which resolved the error. However, this issue should be addressed to discourage users from having to find and discover the hardcoded Google Geolocation key in the PKGBUILD, which may lead to greater incidences of abuse of the golden key.

Solution and suggested fixes

Remove all lines in 0001-WIP-Use-Google-Maps-Platform-by-default.patch for meson.build, meson_options.txt, and src/gclue-config.c.

  • Retain only the data/geoclue.conf.in patch with the modified comments for Google API.

Update the PKGBUILD to use -D default-wifi-url="https://www.googleapis.com/geolocation/v1/geolocate?key=$_google-api-key" in the build() function, which matches the new meson options as per upstream.

Edited by Javier Heng
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information