Bug 159313 - sysutils/uhidd: uhidd-devd.conf.sample doesn't work
Summary: sysutils/uhidd: uhidd-devd.conf.sample doesn't work
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-30 16:20 UTC by Test Rat
Modified: 2012-02-03 17:20 UTC (History)
0 users

See Also:


Attachments
8.1.devctl (2.97 KB, text/plain)
2011-08-10 13:50 UTC, Test Rat
no flags Details
8.2.devctl (2.97 KB, text/plain)
2011-08-10 13:50 UTC, Test Rat
no flags Details
stable.devctl (2.98 KB, text/plain)
2011-08-10 13:50 UTC, Test Rat
no flags Details
head.devctl (2.47 KB, text/plain)
2011-08-10 13:50 UTC, Test Rat
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Test Rat 2011-07-30 16:20:09 UTC

Fix: 

# and this one works
notify 0 {
	match "subsystem" "DEVICE";
	match "type" "ATTACH";
	match "cdev" "ugen[0-9]+.[0-9]+";
	action "/usr/local/etc/rc.d/uhidd start /dev/$cdev";
};
How-To-Repeat: $ devd -Ddf uhidd-devd.conf.sample
Parsing /usr/local/etc/devd/uhidd-devd.conf.sample
Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=usb/4.2.0'
Pushing table
setting system=DEVFS
setting subsystem=CDEV
setting type=CREATE
setting cdev=usb/4.2.0
Processing notify event
Popping table
Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=ugen4.2'
Pushing table
setting system=DEVFS
setting subsystem=CDEV
setting type=CREATE
setting cdev=ugen4.2
Processing notify event
Popping table
Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=usb/4.2.1'
Pushing table
setting system=DEVFS
setting subsystem=CDEV
setting type=CREATE
setting cdev=usb/4.2.1
Processing notify event
Popping table
Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=usb/4.2.2'
Pushing table
setting system=DEVFS
setting subsystem=CDEV
setting type=CREATE
setting cdev=usb/4.2.2
Processing notify event
Popping table
Processing event '!system=USB subsystem=DEVICE type=ATTACH ugen=ugen4.2 cdev=ugen4.2 vendor=0x045e product=0x00db devclass=0x00 devsubclass=0x00 sernum="" release=0x0173 mode=host port=1 parent=ugen4.1'
Pushing table
setting system=USB
setting subsystem=DEVICE
setting type=ATTACH
setting ugen=ugen4.2
setting cdev=ugen4.2
setting vendor=0x045e
setting product=0x00db
setting devclass=0x00
setting devsubclass=0x00
setting sernum=
setting release=0x0173
setting mode=host
setting port=1
setting parent=ugen4.1
Processing notify event
Popping table
Processing event '!system=USB subsystem=INTERFACE type=ATTACH ugen=ugen4.2 cdev=ugen4.2 vendor=0x045e product=0x00db devclass=0x00 devsubclass=0x00 sernum="" release=0x0173 mode=host interface=0 endpoints=1 intclass=0x03 intsubclass=0x01 intprotocol=0x01'
Pushing table
setting system=USB
setting subsystem=INTERFACE
setting type=ATTACH
setting ugen=ugen4.2
setting cdev=ugen4.2
setting vendor=0x045e
setting product=0x00db
setting devclass=0x00
setting devsubclass=0x00
setting sernum=
setting release=0x0173
setting mode=host
setting interface=0
setting endpoints=1
setting intclass=0x03
setting intsubclass=0x01
setting intprotocol=0x01
Processing notify event
Popping table
Processing event '!system=USB subsystem=INTERFACE type=ATTACH ugen=ugen4.2 cdev=ugen4.2 vendor=0x045e product=0x00db devclass=0x00 devsubclass=0x00 sernum="" release=0x0173 mode=host interface=1 endpoints=1 intclass=0x03 intsubclass=0x00 intprotocol=0x00'
Pushing table
setting system=USB
setting subsystem=INTERFACE
setting type=ATTACH
setting ugen=ugen4.2
setting cdev=ugen4.2
setting vendor=0x045e
setting product=0x00db
setting devclass=0x00
setting devsubclass=0x00
setting sernum=
setting release=0x0173
setting mode=host
setting interface=1
setting endpoints=1
setting intclass=0x03
setting intsubclass=0x00
setting intprotocol=0x00
Processing notify event
Popping table
Processing event '+ukbd0 at bus=1 hubaddr=1 port=4 devaddr=2 interface=0 vendor=0x045e product=0x00db devclass=0x00 devsubclass=0x00 sernum="" release=0x0173 mode=host intclass=0x03 intsubclass=0x01 intprotocol=0x01  on uhub4'
Pushing table
setting device-name=ukbd0
setting bus=1
setting hubaddr=1
setting port=4
setting devaddr=2
setting interface=0
setting vendor=0x045e
setting product=0x00db
setting devclass=0x00
setting devsubclass=0x00
setting sernum=
setting release=0x0173
setting mode=host
setting intclass=0x03
setting intsubclass=0x01
setting intprotocol=0x01
setting bus=uhub4
Processing attach event
Testing device-name=ukbd0 against ^ugen[0-9]+.[0-9]+
Popping table
Processing event '!system=DEVFS subsystem=CDEV type=CREATE cdev=uhid0'
Pushing table
setting system=DEVFS
setting subsystem=CDEV
setting type=CREATE
setting cdev=uhid0
Processing notify event
Popping table
Processing event '+uhid0 at bus=1 hubaddr=1 port=4 devaddr=2 interface=1 vendor=0x045e product=0x00db devclass=0x00 devsubclass=0x00 sernum="" release=0x0173 mode=host intclass=0x03 intsubclass=0x00 intprotocol=0x00  on uhub4'
Pushing table
setting device-name=uhid0
setting bus=1
setting hubaddr=1
setting port=4
setting devaddr=2
setting interface=1
setting vendor=0x045e
setting product=0x00db
setting devclass=0x00
setting devsubclass=0x00
setting sernum=
setting release=0x0173
setting mode=host
setting intclass=0x03
setting intsubclass=0x00
setting intprotocol=0x00
setting bus=uhub4
Processing attach event
Testing device-name=uhid0 against ^ugen[0-9]+.[0-9]+
Popping table
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-30 16:21:04 UTC
Maintainer of sysutils/uhidd,

Please note that PR ports/159313 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/159313

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-30 16:21:06 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Test Rat 2011-08-08 04:35:11 UTC
Fix devd sample conf on /head after r221623.

  http://docs.freebsd.org/cgi/mid.cgi?861uwxcrh1

--- a.diff begins here ---
Index: sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
===================================================================
RCS file: sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
diff -N sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample	8 Aug 2011 03:25:53 -0000
@@ -0,0 +1,12 @@
+--- uhidd/uhidd-devd.conf.sample~
++++ uhidd/uhidd-devd.conf.sample
+@@ -1,4 +1,6 @@
+-attach 0 {
+-	match "device-name" "ugen[0-9]+.[0-9]+";
+-	action "/usr/local/etc/rc.d/uhidd start /dev/$device-name";
++notify 0 {
++	match "subsystem" "DEVICE";
++	match "type" "ATTACH";
++	match "cdev" "ugen[0-9]+.[0-9]+";
++	action "/usr/local/etc/rc.d/uhidd start /dev/$cdev";
+ };
--- a.diff ends here ---
Comment 4 kaiwang27 2011-08-10 08:31:59 UTC
Hi,

Thanks for the patch. It looks good, but it seems to break
uhidd autorun on system before r221623? Have you tested if
it works on 8.2-Release and 8.1-Release?

Kai
Comment 5 Test Rat 2011-08-10 13:50:57 UTC
Kai Wang <kaiwang27@gmail.com> writes:

> Thanks for the patch. It looks good, but it seems to break
> uhidd autorun on system before r221623? Have you tested if
> it works on 8.2-Release and 8.1-Release?

A quick test based on amd64 bootonly ISO kernels for

    8.1-RELEASE
    8.2-RELEASE
    /stable/8 snapshot from 20110809 at allbsd.org
    /head snapshot from 20110809 at allbsd.org

after draining /dev/devctl and re-plugging my keyboard shows that DEVICE
& ATTACH lines were only changed once, /stable/8 added `ugen' variable.
So, I assume new .conf file should work on older releases, too, but
I don't have more types of USB devices to verify.
Comment 6 kaiwang27 2011-10-10 12:30:20 UTC
This patch has been committed into uhidd upstream and will be included
in the next uhidd release.

I'm also fine if someone commit this patch to the ports tree now. (we
can remove it when the next uhidd version is brought into ports)

Thanks,
Kai
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2011-12-25 17:42:58 UTC
State Changed
From-To: feedback->closed

wait until the new version is released
Comment 8 dfilter service freebsd_committer freebsd_triage 2012-02-03 17:16:41 UTC
eadler      2012-02-03 17:16:28 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/uhidd       Makefile 
  Added files:
    sysutils/uhidd/files patch-uhidd-uhidd-devd.conf.sample 
  Log:
  This patch has been committed into uhidd upstream and will be included
  in the next uhidd release. However it seems that the next release will take some time and some people want/need this patch so temporarily add it.
  
  PR:             ports/159313
  Submitted by:   Test Rat <ttsestt@gmail.com>
  Reviewed by:    Kai Wang <kaiwang27@gmail.com>
  Requested by:   Jan Beich jbeich@tormail.net
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.6       +1 -1      ports/sysutils/uhidd/Makefile
  1.1       +19 -0     ports/sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"