[ofbiz-tools] branch master updated: Improved: handle patches in demos

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-tools] branch master updated: Improved: handle patches in demos

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ofbiz-tools.git


The following commit(s) were added to refs/heads/master by this push:
     new 476e49a  Improved: handle patches in demos
476e49a is described below

commit 476e49a1a4e5b3a9dc2b2bb6a9e9ff0267989f5d
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Tue May 12 11:18:37 2020 +0200

    Improved: handle patches in demos
   
    Nicolas started a good work 6 months ago and I think it should be continued.
    Since then we have switched to Git so his files are still relevant but need to
    be adapted.
   
    In the meantime I'll handle the patches in a simple way. I have moved the
    patches from the main dir to a patch dir, as did Nicolas, and removed the patch
    dir under Nicolas's dir
   
    This also adds the solr.config.patch provided by Ravi for OFBIZ-11504
---
 .../Nicolas/patch/old/branch13.7-demo.patch        | 12 ---------
 demo-backup/Nicolas/patch/old/fop.xconf.old.patch  | 13 ----------
 .../Nicolas/patch/old/url.properties.old.patch     | 15 -----------
 .../Nicolas/patch/stable/fop.xconf.stable.patch    | 13 ----------
 .../Nicolas/patch/trunk/url.properties.trunk.patch | 15 -----------
 demo-backup/fop.xconf.trunk.patch                  | 13 ----------
 demo-backup/{ => patch/old}/fop.xconf.old.patch    | 26 +++++++++----------
 .../{ => patch/old}/url.properties.old.patch       | 30 +++++++++++-----------
 .../{ => patch/stable}/fop.xconf.stable.patch      | 26 +++++++++----------
 .../patch/stable/url.properties.stable.patch       | 30 +++++++++++-----------
 .../patch/trunk/fop.xconf.trunk.patch              | 26 +++++++++----------
 demo-backup/patch/trunk/solr.config.patch          | 30 ++++++++++++++++++++++
 .../{ => patch/trunk}/url.properties.trunk.patch   | 30 +++++++++++-----------
 demo-backup/url.properties.stable.patch            | 15 -----------
 14 files changed, 114 insertions(+), 180 deletions(-)

diff --git a/demo-backup/Nicolas/patch/old/branch13.7-demo.patch b/demo-backup/Nicolas/patch/old/branch13.7-demo.patch
deleted file mode 100644
index bc51418..0000000
--- a/demo-backup/Nicolas/patch/old/branch13.7-demo.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1608427)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -21,7 +21,7 @@
- ####
-
- # HTTPS Port (Secure port)
--port.https.enabled=Y
-+port.https.enabled=N
- port.https=8443
- force.https.host=
diff --git a/demo-backup/Nicolas/patch/old/fop.xconf.old.patch b/demo-backup/Nicolas/patch/old/fop.xconf.old.patch
deleted file mode 100644
index 7f6a257..0000000
--- a/demo-backup/Nicolas/patch/old/fop.xconf.old.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: framework/webapp/config/fop.xconf
-===================================================================
---- framework/webapp/config/fop.xconf   (revision 1785051)
-+++ framework/webapp/config/fop.xconf   (working copy)
-@@ -31,7 +31,7 @@
- <fop version="1.0">
-
-   <!-- Base URL for resolving relative URLs -->
--  <base>http://localhost:8080</base>
-+  <base>https://demo-old.ofbiz.apache.org</base>
-
-   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
-   <source-resolution>72</source-resolution>
diff --git a/demo-backup/Nicolas/patch/old/url.properties.old.patch b/demo-backup/Nicolas/patch/old/url.properties.old.patch
deleted file mode 100644
index 8f45519..0000000
--- a/demo-backup/Nicolas/patch/old/url.properties.old.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1854638)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -36,8 +36,8 @@
-
- # Static Content URLs to make it easy to move the serving load for static content to other machines
- # -- these are for general content such as images, js & css files, or non-dynamic HTML files
--content.url.prefix.secure=
--content.url.prefix.standard=
-+content.url.prefix.secure=https://demo-old.ofbiz.apache.org
-+content.url.prefix.standard=https://demo-old.ofbiz.apache.org
-
- # Here you can set the domain string to use for new cookies
- cookie.domain=
diff --git a/demo-backup/Nicolas/patch/stable/fop.xconf.stable.patch b/demo-backup/Nicolas/patch/stable/fop.xconf.stable.patch
deleted file mode 100644
index d7bfd9b..0000000
--- a/demo-backup/Nicolas/patch/stable/fop.xconf.stable.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: framework/webapp/config/fop.xconf
-===================================================================
---- framework/webapp/config/fop.xconf   (revision 1785051)
-+++ framework/webapp/config/fop.xconf   (working copy)
-@@ -31,7 +31,7 @@
- <fop version="1.0">
-
-   <!-- Base URL for resolving relative URLs -->
--  <base>http://localhost:8080</base>
-+  <base>https://demo-stable.ofbiz.apache.org</base>
-
-   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
-   <source-resolution>72</source-resolution>
diff --git a/demo-backup/Nicolas/patch/trunk/url.properties.trunk.patch b/demo-backup/Nicolas/patch/trunk/url.properties.trunk.patch
deleted file mode 100644
index ac28565..0000000
--- a/demo-backup/Nicolas/patch/trunk/url.properties.trunk.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1854638)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -36,8 +36,8 @@
-
- # Static Content URLs to make it easy to move the serving load for static content to other machines
- # -- these are for general content such as images, js & css files, or non-dynamic HTML files
--content.url.prefix.secure=
--content.url.prefix.standard=
-+content.url.prefix.secure=https://demo-trunk.ofbiz.apache.org
-+content.url.prefix.standard=https://demo-trunk.ofbiz.apache.org
-
- # Here you can set the domain string to use for new cookies
- cookie.domain=
diff --git a/demo-backup/fop.xconf.trunk.patch b/demo-backup/fop.xconf.trunk.patch
deleted file mode 100644
index b26b324..0000000
--- a/demo-backup/fop.xconf.trunk.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: framework/webapp/config/fop.xconf
-===================================================================
---- framework/webapp/config/fop.xconf   (revision 1785051)
-+++ framework/webapp/config/fop.xconf   (working copy)
-@@ -31,7 +31,7 @@
- <fop version="1.0">
-
-   <!-- Base URL for resolving relative URLs -->
--  <base>http://localhost:8080</base>
-+  <base>https://demo-trunk.ofbiz.apache.org</base>
-
-   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
-   <source-resolution>72</source-resolution>
diff --git a/demo-backup/fop.xconf.old.patch b/demo-backup/patch/old/fop.xconf.old.patch
similarity index 97%
rename from demo-backup/fop.xconf.old.patch
rename to demo-backup/patch/old/fop.xconf.old.patch
index 7f6a257..22a036e 100644
--- a/demo-backup/fop.xconf.old.patch
+++ b/demo-backup/patch/old/fop.xconf.old.patch
@@ -1,13 +1,13 @@
-Index: framework/webapp/config/fop.xconf
-===================================================================
---- framework/webapp/config/fop.xconf   (revision 1785051)
-+++ framework/webapp/config/fop.xconf   (working copy)
-@@ -31,7 +31,7 @@
- <fop version="1.0">
-
-   <!-- Base URL for resolving relative URLs -->
--  <base>http://localhost:8080</base>
-+  <base>https://demo-old.ofbiz.apache.org</base>
-
-   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
-   <source-resolution>72</source-resolution>
+Index: framework/webapp/config/fop.xconf
+===================================================================
+--- framework/webapp/config/fop.xconf   (revision 1785051)
++++ framework/webapp/config/fop.xconf   (working copy)
+@@ -31,7 +31,7 @@
+ <fop version="1.0">
+
+   <!-- Base URL for resolving relative URLs -->
+-  <base>http://localhost:8080</base>
++  <base>https://demo-old.ofbiz.apache.org</base>
+
+   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
+   <source-resolution>72</source-resolution>
diff --git a/demo-backup/url.properties.old.patch b/demo-backup/patch/old/url.properties.old.patch
similarity index 97%
rename from demo-backup/url.properties.old.patch
rename to demo-backup/patch/old/url.properties.old.patch
index 8f45519..74f5bdd 100644
--- a/demo-backup/url.properties.old.patch
+++ b/demo-backup/patch/old/url.properties.old.patch
@@ -1,15 +1,15 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1854638)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -36,8 +36,8 @@
-
- # Static Content URLs to make it easy to move the serving load for static content to other machines
- # -- these are for general content such as images, js & css files, or non-dynamic HTML files
--content.url.prefix.secure=
--content.url.prefix.standard=
-+content.url.prefix.secure=https://demo-old.ofbiz.apache.org
-+content.url.prefix.standard=https://demo-old.ofbiz.apache.org
-
- # Here you can set the domain string to use for new cookies
- cookie.domain=
+Index: framework/webapp/config/url.properties
+===================================================================
+--- framework/webapp/config/url.properties (revision 1854638)
++++ framework/webapp/config/url.properties (working copy)
+@@ -36,8 +36,8 @@
+
+ # Static Content URLs to make it easy to move the serving load for static content to other machines
+ # -- these are for general content such as images, js & css files, or non-dynamic HTML files
+-content.url.prefix.secure=
+-content.url.prefix.standard=
++content.url.prefix.secure=https://demo-old.ofbiz.apache.org
++content.url.prefix.standard=https://demo-old.ofbiz.apache.org
+
+ # Here you can set the domain string to use for new cookies
+ cookie.domain=
diff --git a/demo-backup/fop.xconf.stable.patch b/demo-backup/patch/stable/fop.xconf.stable.patch
similarity index 97%
rename from demo-backup/fop.xconf.stable.patch
rename to demo-backup/patch/stable/fop.xconf.stable.patch
index d7bfd9b..a279d7e 100644
--- a/demo-backup/fop.xconf.stable.patch
+++ b/demo-backup/patch/stable/fop.xconf.stable.patch
@@ -1,13 +1,13 @@
-Index: framework/webapp/config/fop.xconf
-===================================================================
---- framework/webapp/config/fop.xconf   (revision 1785051)
-+++ framework/webapp/config/fop.xconf   (working copy)
-@@ -31,7 +31,7 @@
- <fop version="1.0">
-
-   <!-- Base URL for resolving relative URLs -->
--  <base>http://localhost:8080</base>
-+  <base>https://demo-stable.ofbiz.apache.org</base>
-
-   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
-   <source-resolution>72</source-resolution>
+Index: framework/webapp/config/fop.xconf
+===================================================================
+--- framework/webapp/config/fop.xconf   (revision 1785051)
++++ framework/webapp/config/fop.xconf   (working copy)
+@@ -31,7 +31,7 @@
+ <fop version="1.0">
+
+   <!-- Base URL for resolving relative URLs -->
+-  <base>http://localhost:8080</base>
++  <base>https://demo-stable.ofbiz.apache.org</base>
+
+   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
+   <source-resolution>72</source-resolution>
diff --git a/demo-backup/Nicolas/patch/stable/url.properties.stable.patch b/demo-backup/patch/stable/url.properties.stable.patch
similarity index 97%
rename from demo-backup/Nicolas/patch/stable/url.properties.stable.patch
rename to demo-backup/patch/stable/url.properties.stable.patch
index 860d57f..a047be0 100644
--- a/demo-backup/Nicolas/patch/stable/url.properties.stable.patch
+++ b/demo-backup/patch/stable/url.properties.stable.patch
@@ -1,15 +1,15 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1854638)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -36,8 +36,8 @@
-
- # Static Content URLs to make it easy to move the serving load for static content to other machines
- # -- these are for general content such as images, js & css files, or non-dynamic HTML files
--content.url.prefix.secure=
--content.url.prefix.standard=
-+content.url.prefix.secure=https://demo-stable.ofbiz.apache.org
-+content.url.prefix.standard=https://demo-stable.ofbiz.apache.org
-
- # Here you can set the domain string to use for new cookies
- cookie.domain=
+Index: framework/webapp/config/url.properties
+===================================================================
+--- framework/webapp/config/url.properties (revision 1854638)
++++ framework/webapp/config/url.properties (working copy)
+@@ -36,8 +36,8 @@
+
+ # Static Content URLs to make it easy to move the serving load for static content to other machines
+ # -- these are for general content such as images, js & css files, or non-dynamic HTML files
+-content.url.prefix.secure=
+-content.url.prefix.standard=
++content.url.prefix.secure=https://demo-stable.ofbiz.apache.org
++content.url.prefix.standard=https://demo-stable.ofbiz.apache.org
+
+ # Here you can set the domain string to use for new cookies
+ cookie.domain=
diff --git a/demo-backup/Nicolas/patch/trunk/fop.xconf.trunk.patch b/demo-backup/patch/trunk/fop.xconf.trunk.patch
similarity index 97%
rename from demo-backup/Nicolas/patch/trunk/fop.xconf.trunk.patch
rename to demo-backup/patch/trunk/fop.xconf.trunk.patch
index b26b324..725744a 100644
--- a/demo-backup/Nicolas/patch/trunk/fop.xconf.trunk.patch
+++ b/demo-backup/patch/trunk/fop.xconf.trunk.patch
@@ -1,13 +1,13 @@
-Index: framework/webapp/config/fop.xconf
-===================================================================
---- framework/webapp/config/fop.xconf   (revision 1785051)
-+++ framework/webapp/config/fop.xconf   (working copy)
-@@ -31,7 +31,7 @@
- <fop version="1.0">
-
-   <!-- Base URL for resolving relative URLs -->
--  <base>http://localhost:8080</base>
-+  <base>https://demo-trunk.ofbiz.apache.org</base>
-
-   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
-   <source-resolution>72</source-resolution>
+Index: framework/webapp/config/fop.xconf
+===================================================================
+--- framework/webapp/config/fop.xconf   (revision 1785051)
++++ framework/webapp/config/fop.xconf   (working copy)
+@@ -31,7 +31,7 @@
+ <fop version="1.0">
+
+   <!-- Base URL for resolving relative URLs -->
+-  <base>http://localhost:8080</base>
++  <base>https://demo-trunk.ofbiz.apache.org</base>
+
+   <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels in SVG and bitmap images, default: 72dpi -->
+   <source-resolution>72</source-resolution>
diff --git a/demo-backup/patch/trunk/solr.config.patch b/demo-backup/patch/trunk/solr.config.patch
new file mode 100644
index 0000000..6606809
--- /dev/null
+++ b/demo-backup/patch/trunk/solr.config.patch
@@ -0,0 +1,30 @@
+diff --git solr/config/solrconfig.properties solr/config/solrconfig.properties
+index b87a305..b87142b 100644
+--- solr/config/solrconfig.properties
++++ solr/config/solrconfig.properties
+@@ -25,6 +25,10 @@ solr.webapp.domainName=localhost
+ solr.webapp.portOverride=
+ solr.webapp.path=/solr
+
++# complete url with protocol, domainName,port(if require), and webapp path
++# complete url will be given preference if set
++solr.complete.url=https://demo-trunk.ofbiz.apache.org/solr
++
+ # Global solr ECA service toggling
+ # Set to true to enable solr indexing using ECAs/SECAs.
+ # If set to false, solr services meant to be triggered by ECA/SECA will not execute and will "succeed" silently.
+diff --git solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
+index 3e05b70..50c8bad 100644
+--- solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
++++ solr/src/main/java/org/apache/ofbiz/solr/SolrUtil.java
+@@ -76,6 +76,10 @@ public final class SolrUtil {
+     private static final boolean trustSelfSignedCert = getTrustSelfSignedCert();
+    
+     public static String makeSolrWebappUrl() {
++        final String solrCompleteUrl = UtilProperties.getPropertyValue(solrConfigName, "solr.complete.url");
++        if (UtilValidate.isNotEmpty(solrCompleteUrl)) {
++            return solrCompleteUrl;
++        }
+         final String solrWebappProtocol = UtilProperties.getPropertyValue(solrConfigName, "solr.webapp.protocol");
+         final String solrWebappDomainName = UtilProperties.getPropertyValue(solrConfigName, "solr.webapp.domainName");
+         final String solrWebappPath = UtilProperties.getPropertyValue(solrConfigName, "solr.webapp.path");
diff --git a/demo-backup/url.properties.trunk.patch b/demo-backup/patch/trunk/url.properties.trunk.patch
similarity index 97%
rename from demo-backup/url.properties.trunk.patch
rename to demo-backup/patch/trunk/url.properties.trunk.patch
index ac28565..76f5a63 100644
--- a/demo-backup/url.properties.trunk.patch
+++ b/demo-backup/patch/trunk/url.properties.trunk.patch
@@ -1,15 +1,15 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1854638)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -36,8 +36,8 @@
-
- # Static Content URLs to make it easy to move the serving load for static content to other machines
- # -- these are for general content such as images, js & css files, or non-dynamic HTML files
--content.url.prefix.secure=
--content.url.prefix.standard=
-+content.url.prefix.secure=https://demo-trunk.ofbiz.apache.org
-+content.url.prefix.standard=https://demo-trunk.ofbiz.apache.org
-
- # Here you can set the domain string to use for new cookies
- cookie.domain=
+Index: framework/webapp/config/url.properties
+===================================================================
+--- framework/webapp/config/url.properties (revision 1854638)
++++ framework/webapp/config/url.properties (working copy)
+@@ -36,8 +36,8 @@
+
+ # Static Content URLs to make it easy to move the serving load for static content to other machines
+ # -- these are for general content such as images, js & css files, or non-dynamic HTML files
+-content.url.prefix.secure=
+-content.url.prefix.standard=
++content.url.prefix.secure=https://demo-trunk.ofbiz.apache.org
++content.url.prefix.standard=https://demo-trunk.ofbiz.apache.org
+
+ # Here you can set the domain string to use for new cookies
+ cookie.domain=
diff --git a/demo-backup/url.properties.stable.patch b/demo-backup/url.properties.stable.patch
deleted file mode 100644
index 860d57f..0000000
--- a/demo-backup/url.properties.stable.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: framework/webapp/config/url.properties
-===================================================================
---- framework/webapp/config/url.properties (revision 1854638)
-+++ framework/webapp/config/url.properties (working copy)
-@@ -36,8 +36,8 @@
-
- # Static Content URLs to make it easy to move the serving load for static content to other machines
- # -- these are for general content such as images, js & css files, or non-dynamic HTML files
--content.url.prefix.secure=
--content.url.prefix.standard=
-+content.url.prefix.secure=https://demo-stable.ofbiz.apache.org
-+content.url.prefix.standard=https://demo-stable.ofbiz.apache.org
-
- # Here you can set the domain string to use for new cookies
- cookie.domain=