From 4c9974c243496ab7d233616fe113959c519a481d Mon Sep 17 00:00:00 2001 From: Steve Capper Date: Thu, 29 Oct 2015 20:27:13 +0000 Subject: PIG: remove JavaScript from ANT build logic The Pig build system uses JavaScript in Ant. This will fail to build on OpenJDK 7 due to missing Java libraries. This commit replaces the JavaScript for project property setting with Ant macros that are functionally equivalent. Also one piece of JavaScript, to remove an item from classpath, is not actually needed for the Big Top build so is removed entirely. Some Big Top logic is also tweaked to allow patches in the SPEC file. Signed-off-by: Steve Capper --- .../src/common/pig/patch0-remove-javascript.diff | 36 ++++++++++++++++++++++ bigtop-packages/src/rpm/pig/SPECS/pig.spec | 3 ++ 2 files changed, 39 insertions(+) create mode 100644 bigtop-packages/src/common/pig/patch0-remove-javascript.diff diff --git a/bigtop-packages/src/common/pig/patch0-remove-javascript.diff b/bigtop-packages/src/common/pig/patch0-remove-javascript.diff new file mode 100644 index 00000000..4a2f5b16 --- /dev/null +++ b/bigtop-packages/src/common/pig/patch0-remove-javascript.diff @@ -0,0 +1,36 @@ +diff -urN pig-0.14.0-src.orig/build.xml pig-0.14.0-src/build.xml +--- pig-0.14.0-src.orig/build.xml 2015-10-29 20:30:58.540000000 +0000 ++++ pig-0.14.0-src/build.xml 2015-10-29 20:32:08.810000000 +0000 +@@ -573,10 +573,10 @@ + + + +- --> + + + +@@ -777,12 +777,15 @@ + + + +- ++ + + +- project.setProperty(attributes.get("name"), attributes.get("value")); +- ++ ++ ++ ++ ++ ++ + + + diff --git a/bigtop-packages/src/rpm/pig/SPECS/pig.spec b/bigtop-packages/src/rpm/pig/SPECS/pig.spec index 370b7aad..67f58dba 100644 --- a/bigtop-packages/src/rpm/pig/SPECS/pig.spec +++ b/bigtop-packages/src/rpm/pig/SPECS/pig.spec @@ -83,6 +83,7 @@ Source1: do-component-build Source2: install_pig.sh Source3: pig.1 Source4: bigtop.bom +#BIGTOP_PATCH_FILES Requires: hadoop-client, hbase, hive, zookeeper, bigtop-utils >= 0.7 %description @@ -111,6 +112,8 @@ language called Pig Latin, which has the following key properties: %prep %setup -n %{name}-%{pig_base_version}-src +#BIGTOP_PATCH_COMMANDS + %build env PIG_BASE_VERSION=%{pig_base_version} bash %{SOURCE1} -- cgit v1.2.3