On some configurations, build of Web UI with java-1.7.0-openjdk-1.7.0.25-2.3.10.10 fails. It works with java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19 which is in koji.

Provided patch fixes it for 10-10. It should also fix an issue when freeipa is build on x86 machine with small memory (discovered by Sumit).

I'm not sure if we want to push it to our git since the build issue is temporary.
--
Petr Vobornik
From 1d69400d19f7fc8b80efad302d61cb70b8ba066d Mon Sep 17 00:00:00 2001
From: Petr Vobornik <[email protected]>
Date: Wed, 31 Jul 2013 15:12:19 +0200
Subject: [PATCH] Use rhino.jar directly instead of rhino util

Rhino package comes with rhino util and /usr/share/rhino.jar. On some configurations
`rhino` errors out with:
  Error: Could not find or load main class org.mozilla.javascript.tools.shell.Main

It occurs after update to java-1.7.0-openjdk-1.7.0.25-2.3.10.10.fc19.x86_64

Calling rhino by:
  `java -Xss1m -classpath /usr/share/java/rhino.jar  org.mozilla.javascript.tools.shell.Main`
fixes the issue.
---
 install/ui/util/build.sh        | 3 ++-
 install/ui/util/uglifyjs/uglify | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/install/ui/util/build.sh b/install/ui/util/build.sh
index 7cd623485a8a87872e29d32f529bd77a45d59810..cacacbca0fdfc3078f78f19f6117492e8b39c912 100755
--- a/install/ui/util/build.sh
+++ b/install/ui/util/build.sh
@@ -31,5 +31,6 @@ if [[ ! $profile ]] ; then
     exit 1
 fi
 
-rhino $DIR/build/build.js baseUrl=$DIR/build load=build profile=$DIR/../src/$profile.profile.js
+RHINO="java -Xss1m -classpath /usr/share/java/rhino.jar  org.mozilla.javascript.tools.shell.Main"
+$RHINO $DIR/build/build.js baseUrl=$DIR/build load=build profile=$DIR/../src/$profile.profile.js
 exit $?
\ No newline at end of file
diff --git a/install/ui/util/uglifyjs/uglify b/install/ui/util/uglifyjs/uglify
index 7d25b38df19e465227f29b8b70ccf7ca140f725a..299ad3d1911648a57355e558c5e26aef221039af 100755
--- a/install/ui/util/uglifyjs/uglify
+++ b/install/ui/util/uglifyjs/uglify
@@ -25,8 +25,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 # rhino-1.7R4 doesn't have -main option to enable CommonJS support. It was
 # replaced by -require option.
-if [ `rhino --help | grep -e -require | wc -l` -gt 0 ] ; then
-    rhino -require $DIR/uglify-js.js $@
+RHINO="java -Xss1m -classpath /usr/share/java/rhino.jar  org.mozilla.javascript.tools.shell.Main"
+if [ `$RHINO --help | grep -e -require | wc -l` -gt 0 ] ; then
+    $RHINO -require $DIR/uglify-js.js $@
 else
-    rhino -main $DIR/uglify-js.js $DIR/ug.js $@
+    $RHINO -main $DIR/uglify-js.js $DIR/ug.js $@
 fi
\ No newline at end of file
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to