[
https://issues.apache.org/jira/browse/ZOOKEEPER-1210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13122588#comment-13122588
]
Tadeusz Andrzej Kadłubowski commented on ZOOKEEPER-1210:
--------------------------------------------------------
The following patch fixes rpm buildroot misplacement on systems with rpm >=
4.6. Earlier rpm versions support --buildroot commandline flag, so this patch
doesn't break building on older systems.
diff --git a/build.xml b/build.xml
index 8448aa6..fa3f6d8 100644
--- a/build.xml
+++ b/build.xml
@@ -1020,7 +1020,7 @@
</replacetokens>
</filterchain>
</copy>
- <rpm specFile="zookeeper.spec" command="-ba"
topDir="${package.buildroot}" cleanBuildDir="true" failOnError="true"
+ <rpm specFile="zookeeper.spec" command="-ba
--buildroot=${package.buildroot}/BUILD" topDir="${package.buildroot}"
cleanBuildDir="true" failOnError="true"
/>
<copy todir="${build.dir}/" flatten="true">
<fileset dir="${package.buildroot}/RPMS">
diff --git a/src/contrib/zkpython/build.xml b/src/contrib/zkpython/build.xml
index 7ceeda9..d8254d1 100644
--- a/src/contrib/zkpython/build.xml
+++ b/src/contrib/zkpython/build.xml
@@ -141,7 +141,7 @@
</filterchain>
</copy>
- <rpm specFile="${name}.spec" command="-ba" topDir="${package.buildroot}"
cleanBuildDir="true" failOnError="true" />
+ <rpm specFile="${name}.spec" command="-ba
--buildroot=${package.buildroot}/BUILD" topDir="${package.buildroot}"
cleanBuildDir="true" failOnError="true" />
<copy todir="${build.dir}/" flatten="true">
<fileset dir="${package.buildroot}/RPMS">
<include name="**/*.rpm" />
diff --git a/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec
b/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec
index 2c640b0..d1f9814 100644
--- a/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec
+++ b/src/contrib/zkpython/src/packages/rpm/spec/zkpython.spec
@@ -52,7 +52,6 @@ Version: %{version}
Release: %{release}
Source0: %{_python_lib}
Prefix: %{_prefix}
-Buildroot: %{_build_dir}
Requires: zookeeper-lib == %{version}
AutoReqProv: no
Provides: zkpython
diff --git a/src/packages/rpm/spec/zookeeper.spec
b/src/packages/rpm/spec/zookeeper.spec
index fa1333c..8e195c7 100644
--- a/src/packages/rpm/spec/zookeeper.spec
+++ b/src/packages/rpm/spec/zookeeper.spec
@@ -70,7 +70,6 @@ Prefix: %{_conf_dir}
Prefix: %{_log_dir}
Prefix: %{_pid_dir}
Prefix: %{_var_dir}
-Buildroot: %{_build_dir}
Requires: sh-utils, textutils, /usr/sbin/useradd, /usr/sbin/usermod,
/sbin/chkconfig, /sbin/service, jdk >= 1.6
AutoReqProv: no
Provides: zookeeper
> Can't build ZooKeeper RPM with RPM >= 4.6.0 (i.e. on RHEL 6 and Fedora >= 10)
> -----------------------------------------------------------------------------
>
> Key: ZOOKEEPER-1210
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1210
> Project: ZooKeeper
> Issue Type: Bug
> Components: build
> Affects Versions: 3.4.0
> Environment: Tested to fail on both Centos 6.0 and Fedora 14
> Reporter: Tadeusz Andrzej Kadłubowski
> Priority: Minor
> Labels: patch
>
> I was trying to build the zookeeper RPM (basically, `ant rpm
> -Dskip.contrib=1`), using build scripts that were recently merged from the
> work on the ZOOKEEPER-999 issue.
> The final stage, i.e. running rpmbuild failed. From what I understand it
> mixed BUILD and BUILDROOT subdirectories in
> /tmp/zookeeper_package_build_tkadlubo/, leaving BUILDROOT empty, and placing
> everything in BUILD.
> The full build log is at http://pastebin.com/0ZvUAKJt (Caution: I cut out
> long file listings from running tar -xvvf).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira