diff -urN concordance-0.23/libconcord/gen_udev_support concordance-0.23-new/libconcord/gen_udev_support --- concordance-0.23/libconcord/gen_udev_support 2009-02-26 10:22:49.000000000 -0800 +++ concordance-0.23-new/libconcord/gen_udev_support 2012-01-16 17:37:26.867310609 -0800 @@ -15,7 +15,8 @@ # UDEV_POLICY_TEMPLATE='ATTR{idVendor}=="%s", ATTR{idProduct}=="%s", SYMLINK+="harmony-%%k"' -UDEV_NO_POLICY_TEMPLATE='SYSFS{idVendor}=="%s", SYSFS{idProduct}=="%s", MODE="0660", GROUP="dialout"' +UDEV_NEW_NO_POLICY_TEMPLATE='ATTR{idVendor}=="%s", ATTR{idProduct}=="%s", ENV{ID_REMOTE_CONTROL}="1"' +UDEV_OLD_NO_POLICY_TEMPLATE='SYSFS{idVendor}=="%s", SYSFS{idProduct}=="%s", MODE="0660", GROUP="dialout"' HAL_PRE_TEMPLATE=' <match key="usb_device.vendor_id" int="0x%s">' HAL_RULE_TEMPLATE=' <match key="usb_device.product_id" int="0x%s"> @@ -66,7 +67,7 @@ # Neat trick so that non-harmony devices don't read through a million rules SUBSYSTEM=="usb_device", GOTO="harmony_usb_rules" SUBSYSTEM=="usb", GOTO="harmony_usb_rules" -BUS!="usb", GOTO="harmony_rules_end" +SUBSYSTEM!="usb", GOTO="harmony_rules_end" GOTO="harmony_rules_end" LABEL="harmony_usb_rules" END @@ -85,8 +86,10 @@ type="$2" if [ "$type" == 'policykit' -o "$type" == 'consolekit' ]; then template="$UDEV_POLICY_TEMPLATE" + elif [ "$type" == 'old_udev' ]; then + template="$UDEV_OLD_NO_POLICY_TEMPLATE" else - template="$UDEV_NO_POLICY_TEMPLATE" + template="$UDEV_NEW_NO_POLICY_TEMPLATE" fi emit_for_all $file "$template" 'yes' @@ -192,14 +195,14 @@ # usage() { - echo "Usage: $0 <-u|-p|-c>" + echo "Usage: $0 <-u|-p|-c|-o>" } # # MAIN # -while getopts upc opt; do +while getopts upco opt; do case $opt in u) MODE='udev_only' @@ -210,6 +213,9 @@ c) MODE='consolekit' ;; + o) + MODE='old_udev' + ;; *) usage exit 1 diff -urN concordance-0.23/libconcord/INSTALL.linux concordance-0.23-new/libconcord/INSTALL.linux --- concordance-0.23/libconcord/INSTALL.linux 2010-08-01 09:00:42.000000000 -0700 +++ concordance-0.23-new/libconcord/INSTALL.linux 2012-01-16 17:47:03.024191082 -0800 @@ -31,34 +31,62 @@ 3. INSTALL UDEV/CONSOLEKIT/POLICYKIT SUPPORT (OPTIONAL) If you don't want to have to be root to use concordance (or any other -libconcord frontend), you'll need to set up udev, consolekit, or policykit -support. If you don't know which of these your distribution uses, then the -plain udev support will work: +libconcord frontend), you'll need to set up udev-acl, hal/consolekit, +hal/policykit or old udev support. + +Most modern distributions should use the udev-acl support. udev versions since +167, released on 2011-03-30, have the necessary support for this method to +work. + +With this option, all locally logged-in users will be able to have access +to the remote control, but remote users (such as those logged in via ssh or +fast user switching) will not. This support does not depend on anything beyond +a sufficiently recent version of udev itself. To use the udev-acl support, do: make udev sudo make install_udev -This will allow anyone in the "dialout" group to read and write to harmony -remote controls connected to the machine. +If you have an older distribution without a recent enough version of udev, you +can choose between old-style generic udev support, hal/consolekit support, and +hal/policykit support. -Alternatively, if you use policykit (fedora, and ubuntu, for example), you can -do: +To use hal/policykit support, you can do: make policykit sudo make install_policykit -This will generate a different udev file and all the appropriate policykit +This will generate a different udev file and all the appropriate HAL/policykit files and install them in the right place for the console user to have access -to the remote when it's plugged in. In otherwords, there is no need to do udev -and policykit - policykit will take care of everything needed for policykit. +to the remote when it's plugged in. It will work only if your distribution has +udev, HAL and PolicyKit of around the correct vintage - approximately, the +versions that were current in early 2009 - correctly built to work with each +other. -If your system is using consolekit, then you can use: +To use hal/consolekit, you can do: make consolekit sudo make install_consolekit -If you're not sure which method your system uses, the udev one will work on -all systems. +This will do much the same as the hal/policykit support does, only with +consolekit instead. As with the hal/policykit support, it depends on having +udev, HAL and ConsoleKit of an early 2009 vintage, correctly built to work +together. + +The safest option for old systems is the old generic udev support: + + make old-udev + sudo make install_old-udev + +This will allow anyone in the "dialout" group to read and write to harmony +remote controls connected to the machine. It should work with any udev system, +including modern ones, but is a less sophisticated solution than the udev-acl +support and requires you to add your user to the "dialout" group. + +If you are not sure which method to use, and your distribution came out since +March 2011, try the new udev option first, as it provides the cleanest +configuration and most transparent operation. If it does not work, you can try +the hal/consolekit or hal/policykit options, but old-udev is the most likely +to work. NOTE: By default the install prefix is /usr/local which means that the udev/policykit/consolekit make targets will install in /usr/local/etc which diff -urN concordance-0.23/libconcord/Makefile.am concordance-0.23-new/libconcord/Makefile.am --- concordance-0.23/libconcord/Makefile.am 2010-08-14 14:17:04.000000000 -0700 +++ concordance-0.23-new/libconcord/Makefile.am 2012-01-16 17:12:27.975236664 -0800 @@ -15,10 +15,15 @@ install_udev_generic: $(MKDIR_P) $(DESTDIR)$(sysconfdir)/udev/rules.d $(install_sh_DATA) libconcord.rules \ - $(DESTDIR)$(sysconfdir)/udev/rules.d/99-libconcord.rules + $(DESTDIR)$(sysconfdir)/udev/rules.d/60-libconcord.rules install_udev: udev install_udev_generic +old-udev: + ./gen_udev_support -o + +install_old-udev: old-udev install_udev_generic + policykit: ./gen_udev_support -p