diff --git a/.gitignore b/.gitignore index 8a55485..2b58d7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/thermostat-1.2.0.tar.gz +SOURCES/thermostat-1.4.4.tar.gz diff --git a/.thermostat1-thermostat.metadata b/.thermostat1-thermostat.metadata index 98b67d0..7d8a644 100644 --- a/.thermostat1-thermostat.metadata +++ b/.thermostat1-thermostat.metadata @@ -1 +1 @@ -fd548407d3abbf34df9e8d0c58f8f4a36f80743c SOURCES/thermostat-1.2.0.tar.gz +c269ef0367b98a848ed72a951f6550002da2fec7 SOURCES/thermostat-1.4.4.tar.gz diff --git a/SOURCES/fix_bundle_loading.patch b/SOURCES/fix_bundle_loading.patch index 7285b9a..28208c1 100644 --- a/SOURCES/fix_bundle_loading.patch +++ b/SOURCES/fix_bundle_loading.patch @@ -1,71 +1,75 @@ -# HG changeset patch -# Parent 5d0c366a0fbe751f2185d3cdda3aae293da98611 diff --git a/dev/multi-module-plugin-archetype/src/main/resources/archetype-resources/distribution/thermostat-plugin.xml b/dev/multi-module-plugin-archetype/src/main/resources/archetype-resources/distribution/thermostat-plugin.xml --- a/dev/multi-module-plugin-archetype/src/main/resources/archetype-resources/distribution/thermostat-plugin.xml +++ b/dev/multi-module-plugin-archetype/src/main/resources/archetype-resources/distribution/thermostat-plugin.xml -@@ -39,6 +39,7 @@ +@@ -39,7 +39,7 @@ org.apache.commons.logging${symbol_dollar}{commons-logging.version} org.apache.httpcomponents.httpcore${symbol_dollar}{httpcomponents.core.version} org.apache.httpcomponents.httpclient${symbol_dollar}{httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${symbol_dollar}{gson.version} + diff --git a/dev/schema-info-command/distribution/thermostat-plugin.xml b/dev/schema-info-command/distribution/thermostat-plugin.xml --- a/dev/schema-info-command/distribution/thermostat-plugin.xml +++ b/dev/schema-info-command/distribution/thermostat-plugin.xml -@@ -62,6 +62,7 @@ +@@ -63,7 +63,7 @@ com.redhat.thermostat.web.client${project.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} org.mongodb.mongo-java-driver${mongo-driver.osgi-version} + diff --git a/distribution/config/commands/agent-info.properties b/distribution/config/commands/agent-info.properties --- a/distribution/config/commands/agent-info.properties +++ b/distribution/config/commands/agent-info.properties -@@ -4,6 +4,7 @@ +@@ -4,7 +4,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ diff --git a/distribution/config/commands/agent.properties b/distribution/config/commands/agent.properties --- a/distribution/config/commands/agent.properties +++ b/distribution/config/commands/agent.properties -@@ -3,6 +3,7 @@ +@@ -3,7 +3,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ com.redhat.thermostat.process=${project.version}, \ + com.redhat.thermostat.common.core=${project.version}, \ diff --git a/distribution/config/commands/clean-data.properties b/distribution/config/commands/clean-data.properties --- a/distribution/config/commands/clean-data.properties +++ b/distribution/config/commands/clean-data.properties -@@ -4,6 +4,7 @@ +@@ -4,7 +4,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ diff --git a/distribution/config/commands/connect.properties b/distribution/config/commands/connect.properties --- a/distribution/config/commands/connect.properties +++ b/distribution/config/commands/connect.properties -@@ -10,6 +10,7 @@ +@@ -10,7 +10,7 @@ org.apache.commons.logging=${commons-logging.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version} + summary = persistently connect to storage diff --git a/distribution/config/commands/gui.properties b/distribution/config/commands/gui.properties --- a/distribution/config/commands/gui.properties +++ b/distribution/config/commands/gui.properties @@ -73,70 +77,85 @@ diff --git a/distribution/config/commands/gui.properties b/distribution/config/c com.redhat.thermostat.process=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ -+ org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - org.jboss.netty=${netty.version} ++ org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ + org.jboss.netty=${netty.version}, \ -+ org.jfree.jcommon=${jcommon.osgi.version} , \ -+ org.jfree.jfreechart=${jfreechart.osgi.version} ++ org.jfree.jcommon=${jcommon.osgi.version}, \ ++ org.jfree.jfreechart=${jfreechart.osgi.version}, \ ++ com.mxgraph=${jgraphx.osgi.version} - description = launches the GUI client + summary = launch the GUI client diff --git a/distribution/config/commands/list-agents.properties b/distribution/config/commands/list-agents.properties --- a/distribution/config/commands/list-agents.properties +++ b/distribution/config/commands/list-agents.properties -@@ -4,6 +4,7 @@ +@@ -4,7 +4,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ diff --git a/distribution/config/commands/list-vms.properties b/distribution/config/commands/list-vms.properties --- a/distribution/config/commands/list-vms.properties +++ b/distribution/config/commands/list-vms.properties -@@ -4,6 +4,7 @@ +@@ -4,7 +4,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ diff --git a/distribution/config/commands/ping.properties b/distribution/config/commands/ping.properties --- a/distribution/config/commands/ping.properties +++ b/distribution/config/commands/ping.properties -@@ -5,6 +5,7 @@ +@@ -5,7 +5,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ diff --git a/distribution/config/commands/vm-info.properties b/distribution/config/commands/vm-info.properties --- a/distribution/config/commands/vm-info.properties +++ b/distribution/config/commands/vm-info.properties -@@ -4,6 +4,7 @@ +@@ -4,7 +4,7 @@ com.redhat.thermostat.web.client=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ diff --git a/distribution/config/commands/vm-stat.properties b/distribution/config/commands/vm-stat.properties --- a/distribution/config/commands/vm-stat.properties +++ b/distribution/config/commands/vm-stat.properties -@@ -5,6 +5,7 @@ +@@ -5,13 +5,15 @@ com.redhat.thermostat.client.core=${project.version}, \ org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ +- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ + org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ - ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ com.google.gson=${gson.version}, \ org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ + org.apache.commons.beanutils=${commons-beanutils.version}, \ + org.apache.commons.codec=${commons-codec.osgi-version}, \ + org.apache.commons.collections=${commons-collections.version}, \ +- org.apache.commons.logging=${commons-logging.version} ++ org.apache.commons.logging=${commons-logging.version}, \ ++ org.jfree.jcommon=${jcommon.osgi.version}, \ ++ org.jfree.jfreechart=${jfreechart.osgi.version} + + summary = show various statistics about a VM + diff --git a/distribution/config/osgi-export.properties b/distribution/config/osgi-export.properties --- a/distribution/config/osgi-export.properties +++ b/distribution/config/osgi-export.properties @@ -191,17 +210,34 @@ diff --git a/distribution/scripts/thermostat b/distribution/scripts/thermostat # Needed to parse web.xml files without network connection See PR 2029. SERVICE_CLASSPATH="${SERVICE_CLASSPATH}:${THERMOSTAT_HOME}/plugins/embedded-web-endpoint/jetty-schemas-@jetty-schemas.version@.jar" SERVICE_CLASSPATH="${TOOLS_JAR}:${SERVICE_CLASSPATH}" +diff --git a/distribution/scripts/thermostat-command-channel b/distribution/scripts/thermostat-command-channel +--- a/distribution/scripts/thermostat-command-channel ++++ b/distribution/scripts/thermostat-command-channel +@@ -60,7 +60,7 @@ + BOOT_CLASSPATH="${BOOT_CLASSPATH}:${THERMOSTAT_LIBS}/thermostat-agent-command-@project.version@.jar" + BOOT_CLASSPATH="${BOOT_CLASSPATH}:${THERMOSTAT_LIBS}/thermostat-common-command-@project.version@.jar" + BOOT_CLASSPATH="${BOOT_CLASSPATH}:${THERMOSTAT_LIBS}/thermostat-agent-command-server-@project.version@.jar" +-BOOT_CLASSPATH="${BOOT_CLASSPATH}:${THERMOSTAT_LIBS}/netty-@netty.version@.jar" ++BOOT_CLASSPATH="${BOOT_CLASSPATH}:${THERMOSTAT_LIBS}/netty.jar" + BOOT_CLASSPATH="${TOOLS_JAR}:${BOOT_CLASSPATH}" + + # Duplicated in ThermostatVmMainLabelDecorator diff --git a/killvm/distribution/thermostat-plugin.xml b/killvm/distribution/thermostat-plugin.xml --- a/killvm/distribution/thermostat-plugin.xml +++ b/killvm/distribution/thermostat-plugin.xml -@@ -80,6 +80,7 @@ +@@ -81,9 +81,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} ++ org.jfree.jcommon${jcommon.osgi.version} ++ org.jfree.jfreechart${jfreechart.osgi.version} + + + diff --git a/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties b/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties --- a/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties +++ b/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbundles.properties @@ -214,11 +250,26 @@ diff --git a/main/src/main/resources/com/redhat/thermostat/main/impl/bootstrapbu + jline2.jar, \ + jansi.jar, \ + commons-cli.jar +diff --git a/setup/distribution/thermostat-plugin.xml b/setup/distribution/thermostat-plugin.xml +--- a/setup/distribution/thermostat-plugin.xml ++++ b/setup/distribution/thermostat-plugin.xml +@@ -71,6 +71,8 @@ + com.redhat.thermostat.internal.utils.laf${project.version} + com.redhat.thermostat.plugin.validator${project.version} + com.redhat.thermostat.process${project.version} ++ org.jfree.jcommon${jcommon.osgi.version} ++ org.jfree.jfreechart${jfreechart.osgi.version} + + + diff --git a/storage-profile/distribution/thermostat-plugin.xml b/storage-profile/distribution/thermostat-plugin.xml --- a/storage-profile/distribution/thermostat-plugin.xml +++ b/storage-profile/distribution/thermostat-plugin.xml -@@ -68,6 +68,7 @@ - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} +@@ -70,9 +70,9 @@ + com.redhat.thermostat.storage.mongodb${project.version} + com.redhat.thermostat.web.common${project.version} + com.redhat.thermostat.web.client${project.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} @@ -228,127 +279,149 @@ diff --git a/storage-profile/distribution/thermostat-plugin.xml b/storage-profil diff --git a/vm-gc/distribution/thermostat-plugin.xml b/vm-gc/distribution/thermostat-plugin.xml --- a/vm-gc/distribution/thermostat-plugin.xml +++ b/vm-gc/distribution/thermostat-plugin.xml -@@ -74,6 +74,7 @@ +@@ -76,9 +76,12 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} ++ ++ org.jfree.jcommon${jcommon.osgi.version} ++ org.jfree.jfreechart${jfreechart.osgi.version} + + + +@@ -122,9 +125,12 @@ + org.apache.commons.logging${commons-logging.version} + org.apache.httpcomponents.httpcore${httpcomponents.core.version} + org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} ++ org.apache.httpcomponents.httpmime${httpcomponents.mime.version} + com.google.gson${gson.version} + org.jboss.netty${netty.version} ++ ++ org.jfree.jcommon${jcommon.osgi.version} ++ org.jfree.jfreechart${jfreechart.osgi.version} + + + diff --git a/vm-heap-analysis/distribution/thermostat-plugin.xml b/vm-heap-analysis/distribution/thermostat-plugin.xml --- a/vm-heap-analysis/distribution/thermostat-plugin.xml +++ b/vm-heap-analysis/distribution/thermostat-plugin.xml -@@ -86,9 +86,12 @@ +@@ -87,9 +87,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} -@@ -142,9 +145,12 @@ +@@ -144,9 +146,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} -@@ -201,9 +207,12 @@ +@@ -204,9 +208,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} -@@ -254,9 +263,12 @@ +@@ -258,9 +264,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} -@@ -307,9 +319,12 @@ +@@ -312,9 +320,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} -@@ -360,9 +375,12 @@ +@@ -366,9 +376,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} -@@ -406,9 +424,12 @@ +@@ -414,9 +426,11 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} org.jboss.netty${netty.version} + org.jfree.jcommon${jcommon.osgi.version} + org.jfree.jfreechart${jfreechart.osgi.version} - org.apache.servicemix.bundles.lucene${lucene.osgi-version} - org.apache.servicemix.bundles.lucene-analyzers-common${lucene.osgi-version} + ${lucene-core.bundle.symbolic-name}${lucene.osgi-version} + ${lucene-analysis.bundle.symbolic-name}${lucene.osgi-version} diff --git a/vm-profiler/distribution/thermostat-plugin.xml b/vm-profiler/distribution/thermostat-plugin.xml --- a/vm-profiler/distribution/thermostat-plugin.xml +++ b/vm-profiler/distribution/thermostat-plugin.xml -@@ -94,6 +94,7 @@ +@@ -95,7 +95,7 @@ org.apache.commons.logging${commons-logging.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + diff --git a/web/endpoint-plugin/distribution/thermostat-plugin.xml b/web/endpoint-plugin/distribution/thermostat-plugin.xml --- a/web/endpoint-plugin/distribution/thermostat-plugin.xml +++ b/web/endpoint-plugin/distribution/thermostat-plugin.xml -@@ -68,6 +68,7 @@ +@@ -73,7 +73,7 @@ com.redhat.thermostat.web.client${project.version} org.apache.httpcomponents.httpcore${httpcomponents.core.version} org.apache.httpcomponents.httpclient${httpcomponents.client.version} +- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} + org.apache.httpcomponents.httpmime${httpcomponents.mime.version} - ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} com.google.gson${gson.version} com.redhat.thermostat.process${project.version} + com.redhat.thermostat.agent.cli${project.version} diff --git a/SOURCES/fix_lucene_symbolic_name.patch b/SOURCES/fix_lucene_symbolic_name.patch deleted file mode 100644 index 5d770a8..0000000 --- a/SOURCES/fix_lucene_symbolic_name.patch +++ /dev/null @@ -1,120 +0,0 @@ -# HG changeset patch -# Parent 87052247afc2111919d290cb94eabefd83979263 -diff --git a/pom.xml b/pom.xml ---- a/pom.xml -+++ b/pom.xml -@@ -238,8 +238,10 @@ - 1.2.2 - - 2.9 -- 4.7.0_1 -- 4.7.0.1 -+ 4.8.0_1 -+ 4.8.0.1 -+ org.apache.lucene.analysis -+ org.apache.lucene.core - - 4.3.1 -- 4.3.1 -- 4.3.1.201210102024 -- osgi.cmpn - 4.2.0 ++ 4.2.0 + 4.3.1 + 4.3.1.201210102024 + osgi.cmpn +- 4.2.0 3.2.4.Final -@@ -630,17 +639,7 @@ + 4.3.2 +@@ -550,12 +562,7 @@ tools ${jdktools.version} @@ -678,15 +672,10 @@ diff --git a/pom.xml b/pom.xml - org.osgi.core - ${osgi.core.version} - -- -- org.osgi -- org.osgi.compendium -- ${osgi.compendium.version} -- -+ ++ - org.apache.felix - org.apache.felix.framework + org.osgi + org.osgi.compendium diff --git a/storage/cli/pom.xml b/storage/cli/pom.xml --- a/storage/cli/pom.xml +++ b/storage/cli/pom.xml @@ -779,7 +768,7 @@ diff --git a/thread/client-swing/pom.xml b/thread/client-swing/pom.xml + org.apache.felix + org.apache.felix.framework - + diff --git a/thread/collector/pom.xml b/thread/collector/pom.xml --- a/thread/collector/pom.xml @@ -804,7 +793,7 @@ diff --git a/thread/collector/pom.xml b/thread/collector/pom.xml diff --git a/thread/harvester/pom.xml b/thread/harvester/pom.xml --- a/thread/harvester/pom.xml +++ b/thread/harvester/pom.xml -@@ -68,14 +68,8 @@ +@@ -74,14 +74,8 @@ @@ -844,7 +833,7 @@ diff --git a/unix-process-handler/pom.xml b/unix-process-handler/pom.xml diff --git a/vm-classstat/agent/pom.xml b/vm-classstat/agent/pom.xml --- a/vm-classstat/agent/pom.xml +++ b/vm-classstat/agent/pom.xml -@@ -80,13 +80,8 @@ +@@ -80,14 +80,8 @@ test @@ -855,11 +844,12 @@ diff --git a/vm-classstat/agent/pom.xml b/vm-classstat/agent/pom.xml - - org.osgi - org.osgi.compendium +- provided + org.apache.felix + org.apache.felix.framework - provided + com.redhat.thermostat diff --git a/vm-classstat/client-core/pom.xml b/vm-classstat/client-core/pom.xml --- a/vm-classstat/client-core/pom.xml +++ b/vm-classstat/client-core/pom.xml @@ -1083,23 +1073,25 @@ diff --git a/vm-gc/client-swing/pom.xml b/vm-gc/client-swing/pom.xml diff --git a/vm-gc/command/pom.xml b/vm-gc/command/pom.xml --- a/vm-gc/command/pom.xml +++ b/vm-gc/command/pom.xml -@@ -67,14 +67,8 @@ +@@ -67,15 +67,10 @@ ${project.version} - org.osgi - org.osgi.core - provided -- ++ org.apache.felix ++ org.apache.felix.framework + - - org.osgi - org.osgi.compendium - provided -+ org.apache.felix -+ org.apache.felix.framework - +- ++ com.redhat.thermostat + thermostat-common-test diff --git a/vm-gc/common/pom.xml b/vm-gc/common/pom.xml --- a/vm-gc/common/pom.xml +++ b/vm-gc/common/pom.xml @@ -1223,7 +1215,7 @@ diff --git a/vm-heap-analysis/agent/pom.xml b/vm-heap-analysis/agent/pom.xml diff --git a/vm-heap-analysis/client-core/pom.xml b/vm-heap-analysis/client-core/pom.xml --- a/vm-heap-analysis/client-core/pom.xml +++ b/vm-heap-analysis/client-core/pom.xml -@@ -94,14 +94,9 @@ +@@ -94,14 +94,8 @@ test @@ -1236,8 +1228,7 @@ diff --git a/vm-heap-analysis/client-core/pom.xml b/vm-heap-analysis/client-core - org.osgi.compendium - provided + org.apache.felix -+ org.apache.felix.framework -+ ++ org.apache.felix.framework @@ -1564,7 +1555,7 @@ diff --git a/vm-profiler/client-cli/pom.xml b/vm-profiler/client-cli/pom.xml diff --git a/vm-profiler/client-core/pom.xml b/vm-profiler/client-core/pom.xml --- a/vm-profiler/client-core/pom.xml +++ b/vm-profiler/client-core/pom.xml -@@ -99,14 +99,8 @@ +@@ -98,14 +98,8 @@ test @@ -1604,7 +1595,7 @@ diff --git a/vm-profiler/client-swing/pom.xml b/vm-profiler/client-swing/pom.xml diff --git a/vm-profiler/common/pom.xml b/vm-profiler/common/pom.xml --- a/vm-profiler/common/pom.xml +++ b/vm-profiler/common/pom.xml -@@ -99,14 +99,8 @@ +@@ -98,14 +98,8 @@ test @@ -1636,19 +1627,17 @@ diff --git a/web/client/pom.xml b/web/client/pom.xml -@@ -93,12 +92,6 @@ - httpclient-osgi - ${httpcomponents.client.version} - -- -- +@@ -96,10 +95,6 @@ + + - org.osgi - org.osgi.compendium - - +- org.apache.httpcomponents httpcore-osgi + ${httpcomponents.core.version} diff --git a/web/endpoint-plugin/web-service/pom.xml b/web/endpoint-plugin/web-service/pom.xml --- a/web/endpoint-plugin/web-service/pom.xml +++ b/web/endpoint-plugin/web-service/pom.xml @@ -1679,238 +1668,3 @@ diff --git a/web/server/pom.xml b/web/server/pom.xml -diff --git a/distribution/assembly/core-assembly.xml b/distribution/assembly/core-assembly.xml ---- a/distribution/assembly/core-assembly.xml -+++ b/distribution/assembly/core-assembly.xml -@@ -69,7 +69,6 @@ - com.redhat.thermostat:thermostat-web-client - com.redhat.thermostat:thermostat-system-backend - com.redhat.thermostat:thermostat-laf-utils -- org.osgi:org.osgi.compendium - - - org.osgi:org.osgi.core -diff --git a/distribution/config/commands/agent-info.properties b/distribution/config/commands/agent-info.properties ---- a/distribution/config/commands/agent-info.properties -+++ b/distribution/config/commands/agent-info.properties -@@ -5,7 +5,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/distribution/config/commands/agent.properties b/distribution/config/commands/agent.properties ---- a/distribution/config/commands/agent.properties -+++ b/distribution/config/commands/agent.properties -@@ -4,7 +4,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - com.redhat.thermostat.process=${project.version}, \ - com.redhat.thermostat.common.core=${project.version}, \ -diff --git a/distribution/config/commands/clean-data.properties b/distribution/config/commands/clean-data.properties ---- a/distribution/config/commands/clean-data.properties -+++ b/distribution/config/commands/clean-data.properties -@@ -5,7 +5,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/distribution/config/commands/connect.properties b/distribution/config/commands/connect.properties ---- a/distribution/config/commands/connect.properties -+++ b/distribution/config/commands/connect.properties -@@ -11,7 +11,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version} - - description = persistently connect to storage -diff --git a/distribution/config/commands/gui.properties b/distribution/config/commands/gui.properties ---- a/distribution/config/commands/gui.properties -+++ b/distribution/config/commands/gui.properties -@@ -20,7 +20,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - org.jboss.netty=${netty.version}, \ - org.jfree.jcommon=${jcommon.osgi.version} , \ - org.jfree.jfreechart=${jfreechart.osgi.version} -diff --git a/distribution/config/commands/list-agents.properties b/distribution/config/commands/list-agents.properties ---- a/distribution/config/commands/list-agents.properties -+++ b/distribution/config/commands/list-agents.properties -@@ -5,7 +5,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/distribution/config/commands/list-vms.properties b/distribution/config/commands/list-vms.properties ---- a/distribution/config/commands/list-vms.properties -+++ b/distribution/config/commands/list-vms.properties -@@ -5,7 +5,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/distribution/config/commands/ping.properties b/distribution/config/commands/ping.properties ---- a/distribution/config/commands/ping.properties -+++ b/distribution/config/commands/ping.properties -@@ -6,7 +6,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/distribution/config/commands/vm-info.properties b/distribution/config/commands/vm-info.properties ---- a/distribution/config/commands/vm-info.properties -+++ b/distribution/config/commands/vm-info.properties -@@ -5,7 +5,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/distribution/config/commands/vm-stat.properties b/distribution/config/commands/vm-stat.properties ---- a/distribution/config/commands/vm-stat.properties -+++ b/distribution/config/commands/vm-stat.properties -@@ -6,7 +6,6 @@ - org.apache.httpcomponents.httpcore=${httpcomponents.core.version}, \ - org.apache.httpcomponents.httpclient=${httpcomponents.client.version}, \ - org.apache.httpcomponents.httpmime=${httpcomponents.mime.version}, \ -- ${osgi.compendium.bundle.symbolic-name}=${osgi.compendium.osgi-version}, \ - com.google.gson=${gson.version}, \ - org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ - org.apache.commons.beanutils=${commons-beanutils.version}, \ -diff --git a/killvm/distribution/thermostat-plugin.xml b/killvm/distribution/thermostat-plugin.xml ---- a/killvm/distribution/thermostat-plugin.xml -+++ b/killvm/distribution/thermostat-plugin.xml -@@ -81,7 +81,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - -diff --git a/storage-profile/distribution/thermostat-plugin.xml b/storage-profile/distribution/thermostat-plugin.xml ---- a/storage-profile/distribution/thermostat-plugin.xml -+++ b/storage-profile/distribution/thermostat-plugin.xml -@@ -65,7 +65,6 @@ - com.redhat.thermostat.storage.mongodb${project.version} - com.redhat.thermostat.web.common${project.version} - com.redhat.thermostat.web.client${project.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -diff --git a/vm-gc/distribution/thermostat-plugin.xml b/vm-gc/distribution/thermostat-plugin.xml ---- a/vm-gc/distribution/thermostat-plugin.xml -+++ b/vm-gc/distribution/thermostat-plugin.xml -@@ -75,7 +75,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - -diff --git a/vm-heap-analysis/distribution/thermostat-plugin.xml b/vm-heap-analysis/distribution/thermostat-plugin.xml ---- a/vm-heap-analysis/distribution/thermostat-plugin.xml -+++ b/vm-heap-analysis/distribution/thermostat-plugin.xml -@@ -87,7 +87,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -@@ -146,7 +145,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -@@ -208,7 +206,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -@@ -264,7 +261,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -@@ -320,7 +316,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -@@ -376,7 +371,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -@@ -425,7 +419,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - org.jboss.netty${netty.version} - org.jfree.jcommon${jcommon.osgi.version} -diff --git a/vm-profiler/distribution/thermostat-plugin.xml b/vm-profiler/distribution/thermostat-plugin.xml ---- a/vm-profiler/distribution/thermostat-plugin.xml -+++ b/vm-profiler/distribution/thermostat-plugin.xml -@@ -95,7 +95,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - - - -diff --git a/web/endpoint-plugin/distribution/thermostat-plugin.xml b/web/endpoint-plugin/distribution/thermostat-plugin.xml ---- a/web/endpoint-plugin/distribution/thermostat-plugin.xml -+++ b/web/endpoint-plugin/distribution/thermostat-plugin.xml -@@ -69,7 +69,6 @@ - org.apache.httpcomponents.httpcore${httpcomponents.core.version} - org.apache.httpcomponents.httpclient${httpcomponents.client.version} - org.apache.httpcomponents.httpmime${httpcomponents.mime.version} -- ${osgi.compendium.bundle.symbolic-name}${osgi.compendium.osgi-version} - com.google.gson${gson.version} - com.redhat.thermostat.process${project.version} - com.redhat.thermostat.agent.cli${project.version} diff --git a/SOURCES/remove_adduser_command.patch b/SOURCES/remove_adduser_command.patch deleted file mode 100644 index a211c75..0000000 --- a/SOURCES/remove_adduser_command.patch +++ /dev/null @@ -1,1001 +0,0 @@ -# HG changeset patch -# Parent 580b6482ef65a0e0b5a45f2923aecd75e838dcd3 -diff --git a/distribution/config/commands/add-mongodb-user.properties b/distribution/config/commands/add-mongodb-user.properties -deleted file mode 100644 ---- a/distribution/config/commands/add-mongodb-user.properties -+++ /dev/null -@@ -1,23 +0,0 @@ --bundles = com.redhat.thermostat.storage.mongodb=${project.version}, \ -- org.mongodb.mongo-java-driver=${mongo-driver.osgi-version}, \ -- org.apache.commons.beanutils=${commons-beanutils.version}, \ -- org.apache.commons.codec=${commons-codec.osgi-version}, \ -- org.apache.commons.collections=${commons-collections.version}, \ -- org.apache.commons.logging=${commons-logging.version} -- --description = adds a new mongodb user to the thermostat DB, reading credentials \ -- from standard input -- --usage = add-mongodb-user -d |\ -- add-mongodb-user -s -- --options = AUTO_LOG_OPTION, AUTO_DB_OPTIONS, startStorage -- --startStorage.short = s --startStorage.long = startStorage --startStorage.description = start storage with appropriate options before \ -- running the command and stop the storage when the command finishes --startStorage.required = false --startStorage.hasarg = false -- --environments = cli -diff --git a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/Activator.java b/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/Activator.java ---- a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/Activator.java -+++ b/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/Activator.java -@@ -40,8 +40,6 @@ - import org.osgi.framework.BundleContext; - import org.osgi.framework.ServiceRegistration; - --import com.redhat.thermostat.common.cli.CommandRegistry; --import com.redhat.thermostat.common.cli.CommandRegistryImpl; - import com.redhat.thermostat.storage.core.StorageProvider; - import com.redhat.thermostat.storage.mongodb.MongoStorageProvider; - -@@ -49,20 +47,16 @@ - - @SuppressWarnings("rawtypes") - private ServiceRegistration reg; -- private CommandRegistry cmdReg; - - @Override - public void start(BundleContext context) throws Exception { - StorageProvider prov = new MongoStorageProvider(); - reg = context.registerService(StorageProvider.class.getName(), prov, null); -- cmdReg = new CommandRegistryImpl(context); -- cmdReg.registerCommand(AddUserCommandDispatcher.COMMAND_NAME, new AddUserCommandDispatcher(context)); - } - - @Override - public void stop(BundleContext context) throws Exception { - reg.unregister(); -- cmdReg.unregisterCommands(); - } - - } -diff --git a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommand.java b/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommand.java -deleted file mode 100644 ---- a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommand.java -+++ /dev/null -@@ -1,198 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import java.io.File; --import java.io.IOException; --import java.lang.reflect.Field; --import java.util.Arrays; --import java.util.Objects; -- --import org.osgi.framework.BundleContext; --import org.osgi.framework.ServiceReference; --import org.osgi.framework.ServiceRegistration; -- --import com.redhat.thermostat.common.cli.CommandContext; --import com.redhat.thermostat.common.cli.CommandException; --import com.redhat.thermostat.common.tools.StorageAuthInfoGetter; --import com.redhat.thermostat.shared.config.CommonPaths; --import com.redhat.thermostat.shared.locale.LocalizedString; --import com.redhat.thermostat.shared.locale.Translate; --import com.redhat.thermostat.storage.core.DbService; --import com.redhat.thermostat.storage.core.DbServiceFactory; --import com.redhat.thermostat.storage.core.QueuedStorage; --import com.redhat.thermostat.storage.core.Storage; --import com.redhat.thermostat.storage.core.StorageCredentials; -- --/** -- * This command needs to be in the mongodb storage bundle since it -- * uses MongoStorage directly (casts to it). -- * -- */ --public class AddUserCommand extends BaseAddUserCommand { -- -- private static final Translate t = LocaleResources.createLocalizer(); -- static final String DB_URL_ARG = "dbUrl"; -- private final BundleContext context; -- private final StorageCredentials emptyCredentials; -- -- AddUserCommand(BundleContext context) { -- this.context = context; -- // These are empty credentials we'll use for the initial connect. We -- // connect with them when the local host exception is turned off. -- emptyCredentials = new StorageCredentials() { -- -- @Override -- public String getUsername() { -- return null; -- } -- -- @Override -- public char[] getPassword() { -- return null; -- } -- }; -- } -- -- // PRE: storage started with --permitLocalHostException. -- // FIXME: Is there anything we can do to ensure this precondition? -- @Override -- public void run(CommandContext ctx) throws CommandException { -- // Check if mongodb stamp file exists. -- ServiceReference commonPathRef = context.getServiceReference(CommonPaths.class.getName()); -- requireNonNull(commonPathRef, t.localize(LocaleResources.COMMON_PATHS_SERVICE_UNAVAILABLE)); -- CommonPaths commonPath = (CommonPaths)context.getService(commonPathRef); -- File dataDir = commonPath.getUserPersistentDataDirectory(); -- // Since this is backing storage specific, it's most likely not a good -- // candidate for CommonPaths -- File mongodbSetupStamp = new File(dataDir, BaseAddUserCommand.MONGODB_STAMP_FILE_NAME); -- if (mongodbSetupStamp.exists()) { -- String msg = t.localize(LocaleResources.MONGODB_SETUP_FILE_EXISTS, -- mongodbSetupStamp.getAbsolutePath()).getContents(); -- ctx.getConsole().getOutput().println(msg); -- return; -- } -- -- ServiceReference dbServiceRef = context.getServiceReference(DbService.class); -- if (dbServiceRef != null) { -- // Already connected, bail out -- throw new CommandException(t.localize(LocaleResources.ALREADY_CONNECTED_TO_STORAGE_WARNING)); -- } -- String dbUrl = ctx.getArguments().getArgument(DB_URL_ARG); -- // dbUrl is a required argument. This should never happen -- Objects.requireNonNull(dbUrl); -- // we only understand "mongodb://" URLs -- if (!dbUrl.startsWith("mongodb://")) { -- throw new CommandException(t.localize(LocaleResources.UNKNOWN_STORAGE_URL)); -- } -- -- // Register empty credentials so that connection succeeds -- ServiceRegistration reg = context.registerService(StorageCredentials.class.getName(), emptyCredentials, null); -- DbServiceFactory factory = new DbServiceFactory(); -- DbService service = factory.createDbService(dbUrl); -- // this synchronously connects to storage -- service.connect(); -- // Unregister empty credentials -- reg.unregister(); -- -- ServiceReference storageRef = context.getServiceReference(Storage.class.getName()); -- requireNonNull(storageRef, t.localize(LocaleResources.STORAGE_SERVICE_UNAVAILABLE)); -- @SuppressWarnings("unchecked") -- // FIXME: Hack alarm. We use knowledge that via MongoStorageProvider we -- // have a MongoStorage instance wrapped in QueuedStorage. What's -- // more, we use the "delegate" field name in order to get at the -- // MongoStorage instance, which we cast to. I'm not sure if adding -- // method in BackingStorage (the interface) directly would be -- // any better than this. After all, this is very backing storage -- // impl specific. For now do this hack :-/ -- QueuedStorage storage = (QueuedStorage)context.getService(storageRef); -- MongoStorage mongoStorage = getDelegate(storage); -- requireNonNull(mongoStorage, t.localize(LocaleResources.MONGOSTORAGE_RETRIEVAL_FAILED)); -- StorageAuthInfoGetter getter = null; -- try { -- LocalizedString userPrompt = new LocalizedString("Please enter the username you'd like to add to mongodb storage at " + dbUrl + ": "); -- LocalizedString passWordPrompt = new LocalizedString("Please enter the desired password of this user: "); -- getter = new StorageAuthInfoGetter(ctx.getConsole(), userPrompt, passWordPrompt); -- } catch (IOException e) { -- throw new CommandException(t.localize(LocaleResources.ADDING_USER_FAILED)); -- } -- ConsoleStorageCredentials creds = new ConsoleStorageCredentials(getter); -- addUser(mongoStorage, creds); -- -- // create the STAMP file -- try { -- mongodbSetupStamp.createNewFile(); -- } catch (IOException e) { -- String msg = t.localize(LocaleResources.STAMP_FILE_CREATION_FAILED, -- mongodbSetupStamp.getAbsolutePath()).getContents(); -- ctx.getConsole().getError().println(msg); -- throw new CommandException(new LocalizedString(msg)); -- } -- -- String msg = t.localize(LocaleResources.MONGODB_USER_SETUP_COMPLETE).getContents(); -- ctx.getConsole().getOutput().println(msg); -- } -- -- // package-private for testing -- void addUser(MongoStorage mongoStorage, StorageCredentials creds) { -- // It's important that getUsername is called prior getPassword. -- // otherwise prompts don't make much sense. -- String username = creds.getUsername(); -- char[] pwd = creds.getPassword(); -- mongoStorage.addUser(username, pwd); -- // zero out password. We no longer use it. -- Arrays.fill(pwd, '\0'); -- } -- -- // package-private for testing -- MongoStorage getDelegate(QueuedStorage storage) { -- try { -- Field field = storage.getClass().getDeclaredField("delegate"); -- field.setAccessible(true); -- MongoStorage mongo = (MongoStorage)field.get(storage); -- return mongo; -- } catch (Exception e) { -- return null; -- } -- } -- -- @Override -- public boolean isStorageRequired() { -- return false; -- } -- --} -diff --git a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandDispatcher.java b/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandDispatcher.java -deleted file mode 100644 ---- a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandDispatcher.java -+++ /dev/null -@@ -1,78 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import org.osgi.framework.BundleContext; -- --import com.redhat.thermostat.common.cli.CommandContext; --import com.redhat.thermostat.common.cli.CommandException; --import com.redhat.thermostat.shared.locale.Translate; -- --/** -- * Dispatcher making sure either -d or -s has been provided. -- * -- */ --class AddUserCommandDispatcher extends BaseAddUserCommand { -- -- private static final Translate t = LocaleResources.createLocalizer(); -- private static final String START_STORAGE_ARG = "startStorage"; -- private static final String DB_URL_ARG = "dbUrl"; -- static final String COMMAND_NAME = "add-mongodb-user"; -- private final BundleContext context; -- private BaseAddUserCommand command; -- -- AddUserCommandDispatcher(BundleContext context, BaseAddUserCommand cmd) { -- this.context = context; -- this.command = cmd; -- } -- -- AddUserCommandDispatcher(BundleContext context) { -- this(context, new AddUserCommand(context)); -- } -- -- @Override -- public void run(CommandContext ctx) throws CommandException { -- if (ctx.getArguments().hasArgument(START_STORAGE_ARG)) { -- // decorate and run -- command = new StartStopAddUserCommandDecorator(context, command); -- } else if (!ctx.getArguments().hasArgument(DB_URL_ARG)) { -- throw new CommandException(t.localize(LocaleResources.DISPATCHER_WRONG_OPTION)); -- } -- command.run(ctx); -- } -- --} -diff --git a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/BaseAddUserCommand.java b/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/BaseAddUserCommand.java -deleted file mode 100644 ---- a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/BaseAddUserCommand.java -+++ /dev/null -@@ -1,62 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import com.redhat.thermostat.common.cli.AbstractCommand; --import com.redhat.thermostat.common.cli.CommandContext; --import com.redhat.thermostat.common.cli.CommandException; -- --/** -- * -- * Base class for user setup decorators. -- * -- * @see AddUserCommand -- * @see StartStopAddUserCommandDecorator -- * -- */ --abstract class BaseAddUserCommand extends AbstractCommand { -- -- static final String MONGODB_STAMP_FILE_NAME = "mongodb-user-done.stamp"; -- -- @Override -- abstract public void run(CommandContext ctx) throws CommandException; -- -- @Override -- public boolean isStorageRequired() { -- return false; -- } --} -diff --git a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/StartStopAddUserCommandDecorator.java b/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/StartStopAddUserCommandDecorator.java -deleted file mode 100644 ---- a/storage/mongo/src/main/java/com/redhat/thermostat/storage/mongodb/internal/StartStopAddUserCommandDecorator.java -+++ /dev/null -@@ -1,268 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import java.io.File; --import java.util.ArrayList; --import java.util.Collections; --import java.util.List; --import java.util.concurrent.CountDownLatch; -- --import org.osgi.framework.BundleContext; --import org.osgi.framework.ServiceReference; -- --import com.redhat.thermostat.common.ActionEvent; --import com.redhat.thermostat.common.ActionListener; --import com.redhat.thermostat.common.cli.AbstractStateNotifyingCommand; --import com.redhat.thermostat.common.cli.Arguments; --import com.redhat.thermostat.common.cli.CommandContext; --import com.redhat.thermostat.common.cli.CommandContextFactory; --import com.redhat.thermostat.common.cli.CommandException; --import com.redhat.thermostat.common.tools.ApplicationState; --import com.redhat.thermostat.launcher.Launcher; --import com.redhat.thermostat.shared.config.CommonPaths; --import com.redhat.thermostat.shared.locale.Translate; -- --/* -- * A command which adds a mongdb user by using AddUserCommand. It has been -- * introduced in order to aid boot-strapping of thermostat deployments. In order -- * to set up a user in mongodb, storage needs to be started with the -- * --permitLocalhostException option first. Then the credentials need to be -- * injected and storage stopped again. This command performs all three -- * required steps. -- */ --public class StartStopAddUserCommandDecorator extends BaseAddUserCommand { -- -- public static final String COMMAND_NAME = "admin-mongodb-creds-setup"; -- private static final Translate t = LocaleResources.createLocalizer(); -- private final BundleContext context; -- private final List> listeners; -- private final CountDownLatch setupFinishedBarrier; -- private final BaseAddUserCommand decoratee; -- private boolean setupSuccessful; -- private Launcher launcher; -- private CommandContext cmdCtx; -- -- StartStopAddUserCommandDecorator(BundleContext context, BaseAddUserCommand command) { -- this.context = context; -- this.listeners = new ArrayList<>(1); -- this.setupFinishedBarrier = new CountDownLatch(1); -- this.setupSuccessful = true; -- this.decoratee = command; -- } -- -- @Override -- public void run(CommandContext ctx) throws CommandException { -- cmdCtx = ctx; -- if (!stampFileExists()) { -- startStorageAndRunDecoratee(); -- stopStorage(); -- } -- // if stamp file exists, there is nothing to do. -- String msg; -- if (setupSuccessful) { -- msg = t.localize(LocaleResources.USER_SETUP_COMPLETE).getContents(); -- cmdCtx.getConsole().getOutput().println(msg); -- } else { -- msg = t.localize(LocaleResources.USER_SETUP_FAILED).getContents(); -- cmdCtx.getConsole().getOutput().println(msg); -- } -- } -- -- private void stopStorage() throws CommandException { -- listeners.clear(); -- CountDownLatch storageStoppedlatch = new CountDownLatch(1); -- StorageStoppedListener listener = new StorageStoppedListener(storageStoppedlatch); -- String[] storageStopArgs = new String[] { -- "storage", "--stop" -- }; -- listeners.add(listener); -- launcher.run(storageStopArgs, listeners, false); -- try { -- storageStoppedlatch.await(); -- } catch (InterruptedException e) { -- setupSuccessful = false; -- throw new CommandException(t.localize(LocaleResources.INTERRUPTED_WAITING_FOR_STORAGE_STOP), e); -- } -- if (!listener.storageStopPassed) { -- setupSuccessful = false; -- String msg = t.localize(LocaleResources.STORAGE_STOP_FAILED).getContents(); -- cmdCtx.getConsole().getError().println(msg); -- } -- } -- -- private void startStorageAndRunDecoratee() throws CommandException { -- ServiceReference launcherRef = context.getServiceReference(Launcher.class); -- if (launcherRef == null) { -- throw new CommandException(t.localize(LocaleResources.LAUNCHER_SERVICE_UNAVAILABLE)); -- } -- launcher = (Launcher) context.getService(launcherRef); -- StorageStartedListener listener = new StorageStartedListener(); -- listeners.add(listener); -- String[] storageStartArgs = new String[] { "storage", "--start", "--permitLocalhostException"}; -- launcher.run(storageStartArgs, listeners, false); -- try { -- setupFinishedBarrier.await(); -- } catch (InterruptedException e) { -- e.printStackTrace(); -- } -- } -- -- private boolean stampFileExists() throws CommandException { -- ServiceReference commonPathRef = context.getServiceReference(CommonPaths.class.getName()); -- if (commonPathRef == null) { -- throw new CommandException(t.localize(LocaleResources.COMMON_PATHS_SERVICE_UNAVAILABLE)); -- } -- CommonPaths commonPath = (CommonPaths)context.getService(commonPathRef); -- File dataDir = commonPath.getUserPersistentDataDirectory(); -- // Since this is backing storage specific, it's most likely not a good -- // candidate for CommonPaths -- File mongodbSetupStamp = new File(dataDir, BaseAddUserCommand.MONGODB_STAMP_FILE_NAME); -- if (mongodbSetupStamp.exists()) { -- String msg = t.localize(LocaleResources.MONGODB_SETUP_FILE_EXISTS, -- mongodbSetupStamp.getAbsolutePath()).getContents(); -- cmdCtx.getConsole().getOutput().println(msg); -- return true; -- } else { -- return false; -- } -- } -- -- private class StorageStartedListener implements ActionListener { -- -- @Override -- public void actionPerformed(ActionEvent actionEvent) { -- if (actionEvent.getSource() instanceof AbstractStateNotifyingCommand) { -- AbstractStateNotifyingCommand storage = (AbstractStateNotifyingCommand) actionEvent.getSource(); -- // Implementation detail: there is a single StorageCommand instance registered -- // as an OSGi service. We remove ourselves as listener so that we don't get -- // notified in the case that the command is invoked by some other means later. -- storage.getNotifier().removeActionListener(this); -- -- try { -- switch (actionEvent.getActionId()) { -- case START: -- // Payload is connection URL -- Object payload = actionEvent.getPayload(); -- if (payload == null || !(payload instanceof String)) { -- setupSuccessful = false; -- throw new CommandException(t.localize(LocaleResources.UNRECOGNIZED_PAYLOAD_FROM_STORAGE_CMD)); -- } -- final String dbUrl = (String)payload; -- try { -- CommandContext ctx = getAddUserCommandContext(dbUrl); -- decoratee.run(ctx); -- } catch (CommandException e) { -- cmdCtx.getConsole().getError().println(e.getMessage()); -- String msg = t.localize(LocaleResources.ADDING_USER_FAILED).getContents(); -- cmdCtx.getConsole().getError().println(msg); -- } -- break; -- case FAIL: -- // nothing -- break; -- default: -- // nothing -- break; -- } -- } catch (CommandException e) { -- cmdCtx.getConsole().getError().println(e.getMessage()); -- } finally { -- setupFinishedBarrier.countDown(); -- } -- } -- -- } -- -- private CommandContext getAddUserCommandContext(final String dbUrl) { -- CommandContextFactory factory = new CommandContextFactory(context); -- CommandContext ctx = factory.createContext(new Arguments() { -- -- @Override -- public boolean hasArgument(String name) { -- if (name.equals(AddUserCommand.DB_URL_ARG)) { -- return true; -- } -- return false; -- } -- -- @Override -- public List getNonOptionArguments() { -- return Collections.emptyList(); -- } -- -- @Override -- public String getArgument(String name) { -- if (name.equals(AddUserCommand.DB_URL_ARG)) { -- return dbUrl; -- } -- return null; -- } -- }); -- return ctx; -- } -- } -- -- private static class StorageStoppedListener implements ActionListener { -- -- private boolean storageStopPassed; -- private final CountDownLatch storageStoppedLatch; -- private StorageStoppedListener(CountDownLatch latch) { -- storageStoppedLatch = latch; -- } -- -- @Override -- public void actionPerformed(ActionEvent actionEvent) { -- if (actionEvent.getSource() instanceof AbstractStateNotifyingCommand) { -- AbstractStateNotifyingCommand storage = (AbstractStateNotifyingCommand) actionEvent.getSource(); -- // remove ourselves so that we get called more than once. -- storage.getNotifier().removeActionListener(this); -- switch(actionEvent.getActionId()) { -- case STOP: -- storageStopPassed = true; -- storageStoppedLatch.countDown(); -- break; -- default: -- storageStoppedLatch.countDown(); -- break; -- -- } -- } -- } -- -- } --} -diff --git a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandDispatcherTest.java b/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandDispatcherTest.java -deleted file mode 100644 ---- a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandDispatcherTest.java -+++ /dev/null -@@ -1,119 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import static org.junit.Assert.assertEquals; --import static org.junit.Assert.assertTrue; --import static org.junit.Assert.fail; --import static org.mockito.Matchers.eq; --import static org.mockito.Matchers.any; --import static org.mockito.Mockito.mock; --import static org.mockito.Mockito.when; -- --import org.junit.Test; --import org.osgi.framework.BundleContext; -- --import com.redhat.thermostat.common.cli.Arguments; --import com.redhat.thermostat.common.cli.CommandContext; --import com.redhat.thermostat.common.cli.CommandContextFactory; --import com.redhat.thermostat.common.cli.CommandException; -- --public class AddUserCommandDispatcherTest { -- -- @Test -- public void canRunUndecorated() { -- BundleContext context = mock(BundleContext.class); -- BaseAddUserCommand mockCmd = mock(BaseAddUserCommand.class); -- AddUserCommandDispatcher dispatcher = new AddUserCommandDispatcher(context, mockCmd); -- CommandContextFactory factory = new CommandContextFactory(context); -- Arguments args = mock(Arguments.class); -- when(args.hasArgument(eq("dbUrl"))).thenReturn(true); -- CommandContext ctx = factory.createContext(args); -- -- // This should not throw any exception -- try { -- dispatcher.run(ctx); -- } catch (CommandException e) { -- fail(e.getMessage()); -- } -- } -- -- @Test(expected = CommandException.class ) -- public void failsToRunWithNoArguments() throws CommandException { -- BundleContext context = mock(BundleContext.class); -- BaseAddUserCommand mockCmd = mock(BaseAddUserCommand.class); -- AddUserCommandDispatcher dispatcher = new AddUserCommandDispatcher(context, mockCmd); -- CommandContextFactory factory = new CommandContextFactory(context); -- Arguments args = mock(Arguments.class); -- when(args.hasArgument(any(String.class))).thenReturn(false); -- CommandContext ctx = factory.createContext(args); -- -- // this throws CommandException -- dispatcher.run(ctx); -- } -- -- @Test -- public void decoratesIfStorageStartOptionGiven() { -- BundleContext context = mock(BundleContext.class); -- BaseAddUserCommand mockCmd = mock(BaseAddUserCommand.class); -- AddUserCommandDispatcher dispatcher = new AddUserCommandDispatcher(context, mockCmd); -- CommandContextFactory factory = new CommandContextFactory(context); -- Arguments args = mock(Arguments.class); -- when(args.hasArgument(eq("startStorage"))).thenReturn(true); -- CommandContext ctx = factory.createContext(args); -- -- try { -- dispatcher.run(ctx); -- fail("CommonPaths not available, should have thrown exception"); -- } catch (CommandException e) { -- boolean passed = false; -- for( StackTraceElement elmt: e.getStackTrace()) { -- // StartStopAddUserCommandDecorator should be in stack trace -- if (elmt.getClassName().equals(StartStopAddUserCommandDecorator.class.getName())) { -- passed = true; -- break; -- } -- } -- assertTrue("Expected mocked BaseAddUserCommand to be decorated", passed); -- } -- } -- -- @Test -- public void testCommandName() { -- assertEquals("add-mongodb-user", AddUserCommandDispatcher.COMMAND_NAME); -- } --} -diff --git a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandTest.java b/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandTest.java -deleted file mode 100644 ---- a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/AddUserCommandTest.java -+++ /dev/null -@@ -1,116 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import static org.junit.Assert.assertSame; --import static org.junit.Assert.assertTrue; --import static org.mockito.Mockito.inOrder; --import static org.mockito.Mockito.mock; --import static org.mockito.Mockito.when; -- --import java.util.Arrays; --import java.util.concurrent.CountDownLatch; -- --import org.junit.Test; --import org.junit.runner.RunWith; --import org.mockito.InOrder; --import org.powermock.api.mockito.PowerMockito; --import org.powermock.core.classloader.annotations.PowerMockIgnore; --import org.powermock.core.classloader.annotations.PrepareForTest; --import org.powermock.modules.junit4.PowerMockRunner; -- --import com.mongodb.DB; --import com.redhat.thermostat.storage.core.QueuedStorage; --import com.redhat.thermostat.storage.core.Storage; --import com.redhat.thermostat.storage.core.StorageCredentials; -- --//There is a bug (resolved as wontfix) in powermock which results in --//java.lang.LinkageError if javax.management.* classes aren't ignored by --//Powermock. More here: http://code.google.com/p/powermock/issues/detail?id=277 --//SSL tests need this and having that annotation on method level doesn't seem --//to solve the issue. --@PowerMockIgnore( {"javax.management.*"}) --@RunWith(PowerMockRunner.class) --@PrepareForTest({ DB.class }) --public class AddUserCommandTest { -- -- /* -- * Verifies that credentials' methods are called in the right order and -- * the password array is filled with zeros after use. -- */ -- @Test -- public void verifyAddUser() { -- DB db = PowerMockito.mock(DB.class); -- CountDownLatch latch = new CountDownLatch(1); -- MongoStorage storage = new MongoStorage(db, latch); -- -- StorageCredentials creds = mock(StorageCredentials.class); -- String username = "fooUser"; -- char[] password = new char[] { 'f', 'o', 'o' }; -- when(creds.getUsername()).thenReturn(username); -- when(creds.getPassword()).thenReturn(password); -- InOrder inOrder = inOrder(creds); -- -- AddUserCommand command = new AddUserCommand(null /* unused */); -- command.addUser(storage, creds); -- -- // password should have been zero-filled -- assertTrue(Arrays.equals(new char[] { '\0', '\0', '\0' }, password)); -- // First username, then password should get called. -- inOrder.verify(creds).getUsername(); -- inOrder.verify(creds).getPassword(); -- } -- -- /* -- * Verifies if the delegate can be retrieved from QueuedStorage since -- * AddUserCommand relies on this. In particular the delegate needs to be -- * a MongoStorage instance. -- */ -- @Test -- public void verifyGettingDelegateWorks() { -- DB db = PowerMockito.mock(DB.class); -- CountDownLatch latch = new CountDownLatch(1); -- // Delegate must be mongostorage -- MongoStorage storage = new MongoStorage(db, latch); -- -- QueuedStorage qStorage = new QueuedStorage(storage); -- AddUserCommand command = new AddUserCommand(null /* unused */); -- Storage actual = command.getDelegate(qStorage); -- -- assertSame(storage, actual); -- } --} -diff --git a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/BaseAddUserCommandTest.java b/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/BaseAddUserCommandTest.java -deleted file mode 100644 ---- a/storage/mongo/src/test/java/com/redhat/thermostat/storage/mongodb/internal/BaseAddUserCommandTest.java -+++ /dev/null -@@ -1,62 +0,0 @@ --/* -- * Copyright 2012-2014 Red Hat, Inc. -- * -- * This file is part of Thermostat. -- * -- * Thermostat is free software; you can redistribute it and/or modify -- * it under the terms of the GNU General Public License as published -- * by the Free Software Foundation; either version 2, or (at your -- * option) any later version. -- * -- * Thermostat is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- * -- * You should have received a copy of the GNU General Public License -- * along with Thermostat; see the file COPYING. If not see -- * . -- * -- * Linking this code with other modules is making a combined work -- * based on this code. Thus, the terms and conditions of the GNU -- * General Public License cover the whole combination. -- * -- * As a special exception, the copyright holders of this code give -- * you permission to link this code with independent modules to -- * produce an executable, regardless of the license terms of these -- * independent modules, and to copy and distribute the resulting -- * executable under terms of your choice, provided that you also -- * meet, for each linked independent module, the terms and conditions -- * of the license of that module. An independent module is a module -- * which is not derived from or based on this code. If you modify -- * this code, you may extend this exception to your version of the -- * library, but you are not obligated to do so. If you do not wish -- * to do so, delete this exception statement from your version. -- */ -- --package com.redhat.thermostat.storage.mongodb.internal; -- --import static org.junit.Assert.assertFalse; -- --import org.junit.Test; -- --import com.redhat.thermostat.common.cli.CommandContext; --import com.redhat.thermostat.common.cli.CommandException; -- --public class BaseAddUserCommandTest { -- -- @Test -- public void storageRequiredFalse() { -- TestAddUserCommand cmd = new TestAddUserCommand(); -- assertFalse(cmd.isStorageRequired()); -- } -- -- private static class TestAddUserCommand extends BaseAddUserCommand { -- -- @Override -- public void run(CommandContext ctx) throws CommandException { -- // no-op -- } -- -- } --} diff --git a/SOURCES/rhbz1221989.patch b/SOURCES/rhbz1221989.patch deleted file mode 100644 index 68bb7ec..0000000 --- a/SOURCES/rhbz1221989.patch +++ /dev/null @@ -1,469 +0,0 @@ -diff --git a/distribution/scripts/thermostat-setup b/distribution/scripts/thermostat-setup ---- a/distribution/scripts/thermostat-setup -+++ b/distribution/scripts/thermostat-setup -@@ -122,7 +122,6 @@ - # in this script already, but failed somewhere - # down the line. - removeTempStampFile -- cleanupSedFiles - echo 'Thermostat setup failed!' 1>&2 - stty "$tty_flags" - exit 1 -@@ -137,18 +136,10 @@ - fi - } - --cleanupSedFiles() { -- if [ ! -z "$SED_FILES_DIR" ] && -- [ -e $SED_FILES_DIR ]; then -- rm -rf "$SED_FILES_DIR" -- fi --} -- - exitSuccess() { - # Remove temporary unlock file and create the actual setup-complete - # file. - removeTempStampFile -- cleanupSedFiles - echo $SETUP_UNLOCK_CONTENT_REGULAR > "$SETUP_COMPLETE_FILE" - echo -e "\nThermostat setup complete!\n" - echo -e "Be sure to configure thermostat-users.properties and" -@@ -206,45 +197,19 @@ - default_webapp="$THERMOSTAT_HOME/webapp" - THERMOSTAT_WEBAPP_LOCATION="$(readlink -f $default_webapp)" - fi -- TH_WEB_INF="$THERMOSTAT_WEBAPP_LOCATION/WEB-INF/web.xml" -+ TH_WEB_INF="$THERMOSTAT_WEBAPP_LOCATION/WEB-INF/web.auth" - - if [ ! -e $TH_WEB_INF ]; then - echo "File not found: $TH_WEB_INF" 1>&2 - exitFail - fi - -- # We use this var for cleaning up after sed has run and -- # the script exits. -- SED_FILES_DIR="$(mktemp -d)" -- setSedExprs "storage.username" "$USERNAME" -- writeSedFiles "$SED_FILES_DIR" "storage.username" -- SED_CMD_USER1="sed -i -f $SED_FILE_UNCOMMENTED $TH_WEB_INF" -- SED_CMD_USER2="sed -i -f $SED_FILE_COMMENTED $TH_WEB_INF" -- -- setSedExprs "storage.password" "$PASSWORD" -- writeSedFiles "$SED_FILES_DIR" "storage.password" -- SED_CMD_PWD1="sed -i -f $SED_FILE_UNCOMMENTED $TH_WEB_INF" -- SED_CMD_PWD2="sed -i -f $SED_FILE_COMMENTED $TH_WEB_INF" -- - if [ ! -w $TH_WEB_INF ]; then -- local sed_one_line_user="$SED_CMD_USER1 && $SED_CMD_USER2" -- local sed_one_line_pwd="$SED_CMD_PWD1 && $SED_CMD_PWD2" - echo -e "\n\nWARNING: $(readlink -f $TH_WEB_INF) is NOT writable.\n" -- echo -e "You have the following options:\n" -- echo -e " 1. Run the following command(s) as root:" -- echo -e " #> $sed_one_line_user" -- echo -e " #> $sed_one_line_pwd" -- echo -e " #> rm -r $SED_FILES_DIR" -- echo -e " 2. Modify the file manually and add the following" -- echo -e " credentials config snippet (in 'servlet'):" -- echo -e " " -- echo -e " storage.username" -- echo -e " $USERNAME" -- echo -e " " -- echo -e " " -- echo -e " storage.password" -- echo -e " $PASSWORD" -- echo -e " " -+ echo -e " Modify the file manually and add the following" -+ echo -e " credentials config snippet:" -+ echo -e " storage.username = $USERNAME" -+ echo -e " storage.password = $PASSWORD" - echo -e " The file in which you need to put this snippet" - echo -e " is:" - echo -e " $TH_WEB_INF" -@@ -252,9 +217,9 @@ - else - # Run the sed command(s) - local sedSuccess=0 -- $SED_CMD_USER1 && $SED_CMD_USER2 -+ echo "storage.username = $USERNAME" > "$TH_WEB_INF" - sedSuccess=$(( $sedSuccess + $? )) -- $SED_CMD_PWD1 && $SED_CMD_PWD2 -+ echo "storage.password = $PASSWORD" >> "$TH_WEB_INF" - sedSuccess=$(( $sedSuccess + $? )) - if [ $sedSuccess -eq 0 ]; then - exitSuccess -@@ -265,109 +230,6 @@ - fi - } - --writeSedFiles() { -- local tmpDir="$1" -- local paramName="$2" -- SED_FILE_UNCOMMENTED="$tmpDir/uncommented-${paramName}.sed" -- SED_FILE_COMMENTED="$tmpDir/commented-${paramName}.sed" -- echo "$SED_EXPR_COMMENTED" > $SED_FILE_COMMENTED -- echo "$SED_EXPR_UNCOMMENTED" > $SED_FILE_UNCOMMENTED --} -- --setSedExprs() { -- local paramName=$1 -- local paramVal=$2 -- setSedExprUnCommented "$paramName" "$paramVal" -- setSedExprCommented "$paramName" "$paramVal" --} -- --setSedExprCommented() { -- local paramName=$1 -- local paramVal=$2 -- SED_EXPR_COMMENTED=" -- # Finds pattern A and replaces it with B. -- # -- # Pattern A is something like the following: -- # -- # -- # Replacement (B) would then be: -- # -- # -- # storage.username -- # foo-bar -- # -- # -- # In essence it removes the comments and sets -- # the param value we want. -- # -- /<[!]--/ { -- N -- // { -- N -- /$paramName<[/]param-name>/ { -- N -- /.*<[/]param-value>/ { -- N -- /<[/]init-param>/ { -- N -- /-->/ { -- N -- # Do the substitution with all matching lines in -- # current buffer -- s%.*<[!]--\n.*\n.*$paramName<[/]param-name>\n.*.*<[/]param-value>.*<[/]init-param>.*-->%\n$paramName\n$paramVal\n% -- } -- } -- } -- } -- } -- }" --} -- --setSedExprUnCommented() { -- paramName=$1 -- paramVal=$2 -- SED_EXPR_UNCOMMENTED=" -- # Finds pattern C and replaces it with D. -- # -- # Pattern C is something like the following: -- # -- # storage.username -- # something -- # -- # -- # Replacement (D) would then be: -- # -- # -- # storage.username -- # foo-bar -- # -- # -- # I.e. it changes the username to what we'd -- # like it to be. If that section is already -- # in place (not commented out) -- # -- // { -- N -- /$paramName<[/]param-name>/ { -- N -- /.*<[/]param-value>/ { -- N -- /<[/]init-param>/ { -- N -- # Do the substitution with all matching lines in -- # current buffer -- s%.*\n.*$paramName<[/]param-name>\n.*.*<[/]param-value>.*<[/]init-param>%\n$paramName\n$paramVal\n% -- } -- } -- } -- }" --} -- - readUsername() { - dUsername="$1" - prompt="Please enter the desired Mongodb username (press return in order to use '$dUsername'): " -diff --git a/pom.xml b/pom.xml ---- a/pom.xml -+++ b/pom.xml -@@ -98,17 +98,11 @@ - mongodevpassword - - -- <init-param> -- <param-name>storage.username</param-name> -- <param-value>${mongodb.dev.username}</param-value> -- </init-param> -+storage.username=${mongodb.dev.username} - - - -- <init-param> -- <param-name>storage.password</param-name> -- <param-value>${mongodb.dev.password}</param-value> -- </init-param> -+storage.password=${mongodb.dev.password} - - - -- <!-- -- <init-param> -- <param-name>storage.username</param-name> -- <param-value>thermostat-mongodb-user</param-value> -- </init-param> -- --> -+#storage.username=thermostat-mongodb-user - - - -- <!-- -- <init-param> -- <param-name>storage.password</param-name> -- <param-value>supersecrit</param-value> -- </init-param> -- --> -+#storage.password=supersecrit - - - - - true - src/main/webapp - - **/web.xml -+ **/web.auth - - - -@@ -244,6 +244,7 @@ - src/main/webapp - - **/web.xml -+ **/web.auth - - - -diff --git a/web/war/src/main/webapp/WEB-INF/web.auth b/web/war/src/main/webapp/WEB-INF/web.auth -new file mode 100644 ---- /dev/null -+++ b/web/war/src/main/webapp/WEB-INF/web.auth -@@ -0,0 +1,11 @@ -+# Credentials to use for connecting to the backing storage -+# (currently mongodb). Uncomment the following two blocks in -+# order to use this username/password for the connection. -+ -+# Username to use for connecting to the backing storage -+# implementation -+${web.war.backingstorage.username.snippet} -+ -+# Password to use for connecting to the backing storage -+# implementation -+${web.war.backingstorage.password.snippet} -diff --git a/web/war/src/main/webapp/WEB-INF/web.xml b/web/war/src/main/webapp/WEB-INF/web.xml ---- a/web/war/src/main/webapp/WEB-INF/web.xml -+++ b/web/war/src/main/webapp/WEB-INF/web.xml -@@ -52,16 +52,6 @@ - storage.endpoint - mongodb://127.0.0.1:27518 - -- -- -- -- ${web.war.backingstorage.username.snippet} -- -- ${web.war.backingstorage.password.snippet} - - - token-manager-timeout diff --git a/SOURCES/scl-thermostat-tomcat-service-sysconfig b/SOURCES/scl-thermostat-tomcat-service-sysconfig index 3b879b8..6229871 100644 --- a/SOURCES/scl-thermostat-tomcat-service-sysconfig +++ b/SOURCES/scl-thermostat-tomcat-service-sysconfig @@ -3,4 +3,7 @@ # Where your tomcat installation lives CATALINA_BASE="__catalina_base__" CATALINA_HOME="/usr/share/tomcat" -JAVA_OPTS="-Djava.security.auth.login.config=__jaas_config__" +# -Djava.security.egd=file:/dev/./urandom makes our tomcat use +# /dev/urandom over /dev/random which might block. See +# RHBZ#1328972 for details. +JAVA_OPTS="-Djava.security.auth.login.config=__jaas_config__ -Djava.security.egd=file:/dev/./urandom" diff --git a/SOURCES/thermostat_setup_ctrl_c.patch b/SOURCES/thermostat_setup_ctrl_c.patch deleted file mode 100644 index 832639a..0000000 --- a/SOURCES/thermostat_setup_ctrl_c.patch +++ /dev/null @@ -1,30 +0,0 @@ -# HG changeset patch -# User Omair Majid -# Date 1426001971 14400 -# Tue Mar 10 11:39:31 2015 -0400 -# Node ID db706e3e09ed947ff77cbe75e23dd82c5d6b8b82 -# Parent 505bcac210496aadb32b9be4a0869260fe0a5005 -Don't break terminal on Ctrl-c when reading password -Reviewed-by: jerboaa -Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2015-March/013058.html - -diff --git a/distribution/scripts/thermostat-setup b/distribution/scripts/thermostat-setup ---- a/distribution/scripts/thermostat-setup -+++ b/distribution/scripts/thermostat-setup -@@ -56,6 +56,8 @@ - # For debugging - #set -xv - -+tty_flags="$(stty -g)" -+ - # Interruptions are failures - trap exitFail SIGINT - -@@ -122,6 +124,7 @@ - removeTempStampFile - cleanupSedFiles - echo 'Thermostat setup failed!' 1>&2 -+ stty "$tty_flags" - exit 1 - } - diff --git a/SOURCES/user_thermostat_home_new_default.patch b/SOURCES/user_thermostat_home_new_default.patch index 144b59f..22342c8 100644 --- a/SOURCES/user_thermostat_home_new_default.patch +++ b/SOURCES/user_thermostat_home_new_default.patch @@ -6,7 +6,7 @@ diff --git a/config/src/main/java/com/redhat/thermostat/shared/config/internal/C - private static final String THERMOSTAT_USER_DIR = ".thermostat"; -+ private static final String THERMOSTAT_USER_DIR = ".thermostat-1.2"; ++ private static final String THERMOSTAT_USER_DIR = ".thermostat-1.4"; private static final Translate t = LocaleResources.createLocalizer(); @@ -18,19 +18,7 @@ diff --git a/distribution/scripts/thermostat-devsetup b/distribution/scripts/the DEV_INPUT="$THERMOSTAT_HOME/etc/devsetup.input" if [ "x$USER_THERMOSTAT_HOME" == "x" ]; then - USER_THERMOSTAT_HOME="$HOME/.thermostat" -+ USER_THERMOSTAT_HOME="$HOME/.thermostat-1.2" ++ USER_THERMOSTAT_HOME="$HOME/.thermostat-1.4" fi # Call the setup script -diff --git a/distribution/scripts/thermostat-setup b/distribution/scripts/thermostat-setup ---- a/distribution/scripts/thermostat-setup -+++ b/distribution/scripts/thermostat-setup -@@ -103,7 +103,7 @@ - export THERMOSTAT_HOME - # Thermostat user home - if [ "x$USER_THERMOSTAT_HOME" = "x" ]; then -- USER_THERMOSTAT_HOME="$HOME/.thermostat" -+ USER_THERMOSTAT_HOME="$HOME/.thermostat-1.2" - fi - export USER_THERMOSTAT_HOME - THERMOSTAT="$THERMOSTAT_HOME/bin/thermostat" diff --git a/SOURCES/webstorage_service_custom_jaas.patch b/SOURCES/webstorage_service_custom_jaas.patch deleted file mode 100644 index 6b5eb6d..0000000 --- a/SOURCES/webstorage_service_custom_jaas.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff --git a/distribution/config/thermostat_webstorageservice_jaas.conf b/distribution/config/thermostat_webstorageservice_jaas.conf -new file mode 100644 ---- /dev/null -+++ b/distribution/config/thermostat_webstorageservice_jaas.conf -@@ -0,0 +1,10 @@ -+ThermostatJAASLogin { -+ com.redhat.thermostat.web.server.auth.spi.DelegateLoginModule required debug=false; -+}; -+ -+ThermostatJAASDelegate { -+ com.redhat.thermostat.web.server.auth.spi.PropertiesUsernameRolesLoginModule required -+ debug=false -+ users.properties="\${user.home}/.thermostat-1.2/etc/thermostat-users.properties" -+ roles.properties="\${user.home}/.thermostat-1.2/etc/thermostat-roles.properties" ; -+}; -diff --git a/distribution/pom.xml b/distribution/pom.xml ---- a/distribution/pom.xml -+++ b/distribution/pom.xml -@@ -173,6 +173,7 @@ - thermostat-users.properties - thermostat-roles.properties - thermostat_jaas.conf -+ thermostat_webstorageservice_jaas.conf - devsetup.input - db.properties - logging.properties -@@ -186,6 +187,7 @@ - true - - -+ \ - - - -diff --git a/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java b/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java ---- a/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java -+++ b/web/endpoint-plugin/web-service/src/main/java/com/redhat/thermostat/web/endpoint/internal/EmbeddedServletContainerConfiguration.java -@@ -177,7 +177,7 @@ - - String getAbsolutePathToJaasConfig() throws InvalidConfigurationException { - File etcPath = paths.getSystemConfigurationDirectory(); -- File thermostatJaasConf = new File(etcPath, "thermostat_jaas.conf"); -+ File thermostatJaasConf = new File(etcPath, "thermostat_webstorageservice_jaas.conf"); - try { - return thermostatJaasConf.getCanonicalPath(); - } catch (IOException e) { -diff --git a/distribution/scripts/thermostat-setup b/distribution/scripts/thermostat-setup ---- a/distribution/scripts/thermostat-setup -+++ b/distribution/scripts/thermostat-setup -@@ -166,7 +166,8 @@ - echo -e "\nBe sure to configure $TH_WEB_INF as mentioned above." - echo -e "\nThen, make sure to configure thermostat-users.properties and" - echo -e "thermostat-roles.properties before you attempt connections" -- echo -e "with agent(s) and/or client(s)." -+ echo -e "with agent(s) and/or client(s). For web-storage-service these" -+ echo -e "files need to be in your home directory under .thermostat-1.2/etc/." - exit 0 - } - diff --git a/SPECS/thermostat.spec b/SPECS/thermostat.spec index 6f4255d..95ace6e 100644 --- a/SPECS/thermostat.spec +++ b/SPECS/thermostat.spec @@ -1,9 +1,10 @@ # Thermostat version %global major 1 -%global minor 2 -%global patchlevel 0 +%global minor 4 +%global patchlevel 4 # Real OSGi Bundle-Version is 3.6.6.Final %global netty_bundle_version 3.6.3 +%global asm_version 5 %global jcommon_bundle_version 1.0.18 %global jfreechart_bundle_version 1.0.14 # apache-commons-beanutils @@ -19,6 +20,7 @@ %global hc_core_bundle_version 4.3.3 %global hc_client_bundle_version 4.3.6 %global gson_bundle_version 2.2.2 +%global jgraphx_bundle_version 3.1.2 # Base path to the JDK which will be used in boot scripts %global jdk_base /usr/lib/jvm/java-1.7.0-openjdk @@ -88,7 +90,7 @@ Version: %{major}.%{minor}.%{patchlevel} # 60.X where X is an increasing int. 60 for rhel-6. We use # 70.X for rhel-7. For some reason we cannot rely on the # dist tag. -Release: 70.12%{?dist} +Release: 70.3%{?dist} Summary: A monitoring and serviceability tool for OpenJDK License: GPLv2+ with exceptions and OFL URL: http://icedtea.classpath.org/thermostat/ @@ -125,31 +127,16 @@ Patch1: osgi_spec_fixes.patch Patch2: ignore_bundle_versions.patch # Not suitable for upstream. Different OSGi version means some API compat issues. Patch3: osgi_api_fixes.patch -# FIXME remove when upstream supports mongodb 2.6 ootb. -Patch4: mongodb26_setup_changes.patch -# Ditto (command does not work with 2.6) -Patch5: remove_adduser_command.patch -# FIXME: remove once rebased to >= 1.2.4 Upstream commit: -# http://icedtea.classpath.org/hg/release/thermostat-1.2/rev/0f250b6c47e8 -Patch6: fix_lucene_symbolic_name.patch -# FIXME: remove once rebased to >= 1.2.4, RHBZ#1199581, Upstream commit: -# http://icedtea.classpath.org/hg/release/thermostat-1.2/rev/1cfebde69814 -Patch7: thermostat_setup_ctrl_c.patch -# Set USER_THERMOSTAT_HOME default to ~/.thermostat-1.2 since this allows -# for better data migration from 1.0 Thermostat. -Patch8: user_thermostat_home_new_default.patch +# Set USER_THERMOSTAT_HOME default to ~/.thermostat-1.4 since this allows +# for better data migration from 1.0/1.2 Thermostat (if any). +Patch4: user_thermostat_home_new_default.patch # jetty provides the javax.servlet API -Patch9: servlet_api_jar.patch -# Allow 'thermostat web-storage-service' to read configs from -# ~/.thermostat, by using a custom jaas config. -Patch10: webstorage_service_custom_jaas.patch -# Remove when this lands in a release: -# http://icedtea.classpath.org/hg/thermostat/rev/296194a48778 -Patch11: non_existent_bundle.patch -# Upstream puts passwords in a world-readable location -Patch12: rhbz1221989.patch +Patch5: servlet_api_jar.patch BuildRequires: libgnome-keyring-devel +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool # laf-utils JNI need pkconfig files for gtk2+ BuildRequires: gtk2-devel # Use tomcat only for web storage @@ -165,6 +152,7 @@ BuildRequires: %{?scl_prefix}jfreechart >= 1.0.14-7 BuildRequires: %{?scl_prefix}jcommon >= 1.0.17-4 BuildRequires: %{?scl_prefix}netty BuildRequires: %{?scl_prefix}apache-commons-fileupload +BuildRequires: %{?scl_prefix}jgraphx >= 3.1.2 # rh-java-common collection dependencies BuildRequires: rh-java-common-apache-commons-beanutils @@ -211,6 +199,10 @@ Requires: libgnome-keyring Requires: rh-mongodb26 Requires: rh-mongodb26-mongodb Requires: rh-mongodb26-mongodb-server +# In RHSCL 2.2 we've built against 2.14 and, thus +# OSGi imports generated by maven-bundle-plugin +# requires at least 2.14.1. See RHBZ#1328519 +Requires: rh-mongodb26-mongo-java-driver >= 2.14.1 Requires(post): systemd Requires(preun): systemd @@ -264,13 +256,6 @@ for Thermostat's Web layer. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 # Fix up artifact names which have different name upstream # lucene @@ -282,6 +267,8 @@ for Thermostat's Web layer. %pom_add_dep "org.apache.lucene:lucene-analyzers:4.8.0" vm-heap-analysis/distribution %pom_add_dep "org.apache.lucene:lucene-core:4.8.0" vm-heap-analysis/common %pom_add_dep "org.apache.lucene:lucene-core:4.8.0" vm-heap-analysis/distribution +# Fix up artifact names for jgraphx +%pom_change_dep -r "org.tinyjee.jgraphx:jgraphx" "com.mxgraph:jgraphx" # httpclient %pom_remove_dep org.apache.httpcomponents:httpclient-osgi web/client %pom_add_dep org.apache.httpcomponents:httpclient:4.1.2 web/client @@ -323,6 +310,7 @@ for Thermostat's Web layer. %pom_remove_dep com.redhat.thermostat:thermostat-storage-testutils vm-cpu/common %pom_remove_dep com.redhat.thermostat:thermostat-storage-testutils vm-profiler/common %pom_remove_dep com.redhat.thermostat:thermostat-storage-testutils thread/collector +%pom_remove_dep com.redhat.thermostat:thermostat-schema-info-distribution distribution # Remove depencency on the web archive for web-storage-service we'll make deps # available manually @@ -349,6 +337,8 @@ for Thermostat's Web layer. %pom_xpath_remove "pom:dependencies/pom:dependency[pom:groupId='com.sun']/pom:systemPath" vm-heap-analysis/command %pom_xpath_remove "pom:dependencies/pom:dependency[pom:groupId='com.sun']/pom:systemPath" vm-heap-analysis/client-swing %pom_xpath_remove "pom:dependencies/pom:dependency[pom:groupId='com.sun']/pom:systemPath" vm-heap-analysis/client-core +# Do not embed jgraphx dependency in thread client. +%pom_xpath_remove "pom:project/pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-bundle-plugin']/pom:configuration/pom:instructions/pom:Embed-Dependency" thread/client-swing # Don't install the zip files created during the build %mvn_package com.redhat.thermostat::zip: __noinstall @@ -410,6 +400,8 @@ pushd keyring src/main/java/com/redhat/thermostat/utils/keyring/Keyring.java \ src/main/java/com/redhat/thermostat/utils/keyring/KeyringException.java \ src/main/java/com/redhat/thermostat/utils/keyring/impl/KeyringImpl.java + autoreconf --install + ./configure make all popd pushd agent/core @@ -437,7 +429,9 @@ rm -rf %{buildroot}/%{_datarootdir}/java/%{?scl_prefix}%{pkg_name} -Dthermostat.web.deploy.dir=$(pwd)/webstorage-webapp \ -Dthermostat.system.user=thermostat \ -Dthermostat.system.group=thermostat \ + -Dthermostat.user.guide="http://icedtea.classpath.org/wiki/Thermostat/RHSCL2.2UserGuide" \ -Dnetty.version=%{netty_bundle_version}.Final \ + -Dasm.version=%{asm_version} \ -Dcommons-logging.version=%{logging_bundle_version} \ -Dcommons-collections.version=%{collections_bundle_version} \ -Dcommons-codec.osgi-version=%{codec_bundle_version} \ @@ -452,7 +446,8 @@ rm -rf %{buildroot}/%{_datarootdir}/java/%{?scl_prefix}%{pkg_name} -Dlucene-core.bundle.symbolic-name=org.apache.lucene.core \ -Dlucene-analysis.bundle.symbolic-name=org.apache.lucene.analysis \ -Dosgi.compendium.bundle.symbolic-name=org.osgi.compendium \ - -Dosgi.compendium.osgi-version=4.1.0 + -Dosgi.compendium.osgi-version=4.1.0 \ + -Djgraphx.osgi.version=%{jgraphx_bundle_version} # the build puts all depdency jars into distribution/target/image/lib as well mv distribution/target/image/libs/thermostat-*jar . @@ -462,9 +457,11 @@ mv thermostat-*jar distribution/target/image/libs/ # Need Java 7 in in scripts sed -i 's|^JAVA=.*|JAVA="%{jdk_base}/bin/java"|' distribution/target/image/bin/thermostat sed -i 's|^JAVA=.*|JAVA="%{jdk_base}/bin/java"|' distribution/target/image/bin/thermostat-agent-proxy +sed -i 's|^JAVA=.*|JAVA="%{jdk_base}/bin/java"|' distribution/target/image/bin/thermostat-command-channel # Fix path to tools.jar sed -i 's|^TOOLS_JAR=.*|TOOLS_JAR="%{jdk_base}/lib/tools.jar"|' distribution/target/image/bin/thermostat sed -i 's|^TOOLS_JAR=.*|TOOLS_JAR="%{jdk_base}/lib/tools.jar"|' distribution/target/image/bin/thermostat-agent-proxy +sed -i 's|^TOOLS_JAR=.*|TOOLS_JAR="%{jdk_base}/lib/tools.jar"|' distribution/target/image/bin/thermostat-command-channel # Collect a list of filenames which we later use in order to symlink from /usr/share/java pushd distribution/target/image/libs @@ -512,6 +509,8 @@ mkdir -p %{buildroot}%{_unitdir} mkdir -p %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps # Thermostat desktop lives there mkdir -p %{buildroot}%{_datarootdir}/applications +# Example config files are in docdir +mkdir -p %{buildroot}%{_docdir}/%{pkg_name} # Dance the xmvn install limbo. This only makes sense if %mvn_build does NOT # have the '-i' switch. @@ -574,6 +573,17 @@ cp %{SOURCE2} %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps/%{pkg_name mkdir -p %{buildroot}%{system_tmpfilesdir} install -m 0644 distribution/target/tmpfiles.d/%{pkg_name}.conf %{buildroot}%{system_tmpfilesdir}/%{pkg_name}.conf +# Install thermostat man page +mkdir -p %{buildroot}%{_mandir}/man1 +install -m 0644 distribution/docs/%{pkg_name}.1 %{buildroot}%{_mandir}/man1/%{pkg_name}.1 + +# Install bash completion +mkdir -p %{buildroot}%{system_root_datadir}/bash-completion/completions +install -pm 644 distribution/target/image/bin/thermostat-completion %{buildroot}%{system_root_datadir}/bash-completion/completions/%{pkg_name} +# Remove from image directory in order for the completion +# script to not be in the default PATH +rm distribution/target/image/bin/thermostat-completion + # Don't want dev setup things rm distribution/target/image/bin/thermostat-devsetup rm distribution/target/image/etc/devsetup.input @@ -606,6 +616,7 @@ ln -s %{scl_javadir}/netty.jar %{buildroot}%{thermostat_home}/libs/netty.jar ln -s %{scl_javadir}/jfreechart.jar %{buildroot}%{thermostat_home}/libs/jfreechart.jar ln -s %{scl_javadir}/jcommon.jar %{buildroot}%{thermostat_home}/libs/jcommon.jar ln -s %{scl_javadir}/jline2/jline.jar %{buildroot}%{thermostat_home}/libs/jline2.jar +ln -s %{scl_javadir}/jgraphx/jgraphx.jar %{buildroot}%{thermostat_home}/libs/jgraphx.jar # The following are additional downstream specific symlinks for transitive deps # see fix_bundle_loading.patch # some of them have their deps embedded upstream (or whatever is available in the maven repos) @@ -624,7 +635,7 @@ ln -s /opt/rh/rh-java-common/root/usr/share/java/lucene/lucene-analyzers-common. # set up symlinks for vm-profiler plugin rm %{buildroot}%{thermostat_home}/plugins/vm-profiler/asm*jar -ln -s /opt/rh/rh-java-common/root/usr/share/java/objectweb-asm5/asm-all-5.jar %{buildroot}%{thermostat_home}/libs/asm-all.jar +ln -s /opt/rh/rh-java-common/root/usr/share/java/objectweb-asm5/asm-all-%{asm_version}.jar %{buildroot}%{thermostat_home}/plugins/vm-profiler/asm-all-%{asm_version}.jar # set up symlinks for embedded-web-endpoint plugin rm %{buildroot}%{thermostat_home}/plugins/embedded-web-endpoint/jetty*jar @@ -664,7 +675,11 @@ ln -s %{_datarootdir}/%{pkg_name}/bin/thermostat-setup \ # create required config directory mkdir -p %{buildroot}%{thermostat_home}/etc/plugins.d/ -# move config files to /etc and symlink stuff under $THERMOSTAT_HOME/etc to it +# Move config files to /etc and symlink stuff under +# $THERMOSTAT_HOME/etc to it. Put example configs +# in docdir. +mv %{buildroot}%{thermostat_home}/etc/examples \ + %{buildroot}%{_docdir}/%{pkg_name}/ mv %{buildroot}%{thermostat_home}/etc/* \ %{buildroot}%{_sysconfdir}/%{pkg_name} rmdir %{buildroot}%{thermostat_home}/etc @@ -800,10 +815,14 @@ TOOLS_JAR="$(grep 'TOOLS_JAR=' %{buildroot}/%{thermostat_home}/bin/thermostat | test "${TOOLS_JAR}" = "%{jdk_base}/lib/tools.jar" TOOLS_JAR="$(grep 'TOOLS_JAR=' %{buildroot}/%{thermostat_home}/bin/thermostat-agent-proxy | cut -d= -f2 | cut -d\" -f2)" test "${TOOLS_JAR}" = "%{jdk_base}/lib/tools.jar" +TOOLS_JAR="$(grep 'TOOLS_JAR=' %{buildroot}/%{thermostat_home}/bin/thermostat-command-channel | cut -d= -f2 | cut -d\" -f2)" +test "${TOOLS_JAR}" = "%{jdk_base}/lib/tools.jar" JAVA="$(grep 'JAVA=' %{buildroot}/%{thermostat_home}/bin/thermostat | cut -d= -f2 | cut -d\" -f2)" test "${JAVA}" = "%{jdk_base}/bin/java" JAVA="$(grep 'JAVA=' %{buildroot}/%{thermostat_home}/bin/thermostat-agent-proxy | cut -d= -f2 | cut -d\" -f2)" test "${JAVA}" = "%{jdk_base}/bin/java" +JAVA="$(grep 'JAVA=' %{buildroot}/%{thermostat_home}/bin/thermostat-command-channel | cut -d= -f2 | cut -d\" -f2)" +test "${JAVA}" = "%{jdk_base}/bin/java" # Be sure that symlinks to dependencies are not dangling. This might # prevent thermostat from booting. For example see RHBZ#1119757 # The 'grep -v %{version}.jar' is so as to not check for thermostat @@ -867,6 +886,7 @@ fi %config(noreplace) %{_sysconfdir}/%{pkg_name}/commands %config(noreplace) %{_sysconfdir}/%{pkg_name}/db.properties %config(noreplace) %{_sysconfdir}/%{pkg_name}/logging.properties +%config %{_sysconfdir}/%{pkg_name}/bash-complete-logging.properties %config(noreplace) %{_sysconfdir}/%{pkg_name}/plugins.d %config(noreplace) %{_sysconfdir}/%{pkg_name}/osgi-export.properties %config(noreplace) %{_sysconfdir}/%{pkg_name}/ssl.properties @@ -886,6 +906,7 @@ fi %{_datadir}/%{pkg_name}/plugins/notes %{_datadir}/%{pkg_name}/plugins/numa %{_datadir}/%{pkg_name}/plugins/storage-profile +%{_datadir}/%{pkg_name}/plugins/setup %{_datadir}/%{pkg_name}/plugins/thread %{_datadir}/%{pkg_name}/plugins/validate %{_datadir}/%{pkg_name}/plugins/vm-classstat @@ -896,11 +917,15 @@ fi %{_datadir}/%{pkg_name}/plugins/vm-memory %{_datadir}/%{pkg_name}/plugins/vm-overview %{_datadir}/%{pkg_name}/plugins/vm-profiler +%dir %{_datadir}/%{pkg_name}/plugins +%dir %{_datadir}/%{pkg_name} +%dir %{_mavenpomdir}/%{pkg_name} %{_datadir}/%{pkg_name}/cache %{_datadir}/%{pkg_name}/data %{_datadir}/%{pkg_name}/logs %{_datadir}/%{pkg_name}/run %{_jnidir}/thermostat-*.jar +%dir %{_jnidir}/%{pkg_name} %{_bindir}/thermostat %{_bindir}/thermostat-setup %{_unitdir}/%{?scl_prefix}%{pkg_name}-storage.service @@ -908,9 +933,10 @@ fi %{_libdir}/%{pkg_name}/libGnomeKeyringWrapper.so %{_libdir}/%{pkg_name}/libHostNameWrapper.so %{_libdir}/%{pkg_name}/libUserNameUtilWrapper.so -%{_libdir}/%{pkg_name}/thermostat-agent-core-1.2.0.jar -%{_libdir}/%{pkg_name}/thermostat-keyring-1.2.0.jar -%{_libdir}/%{pkg_name}/thermostat-laf-utils-1.2.0.jar +%{_libdir}/%{pkg_name}/thermostat-agent-core-%{version}.jar +%{_libdir}/%{pkg_name}/thermostat-keyring-%{version}.jar +%{_libdir}/%{pkg_name}/thermostat-laf-utils-%{version}.jar +%dir %{_libdir}/%{pkg_name} # FIXME: install or not-to-install agent service running as root? # Currently: Don't install. #%{_unitdir}/%{pkg_name}-agent.service @@ -922,8 +948,16 @@ fi %attr(0770,thermostat,thermostat) %dir %{system_cachedir} %attr(0770,thermostat,thermostat) %dir %{system_logdir} %attr(0770,thermostat,thermostat) %dir %{system_statedir} +# Command channel script should be owned by thermostat user to drop root privileges +%attr(0755,thermostat,thermostat) %{_datadir}/%{pkg_name}/bin/thermostat-command-channel # Own directories we ship libs in. See RHBZ#1057169 %{_javadir}/%{pkg_name} +%{_mandir}/man1/%{pkg_name}.1* +%{system_root_datadir}/bash-completion/completions/%{pkg_name} +# Own containing directories since bash-completion package might not +# be installed +%dir %{system_root_datadir}/bash-completion/completions +%dir %{system_root_datadir}/bash-completion %files javadoc %doc LICENSE @@ -945,11 +979,34 @@ fi %config(noreplace) %{system_confdir}/sysconfig/%{thermostat_tomcat_service_name} %{_unitdir}/%{?scl_prefix}%{pkg_name}-tomcat.service %attr(0770,tomcat,tomcat) %dir %{_root_localstatedir}/log/%{thermostat_tomcat_service_name} -%config(noreplace) %{_sysconfdir}/%{pkg_name}/thermostat_webstorageservice_jaas.conf # File used by RHEL-7.1's tomcat@thermostat service. %config(noreplace) %{system_confdir}/sysconfig/tomcat@%{pkg_name} +%doc %{_docdir}/%{pkg_name} %changelog +* Thu Apr 28 2016 Severin Gehwolf - 1.4.4-70.3 +- Require mongo-java-driver > 2.14 so as to avoid bundle + wiring issues. +- Resolves: RHBZ#1328519 + +* Wed Apr 27 2016 Severin Gehwolf - 1.4.4-70.2 +- Use /dev/urandom for tomcat@thermostat service. +- Resolves: RHBZ#1328972 + +* Wed Mar 30 2016 Severin Gehwolf - 1.4.4-70.1 +- Update to latest upstream 1.4.4 release. +- Resolves: RHBZ#1316863 + +* Wed Mar 30 2016 Severin Gehwolf - 1.4.2-70.3 +- Own in-collection directories. +- Resolves: RHBZ#1317970 + +* Fri Jan 29 2016 Severin Gehwolf - 1.4.2-70.2 +- Directly point to RHSCL 2.2. User Guide. + +* Wed Jan 27 2016 Severin Gehwolf - 1.4.2-70.1 +- Update to Thermostat 1.4 for RHSCL 2.2. + * Mon May 18 2015 Severin Gehwolf - 1.2.0-70.12 - Read mongodb credentials from separate file. - Resolves: RHBZ#1222621 (CVE-2015-3201)