[hornetq] Rebuild without narayana to disable circular dependency
Marek Goldmann
goldmann at fedoraproject.org
Tue Jan 14 12:19:48 UTC 2014
commit 19a5de7e6754ef504430891231ae025a130b1d8b
Author: Marek Goldmann <marek.goldmann at gmail.com>
Date: Tue Jan 14 13:19:44 2014 +0100
Rebuild without narayana to disable circular dependency
hornetq.spec | 41 +++++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 12 deletions(-)
---
diff --git a/hornetq.spec b/hornetq.spec
index 81a42d4..bbb4772 100644
--- a/hornetq.spec
+++ b/hornetq.spec
@@ -2,9 +2,13 @@
%global namedversion %{version}%{?namedreltag}
%global customnamedversion 2_4_0_Final
+# Use this switch to rebuild without narayana
+# This is useful to break the hornetq circular dependency
+%define with_narayana 0
+
Name: hornetq
Version: 2.4.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: High performance messaging system
License: ASL 2.0
URL: http://www.jboss.org/hornetq
@@ -45,7 +49,11 @@ BuildRequires: jgroups
BuildRequires: jboss-integration
BuildRequires: mvn(org.jboss.resteasy:resteasy-jaxrs)
BuildRequires: mvn(org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec)
+
+%if %{with_narayana}
BuildRequires: narayana
+%endif
+
BuildRequires: xml-maven-plugin
BuildRequires: saxon
BuildRequires: qpid-proton-java
@@ -83,19 +91,16 @@ find -name "*.so" -delete
%pom_disable_module integration/hornetq-twitter-integration
%pom_disable_module integration/hornetq-aerogear-integration
-%pom_remove_dep "org.jboss.microcontainer:jboss-kernel"
+%if !%{with_narayana}
+%pom_disable_module hornetq-jms-server
+%pom_disable_module hornetq-ra
+%pom_disable_module hornetq-tools
+%endif
-%pom_remove_dep "io.netty:netty-all"
-%pom_remove_dep "io.netty:netty-all" hornetq-commons/pom.xml
-%pom_remove_dep "io.netty:netty-all" hornetq-server/pom.xml
-%pom_remove_dep "io.netty:netty-all" hornetq-core-client/pom.xml
+%pom_remove_dep "org.jboss.microcontainer:jboss-kernel"
-%pom_add_dep "io.netty:netty-buffer:4" pom.xml
-%pom_add_dep "io.netty:netty-common:4" pom.xml
-%pom_add_dep "io.netty:netty-transport:4" pom.xml
-%pom_add_dep "io.netty:netty-codec:4" pom.xml
-%pom_add_dep "io.netty:netty-codec-http:4" pom.xml
-%pom_add_dep "io.netty:netty-handler:4" pom.xml
+# Use netty version 4, always
+sed -i 's|>4.0.13.Final<|>4<|' pom.xml
# Replace old jca
%pom_remove_dep "org.jboss.javaee:jboss-jca-api" hornetq-ra/pom.xml
@@ -109,6 +114,8 @@ find -name "*.so" -delete
# Currently the build script uses the .so in the hornetq-nativebin/ directory
# but we need to rebuild them. The issue is that the mvn build process does not
# use the new .so files we've built. Here is a simple workaround.
+
+%if %{with_narayana}
pushd hornetq-native
# Let's build the .so files
%mvn_build -i -f -- -Pnative-build
@@ -116,6 +123,7 @@ pushd hornetq-native
find -name "*.so" -exec cp {} bin/libHornetQAIO.so \;
find -name "*.so" -exec cp {} bin/libHornetQAIO%{__isa_bits}.so \;
popd
+%endif
# This will rebuild one more time the hornet-native stuff,
# but this time will include the correct native libraries
@@ -126,16 +134,21 @@ popd
%install
%mvn_install
+
# Install native stuff
+%if %{with_narayana}
install -d -m 755 %{buildroot}/%{_libdir}
cp -L hornetq-native/bin/libHornetQAIO.so %{buildroot}/%{_libdir}/libHornetQAIO.so
+%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f .mfiles
%dir %{_javadir}/%{name}
+%if %{with_narayana}
%{_libdir}/libHornetQAIO.so
+%endif
%doc distribution/hornetq/src/main/resources/licenses/LICENSE.txt
%doc NOTICE
%doc README.md
@@ -145,6 +158,10 @@ cp -L hornetq-native/bin/libHornetQAIO.so %{buildroot}/%{_libdir}/libHornetQAIO.
%doc NOTICE
%changelog
+* Tue Jan 14 2014 Marek Goldmann <mgoldman at redhat.com> - 2.4.0-2
+- Rebuild without narayana to disable circular dependency
+- Changes to netty requirement
+
* Thu Jan 09 2014 Marek Goldmann <mgoldman at redhat.com> - 2.4.0-1
- Upstream release 2.4.0.Final
More information about the scm-commits
mailing list