Yaniv Dary has uploaded a new change for review.

Change subject: packaging: setup: moved postgres driver setup to patches
......................................................................

packaging: setup: moved postgres driver setup to patches

Change-Id: I3879c7ebe13d216765c2daa72770c0ec5a041f7c
Signed-off-by: Yaniv Dary <yd...@redhat.com>
---
A 
packaging/jasper-war-patches/100_002_meta-inf_remove_pgsql_jar_from_exclude.patch
A 
packaging/jasper-war-patches/200_004_web-inf_add_pgsql_driver_to_datasources.patch
M 
packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-reports/jasper/deploy.py
3 files changed, 24 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-reports refs/changes/13/24413/1

diff --git 
a/packaging/jasper-war-patches/100_002_meta-inf_remove_pgsql_jar_from_exclude.patch
 
b/packaging/jasper-war-patches/100_002_meta-inf_remove_pgsql_jar_from_exclude.patch
new file mode 100644
index 0000000..fb2a5b2
--- /dev/null
+++ 
b/packaging/jasper-war-patches/100_002_meta-inf_remove_pgsql_jar_from_exclude.patch
@@ -0,0 +1,11 @@
+--- a/META-INF/jboss-deployment-structure.xml
++++ b/META-INF/jboss-deployment-structure.xml
+@@ -174,8 +174,6 @@
+               <resource-root path="WEB-INF/lib/db2jcc-9.7.jar" 
use-physical-code-source="true"/>
+               <resource-root path="WEB-INF/lib/sqljdbc-1.6-2206.100.jar" 
use-physical-code-source="true"/>
+               <resource-root path="WEB-INF/lib/vertica_4.1.19_jdk_5.jar" 
use-physical-code-source="true"/>
+-              <resource-root path="WEB-INF/lib/postgresql-9.2-1002.jdbc4.jar" 
use-physical-code-source="true"/>
+-
+ 
+             <!-- 2013-07-15 thorick
+                             
http://bugzilla.jaspersoft.com/show_bug.cgi?id=33137
diff --git 
a/packaging/jasper-war-patches/200_004_web-inf_add_pgsql_driver_to_datasources.patch
 
b/packaging/jasper-war-patches/200_004_web-inf_add_pgsql_driver_to_datasources.patch
new file mode 100644
index 0000000..b5723e7
--- /dev/null
+++ 
b/packaging/jasper-war-patches/200_004_web-inf_add_pgsql_driver_to_datasources.patch
@@ -0,0 +1,13 @@
+--- a/WEB-INF/js-jboss7-ds.xml
++++ b/WEB-INF/js-jboss7-ds.xml
+@@ -68,4 +68,9 @@
+             <share-prepared-statements>false</share-prepared-statements>
+         </statement>
+     </datasource>
++    <drivers>
++        <driver name="postgresql" module="org.postgresql">
++            
<xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
++        </driver>
++    </drivers>
+ </datasources>
+\ No newline at end of file
diff --git 
a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-reports/jasper/deploy.py
 
b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-reports/jasper/deploy.py
index 4cb9d49..8880566 100644
--- 
a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-reports/jasper/deploy.py
+++ 
b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-reports/jasper/deploy.py
@@ -777,55 +777,6 @@
         ):
             os.unlink(f)
 
-        with self.XMLDoc(
-            os.path.join(
-                oreportscons.FileLocations.OVIRT_ENGINE_REPORTS_JASPER_WAR,
-                'WEB-INF',
-                'js-jboss7-ds.xml',
-            )
-        ) as xml:
-            if len(xml.xpath.xpathEval('/datasources/drivers')) == 0:
-                addition = None
-                try:
-                    addition = libxml2.parseDoc(
-                        '''
-<drivers>
-  <driver name="postgresql" module="org.postgresql">
-    <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
-  </driver>
-</drivers>
-                        '''
-                    )
-                    xml.xpath.xpathEval('/datasources')[0].addChild(
-                        addition.getRootElement()
-                    )
-                finally:
-                    # do not free, cause segmentation fault
-                    #addition.freeDoc()
-                    pass
-
-            for node in xml.xpath.xpathEval(
-                '/datasources/datasource/driver'
-            ):
-                if 'postgresql' in node.content:
-                    node.setContent('postgresql')
-
-        with self.XMLDoc(
-            os.path.join(
-                oreportscons.FileLocations.OVIRT_ENGINE_REPORTS_JASPER_WAR,
-                'META-INF',
-                'jboss-deployment-structure.xml',
-            )
-        ) as xml:
-            for node in xml.xpath.xpathEval(
-                (
-                    '/jboss-deployment-structure/deployment'
-                    '/resources/resource-root'
-                )
-            ):
-                if 'postgresql' in node.prop('path'):
-                    node.unlinkNode()
-
         self.logger.info(_('Customizing Jasper'))
 
         for p in sorted(


-- 
To view, visit http://gerrit.ovirt.org/24413
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3879c7ebe13d216765c2daa72770c0ec5a041f7c
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-reports
Gerrit-Branch: master
Gerrit-Owner: Yaniv Dary <yd...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to