├── VERSION
├── addon_files
├── mosquitto
│ ├── var
│ │ └── .gitignore
│ ├── lib
│ │ ├── libev.so
│ │ ├── libmosquitto.so
│ │ ├── libmosquittopp.so
│ │ ├── libwebsockets.so
│ │ ├── libev.so.4
│ │ ├── libssl.so.1.1
│ │ ├── libcrypto.so.1.1
│ │ ├── libmosquitto.so.1
│ │ ├── libwebsockets.so.8
│ │ └── libmosquittopp.so.1
│ ├── etc
│ │ ├── conf.d
│ │ │ ├── log.conf
│ │ │ ├── listener-mqtt.conf
│ │ │ ├── listener-ws.conf
│ │ │ ├── persistence.conf
│ │ │ ├── listener-mqtts.conf
│ │ │ └── listener-wss.conf
│ │ └── mosquitto.conf
│ ├── bin
│ │ ├── mosquitto
│ │ ├── mosquitto_pub
│ │ ├── mosquitto_sub
│ │ └── mosquitto_passwd
│ ├── www
│ │ ├── mosquitto-text-side-28.png
│ │ └── update-check.cgi
│ └── rc.d
│ │ └── mosquitto
└── update_script
├── .gitignore
├── LICENSE
├── edl-v10
├── README.md
└── epl-v10
/VERSION:
--------------------------------------------------------------------------------
1 | 1.5.8+4
2 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/var/.gitignore:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libev.so:
--------------------------------------------------------------------------------
1 | libev.so.4
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libmosquitto.so:
--------------------------------------------------------------------------------
1 | libmosquitto.so.1
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/conf.d/log.conf:
--------------------------------------------------------------------------------
1 | log_dest syslog
2 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libmosquittopp.so:
--------------------------------------------------------------------------------
1 | libmosquittopp.so.1
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libwebsockets.so:
--------------------------------------------------------------------------------
1 | libwebsockets.so.8
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | addon_tmp
2 | dist
3 | .idea
4 | .DS_Store
5 | live
6 | CHANGELOG.md
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/conf.d/listener-mqtt.conf:
--------------------------------------------------------------------------------
1 | listener 1883 0.0.0.0
2 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/conf.d/listener-ws.conf:
--------------------------------------------------------------------------------
1 | listener 1884
2 | protocol websockets
3 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/mosquitto.conf:
--------------------------------------------------------------------------------
1 | user root
2 | include_dir /usr/local/addons/mosquitto/etc/conf.d/
3 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/conf.d/persistence.conf:
--------------------------------------------------------------------------------
1 | persistence true
2 | persistence_location /usr/local/addons/mosquitto/var/
3 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/bin/mosquitto:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/bin/mosquitto
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libev.so.4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/lib/libev.so.4
--------------------------------------------------------------------------------
/addon_files/mosquitto/bin/mosquitto_pub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/bin/mosquitto_pub
--------------------------------------------------------------------------------
/addon_files/mosquitto/bin/mosquitto_sub:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/bin/mosquitto_sub
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libssl.so.1.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/lib/libssl.so.1.1
--------------------------------------------------------------------------------
/addon_files/mosquitto/bin/mosquitto_passwd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/bin/mosquitto_passwd
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libcrypto.so.1.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/lib/libcrypto.so.1.1
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libmosquitto.so.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/lib/libmosquitto.so.1
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libwebsockets.so.8:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/lib/libwebsockets.so.8
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | This project is dual licensed under the Eclipse Public License 1.0 and the
2 | Eclipse Distribution License 1.0 as described in the epl-v10 and edl-v10 files.
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/conf.d/listener-mqtts.conf:
--------------------------------------------------------------------------------
1 | listener 8883
2 | protocol mqtt
3 |
4 | certfile /etc/config/server.pem
5 | keyfile /etc/config/server.pem
6 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/etc/conf.d/listener-wss.conf:
--------------------------------------------------------------------------------
1 | listener 8884
2 | protocol websockets
3 |
4 | certfile /etc/config/server.pem
5 | keyfile /etc/config/server.pem
6 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/lib/libmosquittopp.so.1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/lib/libmosquittopp.so.1
--------------------------------------------------------------------------------
/addon_files/mosquitto/www/mosquitto-text-side-28.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/HEAD/addon_files/mosquitto/www/mosquitto-text-side-28.png
--------------------------------------------------------------------------------
/addon_files/mosquitto/www/update-check.cgi:
--------------------------------------------------------------------------------
1 | #!/bin/tclsh
2 |
3 | set checkURL "https://raw.githubusercontent.com/homematic-community/ccu-addon-mosquitto/master/VERSION"
4 | set downloadURL "https://github.com/homematic-community/ccu-addon-mosquitto/releases/latest"
5 |
6 | catch {
7 | set input $env(QUERY_STRING)
8 | set pairs [split $input &]
9 | foreach pair $pairs {
10 | if {$pair == "cmd=download"} {
11 | set cmd "download"
12 | break
13 | }
14 | }
15 | }
16 |
17 | if { [info exists cmd ] && $cmd == "download"} {
18 | puts -nonewline "Content-Type: text/html; charset=utf-8\r\n\r\n"
19 | puts -nonewline "
"
20 | } else {
21 | puts -nonewline "Content-Type: text/plain; charset=utf-8\r\n\r\n"
22 | catch {
23 | set newversion [ exec /usr/bin/wget -qO- --no-check-certificate $checkURL ]
24 | }
25 | if { [info exists newversion] } {
26 | puts $newversion
27 | } else {
28 | puts "n/a"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/addon_files/update_script:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | ADDONS_DIR=/usr/local/addons
4 | MSQ_DIR=$ADDONS_DIR/mosquitto
5 | BIN_DIR=/usr/local/bin
6 | LIB_DIR=/usr/local/lib
7 | CONF_DIR=/usr/local/etc/config
8 |
9 | # check for unsupported platforms
10 | if grep -qim1 busmatic /www/api/methods/ccu/downloadFirmware.tcl; then
11 | exit 13
12 | fi
13 |
14 | mount | grep /usr/local 2>&1 >/dev/null
15 | if [ $? -eq 1 ]; then
16 | mount /usr/local
17 | fi
18 |
19 | mkdir -p $ADDONS_DIR && chmod 755 $ADDONS_DIR
20 |
21 | if [ -f $CONF_DIR/rc.d/mosquitto ]; then
22 | $CONF_DIR/rc.d/mosquitto stop
23 | fi
24 |
25 | cp -af mosquitto $ADDONS_DIR/
26 |
27 | ln -sf $MSQ_DIR/rc.d/mosquitto $CONF_DIR/rc.d/mosquitto
28 | ln -sf $MSQ_DIR/www $CONF_DIR/addons/www/mosquitto
29 |
30 | # Migration
31 |
32 | if [ -f $MSQ_DIR/etc/conf.d/mqtt-listener.conf ]; then
33 | rm $MSQ_DIR/etc/conf.d/mqtt-listener.conf
34 | fi
35 |
36 | if [ -f $MSQ_DIR/etc/conf.d/ws-listener.conf ]; then
37 | rm $MSQ_DIR/etc/conf.d/ws-listener.conf
38 | fi
39 |
40 | if [ -f $LIB_DIR/libcrypto.so.1.1 ]; then
41 | rm $LIB_DIR/libcrypto.so.1.1
42 | fi
43 |
44 | if [ -f $LIB_DIR/libev.so ]; then
45 | rm $LIB_DIR/libev.so*
46 | fi
47 |
48 | if [ -f $LIB_DIR/libmosquitto.so ]; then
49 | rm $LIB_DIR/libmosquitto*
50 | fi
51 |
52 | if [ -f $LIB_DIR/libssl.so.1.1 ]; then
53 | rm $LIB_DIR/libssl.so.1.1
54 | fi
55 |
56 | if [ -f $LIB_DIR/libwebsockets.so ]; then
57 | rm $LIB_DIR/libwebsockets.so*
58 | fi
59 |
60 | if [ -f $BIN_DIR/mosquitto ]; then
61 | rm $BIN_DIR/mosquitto*
62 | fi
63 |
64 | sync
65 |
66 | /etc/config/rc.d/mosquitto restart
67 |
68 | exit 0
69 |
--------------------------------------------------------------------------------
/edl-v10:
--------------------------------------------------------------------------------
1 | Eclipse Distribution License - v 1.0
2 |
3 | Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
4 |
5 | All rights reserved.
6 |
7 | Redistribution and use in source and binary forms, with or without
8 | modification, are permitted provided that the following conditions are met:
9 |
10 | Redistributions of source code must retain the above copyright notice, this
11 | list of conditions and the following disclaimer.
12 |
13 | Redistributions in binary form must reproduce the above copyright notice,
14 | this list of conditions and the following disclaimer in the documentation
15 | and/or other materials provided with the distribution.
16 |
17 | Neither the name of the Eclipse Foundation, Inc. nor the names of its
18 | contributors may be used to endorse or promote products derived from this
19 | software without specific prior written permission.
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
22 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
25 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
26 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
28 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 |
32 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ccu-addon-mosquitto
2 |
3 | [](https://github.com/hobbyquaker/ccu-addon-mosquitto/releases/latest)
4 | [](https://github.com/hobbyquaker/ccu-addon-mosquitto/releases)
5 |
6 | [Mosquitto](https://mosquitto.org/) als Addon für die
7 | [Homematic CCU3](https://www.eq-3.de/produkte/homematic/zentralen-und-gateways/smart-home-zentrale-ccu3.html) und
8 | [RaspberryMatic](https://github.com/jens-maus/RaspberryMatic)
9 |
10 | Unter [Releases](https://github.com/hobbyquaker/ccu-addon-mosquitto/releases) steht die Datei
11 | `mosquitto-.tar.gz` zum Download zur Verfügung, diese kann über das CCU WebUI als Zusatzsoftware installiert
12 | werden.
13 |
14 | Auf der CCU3 sind anschließend noch die notwendigen Ports freizugeben. Die Freigabe erfolgt unter Einstellungen > Systemsteuerung > Firewall konfigurieren. Dort trägt man im Feld "Port-Freigabe" z.B. "1883;1884" ein.
15 |
16 | Die Mosquitto Konfiguration ist unter `/usr/local/addons/mosquitto/etc/conf.d/*.conf` zu finden.
17 | Neustart via `/etc/config/rc.d/mosquitto restart`.
18 |
19 | Falls eigene Konfigurationen vorgenommen werden sollten diese nicht in den vorhandenen conf Dateien eingetragen werden
20 | (da diese bei einem evtl Update überschrieben werden). Empfehlung: `conf.d/custom-xyz.conf`.
21 |
22 | Per default lauscht Mosquitto auf den Ports 1883/mqtt und 1884/ws. Falls auf der CCU ein Zertifikat vorhanden ist
23 | werden automatisch auch TLS listener geöffnet (8883/mqtts und 8884/wss).
24 |
25 | Bei Aufrufen von `mosquitto_pub` muss dem Aufruf das Setzen des Library Pfades vorangestellt werden, z.B.: `LD_LIBRARY_PATH=/usr/local/addons/mosquitto/lib /usr/local/addons/mosquitto/bin/mosquitto_pub -t 'test' -m 'test'`
26 |
27 |
28 | ## Credits
29 |
30 | Mosquitto was written by Roger Light
31 |
--------------------------------------------------------------------------------
/addon_files/mosquitto/rc.d/mosquitto:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | CONF_DIR=/usr/local/etc/config
4 | ADDON_DIR=/usr/local/addons/mosquitto
5 | BIN_DIR=$ADDON_DIR/bin
6 |
7 | # check for unsupported platforms
8 | if grep -qim1 busmatic /www/api/methods/ccu/downloadFirmware.tcl; then
9 | exit 13
10 | fi
11 |
12 | Stop () {
13 | echo -n "Stopping Mosquitto: "
14 | start-stop-daemon -K -q -p /var/run/mosquitto.pid && echo "OK"
15 | }
16 |
17 | Start () {
18 | echo -n "Starting Mosquitto: "
19 | if [ -f /etc/config/server.pem ]; then
20 | if [ -f $ADDON_DIR/etc/conf.d/listener-mqtts.conf.disabled ]; then
21 | mv $ADDON_DIR/etc/conf.d/listener-mqtts.conf.disabled $ADDON_DIR/etc/conf.d/listener-mqtts.conf
22 | mv $ADDON_DIR/etc/conf.d/listener-wss.conf.disabled $ADDON_DIR/etc/conf.d/listener-wss.conf
23 | fi
24 | else
25 | if [ -f $ADDON_DIR/etc/conf.d/listener-mqtts.conf ]; then
26 | mv $ADDON_DIR/etc/conf.d/listener-mqtts.conf $ADDON_DIR/etc/conf.d/listener-mqtts.conf.disabled
27 | mv $ADDON_DIR/etc/conf.d/listener-wss.conf $ADDON_DIR/etc/conf.d/listener-wss.conf.disabled
28 | fi
29 | fi
30 | export LD_LIBRARY_PATH=$ADDON_DIR/lib
31 | start-stop-daemon -S -b -m -p /var/run/mosquitto.pid --exec $ADDON_DIR/bin/mosquitto -- -c $ADDON_DIR/etc/mosquitto.conf && echo "OK"
32 | }
33 |
34 | case "$1" in
35 |
36 | stop)
37 | Stop
38 | ;;
39 |
40 | start)
41 | Start
42 | ;;
43 |
44 | restart)
45 | Stop
46 | sleep 3
47 | Start
48 | ;;
49 |
50 | info)
51 | echo "Info:
"
52 | echo "Name: Mosquitto"
53 | echo "Version: $(cat ${ADDON_DIR}/VERSION)"
54 | echo "Update: /addons/mosquitto/update-check.cgi"
55 | echo "Operations: uninstall restart"
56 | ;;
57 |
58 | uninstall)
59 | Stop
60 | rm /var/run/mosquitto.pid
61 | rm $CONF_DIR/rc.d/mosquitto
62 | rm $BIN_DIR/mosquitto*
63 | rm $CONF_DIR/addons/www/mosquitto
64 | rm -r $ADDON_DIR
65 |
66 | # Delete libs only if broken links
67 | find -L /usr/local/lib/libcrypto.so* -type l -delete
68 | find -L /usr/local/lib/libev.so* -type l -delete
69 | find -L /usr/local/lib/libssl.so* -type l -delete
70 | find -L /usr/local/lib/libwebsockets.so* -type l -delete
71 | find -L /usr/local/lib/libmosquitto.so* -type l -delete
72 | find -L /usr/local/lib/libmosquittopp.so* -type l -delete
73 | ;;
74 |
75 | *)
76 | echo "Usage: mosquitto {start|stop|restart|info|uninstall}" >&2
77 | exit 1
78 | ;;
79 |
80 | esac
81 |
82 |
83 |
84 | exit 0
85 |
--------------------------------------------------------------------------------
/epl-v10:
--------------------------------------------------------------------------------
1 | Eclipse Public License - v 1.0
2 |
3 | THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
4 | LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
5 | CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
6 |
7 |
8 | 1. DEFINITIONS
9 |
10 | "Contribution" means:
11 | a) in the case of the initial Contributor, the initial code and
12 | documentation distributed under this Agreement, and
13 |
14 | b) in the case of each subsequent Contributor:
15 |
16 | i) changes to the Program, and
17 | ii) additions to the Program;
18 |
19 | where such changes and/or additions to the Program originate from and are
20 | distributed by that particular Contributor. A Contribution 'originates' from a
21 | Contributor if it was added to the Program by such Contributor itself or anyone
22 | acting on such Contributor's behalf. Contributions do not include additions to
23 | the Program which: (i) are separate modules of software distributed in
24 | conjunction with the Program under their own license agreement, and (ii) are
25 | not derivative works of the Program.
26 |
27 | "Contributor" means any person or entity that distributes the Program.
28 |
29 | "Licensed Patents " mean patent claims licensable by a Contributor which are
30 | necessarily infringed by the use or sale of its Contribution alone or when
31 | combined with the Program.
32 |
33 | "Program" means the Contributions distributed in accordance with this Agreement.
34 |
35 | "Recipient" means anyone who receives the Program under this Agreement,
36 | including all Contributors.
37 |
38 |
39 | 2. GRANT OF RIGHTS
40 |
41 | a) Subject to the terms of this Agreement, each Contributor hereby grants
42 | Recipient a non-exclusive, worldwide, royalty-free copyright license to
43 | reproduce, prepare derivative works of, publicly display, publicly
44 | perform, distribute and sublicense the Contribution of such Contributor,
45 | if any, and such derivative works, in source code and object code form.
46 |
47 | b) Subject to the terms of this Agreement, each Contributor hereby grants
48 | Recipient a non-exclusive, worldwide, royalty-free patent license under
49 | Licensed Patents to make, use, sell, offer to sell, import and otherwise
50 | transfer the Contribution of such Contributor, if any, in source code and
51 | object code form. This patent license shall apply to the combination of the
52 | Contribution and the Program if, at the time the Contribution is added by the
53 | Contributor, such addition of the Contribution causes such combination to be
54 | covered by the Licensed Patents. The patent license shall not apply to any
55 | other combinations which include the Contribution. No hardware per se is
56 | licensed hereunder.
57 |
58 | c) Recipient understands that although each Contributor grants the licenses
59 | to its Contributions set forth herein, no assurances are provided by any
60 | Contributor that the Program does not infringe the patent or other
61 | intellectual property rights of any other entity. Each Contributor disclaims
62 | any liability to Recipient for claims brought by any other entity based on
63 | infringement of intellectual property rights or otherwise. As a condition to
64 | exercising the rights and licenses granted hereunder, each Recipient hereby
65 | assumes sole responsibility to secure any other intellectual property rights
66 | needed, if any. For example, if a third party patent license is required to
67 | allow Recipient to distribute the Program, it is Recipient's responsibility
68 | to acquire that license before distributing the Program.
69 |
70 | d) Each Contributor represents that to its knowledge it has sufficient
71 | copyright rights in its Contribution, if any, to grant the copyright license
72 | set forth in this Agreement.
73 |
74 |
75 | 3. REQUIREMENTS
76 |
77 | A Contributor may choose to distribute the Program in object code form under
78 | its own license agreement, provided that:
79 |
80 | a) it complies with the terms and conditions of this Agreement; and
81 |
82 | b) its license agreement:
83 |
84 | i) effectively disclaims on behalf of all Contributors all warranties and
85 | conditions, express and implied, including warranties or conditions of
86 | title and non-infringement, and implied warranties or conditions of
87 | merchantability and fitness for a particular purpose;
88 |
89 | ii) effectively excludes on behalf of all Contributors all liability for
90 | damages, including direct, indirect, special, incidental and consequential
91 | damages, such as lost profits;
92 |
93 | iii) states that any provisions which differ from this Agreement are offered
94 | by that Contributor alone and not by any other party; and
95 |
96 | iv) states that source code for the Program is available from such
97 | Contributor, and informs licensees how to obtain it in a reasonable manner
98 | on or through a medium customarily used for software exchange.
99 |
100 | When the Program is made available in source code form:
101 |
102 | a) it must be made available under this Agreement; and
103 |
104 | b) a copy of this Agreement must be included with each copy of the Program.
105 |
106 | Contributors may not remove or alter any copyright notices contained within
107 | the Program.
108 |
109 | Each Contributor must identify itself as the originator of its Contribution,
110 | if any, in a manner that reasonably allows subsequent Recipients to identify
111 | the originator of the Contribution.
112 |
113 |
114 | 4. COMMERCIAL DISTRIBUTION
115 |
116 | Commercial distributors of software may accept certain responsibilities with
117 | respect to end users, business partners and the like. While this license is
118 | intended to facilitate the commercial use of the Program, the Contributor who
119 | includes the Program in a commercial product offering should do so in a
120 | manner which does not create potential liability for other Contributors.
121 | Therefore, if a Contributor includes the Program in a commercial product
122 | offering, such Contributor ("Commercial Contributor") hereby agrees to defend
123 | and indemnify every other Contributor ("Indemnified Contributor") against any
124 | losses, damages and costs (collectively "Losses") arising from claims,
125 | lawsuits and other legal actions brought by a third party against the
126 | Indemnified Contributor to the extent caused by the acts or omissions of such
127 | Commercial Contributor in connection with its distribution of the Program in
128 | a commercial product offering. The obligations in this section do not apply
129 | to any claims or Losses relating to any actual or alleged intellectual
130 | property infringement. In order to qualify, an Indemnified Contributor must:
131 | a) promptly notify the Commercial Contributor in writing of such claim, and
132 | b) allow the Commercial Contributor to control, and cooperate with the
133 | Commercial Contributor in, the defense and any related settlement
134 | negotiations. The Indemnified Contributor may participate in any such claim
135 | at its own expense.
136 |
137 | For example, a Contributor might include the Program in a commercial product
138 | offering, Product X. That Contributor is then a Commercial Contributor. If
139 | that Commercial Contributor then makes performance claims, or offers
140 | warranties related to Product X, those performance claims and warranties are
141 | such Commercial Contributor's responsibility alone. Under this section, the
142 | Commercial Contributor would have to defend claims against the other
143 | Contributors related to those performance claims and warranties, and if a
144 | court requires any other Contributor to pay any damages as a result, the
145 | Commercial Contributor must pay those damages.
146 |
147 |
148 | 5. NO WARRANTY
149 |
150 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON
151 | AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
152 | EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR
153 | CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A
154 | PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the
155 | appropriateness of using and distributing the Program and assumes all risks
156 | associated with its exercise of rights under this Agreement , including but
157 | not limited to the risks and costs of program errors, compliance with
158 | applicable laws, damage to or loss of data, programs or equipment, and
159 | unavailability or interruption of operations.
160 |
161 |
162 | 6. DISCLAIMER OF LIABILITY
163 |
164 | EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
165 | CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
166 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
167 | LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
168 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
169 | ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
170 | EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
171 | OF SUCH DAMAGES.
172 |
173 |
174 | 7. GENERAL
175 |
176 | If any provision of this Agreement is invalid or unenforceable under
177 | applicable law, it shall not affect the validity or enforceability of the
178 | remainder of the terms of this Agreement, and without further action by the
179 | parties hereto, such provision shall be reformed to the minimum extent
180 | necessary to make such provision valid and enforceable.
181 |
182 | If Recipient institutes patent litigation against any entity (including a
183 | cross-claim or counterclaim in a lawsuit) alleging that the Program itself
184 | (excluding combinations of the Program with other software or hardware)
185 | infringes such Recipient's patent(s), then such Recipient's rights granted
186 | under Section 2(b) shall terminate as of the date such litigation is filed.
187 |
188 | All Recipient's rights under this Agreement shall terminate if it fails to
189 | comply with any of the material terms or conditions of this Agreement and
190 | does not cure such failure in a reasonable period of time after becoming
191 | aware of such noncompliance. If all Recipient's rights under this Agreement
192 | terminate, Recipient agrees to cease use and distribution of the Program as
193 | soon as reasonably practicable. However, Recipient's obligations under this
194 | Agreement and any licenses granted by Recipient relating to the Program shall
195 | continue and survive.
196 |
197 | Everyone is permitted to copy and distribute copies of this Agreement, but in
198 | order to avoid inconsistency the Agreement is copyrighted and may only be
199 | modified in the following manner. The Agreement Steward reserves the right to
200 | publish new versions (including revisions) of this Agreement from time to
201 | time. No one other than the Agreement Steward has the right to modify this
202 | Agreement. The Eclipse Foundation is the initial Agreement Steward. The
203 | Eclipse Foundation may assign the responsibility to serve as the Agreement
204 | Steward to a suitable separate entity. Each new version of the Agreement will
205 | be given a distinguishing version number. The Program (including
206 | Contributions) may always be distributed subject to the version of the
207 | Agreement under which it was received. In addition, after a new version of
208 | the Agreement is published, Contributor may elect to distribute the Program
209 | (including its Contributions) under the new version. Except as expressly
210 | stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
211 | licenses to the intellectual property of any Contributor under this
212 | Agreement, whether expressly, by implication, estoppel or otherwise. All
213 | rights in the Program not expressly granted under this Agreement are
214 | reserved.
215 |
216 | This Agreement is governed by the laws of the State of New York and the
217 | intellectual property laws of the United States of America. No party to this
218 | Agreement will bring a legal action under this Agreement more than one year
219 | after the cause of action arose. Each party waives its rights to a jury trial
220 | in any resulting litigation.
221 |
222 |
--------------------------------------------------------------------------------