FS#70268 - [joyutils] Wrong paths in jscal-{store,restore}
Attached to Project:
Community Packages
Opened by Krzysztof Nazarewski (nazarewk) - Friday, 02 April 2021, 18:19 GMT
Last edited by Alexander F. Rødseth (xyproto) - Friday, 09 April 2021, 10:50 GMT
Opened by Krzysztof Nazarewski (nazarewk) - Friday, 02 April 2021, 18:19 GMT
Last edited by Alexander F. Rødseth (xyproto) - Friday, 09 April 2021, 10:50 GMT
|
Details
Description:
The package stores files in /usr/share/joystick, but jscal-{store,restore} expect them to be in /usr/local/share/joystick. Works just fine after i linked /usr/share/joystick to /usr/local/share/joystick: e-kfni@nazarewk-portable ~ % ls -la /usr/local/share/joystick lrwxrwxrwx 1 root root 19 Apr 2 20:05 /usr/local/share/joystick -> /usr/share/joystick e-kfni@nazarewk-portable ~ % ls -la /usr/share/joystick total 28 drwxr-xr-x 2 root root 4096 Apr 2 20:03 . drwxr-xr-x 327 root root 12288 Mar 27 10:35 .. -rwxr-xr-x 1 root root 1215 Mar 15 11:44 extract -rwxr-xr-x 1 root root 1649 Mar 15 11:44 filter -rwxr-xr-x 1 root root 1342 Mar 15 11:44 ident Additional info: * package version(s) * config and/or log files etc. * link to upstream bug report, if any Steps to reproduce: 1. Install joyutils 2. Connect joystick 2. run sudo jscal-store /dev/input/js0 e-kfni@nazarewk-portable ~ % grep /joystick/ /usr/bin/jscal-* /usr/bin/jscal-restore:STORE=/var/lib/joystick/joystick.state /usr/bin/jscal-restore:# Set $IFS to newline only as output from /usr/local/share/joystick/ident might contain spaces /usr/bin/jscal-restore:for ATTRIBUTE in $( udevadm info -a -n $1 | /usr/local/share/joystick/ident ); do /usr/bin/jscal-restore: cat $STORE | /usr/local/share/joystick/extract kernel="$DEVICE" | while read COMMAND; do /usr/bin/jscal-restore: cat $STORE | /usr/local/share/joystick/extract name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" | while read COMMAND; do /usr/bin/jscal-store:udevadm info -a -n $1 | /usr/local/share/joystick/ident > $ident /usr/bin/jscal-store:STORE=/var/lib/joystick/joystick.state /usr/bin/jscal-store: /usr/local/share/joystick/filter kernel="$DEVICE" < $STORE > $STORE.new /usr/bin/jscal-store: /usr/local/share/joystick/filter name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" < $STORE > $STORE.new |
This task depends upon
jscal-restore and jscal-store have the prefix set during build() so set PREFIX there as well as in package().
$ mkdir -p /tmp/joyutils-test
$ curl 'https://bugs.archlinux.org/task/70268?getfile=19969' -o PKGBUILD.diff
$ curl https://raw.githubusercontent.com/archlinux/svntogit-community/packages/joyutils/trunk/PKGBUILD
$ patch < PKGBUILD.diff
$ makepkg
$ sudo rm /usr/local/share/joystick
$ sudo pacman -U joyutils-1.7.1-1-x86_64.pkg.tar
$ sudo jscal-restore /dev/input/js0
$ mkdir -p /tmp/joyutils-test
$ curl 'https://bugs.archlinux.org/task/70268?getfile=19969' -o PKGBUILD.diff
$ curl https://raw.githubusercontent.com/archlinux/svntogit-community/packages/joyutils/trunk/PKGBUILD
$ patch < PKGBUILD.diff
$ makepkg
$ sudo rm /usr/local/share/joystick
$ sudo pacman -U joyutils-1.7.1-1-x86_64.pkg.tar
$ sudo jscal-restore /dev/input/js0