Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#33852 - [jmeter] 2.9-1: Unable to access jarfile /usr/bin/ApacheJMeter.jar

Attached to Project: Community Packages
Opened by Vlalislav (dumphblooz) - Thursday, 14 February 2013, 02:27 GMT
Last edited by Dave Reisner (falconindy) - Friday, 15 February 2013, 13:56 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Can't run jmeter after upgrade to 2.9-1: Unable to access jarfile /usr/bin/ApacheJMeter.jar
This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 15 February 2013, 13:56 GMT
Reason for closing:  Fixed
Additional comments about closing:  community/jmeter-2.9.0-2
Comment by Dave Reisner (falconindy) - Thursday, 14 February 2013, 18:46 GMT
And how exactly are you launching jmeter? The 'jmeter' wrapper script shipped in /usr/bin calls the correct path to the jarfile in /opt.
Comment by Vlalislav (dumphblooz) - Friday, 15 February 2013, 02:42 GMT
$ which jmeter
/usr/bin/jmeter

$ /usr/bin/jmeter
Error: Unable to access jarfile /usr/bin/ApacheJMeter.jar

From /usr/bin/jmeter:
#! /bin/sh
...
java $ARGS $JVM_ARGS -jar "`dirname "$0"`/ApacheJMeter.jar" "$@"
Comment by tdy (tdy) - Friday, 15 February 2013, 03:03 GMT
I could never figure out how to get symlinks to work like this. `dirname "$0"` will give you /usr/bin since that's where the symlink is.

I always ended up either sed'ing the opt script, making a custom wrapper in /usr/bin, adding the opt-bin path to a profile in /etc/profile.d, etc.

Actually I'm hoping there's a more obvious solution that I'm not aware of.
Comment by tdy (tdy) - Friday, 15 February 2013, 03:27 GMT
Ok scratch that, just looked at the PKGBUILD and noticed that there IS a sed already. It just needs double quotes around the $0:

sed -i '/^java/s|`dirname "$0"`|/opt/jmeter/bin|' "$pkgdir/opt/jmeter/bin/jmeter"

Loading...