On Sun, Nov 18, 2018 at 04:50:48PM +0100, Marcus MERIGHI wrote:
> Hello Antoine,
>
> [email protected] (Antoine Jacoutot), 2018.11.18 (Sun) 15:31 (CET):
> > On Sun, Nov 18, 2018 at 03:09:01PM +0100, Marcus MERIGHI wrote:
> > > Hello Antoine,
> > >
> > > thank you for handling gtkam for so long!
> > >
> > > [email protected] (Antoine Jacoutot), 2018.11.18 (Sun) 14:48 (CET):
> > > > On Sun, Nov 18, 2018 at 01:42:04PM +0100, Marcus MERIGHI wrote:
> > > > > at least that was what I had to do: adjust permissions to allow access
> > > > > for non-root user. I did not care enough to see if read-only would
> > > > > suffice.
> > > >
> > > > Well that's not really encouraging for us to commit that diff.
> > >
> > > I will try readonly access next time I'm around!
> > >
> > > I just thought it would give others a hint - I did not find any help in
> > > the package as it is now (maybe insufficient looking?).
> > >
> > > > > pkg-readme might be overkill? message better? Both diffs attached.
> > > >
> > > > No one reads MESSAGE.
> > >
> > > What about the pkg-readme, then?
> >
> > Yeah, that's the right place for it.
> > If you look at graphics/sane-backends/pkg/README, there's already an
> > example to
> > properly change the group of the appropriate ugen device that you could
> > adapt.
>
> Thanks for the hint re. sane-backends!
>
> I went for changing the user, not the group; I only want one user to
> access the gadget and figured that's a common case with cameras and
> mobile phones.
>
> I added a PLIST entry a la sane-backends, too.
>
> Marcus
Thanks.
I've added that particular documentation to libgphoto2 (which gtkam uses) and
point the README of gtkam to libgphoto2.
I wonder if this shouldn't be all documented by the libusb port...
> Index: graphics/gtkam/pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/graphics/gtkam/pkg/PLIST,v
> retrieving revision 1.13
> diff -u -p -u -r1.13 PLIST
> --- graphics/gtkam/pkg/PLIST 27 Jun 2018 21:03:54 -0000 1.13
> +++ graphics/gtkam/pkg/PLIST 18 Nov 2018 15:47:08 -0000
> @@ -55,4 +55,5 @@ share/locale/zh_CN/LC_MESSAGES/gtkam.mo
> share/pixmaps/
> share/pixmaps/gtkam-camera.png
> share/pixmaps/gtkam.png
> +share/doc/pkg-readmes/${PKGSTEM}
> @tag update-desktop-database
>
> --- /dev/null Sun Nov 18 16:37:28 2018
> +++ graphics/gtkam/pkg/README Sun Nov 18 16:37:20 2018
> @@ -0,0 +1,32 @@
> ++-----------------------------------------------------------------------
> +| Running ${PKGSTEM} on OpenBSD
> ++-----------------------------------------------------------------------
> +
> +Since USB reading of your camera will be handled by libusb, you need to
> +allow the user access to the corresponding USB endpoint. To do so, find
> +where your camera is attached to by using:
> + # usbdevs -v
> +then change the ownership accordingly.
> +
> +e.g.
> +Controller /dev/usb0:
> +addr 01: 8086:0000 Intel, EHCI root hub
> + high speed, self powered, config 1, rev 1.00
> + driver: uhub0
> +addr 02: 8087:0024 Intel, Rate Matching Hub
> + high speed, self powered, config 1, rev 0.00
> + driver: uhub3
> +addr 03: 04e8:6860 SAMSUNG, SAMSUNG_Android
> + high speed, power 96 mA, config 2, rev 4.00, iSerialNumber
> + 9a0cef4c
> + driver: umodem0
> + driver: ugen0
> +
> +# chown <username> /dev/ugen0.* /dev/usb0
> +
> +The reason we are changing the user and not the group is that only
> +<username> can access it.
> +
> +To preserve your changes after a system update, use rc.local(8).
> +
> +Alternatively, hotplugd(8) attach/detach scripts can automate this.
> --- /dev/null Sun Nov 18 16:37:28 2018
> +++ graphics/gtkam/pkg/README Sun Nov 18 16:37:20 2018
> @@ -0,0 +1,32 @@
> ++-----------------------------------------------------------------------
> +| Running ${PKGSTEM} on OpenBSD
> ++-----------------------------------------------------------------------
> +
> +Since USB reading of your camera will be handled by libusb, you need to
> +allow the user access to the corresponding USB endpoint. To do so, find
> +where your camera is attached to by using:
> + # usbdevs -v
> +then change the ownership accordingly.
> +
> +e.g.
> +Controller /dev/usb0:
> +addr 01: 8086:0000 Intel, EHCI root hub
> + high speed, self powered, config 1, rev 1.00
> + driver: uhub0
> +addr 02: 8087:0024 Intel, Rate Matching Hub
> + high speed, self powered, config 1, rev 0.00
> + driver: uhub3
> +addr 03: 04e8:6860 SAMSUNG, SAMSUNG_Android
> + high speed, power 96 mA, config 2, rev 4.00, iSerialNumber
> + 9a0cef4c
> + driver: umodem0
> + driver: ugen0
> +
> +# chown <username> /dev/ugen0.* /dev/usb0
> +
> +The reason we are changing the user and not the group is that only
> +<username> can access it.
> +
> +To preserve your changes after a system update, use rc.local(8).
> +
> +Alternatively, hotplugd(8) attach/detach scripts can automate this.
--
Antoine