[freeipa/f20] 3.3.3-3
Martin Kosek
mkosek at fedoraproject.org
Fri Dec 13 14:38:53 UTC 2013
commit b9a15de92091334a6ff3fc9074655f6e5d9f24dd
Author: Martin Kosek <mkosek at redhat.com>
Date: Thu Dec 12 10:12:55 2013 +0100
3.3.3-3
- Build crashed rhino exception on some architectures (#1040576)
0002-Increase-stack-size-for-Web-UI-builder.patch | 69 +++++++++++++++++++++
freeipa.spec | 10 +++-
2 files changed, 78 insertions(+), 1 deletions(-)
---
diff --git a/0002-Increase-stack-size-for-Web-UI-builder.patch b/0002-Increase-stack-size-for-Web-UI-builder.patch
new file mode 100644
index 0000000..eadf76a
--- /dev/null
+++ b/0002-Increase-stack-size-for-Web-UI-builder.patch
@@ -0,0 +1,69 @@
+From 375f363df04c51b4f20b68dd567070d9e912e037 Mon Sep 17 00:00:00 2001
+From: Petr Vobornik <pvoborni at redhat.com>
+Date: Wed, 31 Jul 2013 15:12:19 +0200
+Subject: [PATCH] Increase stack size for Web UI builder
+
+Web UI build fails on some architectures or configuration due to
+StackOverflow. This patch increases the stack size to solve it.
+
+512k is usually enough but we encountered fail on ppc64 even with 2m,
+therefore the 8m. The build is single threaded so it shouldn't waste
+much memory.
+---
+ Makefile | 5 +++++
+ install/ui/util/build.sh | 5 +++--
+ install/ui/util/uglifyjs/uglify | 9 +++++----
+ 3 files changed, 13 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a7226341e6bd10106309997aae558fc07239482d..e54f8f0ba6484a12343f389b3cffbc20d7420a5f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -55,6 +55,11 @@ PYTHON ?= $(shell rpm -E %__python || echo /usr/bin/python)
+ CFLAGS := -g -O2 -Werror -Wall -Wextra -Wformat-security -Wno-unused-parameter -Wno-sign-compare -Wno-missing-field-initializers $(CFLAGS)
+ export CFLAGS
+
++# Uncomment to increase Java stack size for Web UI build in case it fails
++# because of stack overflow exception. Default should be OK for most platforms.
++#JAVA_STACK_SIZE ?= 8m
++#export JAVA_STACK_SIZE
++
+ all: bootstrap-autogen server tests
+ @for subdir in $(SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit 1; \
+diff --git a/install/ui/util/build.sh b/install/ui/util/build.sh
+index 7cd623485a8a87872e29d32f529bd77a45d59810..03776c1fe54f750cf028981bce625702af32aa1d 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
+-exit $?
+\ No newline at end of file
++RHINO="java -Xss${JAVA_STACK_SIZE:-512k} -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 $?
+diff --git a/install/ui/util/uglifyjs/uglify b/install/ui/util/uglifyjs/uglify
+index 7d25b38df19e465227f29b8b70ccf7ca140f725a..1227f589b4c50de49c465f6c696ecdc8af5e3c91 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 -Xss${JAVA_STACK_SIZE:-512k} -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 $@
+-fi
+\ No newline at end of file
++ $RHINO -main $DIR/uglify-js.js $DIR/ug.js $@
++fi
+--
+1.8.3.1
+
diff --git a/freeipa.spec b/freeipa.spec
index b0eed52..e4b7ecc 100644
--- a/freeipa.spec
+++ b/freeipa.spec
@@ -8,7 +8,7 @@
Name: freeipa
Version: 3.3.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Identity, Policy and Audit system
Group: System Environment/Base
@@ -18,6 +18,7 @@ Source0: http://www.freeipa.org/downloads/src/freeipa-%{VERSION}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0001: 0001-Guard-import-of-adtrustinstance-for-case-without-tru.patch
+Patch0002: 0002-Increase-stack-size-for-Web-UI-builder.patch
%if ! %{ONLY_CLIENT}
BuildRequires: 389-ds-base-devel >= 1.3.1.3
@@ -364,6 +365,10 @@ done
# Fedora spec file only: END
%build
+%ifarch ppc %{power64}
+# UI compilation segfaulted on ppc platforms when stack was lower (#1040576)
+export JAVA_STACK_SIZE="8m"
+%endif
export CFLAGS="$CFLAGS %{optflags}"
export CPPFLAGS="$CPPFLAGS %{optflags}"
%if 0%{?fedora} >= 18
@@ -888,6 +893,9 @@ fi
%endif # ONLY_CLIENT
%changelog
+* Thu Dec 12 2013 Martin Kosek <mkosek at redhat.com> - 3.3.3-3
+- Build crashed rhino exception on some architectures (#1040576)
+
* Mon Nov 4 2013 Martin Kosek <mkosek at redhat.com> - 3.3.3-2
- ipa-server-install crashed when freeipa-server-trust-ad subpackage was not
installed
More information about the scm-commits
mailing list