commit 3cdfe8538f0e5c9eddddcfe1ff218aa6ba2faf93f421c99bb3b563453baffe63 Author: Adrian Schröter Date: Thu Mar 20 12:47:33 2025 +0100 Sync from SUSE:SLFO:Main iio-sensor-proxy revision e3c3603d8a9ab1a34b16125814c22504 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/iio-sensor-proxy-3.6.tar.bz2 b/iio-sensor-proxy-3.6.tar.bz2 new file mode 100644 index 0000000..092d833 --- /dev/null +++ b/iio-sensor-proxy-3.6.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02b9fe1c0680ad8cf1af1fab42e7d3f905c0c27553efbaf21af2bee0f1193802 +size 64482 diff --git a/iio-sensor-proxy-compass-check-claim-perm.patch b/iio-sensor-proxy-compass-check-claim-perm.patch new file mode 100644 index 0000000..eb39221 --- /dev/null +++ b/iio-sensor-proxy-compass-check-claim-perm.patch @@ -0,0 +1,37 @@ +From ff71a7f1e5d76885138c6df71083b89121884770 Mon Sep 17 00:00:00 2001 +From: Dylan Van Assche +Date: Sun, 9 Feb 2025 18:32:23 +0100 +Subject: [PATCH] iio-sensor-proxy: check claim-permission for compass too + +Fixes https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/405 +--- + src/iio-sensor-proxy.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/iio-sensor-proxy.c b/src/iio-sensor-proxy.c +index 02d9ba5..50b4b45 100644 +--- a/src/iio-sensor-proxy.c ++++ b/src/iio-sensor-proxy.c +@@ -636,6 +636,7 @@ handle_compass_method_call (GDBusConnection *connection, + gpointer user_data) + { + SensorData *data = user_data; ++ g_autoptr(GError) error = NULL; + + if (g_strcmp0 (method_name, "ClaimCompass") != 0 && + g_strcmp0 (method_name, "ReleaseCompass") != 0) { +@@ -647,6 +648,11 @@ handle_compass_method_call (GDBusConnection *connection, + return; + } + ++ if (!check_claim_permission (data, sender, &error)) { ++ g_dbus_method_invocation_return_gerror (invocation, error); ++ return; ++ } ++ + handle_generic_method_call (data, sender, object_path, + interface_name, method_name, + parameters, invocation, DRIVER_TYPE_COMPASS); +-- +GitLab + diff --git a/iio-sensor-proxy.changes b/iio-sensor-proxy.changes new file mode 100644 index 0000000..41d1998 --- /dev/null +++ b/iio-sensor-proxy.changes @@ -0,0 +1,280 @@ +------------------------------------------------------------------- +Mon Feb 10 10:28:26 UTC 2025 - Atri Bhattacharya + +- Add iio-sensor-proxy-compass-check-claim-perm.patch: Avoid + unauthenticated permissions for compass; patch taken from + upstream merge request (bsc#1236290). + +------------------------------------------------------------------- +Thu Jan 23 03:39:45 UTC 2025 - Atri Bhattacharya + +- Update to version 3.6: + * Drop requirement of geoclue user for compass in README. + * Evaluate polling drivers before buffering drivers. + +------------------------------------------------------------------- +Wed Jul 26 23:25:11 UTC 2023 - Atri Bhattacharya + +- Update to version 3.5: + * Fix sensor hotplugging + * Fix some sensors not working when they were assigned a + sampling frequency they did not support. + * Add more tests. + * Correct the location of the D-Bus policy file. + +------------------------------------------------------------------- +Wed Oct 5 13:48:13 UTC 2022 - Callum Farmer + +- Move dbus system.d conf file to /usr (bsc#1204055) + +------------------------------------------------------------------- +Fri Jul 15 21:52:12 UTC 2022 - Atri Bhattacharya + +- Update to version 3.4: + * Add polkit checks for whether a user is allowed to claim a + sensor. + * Fix the ambient light sensor readings on some systems, a + regression in the fake-input-accelerometer test binary. + * A number of memory leaks. +- Package polkit privilege file (subject to boo#1201558); add + BuildRequires: pkgconfig(polkit-gobject-1). + +------------------------------------------------------------------- +Thu Sep 30 00:25:09 UTC 2021 - Atri Bhattacharya + +- Update to version 3.3: + * Fix a bug left-over in one of the 3.2 bug fixes where some + accelerometers would fail to initialise. +- Changes from version 3.2: + * Fix problems parsing numbers with decimal separator. +- Require gudev >= 237 for building (for consistency with + upstream). +- Drop the rpmlintrc file and add back appropriate service macros + in pre/post scriptlets. + +------------------------------------------------------------------- +Wed Jun 16 12:27:02 UTC 2021 - Atri Bhattacharya + +- Update to version 3.1: + * Port to meson as a build system and add a test-suite. + * Fix long-standing problem with property changes being sent as + a broadcast. + * Fix sensor support for accelerometers with different scales on + different axes. + * Add sensor support for RGBC light sensors. + * Support reading proximity threshold from sysfs for DeviceTree + devices. +- Use tar.bz2 source as this can be accessed using a repeatable + URL (not requiring commit id). +- Switch to meson based building. +- New BuildRequires: meson (for building), gtk-doc (to generate + docs); update required version of gudev to 234 in keeping with + minimum required version upstream. + +------------------------------------------------------------------- +Tue Jul 14 17:38:12 UTC 2020 - Bjørn Lie + +- Update to version 3.0: + + This release adds support for a number of sensors that didn't + work before, usually due to being combined with other sensors + of the same or different types (eg. dual-accelerometers, + light/proximity combined sensors, etc.), and adds support for + kernel-exported mount-matrix properties on Device Tree + hardware. + + Update URL and Source to new home on gitlab.freedesktop.org. + +------------------------------------------------------------------- +Wed Sep 11 08:10:23 UTC 2019 - Atri Bhattacharya + +- Update to version 2.8: + + Add support for accelerometers in ChromeBooks. + + Fix screen orientation in favour of portrait when rotating + display instead of favouring the previous orientation. + +------------------------------------------------------------------- +Thu Jun 17 23:19:08 UTC 2019 - Markus Ebner + +- Update to version 2.7: + + This release fixes broken sensor readings on multiple platforms + due to a compiler optimisation. + +------------------------------------------------------------------- +Thu May 16 22:22:14 UTC 2019 - Atri Bhattacharya + +- Update to version 2.6: + + Add support for mount matrices coming from the kernel itself, + checking those more thoroughly for validity. On devices with + multiple accelerometers, the ones in the base are now ignored. + + Improve/fix support for sensors with uncommon formats. + + Fix a couple of possible crashes and memory leaks. +- Minor specfile cleanups using spec-cleaner. + +------------------------------------------------------------------- +Mon Oct 22 14:03:00 UTC 2018 - badshah400@gmail.com + +- Update to version 2.5: + + Fix a number of build warnings and bugs. + + Ensure some devices have non-0 update frequencies. + + Set sensor scale to 1.0 when the device does not export one. + +------------------------------------------------------------------- +Wed Feb 28 21:45:13 UTC 2018 - dimstar@opensuse.org + +- Modernize spec-file by calling spec-cleaner + +------------------------------------------------------------------- +Sun Nov 5 15:17:26 UTC 2017 - badshah400@gmail.com + +- Update to version 2.4: + + Fix data being incorrectly read from sensors due to a naively + broken compilation fix. + + Support Geoclue running as a different user than "geoclue". +- Drop patches incorporated upstream: + + 0001-data-fix-permissions-when-geoclue-runs-with-a-differ.patch + (also drop BuildRequires on autotools and a run of autoreconf + in the build stage that this patch necessitated). + + iio-sensor-proxy-revert-cast-align-warnings-arm-fix.patch. + +------------------------------------------------------------------- +Sat Oct 28 16:26:56 UTC 2017 - badshah400@gmail.com + +- Add iio-sensor-proxy-revert-cast-align-warnings-arm-fix.patch + Revert "iio-buffer-utils: Fix cast-align warnings on ARM" + because it caused rotations on all devices to have undefined + values; patch taken from upstream (boo#1061190, + gh#hadess/iio-sensor-proxy#191). +- Add relevant package Group for both iio-sensor-proxy + (System/Monitor) and iio-sensor-proxy-doc (Documentation/HTML). + +------------------------------------------------------------------- +Fri Sep 22 11:17:49 UTC 2017 - fcrozat@suse.com + +- Update to version 2.3: + + Ensure API documentation is in tarball. + + Remove workaround for long-standing kernel bug (fixed in 4.13). + + Ignore accelerometers which are part of gaming devices. + + Warning fixes. +- Add + 0001-data-fix-permissions-when-geoclue-runs-with-a-differ.patch: + handle geoclue2 service running as srvGeoClue user, add + Requires user(srvGeoClue) and add automake/ autoconf as + BuildRequires. +- Use pregenerated API documentation and drop + BuildRequires on gtk-doc. + +------------------------------------------------------------------- +Sun Jul 9 12:17:47 UTC 2017 - badshah400@gmail.com + +- Update to version 2.2: + + Fixes iio-sensor-proxy not receiving udev events because of + the excessive lockdown added in version 2.1. + + Fixes a possible crash on startup due to a race condition. + +------------------------------------------------------------------- +Thu Feb 2 15:47:58 UTC 2017 - zaitor@opensuse.org + +- Update to version 2.1: + + This release fixes a security problem that will affect services + other than iio-sensor-proxy, that have a system D-Bus + interface. + + Make D-Bus policy rules only affect SensorProxy itself. + + Lockdown service through systemd. + + Fix startup problem on machines with a Compass device. +- Do not use systemd macros for iio-sensor-proxy.service, they are + not designed for dbus systemd unit file. +- Add iio-sensor-proxy-rpmlintrc, silence the unwarranted rpmlint + warnings now produced. + +------------------------------------------------------------------- +Mon Dec 12 14:02:17 UTC 2016 - zaitor@opensuse.org + +- Update to version 2.0: + + This release adds build fixes, fixes the detection of a number + of devices that should be supported, stops trying to use + devices that shouldn't, and adds support for the "mount-matrix" + property, which can be used to fix the orientation of + accelerometers on devices where the default does not work. + + Add support for ACCEL_MOUNT_MATRIX udev property. + + Fix startup failure on certain devices. + + Work-around possible kernel bug on certain devices. + + Better supported/unsupported sensors detection. + + Better debug output. +- Drop iio-sensor-proxy-delay-starting-daemon.patch: Fixed + upstream. +- Pass --disable-gtk-tests to configure, we do not need the sample + programs. + +------------------------------------------------------------------- +Tue Nov 22 00:22:07 UTC 2016 - badshah400@gmail.com + +- Add iio-sensor-proxy-delay-starting-daemon.patch: Add artificial + delay before starting daemon to prevent failure to work right + off a cold boot; patch taken from upstream git + (gh#hadess/iio-sensor-proxy#82). + +------------------------------------------------------------------- +Wed Oct 12 16:50:06 UTC 2016 - mpluskal@suse.com + +- Small packaging cleanup, add explicit pkgconfig BuildRequires. + +------------------------------------------------------------------- +Mon Sep 26 08:44:26 UTC 2016 - zaitor@opensuse.org + +- Add gtk-doc BuildRequires and pass --enable-gtk-doc to configure. + Split out a new doc subpackage. +- Stop passing --disable-silent-rules to configure and V=1 to make, + we do debugging locally. + +------------------------------------------------------------------- +Sun Sep 25 21:13:02 UTC 2016 - badshah400@gmail.com + +- Update to version 1.3: + + Build fixes. + + Fixes accelerometer unit scaling. + + Really fixes regression with the IIO accelerometer in kernel + 4.8 that was supposed to be fixed in version 1.2. + +------------------------------------------------------------------- +Tue Sep 6 15:58:56 UTC 2016 - zaitor@opensuse.org + +- Update to version 1.2: + + This release mainly adds better debug output, and updated + testing instructions in the README. + + Fix regression with IIO accelerometer in kernel 4.8. + + Fix possible crash in compass handling. +- Update Source Url. + +------------------------------------------------------------------- +Wed Jan 20 14:38:05 UTC 2016 - badshah400@gmail.com + +- Drop rpmlintrc file; this was needed because iiio-sensor-proxy + installs a dbus service that was so far unauthorized, but this + has now been cleared by the Security team (bnc#939191). + +------------------------------------------------------------------- +Tue Jul 28 16:40:36 UTC 2015 - zaitor@opensuse.org + +- Update to version 1.1: + + Add support for Compasses (only accessible to GeoClue). + + Fix service not starting in a number of cases. + + Fix excessive CPU usage monitoring light sensors on Macs. + + Support light sensors on some Samsung laptops. + + Fix incorrect sensor readings on some devices due to unit + scaling. + +------------------------------------------------------------------- +Sat Jun 27 12:50:20 UTC 2015 - zaitor@opensuse.org + +- Add missing rcsymlink. + +------------------------------------------------------------------- +Sat May 23 16:52:30 UTC 2015 - crrodriguez@opensuse.org + +- Update to version 1.0, this replaces udev "accelerometer" + tool and udev rules. + +------------------------------------------------------------------- +Sat Sep 27 15:18:56 UTC 2014 - stefan.bruens@rwth-aachen.de + +- initial package version + diff --git a/iio-sensor-proxy.spec b/iio-sensor-proxy.spec new file mode 100644 index 0000000..12e1af9 --- /dev/null +++ b/iio-sensor-proxy.spec @@ -0,0 +1,95 @@ +# +# spec file for package iio-sensor-proxy +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: iio-sensor-proxy +Version: 3.6 +Release: 0 +Summary: Proxy for IIO and input subsystems +License: GPL-3.0-only +Group: System/Monitoring +URL: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy +Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM iio-sensor-proxy-compass-check-claim-perm.patch bsc#1236290 badshah400@gmail.com -- avoid unauthenticated permissions for compass +Patch0: https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/merge_requests/393.patch#/iio-sensor-proxy-compass-check-claim-perm.patch +BuildRequires: gtk-doc +BuildRequires: meson +BuildRequires: pkgconfig +BuildRequires: pkgconfig(glib-2.0) >= 2.56 +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gudev-1.0) >= 237 +BuildRequires: pkgconfig(polkit-gobject-1) +BuildRequires: pkgconfig(systemd) >= 219 +BuildRequires: pkgconfig(udev) >= 219 +Requires: user(srvGeoClue) +%{?systemd_requires} + +%description +This proxy reads sensor data from the IIO subsystem and serves to +the input subsystem + +%package doc +Summary: Documentation for %{name} +Group: Documentation/HTML +BuildArch: noarch + +%description doc +This package contains the documentation for %{name}. + +%prep +%autosetup -p1 + +%build +%meson -Dgtk-tests=false \ + -Dgtk_doc=true \ + -Dgeoclue-user=srvGeoClue +%meson_build + +%install +%meson_install + +%pre +%service_add_pre iio-sensor-proxy.service + +%preun +%service_del_preun iio-sensor-proxy.service + +%post +%udev_hwdb_update +%udev_rules_update +%service_add_post iio-sensor-proxy.service + +%postun +%udev_hwdb_update +%udev_rules_update +%service_del_postun iio-sensor-proxy.service + +%files +%{_bindir}/monitor-sensor +%{_libexecdir}/iio-sensor-proxy +%{_udevrulesdir}/*.rules +%{_unitdir}/iio-sensor-proxy.service +%{_datadir}/polkit-1/actions/net.hadess.SensorProxy.policy +# Own dirs to avoid depending on dbus while building. +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/system.d +%{_datadir}/dbus-1/system.d/net.hadess.SensorProxy.conf + +%files doc +%{_datadir}/gtk-doc/html/%{name}/ + +%changelog