Hello community, here is the log from the commit of package iio-sensor-proxy for openSUSE:Factory checked in at 2017-07-11 08:27:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/iio-sensor-proxy (Old) and /work/SRC/openSUSE:Factory/.iio-sensor-proxy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "iio-sensor-proxy" Tue Jul 11 08:27:36 2017 rev:8 rq:509180 version:2.2 Changes: -------- --- /work/SRC/openSUSE:Factory/iio-sensor-proxy/iio-sensor-proxy.changes 2017-02-09 11:17:54.479618433 +0100 +++ /work/SRC/openSUSE:Factory/.iio-sensor-proxy.new/iio-sensor-proxy.changes 2017-07-11 08:27:40.052026671 +0200 @@ -1,0 +2,8 @@ +Sun Jul 9 12:17:47 UTC 2017 - [email protected] + +- 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. + +------------------------------------------------------------------- Old: ---- iio-sensor-proxy-2.1.tar.xz New: ---- iio-sensor-proxy-2.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ iio-sensor-proxy.spec ++++++ --- /var/tmp/diff_new_pack.bRwvGg/_old 2017-07-11 08:27:41.679797067 +0200 +++ /var/tmp/diff_new_pack.bRwvGg/_new 2017-07-11 08:27:41.683796503 +0200 @@ -17,7 +17,7 @@ Name: iio-sensor-proxy -Version: 2.1 +Version: 2.2 Release: 0 Summary: Proxy for IIO and input subsystems License: GPL-3.0 ++++++ iio-sensor-proxy-2.1.tar.xz -> iio-sensor-proxy-2.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/NEWS new/iio-sensor-proxy-2.2/NEWS --- old/iio-sensor-proxy-2.1/NEWS 2017-02-02 16:20:02.000000000 +0100 +++ new/iio-sensor-proxy-2.2/NEWS 2017-02-15 15:56:36.000000000 +0100 @@ -1,3 +1,10 @@ +2.2 +--- + +This release fixes iio-sensor-proxy not receiving udev events +because of the excessive lockdown added in version 2.1. This +also fixes a possible crash on startup due to a race condition. + 2.1 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/README new/iio-sensor-proxy-2.2/README --- old/iio-sensor-proxy-2.1/README 2017-02-02 16:08:21.000000000 +0100 +++ new/iio-sensor-proxy-2.2/README 2017-02-15 10:53:41.000000000 +0100 @@ -13,7 +13,7 @@ make make install ``` -It requires libgudev and systemd. +It requires libgudev and systemd (>= 233 for the accelerometer quirks). Usage ----- @@ -100,7 +100,7 @@ - Apple MacBook Air (6,2) - Apple MacBook Pro (8.2) - Asus Transformer Book TP500LB -- Asus Zenbook UX31A, UX305 +- Asus Zenbook UX31A, UX303L, UX305 - Cube i9 - Dell Inspiron 13 7000 - Dell Venue 11 Pro (7140) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/README.md new/iio-sensor-proxy-2.2/README.md --- old/iio-sensor-proxy-2.1/README.md 2017-02-02 16:08:21.000000000 +0100 +++ new/iio-sensor-proxy-2.2/README.md 2017-02-15 10:53:41.000000000 +0100 @@ -13,7 +13,7 @@ make make install ``` -It requires libgudev and systemd. +It requires libgudev and systemd (>= 233 for the accelerometer quirks). Usage ----- @@ -100,7 +100,7 @@ - Apple MacBook Air (6,2) - Apple MacBook Pro (8.2) - Asus Transformer Book TP500LB -- Asus Zenbook UX31A, UX305 +- Asus Zenbook UX31A, UX303L, UX305 - Cube i9 - Dell Inspiron 13 7000 - Dell Venue 11 Pro (7140) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/configure new/iio-sensor-proxy-2.2/configure --- old/iio-sensor-proxy-2.1/configure 2017-02-02 16:20:14.000000000 +0100 +++ new/iio-sensor-proxy-2.2/configure 2017-02-15 15:58:31.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for iio-sensor-proxy 2.1. +# Generated by GNU Autoconf 2.69 for iio-sensor-proxy 2.2. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='iio-sensor-proxy' PACKAGE_TARNAME='iio-sensor-proxy' -PACKAGE_VERSION='2.1' -PACKAGE_STRING='iio-sensor-proxy 2.1' +PACKAGE_VERSION='2.2' +PACKAGE_STRING='iio-sensor-proxy 2.2' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='' @@ -1287,7 +1287,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures iio-sensor-proxy 2.1 to adapt to many kinds of systems. +\`configure' configures iio-sensor-proxy 2.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1358,7 +1358,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of iio-sensor-proxy 2.1:";; + short | recursive ) echo "Configuration of iio-sensor-proxy 2.2:";; esac cat <<\_ACEOF @@ -1480,7 +1480,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -iio-sensor-proxy configure 2.1 +iio-sensor-proxy configure 2.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1581,7 +1581,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by iio-sensor-proxy $as_me 2.1, which was +It was created by iio-sensor-proxy $as_me 2.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2460,7 +2460,7 @@ # Define the identity of the package. PACKAGE='iio-sensor-proxy' - VERSION='2.1' + VERSION='2.2' cat >>confdefs.h <<_ACEOF @@ -6226,7 +6226,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by iio-sensor-proxy $as_me 2.1, which was +This file was extended by iio-sensor-proxy $as_me 2.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6283,7 +6283,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -iio-sensor-proxy config.status 2.1 +iio-sensor-proxy config.status 2.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/configure.ac new/iio-sensor-proxy-2.2/configure.ac --- old/iio-sensor-proxy-2.1/configure.ac 2017-02-02 16:20:08.000000000 +0100 +++ new/iio-sensor-proxy-2.2/configure.ac 2017-02-15 15:56:42.000000000 +0100 @@ -1,6 +1,6 @@ AC_PREREQ(2.59) -AC_INIT([iio-sensor-proxy], [2.1], [[email protected]]) +AC_INIT([iio-sensor-proxy], [2.2], [[email protected]]) AX_IS_RELEASE([git-directory]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/data/iio-sensor-proxy.service.in new/iio-sensor-proxy-2.2/data/iio-sensor-proxy.service.in --- old/iio-sensor-proxy-2.1/data/iio-sensor-proxy.service.in 2017-01-05 13:02:30.000000000 +0100 +++ new/iio-sensor-proxy-2.2/data/iio-sensor-proxy.service.in 2017-02-15 15:46:45.000000000 +0100 @@ -14,6 +14,6 @@ ProtectHome=true ProtectKernelModules=true PrivateTmp=true -PrivateNetwork=true +RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_NETLINK MemoryDenyWriteExecute=true RestrictRealtime=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/docs/Makefile.in new/iio-sensor-proxy-2.2/docs/Makefile.in --- old/iio-sensor-proxy-2.1/docs/Makefile.in 2017-02-02 16:20:14.000000000 +0100 +++ new/iio-sensor-proxy-2.2/docs/Makefile.in 2017-02-15 15:58:31.000000000 +0100 @@ -500,10 +500,10 @@ @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) @ENABLE_GTK_DOC_FALSE@clean-local: -@ENABLE_GTK_DOC_FALSE@install-data-local: @ENABLE_GTK_DOC_FALSE@distclean-local: -@ENABLE_GTK_DOC_FALSE@uninstall-local: @ENABLE_GTK_DOC_FALSE@maintainer-clean-local: +@ENABLE_GTK_DOC_FALSE@uninstall-local: +@ENABLE_GTK_DOC_FALSE@install-data-local: clean: clean-am clean-am: clean-generic clean-local mostlyclean-am diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/iio-sensor-proxy-2.1/src/iio-sensor-proxy.c new/iio-sensor-proxy-2.2/src/iio-sensor-proxy.c --- old/iio-sensor-proxy-2.1/src/iio-sensor-proxy.c 2016-12-01 14:08:22.000000000 +0100 +++ new/iio-sensor-proxy-2.2/src/iio-sensor-proxy.c 2017-02-15 15:37:40.000000000 +0100 @@ -33,10 +33,11 @@ typedef struct { GMainLoop *loop; + GUdevClient *client; GDBusNodeInfo *introspection_data; GDBusConnection *connection; guint name_id; - gboolean init_done; + int ret; SensorDriver *drivers[NUM_SENSOR_TYPES]; GUdevDevice *devices[NUM_SENSOR_TYPES]; @@ -85,6 +86,11 @@ #define DRIVER_FOR_TYPE(driver_type) data->drivers[driver_type] #define DEVICE_FOR_TYPE(driver_type) data->devices[driver_type] +static void sensor_changes (GUdevClient *client, + gchar *action, + GUdevDevice *device, + SensorData *data); + static gboolean driver_type_exists (SensorData *data, DriverType driver_type) @@ -540,11 +546,40 @@ gpointer user_data) { SensorData *data = user_data; + const gchar * const subsystems[] = { "iio", "input", "platform", NULL }; + guint i; + + data->client = g_udev_client_new (subsystems); + if (!find_sensors (data->client, data)) + goto bail; + + g_signal_connect (G_OBJECT (data->client), "uevent", + G_CALLBACK (sensor_changes), data); + + for (i = 0; i < NUM_SENSOR_TYPES; i++) { + data->clients[i] = create_clients_hash_table (); - if (data->init_done) { - send_dbus_event (data, PROP_ALL); - send_dbus_event (data, PROP_ALL_COMPASS); + if (!driver_type_exists (data, i)) + continue; + + if (!driver_open (DRIVER_FOR_TYPE(i), DEVICE_FOR_TYPE(i), + driver_type_to_callback_func (data->drivers[i]->type), data)) { + DRIVER_FOR_TYPE(i) = NULL; + g_clear_object (&DEVICE_FOR_TYPE(i)); + } } + + if (!any_sensors_left (data)) + goto bail; + + send_dbus_event (data, PROP_ALL); + send_dbus_event (data, PROP_ALL_COMPASS); + return; + +bail: + data->ret = 0; + g_debug ("Could not find any supported sensors"); + g_main_loop_quit (data->loop); } static gboolean @@ -686,6 +721,7 @@ g_clear_pointer (&data->introspection_data, g_dbus_node_info_unref); g_clear_object (&data->connection); + g_clear_object (&data->client); g_clear_pointer (&data->loop, g_main_loop_unref); g_free (data); } @@ -698,6 +734,9 @@ { guint i; + g_debug ("Sensor changes: action = %s, device = %s", + action, g_udev_device_get_sysfs_path (device)); + if (g_strcmp0 (action, "remove") == 0) { for (i = 0; i < NUM_SENSOR_TYPES; i++) { GUdevDevice *dev = DEVICE_FOR_TYPE(i); @@ -754,10 +793,7 @@ int main (int argc, char **argv) { SensorData *data; - GUdevClient *client; int ret = 0; - const gchar * const subsystems[] = { "iio", "input", "platform", NULL }; - guint i; g_usleep (G_USEC_PER_SEC * 3); @@ -768,40 +804,9 @@ /* Set up D-Bus */ setup_dbus (data); - client = g_udev_client_new (subsystems); - if (!find_sensors (client, data)) { - g_debug ("Could not find any supported sensors"); - return 0; - } - g_signal_connect (G_OBJECT (client), "uevent", - G_CALLBACK (sensor_changes), data); - - for (i = 0; i < NUM_SENSOR_TYPES; i++) { - data->clients[i] = create_clients_hash_table (); - - if (!driver_type_exists (data, i)) - continue; - - if (!driver_open (DRIVER_FOR_TYPE(i), DEVICE_FOR_TYPE(i), - driver_type_to_callback_func (data->drivers[i]->type), data)) { - DRIVER_FOR_TYPE(i) = NULL; - g_clear_object (&DEVICE_FOR_TYPE(i)); - } - } - - if (!any_sensors_left (data)) - goto out; - - data->init_done = TRUE; - if (data->connection) { - send_dbus_event (data, PROP_ALL); - send_dbus_event (data, PROP_ALL_COMPASS); - } - data->loop = g_main_loop_new (NULL, TRUE); g_main_loop_run (data->loop); - -out: + ret = data->ret; free_sensor_data (data); return ret;
