add an example to allow unprivileged access to the camera device.

adapted from an original diff by Marcus MERIGHI
This commit is contained in:
ajacoutot 2018-11-18 16:02:06 +00:00
parent 47d0b019bb
commit 03f1857d07
6 changed files with 44 additions and 5 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.44 2018/06/27 21:03:54 espie Exp $
# $OpenBSD: Makefile,v 1.45 2018/11/18 16:02:07 ajacoutot Exp $
COMMENT= digital camera frontend
DISTNAME= gtkam-1.0
REVISION= 1
REVISION= 2
CATEGORIES= graphics

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.13 2018/06/27 21:03:54 espie Exp $
@comment $OpenBSD: PLIST,v 1.14 2018/11/18 16:02:07 ajacoutot Exp $
@bin bin/gtkam
@man man/man1/gtkam.1
share/applications/gtkam.desktop
@ -9,6 +9,7 @@ share/doc/gtkam/COPYING
share/doc/gtkam/NEWS
share/doc/gtkam/README
share/doc/gtkam/TODO
share/doc/pkg-readmes/${PKGSTEM}
share/gtkam/
share/gtkam/pixmaps/
share/gtkam/pixmaps/camera.xpm

View File

@ -0,0 +1,8 @@
$OpenBSD: README,v 1.1 2018/11/18 16:02:07 ajacoutot Exp $
+-------------------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
+-------------------------------------------------------------------------------
See ${LOCALBASE}/share/doc/pkg-readme/libgphoto2 to allow unprivileged access to
the camera device.

View File

@ -1,10 +1,11 @@
# $OpenBSD: Makefile,v 1.61 2018/10/28 09:45:50 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.62 2018/11/18 16:02:06 ajacoutot Exp $
COMMENT= digital camera library
VERSION= 2.5.20
DISTNAME= libgphoto2-${VERSION}
PKGNAME= libgphoto-${VERSION}
REVISION= 0
GPHOTO2_PORT_API= 0.12.0
SUBST_VARS= GPHOTO2_PORT_API VERSION

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.23 2018/04/22 08:27:22 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.24 2018/11/18 16:02:06 ajacoutot Exp $
bin/gphoto2-config
bin/gphoto2-port-config
include/gphoto2/
@ -162,6 +162,7 @@ share/doc/libgphoto2/libgphoto2_port/
share/doc/libgphoto2/libgphoto2_port/AUTHORS
share/doc/libgphoto2/libgphoto2_port/NEWS
share/doc/libgphoto2/libgphoto2_port/README
share/doc/pkg-readmes/${PKGSTEM}
share/libgphoto2/
share/libgphoto2/${VERSION}/
share/libgphoto2/${VERSION}/konica/

View File

@ -0,0 +1,28 @@
$OpenBSD: README,v 1.1 2018/11/18 16:02:07 ajacoutot Exp $
+-----------------------------------------------------------------------
| 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 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.