[packages/domoticz] - up to 4.11563

arekm arekm at pld-linux.org
Thu Dec 12 14:24:50 CET 2019


commit 10f7a92ec88ff949b276dd8f1f3f810cd0361f4e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Dec 12 14:24:38 2019 +0100

    - up to 4.11563

 domoticz-cp-js.patch                    | 17 ------
 domoticz-openzwave.patch                | 42 ++++++++++-----
 domoticz-ozw-barrier-support-0002.patch | 86 ------------------------------
 domoticz-python.patch                   | 94 ++++++++-------------------------
 domoticz.spec                           | 31 ++++++-----
 5 files changed, 71 insertions(+), 199 deletions(-)
---
diff --git a/domoticz.spec b/domoticz.spec
index 914065b..e8402f1 100644
--- a/domoticz.spec
+++ b/domoticz.spec
@@ -1,16 +1,19 @@
+%define		snap	d5e8a14bf
+%define		date	20191209
 Summary:	Open source Home Automation System
 Name:		domoticz
-Version:	4.10717
-Release:	4
+Version:	4.11563
+Release:	1
 License:	GPLv3+ and ASL 2.0 and Boost and BSD and MIT
 Group:		Base
 URL:		http://www.domoticz.com
-Source0:	https://github.com/domoticz/domoticz/archive/%{version}.tar.gz
-# Source0-md5:	1d5f5572ae43379a6d62023cb8da0e9b
+# Source0:	https://github.com/domoticz/domoticz/archive/%{version}.tar.gz
+# https://www.domoticz.com/wiki/Domoticz_versions_-_Commits
+Source0:	https://github.com/domoticz/domoticz/archive/%{snap}.tar.gz
+# Source0-md5:	376611fe9d5a8fb7febd71be8addc4ce
 Source1:	%{name}.service
 Source2:	%{name}.conf
-# Source says its version 4.9700, but it's really 4.10717
-Patch1:		%{name}-version.patch
+
 # Use system tinyxpath (https://github.com/domoticz/domoticz/pull/1759)
 Patch2:		%{name}-tinyxpath.patch
 # Use system openzwave includes
@@ -19,8 +22,6 @@ Patch3:		%{name}-openzwave.patch
 Patch4:		%{name}-openzwave-Dev.patch
 # Fix python detection (https://github.com/domoticz/domoticz/pull/1749)
 Patch5:		%{name}-python.patch
-Patch6:		domoticz-ozw-barrier-support-0002.patch
-Patch7:		domoticz-cp-js.patch
 BuildRequires:	boost-devel
 BuildRequires:	cmake
 BuildRequires:	curl-devel
@@ -76,14 +77,20 @@ sensors/meters like Temperature, Rain, Wind, UV, Electra, Gas, Water
 and much more. Notifications/Alerts can be sent to any mobile device
 
 %prep
-%setup -q
-%patch1 -p1 -b.version
+%setup -q -c
+mv %{name}-%{snap}*/* .
+
+APPVERSION="%{version}"
+echo "#define APPVERSION ${APPVERSION##*.}" > appversion.h
+echo '#define APPHASH "%{snap}"' >> appversion.h
+APPDATE=$(date --date="%{date}" "+%s")
+echo "#define APPDATE ${APPDATE}" >> appversion.h
+
 %patch2 -p1 -b.tinyxpath
 %patch3 -p1 -b.openzwave
 #%patch4 -p1 -b.openzwave-Dev
 %patch5 -p1 -b.python
-%patch6 -p1
-%patch7 -p1
+
 rm -f hardware/openzwave/*.h
 rm -rf hardware/openzwave/aes
 rm -rf hardware/openzwave/command_classes
diff --git a/domoticz-cp-js.patch b/domoticz-cp-js.patch
deleted file mode 100644
index acb38ff..0000000
--- a/domoticz-cp-js.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/www/ozwcp/cp.js	2017-07-30 05:19:41.000000000 -0500
-+++ b/www/ozwcp/cp.js	2018-02-22 17:14:52.185486298 -0600
-@@ -241,7 +241,13 @@
- 	    var current = values[j].getAttribute('current');
- 	    nodes[id].values[k].value = new Array();
- 	    for (var l = 0; l < items.length; l++) {
--	      nodes[id].values[k].value[l] = {item: items[l].firstChild.nodeValue, selected: (current == items[l].firstChild.nodeValue)};
-+              var firstChild = items[l].firstChild;
-+              var nodeValue;
-+              if (firstChild == null)
-+                nodeValue = '';
-+              else
-+                nodeValue = firstChild.nodeValue;
-+	      nodes[id].values[k].value[l] = {item: nodeValue, selected: (current == nodeValue)};
- 	    }
- 	  } else if (values[j].firstChild != null)
- 	    nodes[id].values[k].value = values[j].firstChild.nodeValue;
diff --git a/domoticz-openzwave.patch b/domoticz-openzwave.patch
index bcf6aaf..c53bb90 100644
--- a/domoticz-openzwave.patch
+++ b/domoticz-openzwave.patch
@@ -1,18 +1,33 @@
-diff -urN domoticz-4.10717.orig/CMakeLists.txt domoticz-4.10717/CMakeLists.txt
---- domoticz-4.10717.orig/CMakeLists.txt	2019-05-10 11:37:55.000000000 +0200
-+++ domoticz-4.10717/CMakeLists.txt	2019-10-05 12:18:52.336750288 +0200
-@@ -689,7 +689,7 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 42082192..f16726f8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -298,9 +298,9 @@
+ ADD_CUSTOM_TARGET(revisiontag ALL)
+ 
+ # creates appversion.h using cmake script
+-ADD_CUSTOM_COMMAND(TARGET revisiontag COMMAND ${CMAKE_COMMAND}
+-   -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
+-   -P ${CMAKE_CURRENT_SOURCE_DIR}/getgit.cmake)
++#ADD_CUSTOM_COMMAND(TARGET revisiontag COMMAND ${CMAKE_COMMAND}
++#   -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
++#   -P ${CMAKE_CURRENT_SOURCE_DIR}/getgit.cmake)
+ 
+ ## Target
+ set(
+@@ -700,7 +700,7 @@
  IF(OpenZWave)
    message(STATUS ${OpenZWave})
    target_link_libraries(domoticz ${OpenZWave})
 -  include_directories(${CMAKE_SOURCE_DIR}/hardware/openzwave)
 +  include_directories(${OPENZWAVE_INCLUDE_DIRS})
    add_definitions(-DWITH_OPENZWAVE)
-   # open-zwave needs libudev if statically linked
-   IF(USE_STATIC_OPENZWAVE)
-diff -urN domoticz-4.10717.orig/hardware/openzwave/control_panel/ozwcp.cpp domoticz-4.10717/hardware/openzwave/control_panel/ozwcp.cpp
---- domoticz-4.10717.orig/hardware/openzwave/control_panel/ozwcp.cpp	2019-05-10 11:37:55.000000000 +0200
-+++ domoticz-4.10717/hardware/openzwave/control_panel/ozwcp.cpp	2019-10-05 12:13:41.340069579 +0200
+ ELSE()
+   MESSAGE(STATUS "==== OpenZWave not found, support disabled!")
+diff --git a/hardware/openzwave/control_panel/ozwcp.cpp b/hardware/openzwave/control_panel/ozwcp.cpp
+index ffd8d742..79c708ce 100644
+--- a/hardware/openzwave/control_panel/ozwcp.cpp
++++ b/hardware/openzwave/control_panel/ozwcp.cpp
 @@ -39,11 +39,11 @@
  #include <stdlib.h>
  #include <time.h>
@@ -27,12 +42,13 @@ diff -urN domoticz-4.10717.orig/hardware/openzwave/control_panel/ozwcp.cpp domot
 +#include <Node.h>
 +#include <Group.h>
 +#include <Notification.h>
+ #include "..//main/Logger.h"
  
  #include <sys/stat.h>
- #include <fstream>
-diff -urN domoticz-4.10717.orig/hardware/openzwave/control_panel/ozwcp.h domoticz-4.10717/hardware/openzwave/control_panel/ozwcp.h
---- domoticz-4.10717.orig/hardware/openzwave/control_panel/ozwcp.h	2019-05-10 11:37:55.000000000 +0200
-+++ domoticz-4.10717/hardware/openzwave/control_panel/ozwcp.h	2019-10-05 12:14:19.620071306 +0200
+diff --git a/hardware/openzwave/control_panel/ozwcp.h b/hardware/openzwave/control_panel/ozwcp.h
+index 29ebc0e3..7a027815 100644
+--- a/hardware/openzwave/control_panel/ozwcp.h
++++ b/hardware/openzwave/control_panel/ozwcp.h
 @@ -37,8 +37,8 @@
  
  #include <list>
diff --git a/domoticz-ozw-barrier-support-0002.patch b/domoticz-ozw-barrier-support-0002.patch
deleted file mode 100644
index a190a07..0000000
--- a/domoticz-ozw-barrier-support-0002.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 0d65f8fdcc320d8cc154c1a491a4984ef83a9040 Mon Sep 17 00:00:00 2001
-From: jowerg <jowerg at gmail.com>
-Date: Sat, 22 Apr 2017 08:45:11 -0400
-Subject: [PATCH] Initial COMMAND_CLASS_BARRIER_OPERATOR support
-
----
- .../openzwave/command_classes/BarrierOperator.h    | 70 ++++++++++++++++++++++
- 1 file changed, 70 insertions(+)
- create mode 100644 hardware/openzwave/command_classes/BarrierOperator.h
-
-diff --git a/hardware/openzwave/command_classes/BarrierOperator.h b/hardware/openzwave/command_classes/BarrierOperator.h
-new file mode 100644
-index 000000000..0899304a1
---- /dev/null
-+++ b/hardware/openzwave/command_classes/BarrierOperator.h
-@@ -0,0 +1,70 @@
-+//-----------------------------------------------------------------------------
-+//
-+//	BarrierOperator.h
-+//
-+//	Implementation of the COMMAND_CLASS_BARRIER_OPERATOR
-+//
-+//	Copyright (c) 2016 srirams (https://github.com/srirams)
-+//
-+//	SOFTWARE NOTICE AND LICENSE
-+//
-+//	This file is part of OpenZWave.
-+//
-+//	OpenZWave is free software: you can redistribute it and/or modify
-+//	it under the terms of the GNU Lesser General Public License as published
-+//	by the Free Software Foundation, either version 3 of the License,
-+//	or (at your option) any later version.
-+//
-+//	OpenZWave 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 Lesser General Public License for more details.
-+//
-+//	You should have received a copy of the GNU Lesser General Public License
-+//	along with OpenZWave.  If not, see <http://www.gnu.org/licenses/>.
-+//
-+//-----------------------------------------------------------------------------
-+
-+#ifndef _BarrierOperator_H
-+#define _BarrierOperator_H
-+
-+#include "command_classes/CommandClass.h"
-+
-+namespace OpenZWave
-+{
-+	class ValueByte;
-+	class ValueBool;
-+
-+	/** \brief Implements COMMAND_CLASS_BARRIER_OPERATOR (0x66), a Z-Wave device command class.
-+	 * \ingroup CommandClass
-+	 */
-+	class BarrierOperator: public CommandClass
-+	{
-+	public:
-+		static CommandClass* Create( uint32 const _homeId, uint8 const _nodeId ){ return new BarrierOperator( _homeId, _nodeId ); }
-+		virtual ~BarrierOperator(){}
-+
-+		static uint8 const StaticGetCommandClassId(){ return 0x66; }
-+		static string const StaticGetCommandClassName(){ return "COMMAND_CLASS_BARRIER_OPERATOR"; }
-+
-+		// From CommandClass
-+		virtual bool RequestState( uint32 const _requestFlags, uint8 const _instance, Driver::MsgQueue const _queue );
-+		virtual bool RequestValue( uint32 const _requestFlags, uint8 const _index, uint8 const _instance, Driver::MsgQueue const _queue );
-+		bool RequestSignalSupport( uint8 const _instance, Driver::MsgQueue const _queue );
-+		virtual uint8 const GetCommandClassId()const{ return StaticGetCommandClassId(); }
-+		virtual string const GetCommandClassName()const{ return StaticGetCommandClassName(); }
-+		virtual bool HandleMsg( uint8 const* _data, uint32 const _length, uint32 const _instance = 1 );
-+		virtual bool SetValue(Value const& _value);
-+
-+		virtual uint8 GetMaxVersion(){ return 3; }
-+
-+	protected:
-+		virtual void CreateVars( uint8 const _instance );
-+
-+	private:
-+		BarrierOperator( uint32 const _homeId, uint8 const _nodeId );
-+	};
-+
-+} // namespace OpenZWave
-+
-+#endif
diff --git a/domoticz-python.patch b/domoticz-python.patch
index 2c44d5b..c580ab5 100644
--- a/domoticz-python.patch
+++ b/domoticz-python.patch
@@ -1,7 +1,23 @@
-diff -urN domoticz-4.10717.orig/hardware/plugins/DelayedLink.h domoticz-4.10717/hardware/plugins/DelayedLink.h
---- domoticz-4.10717.orig/hardware/plugins/DelayedLink.h	2019-05-10 11:37:55.000000000 +0200
-+++ domoticz-4.10717/hardware/plugins/DelayedLink.h	2019-10-05 19:05:40.930495976 +0200
-@@ -145,18 +145,10 @@
+From f7b229ce873ff71e2b48e855075153dc1026750d Mon Sep 17 00:00:00 2001
+From: Michael Cronenworth <mike at cchtml.com>
+Date: Mon, 7 Aug 2017 14:37:28 -0500
+Subject: [PATCH] Follow PEP-384 when finding and opening python3 library
+
+Instead of maintaining a list of all Python versions the Python 3
+standard defines that there MUST be a stable ABI and we can always
+rely on a "python3.dll" or a "libpython3.so" existing.
+
+This also fixes library loading on Linux distributions that use
+SO versioned libraries.
+---
+ hardware/plugins/DelayedLink.h | 28 ++--------------------------
+ 1 file changed, 2 insertions(+), 26 deletions(-)
+
+diff --git a/hardware/plugins/DelayedLink.h b/hardware/plugins/DelayedLink.h
+index 25c83f034..ecf19da09 100644
+--- a/hardware/plugins/DelayedLink.h
++++ b/hardware/plugins/DelayedLink.h
+@@ -150,18 +150,10 @@
  				if (!shared_lib_) shared_lib_ = LoadLibrary("python35_d.dll");
  				if (!shared_lib_) shared_lib_ = LoadLibrary("python34_d.dll");
  #	else
@@ -19,9 +35,9 @@ diff -urN domoticz-4.10717.orig/hardware/plugins/DelayedLink.h domoticz-4.10717/
 -				if (!shared_lib_) FindLibrary("python3.5", true);
 -				if (!shared_lib_) FindLibrary("python3.4", true);
 +				if (!shared_lib_) FindLibrary("python3", true);
- #endif
- 				if (shared_lib_)
- 				{
+ #ifdef __FreeBSD__
+ 				if (!shared_lib_) FindLibrary("python3.7m", true);
+ 				if (!shared_lib_) FindLibrary("python3.6m", true);
 @@ -271,24 +263,12 @@
  						library = "lib" + sLibrary + ".so";
  						shared_lib_ = dlopen(library.c_str(), RTLD_LAZY | RTLD_GLOBAL);
@@ -60,67 +76,3 @@ diff -urN domoticz-4.10717.orig/hardware/plugins/DelayedLink.h domoticz-4.10717/
  					// MacOS
  					// look for .dylib in /usr/local/lib
  					if (!shared_lib_)
-From e9bd383ceb63db7cfe8a284014f0cdf8c2bfe4f0 Mon Sep 17 00:00:00 2001
-From: Fabrice Fontaine <fontaine.fabrice at gmail.com>
-Date: Fri, 1 Nov 2019 10:54:11 +0100
-Subject: [PATCH] DelayedLink.h: fix build with python 3.8
-
-Fix build with python 3.8 by copy/pasting the vim workaround from
-https://github.com/vim/vim/commit/13a1f3fb0c9d08bba6109fe2131c9524e6ba7e15
-
-Fix 3703
-
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
----
- hardware/plugins/DelayedLink.h | 38 ++++++++++++++++++++++++++++++++++
- 1 file changed, 38 insertions(+)
-
-diff --git a/hardware/plugins/DelayedLink.h b/hardware/plugins/DelayedLink.h
-index 4bf1973281..c90a7d8e69 100644
---- a/hardware/plugins/DelayedLink.h
-+++ b/hardware/plugins/DelayedLink.h
-@@ -14,6 +14,44 @@
- #include <frameobject.h>
- #include "../../main/Helper.h"
- 
-+#if PY_VERSION_HEX >= 0x030800f0
-+static inline void
-+py3__Py_DECREF(const char *filename, int lineno, PyObject *op)
-+{
-+	(void)filename; /* may be unused, shut up -Wunused-parameter */
-+	(void)lineno; /* may be unused, shut up -Wunused-parameter */
-+	_Py_DEC_REFTOTAL;
-+	if (--op->ob_refcnt != 0)
-+	{
-+#ifdef Py_REF_DEBUG
-+	if (op->ob_refcnt < 0)
-+	{
-+		_Py_NegativeRefcount(filename, lineno, op);
-+	}
-+#endif
-+	}
-+	else
-+	{
-+		_Py_Dealloc(op);
-+	}
-+}
-+
-+#undef Py_DECREF
-+#define Py_DECREF(op) py3__Py_DECREF(__FILE__, __LINE__, _PyObject_CAST(op))
-+
-+static inline void
-+py3__Py_XDECREF(PyObject *op)
-+{
-+	if (op != NULL)
-+	{
-+		Py_DECREF(op);
-+	}
-+}
-+
-+#undef Py_XDECREF
-+#define Py_XDECREF(op) py3__Py_XDECREF(_PyObject_CAST(op))
-+#endif
-+
- namespace Plugins {
- 
- #ifdef WIN32
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/domoticz.git/commitdiff/10f7a92ec88ff949b276dd8f1f3f810cd0361f4e



More information about the pld-cvs-commit mailing list