Bug 158832 - [patch] devel/arduino: use realpath instead of readlink -f
Summary: [patch] devel/arduino: use realpath instead of readlink -f
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Eygene Ryabinkin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 15:00 UTC by Warren Block
Modified: 2011-08-04 02:00 UTC (History)
0 users

See Also:


Attachments
file.diff (1.06 KB, patch)
2011-07-12 15:00 UTC, Warren Block
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Warren Block 2011-07-12 15:00:22 UTC
Versions of FreeBSD's readlink from before January 2011 did not support the -f "canonicalize" option.  The Arduino startup script uses readlink -f, so change this to the native realpath(1) which should work on all versions of FreeBSD.

Fix: Apply patch.

Patch attached with submission follows:
How-To-Repeat: Attempt to start the Arduino IDE.  FreeBSD 7.4-RELEASE and 8.2-RELEASE will fail due to the unknown -f option to readlink:

readlink: illegal option -- f
usage: readlink [-n] [file ...]
usage: dirname string [...]
Exception in thread "main" java.lang.NoClassDefFoundError: processing/app/Base
Comment 1 Eygene Ryabinkin freebsd_committer freebsd_triage 2011-07-20 05:59:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rea

Grabbing PR.
Comment 2 Eygene Ryabinkin freebsd_committer freebsd_triage 2011-07-21 13:59:24 UTC
I have slightly modified variant of the patch.  Functionally is does
the same, but keeps Makefile DRY.  Please, take a look:
  http://codelabs.ru/fbsd/ports/arduino/0022-use-realpath.diff

Tinderbox builds for patchedd arduino are fine:
 - http://gpf.codelabs.ru/tb-logs/mine-9/arduino-0022_2.log
 - http://gpf.codelabs.ru/tb-logs/mine-8/arduino-0022_2.log
 - http://gpf.codelabs.ru/tb-logs/mine-7/arduino-0022_2.log
-- 
Eygene Ryabinkin                                        ,,,^..^,,,
[ Life's unfair - but root password helps!           | codelabs.ru ]
[ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
Comment 3 Warren Block 2011-07-30 00:44:37 UTC
Looks good to me, please commit.
Comment 4 dfilter service freebsd_committer freebsd_triage 2011-08-04 01:55:16 UTC
rea         2011-08-04 00:54:51 UTC

  FreeBSD ports repository

  Modified files:
    devel/arduino        Makefile 
  Log:
  devel/arduino: fix two issues
  
   - use realpath instead of 'readlink -f': support of "-f" is the
     recent addition, so realpath will work in more FreeBSD versions;
  
   - add missing "-e" to the REINPLACE_CMD and get rid of .bak file
     creation.
  
  PR: ports/158832
  Approved-by: Warren Block <wblock@wonkity.com> (maintainer), garga (mentor)
  Feature-safe: yes
  
  Revision  Changes    Path
  1.7       +6 -4      ports/devel/arduino/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Eygene Ryabinkin freebsd_committer freebsd_triage 2011-08-04 01:55:29 UTC
State Changed
From-To: open->closed

Fix committed, thanks for submission!