diff options
| -rw-r--r-- | meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch | 149 | ||||
| -rw-r--r-- | meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb | 2 |
2 files changed, 150 insertions, 1 deletions
diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch b/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch new file mode 100644 index 0000000000..0e0dc879ba --- /dev/null +++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2-2.5.8/0001-scripts-remove-bashisms.patch | |||
| @@ -0,0 +1,149 @@ | |||
| 1 | From c00e63e97d8718836ba011d9172128732eecf001 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ismo Puustinen <ismo.puustinen@intel.com> | ||
| 3 | Date: Tue, 24 Jan 2017 22:24:05 +0200 | ||
| 4 | Subject: [PATCH] scripts: remove bashisms. | ||
| 5 | |||
| 6 | Convert bash scripts to more generic shell scripts. This removes the | ||
| 7 | strict bash dependency and the scripts should now run with any posix | ||
| 8 | shell. Also fix the issues reported by shellcheck while at it. | ||
| 9 | |||
| 10 | Upstream-status: Accepted [https://github.com/gphoto/libgphoto2/commit/39b4395532058c0edb9a56d0ff04e48a472e4743] | ||
| 11 | |||
| 12 | --- | ||
| 13 | packaging/generic/check-ptp-camera | 12 ++++++------ | ||
| 14 | packaging/linux-hotplug/gphoto-set-procperm | 14 +++++++------- | ||
| 15 | packaging/linux-hotplug/usbcam.console | 4 ++-- | ||
| 16 | packaging/linux-hotplug/usbcam.group | 2 +- | ||
| 17 | packaging/linux-hotplug/usbcam.user | 2 +- | ||
| 18 | packaging/linux-hotplug/usbcam.x11-app | 4 ++-- | ||
| 19 | 6 files changed, 19 insertions(+), 19 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/packaging/generic/check-ptp-camera b/packaging/generic/check-ptp-camera | ||
| 22 | index 1793fc8..bc3c6ac 100644 | ||
| 23 | --- a/packaging/generic/check-ptp-camera | ||
| 24 | +++ b/packaging/generic/check-ptp-camera | ||
| 25 | @@ -1,4 +1,4 @@ | ||
| 26 | -#!/bin/bash | ||
| 27 | +#!/bin/sh | ||
| 28 | # This program is free software; you can redistribute it and/or | ||
| 29 | # modify it under the terms of the GNU Lesser General Public | ||
| 30 | # License as published by the Free Software Foundation; either | ||
| 31 | @@ -20,13 +20,13 @@ INTERFACE="${1:-06/01/01}" | ||
| 32 | |||
| 33 | BASENAME=${DEVPATH##*/} | ||
| 34 | for d in /sys/${DEVPATH}/${BASENAME}:*; do | ||
| 35 | - [[ -d ${d} ]] || continue | ||
| 36 | - INTERFACEID="$(< ${d}/bInterfaceClass)" | ||
| 37 | - INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceSubClass)" | ||
| 38 | - INTERFACEID="${INTERFACEID}/$(< ${d}/bInterfaceProtocol)" | ||
| 39 | + [ -d "${d}" ] || continue | ||
| 40 | + INTERFACEID="$(cat "${d}"/bInterfaceClass)" | ||
| 41 | + INTERFACEID="${INTERFACEID}/$(cat "${d}"/bInterfaceSubClass)" | ||
| 42 | + INTERFACEID="${INTERFACEID}/$(cat "${d}"/bInterfaceProtocol)" | ||
| 43 | |||
| 44 | #echo ${d}: ${INTERFACEID} | ||
| 45 | - if [[ ${INTERFACE} == ${INTERFACEID} ]]; then | ||
| 46 | + if [ "${INTERFACE}" = "${INTERFACEID}" ]; then | ||
| 47 | # Found interface | ||
| 48 | exit 0 | ||
| 49 | fi | ||
| 50 | diff --git a/packaging/linux-hotplug/gphoto-set-procperm b/packaging/linux-hotplug/gphoto-set-procperm | ||
| 51 | index d72ee68..977cbf5 100644 | ||
| 52 | --- a/packaging/linux-hotplug/gphoto-set-procperm | ||
| 53 | +++ b/packaging/linux-hotplug/gphoto-set-procperm | ||
| 54 | @@ -1,4 +1,4 @@ | ||
| 55 | -#!/bin/bash | ||
| 56 | +#!/bin/sh | ||
| 57 | # This program is free software; you can redistribute it and/or | ||
| 58 | # modify it under the terms of the GNU Lesser General Public | ||
| 59 | # License as published by the Free Software Foundation; either | ||
| 60 | @@ -18,22 +18,22 @@ | ||
| 61 | # This is taken from Fedora Core gphoto2 package. | ||
| 62 | # http://cvs.fedora.redhat.com/viewcvs/*checkout*/devel/gphoto2/gphoto-set-procperm | ||
| 63 | |||
| 64 | -console_user=`cat /var/run/console/console.lock` | ||
| 65 | +console_user=$(cat /var/run/console/console.lock) | ||
| 66 | |||
| 67 | if [ -z "$console_user" ] ; then | ||
| 68 | exit 1 | ||
| 69 | fi | ||
| 70 | |||
| 71 | -if [ -z "$HAL_PROP_USB_BUS_NUMBER" -o -z "$HAL_PROP_USB_LINUX_DEVICE_NUMBER" ] ; then | ||
| 72 | +if [ -z "$HAL_PROP_USB_BUS_NUMBER" ] || [ -z "$HAL_PROP_USB_LINUX_DEVICE_NUMBER" ] ; then | ||
| 73 | exit 1 | ||
| 74 | fi | ||
| 75 | |||
| 76 | -if [ $HAL_PROP_USB_BUS_NUMBER -lt 0 -o $HAL_PROP_USB_LINUX_DEVICE_NUMBER -lt 0 ] ; then | ||
| 77 | +if [ "$HAL_PROP_USB_BUS_NUMBER" -lt 0 ] || [ "$HAL_PROP_USB_LINUX_DEVICE_NUMBER" -lt 0 ] ; then | ||
| 78 | exit 1 | ||
| 79 | fi | ||
| 80 | |||
| 81 | |||
| 82 | -bus_num=`printf %.3u $HAL_PROP_USB_BUS_NUMBER` | ||
| 83 | -dev_num=`printf %.3u $HAL_PROP_USB_LINUX_DEVICE_NUMBER` | ||
| 84 | +bus_num=$(printf %.3u "$HAL_PROP_USB_BUS_NUMBER") | ||
| 85 | +dev_num=$(printf %.3u "$HAL_PROP_USB_LINUX_DEVICE_NUMBER") | ||
| 86 | |||
| 87 | -chown $console_user /proc/bus/usb/$bus_num/$dev_num | ||
| 88 | +chown "$console_user" /proc/bus/usb/"$bus_num"/"$dev_num" | ||
| 89 | diff --git a/packaging/linux-hotplug/usbcam.console b/packaging/linux-hotplug/usbcam.console | ||
| 90 | index d72128f..7ac6dc5 100755 | ||
| 91 | --- a/packaging/linux-hotplug/usbcam.console | ||
| 92 | +++ b/packaging/linux-hotplug/usbcam.console | ||
| 93 | @@ -1,4 +1,4 @@ | ||
| 94 | -#!/bin/bash | ||
| 95 | +#!/bin/sh | ||
| 96 | # This program is free software; you can redistribute it and/or | ||
| 97 | # modify it under the terms of the GNU Lesser General Public | ||
| 98 | # License as published by the Free Software Foundation; either | ||
| 99 | @@ -50,7 +50,7 @@ then | ||
| 100 | /var/lock/console.lock | ||
| 101 | do | ||
| 102 | if [ -f "$conlock" ]; then | ||
| 103 | - CONSOLEOWNER=`cat $conlock` | ||
| 104 | + CONSOLEOWNER=$(cat $conlock) | ||
| 105 | fi | ||
| 106 | done | ||
| 107 | if [ -n "$CONSOLEOWNER" ] | ||
| 108 | diff --git a/packaging/linux-hotplug/usbcam.group b/packaging/linux-hotplug/usbcam.group | ||
| 109 | index f96c33d..8761fac 100755 | ||
| 110 | --- a/packaging/linux-hotplug/usbcam.group | ||
| 111 | +++ b/packaging/linux-hotplug/usbcam.group | ||
| 112 | @@ -1,4 +1,4 @@ | ||
| 113 | -#!/bin/bash | ||
| 114 | +#!/bin/sh | ||
| 115 | # This program is free software; you can redistribute it and/or | ||
| 116 | # modify it under the terms of the GNU Lesser General Public | ||
| 117 | # License as published by the Free Software Foundation; either | ||
| 118 | diff --git a/packaging/linux-hotplug/usbcam.user b/packaging/linux-hotplug/usbcam.user | ||
| 119 | index c46f155..a3ba71a 100644 | ||
| 120 | --- a/packaging/linux-hotplug/usbcam.user | ||
| 121 | +++ b/packaging/linux-hotplug/usbcam.user | ||
| 122 | @@ -1,4 +1,4 @@ | ||
| 123 | -#!/bin/bash | ||
| 124 | +#!/bin/sh | ||
| 125 | # This program is free software; you can redistribute it and/or | ||
| 126 | # modify it under the terms of the GNU Lesser General Public | ||
| 127 | # License as published by the Free Software Foundation; either | ||
| 128 | diff --git a/packaging/linux-hotplug/usbcam.x11-app b/packaging/linux-hotplug/usbcam.x11-app | ||
| 129 | index 023ae9b..618e7db 100644 | ||
| 130 | --- a/packaging/linux-hotplug/usbcam.x11-app | ||
| 131 | +++ b/packaging/linux-hotplug/usbcam.x11-app | ||
| 132 | @@ -1,4 +1,4 @@ | ||
| 133 | -#!/bin/bash | ||
| 134 | +#!/bin/sh | ||
| 135 | # This program is free software; you can redistribute it and/or | ||
| 136 | # modify it under the terms of the GNU Lesser General Public | ||
| 137 | # License as published by the Free Software Foundation; either | ||
| 138 | @@ -69,7 +69,7 @@ then | ||
| 139 | if [ "${USER}" != "root" ] | ||
| 140 | then | ||
| 141 | # we don't want to run this as root. definitely not. | ||
| 142 | - cd "${DIRECTORY}" | ||
| 143 | + cd "${DIRECTORY}" || exit 1 | ||
| 144 | usrhome=~${USER} | ||
| 145 | "${SU}" "${USER}" -c "${ENV} DISPLAY=${DISPLAY} HOME=${usrhome} ${X11_APP}" | ||
| 146 | fi | ||
| 147 | -- | ||
| 148 | 2.9.3 | ||
| 149 | |||
diff --git a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb index 098da79ad6..e251567ae8 100644 --- a/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb +++ b/meta-oe/recipes-graphics/gphoto2/libgphoto2_2.5.8.bb | |||
| @@ -16,6 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gphoto/libgphoto2-${PV}.tar.bz2;name=libgphoto2 | |||
| 16 | file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \ | 16 | file://0001-configure.ac-remove-AM_PO_SUBDIRS.patch \ |
| 17 | file://0002-correct-jpeg-memsrcdest-support.patch \ | 17 | file://0002-correct-jpeg-memsrcdest-support.patch \ |
| 18 | file://avoid_using_sprintf.patch \ | 18 | file://avoid_using_sprintf.patch \ |
| 19 | file://0001-scripts-remove-bashisms.patch \ | ||
| 19 | " | 20 | " |
| 20 | 21 | ||
| 21 | SRC_URI[libgphoto2.md5sum] = "873ab01aced49c6b92a98e515db5dcef" | 22 | SRC_URI[libgphoto2.md5sum] = "873ab01aced49c6b92a98e515db5dcef" |
| @@ -47,7 +48,6 @@ do_install_append() { | |||
| 47 | PACKAGES =+ "libgphotoport libgphoto2-camlibs" | 48 | PACKAGES =+ "libgphotoport libgphoto2-camlibs" |
| 48 | FILES_libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*" | 49 | FILES_libgphoto2-camlibs = "${libdir}/libgphoto2*/*/*.so*" |
| 49 | RRECOMMENDS_${PN} = "libgphoto2-camlibs" | 50 | RRECOMMENDS_${PN} = "libgphoto2-camlibs" |
| 50 | RDEPENDS_${PN} = "bash" | ||
| 51 | 51 | ||
| 52 | FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*" | 52 | FILES_libgphotoport = "${libdir}/libgphoto2_port.so.*" |
| 53 | 53 | ||
