diff --git a/jetty.spec b/jetty.spec
index a55f437..a9d6187 100644
--- a/jetty.spec
+++ b/jetty.spec
@@ -608,6 +608,14 @@ find . -name "*.class" -exec rm {} \;
%pom_xpath_remove "pom:execution[pom:id[text()='copy-spdy']]" jetty-distribution
%if 0%{?rhel} > 0
+# Disable OSGi
+%pom_disable_module jetty-osgi
+%pom_xpath_remove "pom:profile[pom:id[text()='osgi']]"
+
+# Disable NoSQL
+%pom_disable_module jetty-nosql
+%endif
+
# Use Glassfish JSP
%pom_remove_dep :org.eclipse.jdt.core jetty-jsp
%pom_xpath_inject "pom:project/pom:dependencies" "
@@ -617,14 +625,6 @@ find . -name "*.class" -exec rm {} \;
any
" jetty-jsp
-# Disable OSGi
-%pom_disable_module jetty-osgi
-%pom_xpath_remove "pom:profile[pom:id[text()='osgi']]"
-
-# Disable NoSQL
-%pom_disable_module jetty-nosql
-%endif
-
cp %{SOURCE1} djetty
# this needs jetty6 things, so just remove it
@@ -1051,6 +1051,7 @@ groupdel %username &>/dev/null || :
%changelog
* Tue Aug 7 2012 Mikolaj Izdebski - 8.1.5-2
- Put runtime data in /run instead of /tmp
+- Fix patch for disabling OSGi
* Wed Jul 18 2012 Mikolaj Izdebski - 8.1.5-1
- Update to upstream version 8.1.5