Browse Source

iotivity: update to version 0.9.2

This brings IoTivity to version 0.9.2 in addition it does the following:
* split C and C++ Stack into two packages
* backport some patches which are adding missing dependencies to the shared libs
* remove patches merged upstream
* add some other patches fixing some problems, most of them are already merged upstream
* activate security and logging support

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Hauke Mehrtens 9 years ago
parent
commit
0ec3a55767
21 changed files with 797 additions and 152 deletions
  1. 65
    45
      net/iotivity/Makefile
  2. 15
    2
      net/iotivity/patches/001-no_unit_test.patch
  3. 2
    2
      net/iotivity/patches/004-use-env.patch
  4. 0
    32
      net/iotivity/patches/010-libcoap-fix-big-endian-problems.patch
  5. 0
    35
      net/iotivity/patches/011-cdsk-fix-big-endian-problem.patch
  6. 0
    11
      net/iotivity/patches/030-fix-missing-lib.patch
  7. 0
    11
      net/iotivity/patches/040-fix-things-manager.patch
  8. 0
    14
      net/iotivity/patches/050-fix-OICMidle.patch
  9. 49
    0
      net/iotivity/patches/060-liboc-add-missing-depending-library.patch
  10. 42
    0
      net/iotivity/patches/061-things-manager-libTGMSDKLibrary.so-add-missing-depen.patch
  11. 32
    0
      net/iotivity/patches/062-soft-sensor-manager-libSSMCore.so-add-missing-depend.patch
  12. 39
    0
      net/iotivity/patches/063-mqtt-fan-libmosquittopp.so-add-missing-depending-lib.patch
  13. 42
    0
      net/iotivity/patches/064-protocol-plugin-libfanserver_mqtt_plugin.so-and-libl.patch
  14. 69
    0
      net/iotivity/patches/065-resource-manipulation-libserver_builder.so-add-missi.patch
  15. 54
    0
      net/iotivity/patches/066-csdk-remove-dependency-to-liboc_logger.so-in-c-code.patch
  16. 37
    0
      net/iotivity/patches/067-csdk-libconnectivity_abstraction.so-add-missing-depe.patch
  17. 227
    0
      net/iotivity/patches/068-build-make-build-fail-if-unresolved-symbols-found.patch
  18. 29
    0
      net/iotivity/patches/070-Avoid-Segv-by-testing-address-field-before-using-it.patch
  19. 29
    0
      net/iotivity/patches/090-resource-encapsulation-fix-build-without-curl.patch
  20. 22
    0
      net/iotivity/patches/140-remove-glib2.patch
  21. 44
    0
      net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch

+ 65
- 45
net/iotivity/Makefile View File

@@ -8,15 +8,13 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=iotivity
11
-PKG_VERSION:=0.9.1
12
-PKG_RELEASE:=1
13
-
14
-PKG_SOURCE_PROTO:=git
15
-PKG_SOURCE_URL:=https://gerrit.iotivity.org/gerrit/iotivity
16
-PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
17
-PKG_SOURCE_VERSION:=0.9.1
18
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
19
-PKG_MIRROR_MD5SUM:=
11
+PKG_VERSION:=0.9.2
12
+PKG_RELEASE=1
13
+
14
+PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
15
+PKG_SOURCE_URL:=https://downloads.iotivity.org/${PKG_VERSION}/ \
16
+	http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
17
+PKG_MD5SUM:=cf32e10a8f355fe1327db98ffc9a6173
20 18
 PKG_USE_MIPS16:=0
21 19
 
22 20
 PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@lantiq.com>
@@ -33,8 +31,8 @@ include $(INCLUDE_DIR)/scons.mk
33 31
 define Package/iotivity
34 32
   SECTION:=net
35 33
   CATEGORY:=Network
36
-  DEPENDS:=@!USE_UCLIBC +libpthread +librt +libstdcpp +libuuid
37
-  TITLE:=IoTivity Library
34
+  DEPENDS:=@!USE_UCLIBC +libpthread +librt +libuuid
35
+  TITLE:=IoTivity C Library
38 36
   URL:=https://www.iotivity.org
39 37
 endef
40 38
 
@@ -44,10 +42,24 @@ define Package/iotivity/description
44 42
 endef
45 43
 
46 44
 
45
+define Package/iotivity-cpp
46
+  SECTION:=net
47
+  CATEGORY:=Network
48
+  DEPENDS:=iotivity +libpthread +libstdcpp
49
+  TITLE:=IoTivity C++ Library
50
+  URL:=https://www.iotivity.org
51
+endef
52
+
53
+define Package/iotivity-cpp/description
54
+    IoTivity is a framework for the Internet of Things based on the
55
+    Open Interconnect Consortium Specification.
56
+endef
57
+
58
+
47 59
 define Package/iotivity-things-manager-lib
48 60
   SECTION:=net
49 61
   CATEGORY:=Network
50
-  DEPENDS:=iotivity
62
+  DEPENDS:=iotivity +iotivity-cpp +libstdcpp
51 63
   TITLE:=IoTivity things manager lib
52 64
   URL:=https://www.iotivity.org
53 65
 endef
@@ -60,7 +72,7 @@ endef
60 72
 define Package/iotivity-plugin-manager-lib
61 73
   SECTION:=net
62 74
   CATEGORY:=Network
63
-  DEPENDS:=iotivity +libexpat
75
+  DEPENDS:=iotivity +iotivity-cpp +libexpat +boost +boost-system
64 76
   TITLE:=IoTivity plugin manager lib
65 77
   URL:=https://www.iotivity.org
66 78
 endef
@@ -73,7 +85,7 @@ endef
73 85
 define Package/iotivity-mqttclient
74 86
   SECTION:=net
75 87
   CATEGORY:=Network
76
-  DEPENDS:=iotivity +iotivity-plugin-manager-lib +boost +boost-system
88
+  DEPENDS:=iotivity +iotivity-cpp +iotivity-plugin-manager-lib +boost +boost-system
77 89
   TITLE:=IoTivity mqtt Client
78 90
   URL:=https://www.iotivity.org
79 91
 endef
@@ -86,7 +98,7 @@ endef
86 98
 define Package/iotivity-oic-middle
87 99
   SECTION:=net
88 100
   CATEGORY:=Network
89
-  DEPENDS:=iotivity
101
+  DEPENDS:=iotivity +iotivity-cpp
90 102
   TITLE:=IoTivity OIC Middle
91 103
   URL:=https://www.iotivity.org
92 104
 endef
@@ -99,7 +111,7 @@ endef
99 111
 define Package/iotivity-things-manager
100 112
   SECTION:=net
101 113
   CATEGORY:=Network
102
-  DEPENDS:=iotivity +iotivity-things-manager-lib
114
+  DEPENDS:=iotivity +iotivity-cpp +iotivity-things-manager-lib
103 115
   TITLE:=IoTivity things manager
104 116
   URL:=https://www.iotivity.org
105 117
 endef
@@ -112,7 +124,7 @@ endef
112 124
 define Package/iotivity-example-garage
113 125
   SECTION:=net
114 126
   CATEGORY:=Network
115
-  DEPENDS:=iotivity
127
+  DEPENDS:=iotivity +iotivity-cpp
116 128
   TITLE:=IoTivity Garage example
117 129
   URL:=https://www.iotivity.org
118 130
 endef
@@ -122,23 +134,23 @@ define Package/iotivity-example-garage/description
122 134
 endef
123 135
 
124 136
 
125
-PKG_CEREAL_NAME:=cereal
126
-PKG_CEREAL_VERSION:=7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245
127
-PKG_CEREAL_SOURCE:=$(PKG_CEREAL_NAME)-$(PKG_CEREAL_VERSION).tar.bz2
128
-PKG_CEREAL_PROTO:=git
129
-PKG_CEREAL_SOURCE_URL:=https://github.com/USCiLab/cereal.git
130
-PKG_CEREAL_SUBDIR:=$(PKG_CEREAL_NAME)
131
-#PKG_CEREAL_MIRROR_MD5SUM:=?
137
+PKG_TINYCBOR_NAME:=tinycbor
138
+PKG_TINYCBOR_VERSION:=3e83c0dc6e55bc73e9a4a7343ab8e06c43127efa
139
+PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2
140
+PKG_TINYCBOR_PROTO:=git
141
+PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git
142
+PKG_TINYCBOR_SUBDIR:=$(PKG_TINYCBOR_NAME)
143
+#PKG_TINYCBOR_MIRROR_MD5SUM:=?
132 144
 
133
-define Download/iotivity-cereal
134
-  FILE:=$(PKG_CEREAL_SOURCE)
135
-  URL:=$(PKG_CEREAL_SOURCE_URL)
136
-  PROTO:=$(PKG_CEREAL_PROTO)
137
-  VERSION:=$(PKG_CEREAL_VERSION)
138
-  SUBDIR:=$(PKG_CEREAL_SUBDIR)
139
-  #MIRROR_MD5SUM:=$(PKG_CEREAL_MIRROR_MD5SUM)
145
+define Download/iotivity-tinycbor
146
+  FILE:=$(PKG_TINYCBOR_SOURCE)
147
+  URL:=$(PKG_TINYCBOR_SOURCE_URL)
148
+  PROTO:=$(PKG_TINYCBOR_PROTO)
149
+  VERSION:=$(PKG_TINYCBOR_VERSION)
150
+  SUBDIR:=$(PKG_TINYCBOR_SUBDIR)
151
+  #MIRROR_MD5SUM:=$(PKG_TINYCBOR_MIRROR_MD5SUM)
140 152
 endef
141
-$(eval $(call Download,iotivity-cereal))
153
+$(eval $(call Download,iotivity-tinycbor))
142 154
 
143 155
 
144 156
 SCONS_OPTIONS += \
@@ -146,6 +158,8 @@ SCONS_OPTIONS += \
146 158
 	TARGET_TRANSPORT=ALL \
147 159
 	TARGET_ARCH=$(ARCH) \
148 160
 	STAGING_DIR=$(STAGING_DIR) \
161
+	LOGGING=true \
162
+	SECURED=1 \
149 163
 	mqttclient examples samples libTGMSDK ConServerApp ConClientApp BootstrapServerApp
150 164
 
151 165
 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
@@ -154,9 +168,10 @@ endif
154 168
 
155 169
 define Build/Prepare
156 170
 	$(call Build/Prepare/Default)
157
-	$(TAR) -C $(PKG_BUILD_DIR)/extlibs/cereal -xjf $(DL_DIR)/$(PKG_CEREAL_SOURCE)
171
+	$(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE)
158 172
 endef
159 173
 
174
+
160 175
 define Build/Configure
161 176
 	(cd $(PKG_BUILD_DIR); \
162 177
 		$(SCONS_VARS) \
@@ -168,46 +183,51 @@ endef
168 183
 
169 184
 define Package/iotivity/install
170 185
 	$(INSTALL_DIR) $(1)/usr/lib
171
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc.so $(1)/usr/lib/liboc.so
172
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc_logger.so $(1)/usr/lib/liboc_logger.so
173
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboctbstack.so $(1)/usr/lib/liboctbstack.so
186
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboctbstack.so $(1)/usr/lib/
187
+endef
188
+
189
+define Package/iotivity-cpp/install
190
+	$(INSTALL_DIR) $(1)/usr/lib
191
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc.so $(1)/usr/lib/
192
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/liboc_logger.so $(1)/usr/lib/
174 193
 endef
175 194
 
176 195
 define Package/iotivity-things-manager-lib/install
177 196
 	$(INSTALL_DIR) $(1)/usr/lib
178
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libTGMSDKLibrary.so $(1)/usr/lib/libTGMSDKLibrary.so
197
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libTGMSDKLibrary.so $(1)/usr/lib/
179 198
 endef
180 199
 
181 200
 define Package/iotivity-plugin-manager-lib/install
182 201
 	$(INSTALL_DIR) $(1)/usr/lib
183
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libpmimpl.so $(1)/usr/lib/libpmimpl.so
202
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libpmimpl.so $(1)/usr/lib/
184 203
 endef
185 204
 
186 205
 define Package/iotivity-mqttclient/install
187 206
 	$(INSTALL_DIR) $(1)/usr/bin
188
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient $(1)/usr/bin/mqttclient
207
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient $(1)/usr/bin/
189 208
 endef
190 209
 
191 210
 define Package/iotivity-oic-middle/install
192 211
 	$(INSTALL_DIR) $(1)/usr/bin
193
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/examples/OICMiddle/OICMiddle $(1)/usr/bin/OICMiddle
212
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/examples/OICMiddle/OICMiddle $(1)/usr/bin/
194 213
 endef
195 214
 
196 215
 define Package/iotivity-things-manager/install
197 216
 	$(INSTALL_DIR) $(1)/usr/bin
198
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/bootstrapserver $(1)/usr/bin/bootstrapserver
199
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-server $(1)/usr/bin/con-server
200
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-client $(1)/usr/bin/con-client
217
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/bootstrapserver $(1)/usr/bin/
218
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-server $(1)/usr/bin/
219
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/things-manager/sampleapp/linux/configuration/con-client $(1)/usr/bin/
201 220
 endef
202 221
 
203 222
 define Package/iotivity-example-garage/install
204 223
 	$(INSTALL_DIR) $(1)/usr/bin
205
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageclient $(1)/usr/bin/garageclient
206
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageserver $(1)/usr/bin/garageserver
224
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageclient $(1)/usr/bin/
225
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/resource/examples/garageserver $(1)/usr/bin/
207 226
 endef
208 227
 
209 228
 
210 229
 $(eval $(call BuildPackage,iotivity))
230
+$(eval $(call BuildPackage,iotivity-cpp))
211 231
 $(eval $(call BuildPackage,iotivity-things-manager-lib))
212 232
 $(eval $(call BuildPackage,iotivity-plugin-manager-lib))
213 233
 $(eval $(call BuildPackage,iotivity-mqttclient))

+ 15
- 2
net/iotivity/patches/001-no_unit_test.patch View File

@@ -1,6 +1,6 @@
1 1
 --- a/resource/SConscript
2 2
 +++ b/resource/SConscript
3
-@@ -61,7 +61,7 @@ if target_os == 'linux':
3
+@@ -67,7 +67,7 @@ if target_os == 'linux':
4 4
  	SConscript('csdk/stack/samples/linux/secure/SConscript')
5 5
  
6 6
  	# Build C/C++ unit tests
@@ -8,4 +8,17 @@
8 8
 +	# SConscript('unit_tests.scons')
9 9
  
10 10
  elif target_os == 'darwin':
11
- 	# Build linux samples for now.
11
+ 	env.Command('../../out/darwin/iotivity-csdk.framework',None,src_dir + '/tools/darwin/mkfwk_osx.sh')
12
+--- a/service/resource-encapsulation/SConscript
13
++++ b/service/resource-encapsulation/SConscript
14
+@@ -101,7 +101,7 @@ SConscript('examples/SConscript')
15
+ ######################################################################
16
+ # Build UnitTests Resource Client , resourceCache and resourceBroker
17
+ ################################################ ######################
18
+-SConscript('unittests/SConscript')
19
+-SConscript('src/resourceCache/unittests/SConscript')
20
+-SConscript('src/resourceBroker/unittest/SConscript')
21
++#SConscript('unittests/SConscript')
22
++#SConscript('src/resourceCache/unittests/SConscript')
23
++#SConscript('src/resourceBroker/unittest/SConscript')
24
+ 

+ 2
- 2
net/iotivity/patches/004-use-env.patch View File

@@ -9,7 +9,7 @@ Subject: [PATCH 3/4] 004-use-env.patch
9 9
 
10 10
 --- a/build_common/SConscript
11 11
 +++ b/build_common/SConscript
12
-@@ -106,6 +106,26 @@ tc_set_msg = '''
12
+@@ -129,6 +129,26 @@ tc_set_msg = '''
13 13
  * cause inexplicable errors.                                                  *
14 14
  *******************************************************************************
15 15
  '''
@@ -35,4 +35,4 @@ Subject: [PATCH 3/4] 004-use-env.patch
35 35
 +
36 36
  if env.get('VERBOSE') == False:
37 37
  	env['CCCOMSTR'] = "Compiling $TARGET"
38
- 	env['CXXCOMSTR'] = "Compiling $TARGET"
38
+ 	env['SHCCCOMSTR'] = "Compiling $TARGET"

+ 0
- 32
net/iotivity/patches/010-libcoap-fix-big-endian-problems.patch View File

@@ -1,32 +0,0 @@
1
-From 62c0a14ccd333d0e55fc431f151253a72a2836d0 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Mon, 8 Jun 2015 21:57:52 +0200
4
-Subject: [PATCH] libcoap: fix big endian problems
5
-
6
-When this is build for a big endian Linux system WORDS_BIGENDIAN was
7
-not be set. This patch sets it correctly so it will not generate broken
8
-code on big endian systems.
9
-This was tested on MIPS BE 32 Bit.
10
-
11
-Change-Id: I59dd07d8020c553318e2aa43894a2185fe9b9286
12
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
13
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1219
14
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
15
-Reviewed-by: Erich Keane <erich.keane@intel.com>
16
----
17
- resource/csdk/connectivity/lib/libcoap-4.1.1/config.h | 4 ++--
18
- 1 file changed, 2 insertions(+), 2 deletions(-)
19
-
20
---- a/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h
21
-+++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h
22
-@@ -135,8 +135,8 @@
23
- #  define WORDS_BIGENDIAN 1
24
- # endif
25
- #else
26
--# ifndef WORDS_BIGENDIAN
27
--/* #  undef WORDS_BIGENDIAN */
28
-+# if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
29
-+#  define WORDS_BIGENDIAN 1
30
- # endif
31
- #endif
32
- 

+ 0
- 35
net/iotivity/patches/011-cdsk-fix-big-endian-problem.patch View File

@@ -1,35 +0,0 @@
1
-From 7189bc088f558945972d82a9a3427001cb20000a Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Mon, 8 Jun 2015 22:03:19 +0200
4
-Subject: [PATCH] cdsk: fix big endian problem
5
-
6
-Without this patch the client will endianes swap the port number when
7
-sending the detailed request after it got the answer for his multicast
8
-get. Use the same method for storing the port number in the address
9
-array in ever part of the code and do not use memcpy and manual
10
-bytewise coping mixed over the code. memcpy was used once and byte wise
11
-copy was used twice so I choose the majority.
12
-This was tested on MIPS BE 32 Bit.
13
-
14
-Change-Id: Ib486171987004d10209d2bbf6b1d9ada75235651
15
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
16
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1220
17
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
18
-Reviewed-by: Doug Hudson <douglas.hudson@intel.com>
19
-Reviewed-by: Erich Keane <erich.keane@intel.com>
20
----
21
- resource/csdk/stack/src/ocstack.c | 3 ++-
22
- 1 file changed, 2 insertions(+), 1 deletion(-)
23
-
24
---- a/resource/csdk/stack/src/ocstack.c
25
-+++ b/resource/csdk/stack/src/ocstack.c
26
-@@ -723,7 +723,8 @@ OCStackResult UpdateResponseAddr(OCDevAd
27
-         address->addr[i] = atoi(tok);
28
-     }
29
- 
30
--    memcpy(&address->addr[4], &endPoint->addressInfo.IP.port, sizeof(uint16_t));
31
-+    address->addr[4] = (uint8_t)endPoint->addressInfo.IP.port;
32
-+    address->addr[5] = (uint8_t)(endPoint->addressInfo.IP.port >> 8);
33
-     ret = OC_STACK_OK;
34
- 
35
- exit:

+ 0
- 11
net/iotivity/patches/030-fix-missing-lib.patch View File

@@ -1,11 +0,0 @@
1
---- a/service/protocol-plugin/sample-app/linux/SConscript
2
-+++ b/service/protocol-plugin/sample-app/linux/SConscript
3
-@@ -41,7 +41,7 @@ if target_os not in ['windows', 'winrt']
4
- 
5
- sample_env.AppendUnique(LIBS = ['oc', 'oc_logger', 'octbstack',
6
-                                 'connectivity_abstraction', 'coap',
7
--                                'ppm', 'pmimpl', 'dl'])
8
-+                                'ppm', 'boost_system', 'pmimpl', 'dl'])
9
- 
10
- if env.get('SECURED') == '1':
11
-     sample_env.AppendUnique(LIBS = ['tinydtls'])

+ 0
- 11
net/iotivity/patches/040-fix-things-manager.patch View File

@@ -1,11 +0,0 @@
1
---- a/service/things-manager/sampleapp/linux/configuration/SConscript
2
-+++ b/service/things-manager/sampleapp/linux/configuration/SConscript
3
-@@ -57,7 +57,7 @@ conserver = linux_sample_env.Program('co
4
- conclient = linux_sample_env.Program('con-client', 'con-client.cpp')
5
- bootstrapserver = linux_sample_env.Program('bootstrapserver', 'bootstrapserver.cpp')
6
- Alias("ConServerApp", conserver)
7
--Alias("ConCleintApp", conclient)
8
-+Alias("ConClientApp", conclient)
9
- Alias("BootstrapServerApp", bootstrapserver)
10
- env.AppendTarget('ConServerApp')
11
- env.AppendTarget('ConClientApp')

+ 0
- 14
net/iotivity/patches/050-fix-OICMidle.patch View File

@@ -1,14 +0,0 @@
1
---- a/resource/csdk/stack/include/octypes.h
2
-+++ b/resource/csdk/stack/include/octypes.h
3
-@@ -35,9 +35,9 @@ extern "C" {
4
- //Don't want to expose to application layer that lower level stack is using CoAP.
5
- 
6
- /// Authority + URI string to prefix well known queries
7
--#define OC_WELL_KNOWN_QUERY                  "224.0.1.187:5683/oc/core"
8
-+#define OC_WELL_KNOWN_QUERY                  "/oc/core"
9
- #define OC_MULTICAST_DISCOVERY_URI           "/oc/core"
10
--#define OC_EXPLICIT_DEVICE_DISCOVERY_URI     "224.0.1.187:5683/oc/core/d?rt=core.led"
11
-+#define OC_EXPLICIT_DEVICE_DISCOVERY_URI     "/oc/core/d?rt=core.led"
12
- /// Multicast address and port string to prefix multicast queries
13
- #define OC_MULTICAST_PREFIX                  "224.0.1.187:5683"
14
- /// IP Multicast address to use for multicast requests

+ 49
- 0
net/iotivity/patches/060-liboc-add-missing-depending-library.patch View File

@@ -0,0 +1,49 @@
1
+From b13839cceaae97d7d23b54586da1ad7ac85ab2b6 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 20:50:39 +0200
4
+Subject: [PATCH] liboc: add missing depending library
5
+
6
+liboc.so depends on liboctbstack.so, liboc_logger.so and pthread, this
7
+patch adds these dependencies to the build.
8
+
9
+Without this the dynamic loader will not automatically load these
10
+libraries and it could result in unresolved dependencies at runtime.
11
+
12
+Change-Id: I971b45669adef31dc9cca719884ebeb74aaf735e
13
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
14
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1794
15
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
16
+Reviewed-by: Erich Keane <erich.keane@intel.com>
17
+---
18
+ resource/src/SConscript |   14 ++++++++------
19
+ 1 file changed, 8 insertions(+), 6 deletions(-)
20
+
21
+--- a/resource/src/SConscript
22
++++ b/resource/src/SConscript
23
+@@ -40,18 +40,20 @@ oclib_env.AppendUnique(CPPPATH = [
24
+ 		'../csdk/connectivity/lib/libcoap-4.1.1'
25
+ 		])
26
+ 
27
++oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
28
++
29
++oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
30
++
31
+ target_os = env.get('TARGET_OS')
32
++if target_os == 'linux':
33
++	oclib_env.AppendUnique(LIBS = ['pthread'])
34
++
35
+ if target_os not in ['windows', 'winrt']:
36
+ 	oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
37
+ 
38
+ if target_os == 'android':
39
+ 	oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
40
+-	oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
41
+-	oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
42
+-
43
+-if target_os in ['darwin', 'ios']:
44
+-	oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
45
+-	oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
46
++	oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
47
+ 
48
+ ######################################################################
49
+ # Source files and Targets

+ 42
- 0
net/iotivity/patches/061-things-manager-libTGMSDKLibrary.so-add-missing-depen.patch View File

@@ -0,0 +1,42 @@
1
+From 0143dfaa7e6dace845412e97ebbf697d273b0d10 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 22:06:52 +0200
4
+Subject: [PATCH] things-manager: libTGMSDKLibrary.so: add missing depending
5
+ library
6
+
7
+libTGMSDKLibrary.so also depends on liboc.so, liboctbstack.so and
8
+pthread, this patch adds these dependencies to the build.
9
+
10
+Without this the dynamic loader will not automatically load these
11
+libraries and it could result in unresolved dependencies at runtime.
12
+
13
+Change-Id: I174b38e747be247fc25544db629f8ad2b7eb5ef5
14
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
15
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1795
16
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
17
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
18
+---
19
+ service/things-manager/SConscript |    5 ++++-
20
+ 1 file changed, 4 insertions(+), 1 deletion(-)
21
+
22
+--- a/service/things-manager/SConscript
23
++++ b/service/things-manager/SConscript
24
+@@ -35,14 +35,17 @@ target_os = env.get('TARGET_OS')
25
+ ######################################################################
26
+ things_manager_env.AppendUnique(CPPPATH = ['../../extlibs/timer', 'sdk/inc', 'sdk/src'])
27
+ 
28
++things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack'])
29
++
30
+ if target_os not in ['windows', 'winrt']:
31
+     things_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
32
+     if target_os != 'android':
33
+         things_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
34
++        things_manager_env.AppendUnique(LIBS = ['pthread'])
35
+ 
36
+ if target_os == 'android':
37
+     things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
38
+-    things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack', 'gnustl_shared'])
39
++    things_manager_env.PrependUnique(LIBS = ['gnustl_shared'])
40
+ 
41
+ ######################################################################
42
+ # Source files and Targets

+ 32
- 0
net/iotivity/patches/062-soft-sensor-manager-libSSMCore.so-add-missing-depend.patch View File

@@ -0,0 +1,32 @@
1
+From b52307797b91d7448a72874e4da7bed30c27a4f5 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 22:29:14 +0200
4
+Subject: [PATCH] soft-sensor-manager: libSSMCore.so: add missing depending
5
+ library
6
+
7
+libSSMCore.so also depends on libdl.so, this patch adds these
8
+dependencies to the build.
9
+
10
+Without this the dynamic loader will not automatically load these
11
+libraries and it could result in unresolved dependencies at runtime.
12
+
13
+Change-Id: I76faff46fe96caef75fb6673c7e83d62b15b8489
14
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
15
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1796
16
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
17
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
18
+---
19
+ service/soft-sensor-manager/SConscript |    2 +-
20
+ 1 file changed, 1 insertion(+), 1 deletion(-)
21
+
22
+--- a/service/soft-sensor-manager/SConscript
23
++++ b/service/soft-sensor-manager/SConscript
24
+@@ -157,7 +157,7 @@ static_libssmcore = ssmcore_env.StaticLi
25
+ 
26
+ ssmcore_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
27
+ ssmcore_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger',
28
+-            'connectivity_abstraction', 'coap'])
29
++            'connectivity_abstraction', 'coap', 'dl'])
30
+ 
31
+ shared_libssmcore = ssmcore_env.SharedLibrary(
32
+ 		target = 'SSMCore',

+ 39
- 0
net/iotivity/patches/063-mqtt-fan-libmosquittopp.so-add-missing-depending-lib.patch View File

@@ -0,0 +1,39 @@
1
+From 60b43aed7e479bc6d7252f0dba2542fe7aab9195 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 22:38:02 +0200
4
+Subject: [PATCH] mqtt-fan: libmosquittopp.so: add missing depending library
5
+
6
+libmosquittopp.so also depends on libpthread.so, this patch adds these
7
+dependencies to the build. In addition it puts the dependency to
8
+mosquitto to the beginning of the list. This is needed because
9
+mosquitto is a statically linked lib and it also has unresolved
10
+symbols, but gcc only searches the dynamic libs defined after the
11
+static for unresolved symbols in the static lib.
12
+
13
+Without this the dynamic loader will not automatically load these
14
+libraries and it could result in unresolved dependencies at runtime.
15
+
16
+Change-Id: I866a46305c31d37cf706b9f2b965e843c35c5667
17
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
18
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1797
19
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
20
+Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
21
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
22
+---
23
+ .../plugins/mqtt-fan/lib/cpp/SConscript            |    5 ++++-
24
+ 1 file changed, 4 insertions(+), 1 deletion(-)
25
+
26
+--- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
27
++++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
28
+@@ -16,7 +16,10 @@ mosquittopp_env.AppendUnique(CPPPATH = [
29
+ if target_os not in ['windows', 'winrt']:
30
+ 	mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC'])
31
+ 
32
+-mosquittopp_env.AppendUnique(LIBS = ['mosquitto', 'ssl', 'crypto'])
33
++if target_os == 'linux':
34
++	mosquittopp_env.AppendUnique(LIBS = ['pthread'])
35
++
36
++mosquittopp_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto'])
37
+ ######################################################################
38
+ # Source files and Targets
39
+ ######################################################################

+ 42
- 0
net/iotivity/patches/064-protocol-plugin-libfanserver_mqtt_plugin.so-and-libl.patch View File

@@ -0,0 +1,42 @@
1
+From d1fb4c055f168e68ffd2d5596eef8d96f6c6cfae Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 22:41:09 +0200
4
+Subject: [PATCH] protocol-plugin: libfanserver_mqtt_plugin.so and
5
+ liblightserver_mqtt_plugin.so add missing depending library
6
+
7
+libfanserver_mqtt_plugin.so and liblightserver_mqtt_plugin.so are also
8
+depending on liboc.so and libcrypto.so, this patch adds these
9
+dependencies to the build. In addition it puts the dependency to
10
+mosquitto to the beginning of the list. This is needed because
11
+mosquitto is a statically linked lib and it also has unresolved
12
+symbols, but gcc only searches the dynamic libs defined after the
13
+static for unresolved symbols in the static lib.
14
+
15
+mosquitto was only build as a static linked library so we can use the
16
+normal LIBS mechanism and it will be statically linked.
17
+
18
+Without this the dynamic loader will not automatically load these
19
+libraries and it could result in unresolved dependencies at runtime.
20
+
21
+Change-Id: Ia130827d04bd3bb1a8863fc64d0097a076edc751
22
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
23
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1798
24
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
25
+Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
26
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
27
+---
28
+ service/protocol-plugin/plugins/SConscript |    3 +--
29
+ 1 file changed, 1 insertion(+), 2 deletions(-)
30
+
31
+--- a/service/protocol-plugin/plugins/SConscript
32
++++ b/service/protocol-plugin/plugins/SConscript
33
+@@ -47,8 +47,7 @@ if target_os == 'android':
34
+     plugins_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
35
+     plugins_env.AppendUnique(LIBS = ['gnustl_shared'])
36
+ 
37
+-plugins_env.AppendUnique(LIBS = [File(env.get('BUILD_DIR') + '/libmosquitto.a'),
38
+-        'mosquitto', 'ssl', 'rt'])
39
++plugins_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto', 'rt', 'oc'])
40
+ 
41
+ 
42
+ ######################################################################

+ 69
- 0
net/iotivity/patches/065-resource-manipulation-libserver_builder.so-add-missi.patch View File

@@ -0,0 +1,69 @@
1
+From 2993af980993ebb70b686b1a521d98d26e85cfc2 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke@hauke-m.de>
3
+Date: Tue, 21 Jul 2015 20:55:50 +0200
4
+Subject: [PATCH] resource-manipulation: libserver_builder.so add missing
5
+ depending library
6
+
7
+libserver_builder.so is also depending on liboc.so and
8
+librcs_common.so, this patch adds these dependencies to the build.
9
+
10
+liboctbstack.so is only needed when LOGGING=true is set. Without
11
+liboctbstack.so libserver_builder.so misses the dependencies to the
12
+OCLog and OCLogv symbols.
13
+Add LIBPATH to make sure the libs will be found, this fixes a problem
14
+in some jenkins tests.
15
+
16
+pthread is added two times, once should be enough.
17
+
18
+Without this the dynamic loader will not automatically load these
19
+libraries and it could result in unresolved dependencies at runtime.
20
+
21
+Change-Id: I6af126eb4af975b7231d01df922885c7dec5fc56
22
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
23
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1799
24
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
25
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
26
+---
27
+ .../src/serverBuilder/SConscript                   |   11 ++++++-----
28
+ 1 file changed, 6 insertions(+), 5 deletions(-)
29
+
30
+--- a/service/resource-encapsulation/src/serverBuilder/SConscript
31
++++ b/service/resource-encapsulation/src/serverBuilder/SConscript
32
+@@ -47,6 +47,8 @@ server_builder_env.AppendUnique(CPPPATH
33
+ 
34
+ server_builder_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs', 'include'])
35
+ 
36
++server_builder_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
37
++
38
+ if target_os not in ['windows', 'winrt']:
39
+     server_builder_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
40
+     if target_os != 'android':
41
+@@ -56,7 +58,10 @@ if target_os == 'android':
42
+     server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
43
+     server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
44
+ 
45
+-server_builder_env.AppendUnique(LIBS = ['dl'])
46
++server_builder_env.AppendUnique(LIBS = ['dl', 'oc', 'rcs_common'])
47
++
48
++if env.get('LOGGING'):
49
++	server_builder_env.AppendUnique(LIBS = ['octbstack'])
50
+ 
51
+ if not release:
52
+     server_builder_env.AppendUnique(CXXFLAGS = ['--coverage'])
53
+@@ -77,7 +82,6 @@ server_builder_env.InstallTarget([server
54
+ ######################################################################
55
+ server_builder_test_env = server_builder_env.Clone();
56
+ 
57
+-server_builder_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
58
+ server_builder_test_env.AppendUnique(CPPPATH = [
59
+     env.get('SRC_DIR')+'/extlibs/hippomocks-master',
60
+     gtest_dir + '/include',
61
+@@ -89,8 +93,6 @@ gtest_main = File(gtest_dir + '/lib/.lib
62
+ 
63
+ server_builder_test_env.PrependUnique(LIBS = [
64
+     'rcs_server',
65
+-    'rcs_common',
66
+-    'oc',
67
+     'octbstack',
68
+     'oc_logger',
69
+     'connectivity_abstraction',

+ 54
- 0
net/iotivity/patches/066-csdk-remove-dependency-to-liboc_logger.so-in-c-code.patch View File

@@ -0,0 +1,54 @@
1
+From c02a2b8ad3efb0b59392b1c2d441e3f7144c1fda Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 22:45:40 +0200
4
+Subject: [PATCH] csdk: remove dependency to liboc_logger.so in c code
5
+
6
+The liboc_logger.so is only used by the c++ part and not by the c part,
7
+remove it from the c only part.
8
+
9
+Change-Id: Ib0894974de8ef7150401f02fbd0ea864d1d6f2cd
10
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
11
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1801
12
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
13
+Reviewed-by: Charlie Lenahan <charlie.lenahan@intel.com>
14
+Reviewed-by: Erich Keane <erich.keane@intel.com>
15
+---
16
+ resource/csdk/connectivity/test/SConscript         |    3 ---
17
+ .../samples/linux/SimpleClientServer/SConscript    |    2 +-
18
+ .../csdk/stack/samples/linux/secure/SConscript     |    2 +-
19
+ 3 files changed, 2 insertions(+), 5 deletions(-)
20
+
21
+--- a/resource/csdk/connectivity/test/SConscript
22
++++ b/resource/csdk/connectivity/test/SConscript
23
+@@ -58,9 +58,6 @@ target_os = env.get('TARGET_OS')
24
+ if target_os not in ['arduino', 'darwin', 'ios']:
25
+ 	catest_env.AppendUnique(LIBS=['rt'])
26
+ 
27
+-if target_os != 'darwin':
28
+-    catest_env.PrependUnique(LIBS = ['oc_logger'])
29
+-
30
+ if env.get('SECURED') == '1':
31
+     catest_env.AppendUnique(LIBS = ['tinydtls'])
32
+ 
33
+--- a/resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
34
++++ b/resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
35
+@@ -41,7 +41,7 @@ samples_env.AppendUnique(LIBPATH = [env.
36
+ if target_os in ['darwin', 'ios']:
37
+ 	samples_env.PrependUnique(LIBS = ['m','octbstack', 'ocsrm', 'connectivity_abstraction','coap' ])
38
+ elif target_os not in ['arduino']:
39
+-	samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'ocsrm', 'oc_logger', 'connectivity_abstraction', 'coap'])
40
++	samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap'])
41
+ 	samples_env.AppendUnique(LIBS = ['rt'])
42
+ 
43
+ if env.get('SECURED') == '1':
44
+--- a/resource/csdk/stack/samples/linux/secure/SConscript
45
++++ b/resource/csdk/stack/samples/linux/secure/SConscript
46
+@@ -41,7 +41,7 @@ if target_os not in ['windows', 'winrt']
47
+ 		samples_env.AppendUnique(LIBS = ['-lpthread'])
48
+ 
49
+ samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
50
+-samples_env.PrependUnique(LIBS = ['octbstack', 'm', 'oc_logger', 'connectivity_abstraction', 'coap'])
51
++samples_env.PrependUnique(LIBS = ['octbstack', 'm', 'connectivity_abstraction', 'coap'])
52
+ if env.get('SECURED') == '1':
53
+     samples_env.AppendUnique(LIBS = ['tinydtls'])
54
+ 

+ 37
- 0
net/iotivity/patches/067-csdk-libconnectivity_abstraction.so-add-missing-depe.patch View File

@@ -0,0 +1,37 @@
1
+From 32e39b18fb4fd01408898a0ccba751f0033800c7 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke@hauke-m.de>
3
+Date: Wed, 22 Jul 2015 23:05:19 +0200
4
+Subject: [PATCH] csdk: libconnectivity_abstraction.so: add missing depending
5
+ library
6
+
7
+libconnectivity_abstractionso depends on libcoap.so and librt.so when
8
+build as shared lib, which is the case for the Tizen build. This patch
9
+adds these dependencies to the build.
10
+
11
+Without this the dynamic loader will not automatically load these
12
+libraries and it could result in unresolved dependencies at runtime.
13
+
14
+Change-Id: Ib972be2b766d7fbccac9b246ae6f11e6182af94c
15
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
16
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1825
17
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
18
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
19
+Tested-by: Uze Choi <uzchoi@samsung.com>
20
+---
21
+ resource/csdk/connectivity/src/SConscript |    5 +++++
22
+ 1 file changed, 5 insertions(+)
23
+
24
+--- a/resource/csdk/connectivity/src/SConscript
25
++++ b/resource/csdk/connectivity/src/SConscript
26
+@@ -108,6 +108,11 @@ if 'BLE' in ca_transport:
27
+ print "Include path is %s" % env.get('CPPPATH')
28
+ print "Files path is %s" % env.get('CA_SRC')
29
+ if ca_os in ['android', 'tizen']:
30
++	env.AppendUnique(LIBS = ['coap'])
31
++	if env.get('SECURED') == '1':
32
++		env.AppendUnique(LIBS = ['tinydtls'])
33
++	if ca_os != 'android':
34
++		env.AppendUnique(LIBS = ['rt'])
35
+ 	calib = env.SharedLibrary('connectivity_abstraction', env.get('CA_SRC'))
36
+ else:
37
+ 	calib = env.StaticLibrary('connectivity_abstraction', env.get('CA_SRC'))

+ 227
- 0
net/iotivity/patches/068-build-make-build-fail-if-unresolved-symbols-found.patch View File

@@ -0,0 +1,227 @@
1
+From 2533c88e18de689dbb26cfd4d585b1a991533c76 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Tue, 21 Jul 2015 22:00:18 +0200
4
+Subject: [PATCH] build: make build fail if unresolved symbols found
5
+
6
+gcc links shared libs also when there are still some unresolved
7
+symbols, you have to specify it explicitly to make it fail in such
8
+cases. I think a compiler should fail in such cases otherwise
9
+someone will add some not intended dependencies or some existing
10
+dependencies are not getting declared.
11
+
12
+This patch makes gcc fail in such cases. I have only activated this for
13
+libs build in a Linux build and explicitly deactivates it for windows
14
+(does this even work at all?) This should be build tested with Android
15
+also.
16
+
17
+This was build tested for Linux and Android.
18
+
19
+This patch depends on some other patches I send which are fixing the
20
+problems I found with this change.
21
+
22
+Change-Id: I9ab79896ca2e86e9226cd9b39060a0763ef89694
23
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
24
+Reviewed-on: https://gerrit.iotivity.org/gerrit/1802
25
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
26
+Reviewed-by: Erich Keane <erich.keane@intel.com>
27
+Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
28
+Reviewed-by: Uze Choi <uzchoi@samsung.com>
29
+---
30
+ extlibs/expat/SConscript                           |    3 +++
31
+ .../csdk/connectivity/samples/android/SConscript   |    1 +
32
+ resource/csdk/connectivity/src/SConscript          |    3 +++
33
+ resource/oc_logger/SConscript                      |    3 +++
34
+ resource/src/SConscript                            |    3 +++
35
+ service/notification-manager/SConscript            |    3 +++
36
+ service/protocol-plugin/plugin-manager/SConscript  |    4 ++++
37
+ .../plugin-manager/src/Android/jni/SConscript      |    1 +
38
+ service/protocol-plugin/plugins/SConscript         |    3 +++
39
+ .../plugins/mqtt-fan/lib/cpp/SConscript            |    3 +++
40
+ .../resource-manipulation/src/common/SConscript    |    5 ++++-
41
+ .../src/resourceContainer/SConscript               |    3 +++
42
+ .../src/resourceContainer/unittests/SConscript     |    3 +++
43
+ .../src/serverBuilder/SConscript                   |    3 +++
44
+ service/soft-sensor-manager/SConscript             |    3 +++
45
+ service/things-manager/SConscript                  |    3 +++
46
+ service/things-manager/sdk/java/jni/SConscript     |    3 +++
47
+ 17 files changed, 49 insertions(+), 1 deletion(-)
48
+
49
+--- a/extlibs/expat/SConscript
50
++++ b/extlibs/expat/SConscript
51
+@@ -35,6 +35,9 @@ if target_os not in ['windows', 'winrt']
52
+ 			'-fexceptions', '-fno-common'])
53
+ 	expat_env.AppendUnique(CPPDEFINES = ['HAVE_EXPAT_CONFIG_H'])
54
+ 
55
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
56
++	expat_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
57
++
58
+ ######################################################################
59
+ # Source files and Targets
60
+ ######################################################################
61
+--- a/resource/csdk/connectivity/src/SConscript
62
++++ b/resource/csdk/connectivity/src/SConscript
63
+@@ -27,6 +27,9 @@ env.AppendUnique(CPPPATH = [ os.path.joi
64
+ if ca_os not in ['arduino', 'windows', 'winrt']:
65
+ 	env.AppendUnique(CPPDEFINES = ['WITH_POSIX'])
66
+ 
67
++if ca_os not in ['darwin', 'ios', 'windows', 'winrt']:
68
++	env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
69
++
70
+ if ca_os in ['darwin','ios']:
71
+ 	env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
72
+ 
73
+--- a/resource/oc_logger/SConscript
74
++++ b/resource/oc_logger/SConscript
75
+@@ -42,6 +42,9 @@ if target_os not in ['arduino', 'windows
76
+ 	liboc_logger_env.AppendUnique(CFLAGS = ['-Wall', '-std=c99', '-fPIC'])
77
+ 	liboc_logger_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x', '-fPIC'])
78
+ 
79
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
80
++	liboc_logger_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
81
++
82
+ ######################################################################
83
+ # Source files and Targets
84
+ ######################################################################
85
+--- a/resource/src/SConscript
86
++++ b/resource/src/SConscript
87
+@@ -51,6 +51,9 @@ if target_os == 'linux':
88
+ if target_os not in ['windows', 'winrt']:
89
+ 	oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
90
+ 
91
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
92
++	oclib_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
93
++
94
+ if target_os == 'android':
95
+ 	oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
96
+ 	oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
97
+--- a/service/notification-manager/SConscript
98
++++ b/service/notification-manager/SConscript
99
+@@ -65,6 +65,9 @@ notimgr_env.PrependUnique(LIBS = [
100
+ if target_os not in ['windows', 'winrt']:
101
+ 	notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
102
+ 
103
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
104
++	notimgr_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
105
++
106
+ if target_os == 'linux':
107
+ 	notimgr_env.AppendUnique(LIBS = ['pthread'])
108
+ 
109
+--- a/service/protocol-plugin/plugin-manager/SConscript
110
++++ b/service/protocol-plugin/plugin-manager/SConscript
111
+@@ -61,6 +61,10 @@ if target_os == 'android':
112
+ pmimpl_env = plugin_manager_env.Clone()
113
+ pmimpl_env.PrependUnique(CCFLAGS = ['-fPIC'])
114
+ pmimpl_env.PrependUnique(LIBS = File(env.get('BUILD_DIR') + '/libcpluff.a'))
115
++
116
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
117
++	pmimpl_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
118
++
119
+ pmimpl = pmimpl_env.SharedLibrary('pmimpl', pmimpl_src)
120
+ 
121
+ plugin_manager_env.InstallTarget([ppm, pmimpl], 'libppm')
122
+--- a/service/protocol-plugin/plugin-manager/src/Android/jni/SConscript
123
++++ b/service/protocol-plugin/plugin-manager/src/Android/jni/SConscript
124
+@@ -23,6 +23,7 @@ ppm_jni_env.PrependUnique(LIBS = ['pmimp
125
+ ppm_jni_env.AppendUnique(CPPPATH = [ppm_sdk+'/src'])
126
+ ppm_jni_env.AppendUnique(CPPPATH = [ppm_sdk+'/../lib/cpluff/libcpluff'])
127
+ ppm_jni_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs/rapidxml'])
128
++ppm_jni_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
129
+ 
130
+ ######################################################################
131
+ # Source files and Targets
132
+--- a/service/protocol-plugin/plugins/SConscript
133
++++ b/service/protocol-plugin/plugins/SConscript
134
+@@ -40,6 +40,9 @@ if target_os not in ['windows', 'winrt']
135
+     plugins_env.PrependUnique(CCFLAGS = ['-fPIC'])
136
+     plugins_env.AppendUnique(LINKFLAGS = ['-fPIC'])
137
+ 
138
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
139
++    plugins_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
140
++
141
+     if target_os not in ['arduino', 'android']:
142
+         plugins_env.AppendUnique(LIBS = ['pthread'])
143
+ 
144
+--- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
145
++++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
146
+@@ -16,6 +16,9 @@ mosquittopp_env.AppendUnique(CPPPATH = [
147
+ if target_os not in ['windows', 'winrt']:
148
+ 	mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC'])
149
+ 
150
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
151
++	mosquittopp_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
152
++
153
+ if target_os == 'linux':
154
+ 	mosquittopp_env.AppendUnique(LIBS = ['pthread'])
155
+ 
156
+--- a/service/resource-encapsulation/src/resourceContainer/SConscript
157
++++ b/service/resource-encapsulation/src/resourceContainer/SConscript
158
+@@ -88,6 +88,9 @@ if target_os not in ['windows', 'winrt']
159
+     if target_os != 'android':
160
+         resource_container_env.AppendUnique(CXXFLAGS = ['-pthread'])
161
+ 
162
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
163
++    resource_container_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
164
++
165
+ if target_os == 'android':
166
+     resource_container_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
167
+     resource_container_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
168
+--- a/service/resource-encapsulation/src/resourceContainer/unittests/SConscript
169
++++ b/service/resource-encapsulation/src/resourceContainer/unittests/SConscript
170
+@@ -144,6 +144,9 @@ if int(containerJavaSupport):
171
+ test_bundle_env = container_gtest_env.Clone()
172
+ test_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])
173
+ 
174
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
175
++    test_bundle_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
176
++
177
+ TEST_BUNDLE_DIR = 'TestBundle/'
178
+ test_bundle_env.AppendUnique(CPPPATH = [
179
+ 		TEST_BUNDLE_DIR + 'include',
180
+--- a/service/resource-encapsulation/src/serverBuilder/SConscript
181
++++ b/service/resource-encapsulation/src/serverBuilder/SConscript
182
+@@ -54,6 +54,9 @@ if target_os not in ['windows', 'winrt']
183
+     if target_os != 'android':
184
+         server_builder_env.AppendUnique(CXXFLAGS = ['-pthread'])
185
+ 
186
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
187
++    server_builder_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
188
++
189
+ if target_os == 'android':
190
+     server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
191
+     server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
192
+--- a/service/soft-sensor-manager/SConscript
193
++++ b/service/soft-sensor-manager/SConscript
194
+@@ -45,6 +45,9 @@ if target_os not in ['windows', 'winrt']
195
+ 		soft_sensor_manager_env.AppendUnique(LIBS = ['pthread'])
196
+ 		soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
197
+ 
198
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
199
++	soft_sensor_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
200
++
201
+ if target_os == 'android':
202
+ 	soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
203
+ 	soft_sensor_manager_env.AppendUnique(LIBS = ['gnustl_shared'])
204
+--- a/service/things-manager/SConscript
205
++++ b/service/things-manager/SConscript
206
+@@ -43,6 +43,9 @@ if target_os not in ['windows', 'winrt']
207
+         things_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
208
+         things_manager_env.AppendUnique(LIBS = ['pthread'])
209
+ 
210
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
211
++    things_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
212
++
213
+ if target_os == 'android':
214
+     things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
215
+     things_manager_env.PrependUnique(LIBS = ['gnustl_shared'])
216
+--- a/service/things-manager/sdk/java/jni/SConscript
217
++++ b/service/things-manager/sdk/java/jni/SConscript
218
+@@ -27,6 +27,9 @@ tm_jni_env.AppendUnique(CPPPATH = [tm_sd
219
+ tm_jni_env.AppendUnique(CPPPATH = [base_jni])
220
+ tm_jni_env.AppendUnique(CPPPATH = ['tm/inc', 'jniutil/inc', extlibs+'/timer/'])
221
+ 
222
++if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
223
++    tm_jni_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
224
++
225
+ ######################################################################
226
+ # Source files and Targets
227
+ ######################################################################

+ 29
- 0
net/iotivity/patches/070-Avoid-Segv-by-testing-address-field-before-using-it.patch View File

@@ -0,0 +1,29 @@
1
+From a8f5ed3ff337bce5222967fdf8c0b475fd28e74a Mon Sep 17 00:00:00 2001
2
+From: John Light <john.j.light@intel.com>
3
+Date: Thu, 30 Jul 2015 15:14:07 -0700
4
+Subject: [PATCH] Avoid Segv by testing address field before using it.
5
+
6
+sIssue reported off dev list by Gabriel Schulhof.
7
+
8
+Change-Id: Ifa529da59fb784fd5cdef6ca333635cf99ed1f59
9
+Signed-off-by: John Light <john.j.light@intel.com>
10
+Reviewed-on: https://gerrit.iotivity.org/gerrit/2160
11
+Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
12
+Reviewed-by: Erich Keane <erich.keane@intel.com>
13
+---
14
+ .../src/ip_adapter/linux/caipnwmonitor.c           |    4 ++++
15
+ 1 file changed, 4 insertions(+)
16
+
17
+--- a/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c
18
++++ b/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c
19
+@@ -57,6 +57,10 @@ u_arraylist_t *CAIPGetInterfaceInformati
20
+     struct ifaddrs *ifa = NULL;
21
+     for (ifa = ifp; ifa; ifa = ifa->ifa_next)
22
+     {
23
++        if (!ifa->ifa_addr)
24
++        {
25
++            continue;
26
++        }
27
+         int family = ifa->ifa_addr->sa_family;
28
+         if ((ifa->ifa_flags & IFF_LOOPBACK) || (AF_INET != family && AF_INET6 != family))
29
+         {

+ 29
- 0
net/iotivity/patches/090-resource-encapsulation-fix-build-without-curl.patch View File

@@ -0,0 +1,29 @@
1
+From e767f892e7736008b60f85d2c2690d660661814b Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Thu, 13 Aug 2015 15:03:11 +0200
4
+Subject: [PATCH] resource-encapsulation: fix build without curl
5
+
6
+The hue plugin needs curl and it should only be build when libcurl is available.
7
+Without this patch, the build fails without curl installed, this patch fixes the problem and makes the build worm without curl and without the hue stuff.
8
+
9
+Without this patch I am getting this error message:
10
+scons: ***
11
+File "/service/third_party_libs.scons", line 50, in ?
12
+
13
+Change-Id: I5b4da555ff84b9b605cc6c119990d60ff670bd0d
14
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
15
+---
16
+ .../src/resourceContainer/SConscript               |    2 +-
17
+ 1 file changed, 1 insertion(+), 1 deletion(-)
18
+
19
+--- a/service/resource-encapsulation/src/resourceContainer/SConscript
20
++++ b/service/resource-encapsulation/src/resourceContainer/SConscript
21
+@@ -177,7 +177,7 @@ else:
22
+ 	
23
+ 	HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src)
24
+ 	hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle')
25
+-	lib_env = conf2.Finish()
26
++lib_env = conf2.Finish()
27
+ 
28
+ ######################################################################
29
+ # build resource container unit tests

+ 22
- 0
net/iotivity/patches/140-remove-glib2.patch View File

@@ -0,0 +1,22 @@
1
+--- a/resource/csdk/security/provisioning/sample/SConscript
2
++++ b/resource/csdk/security/provisioning/sample/SConscript
3
+@@ -53,7 +53,7 @@ provisioning_env.PrependUnique(LIBS = ['
4
+ 
5
+ if env.get('SECURED') == '1':
6
+     provisioning_env.AppendUnique(LIBS = ['tinydtls'])
7
+-provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
8
++#provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
9
+ 
10
+ provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
11
+ 
12
+--- a/resource/csdk/security/provisioning/SConscript
13
++++ b/resource/csdk/security/provisioning/SConscript
14
+@@ -62,7 +62,7 @@ provisioning_env.PrependUnique(LIBS = ['
15
+ 
16
+ provisioning_env.AppendUnique(LIBS = ['tinydtls'])
17
+ 
18
+-provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
19
++#provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
20
+ 
21
+ if target_os == 'android':
22
+ 	provisioning_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])

+ 44
- 0
net/iotivity/patches/200-examples-OICMiddle-try-to-load-security-configuratio.patch View File

@@ -0,0 +1,44 @@
1
+From ce27d50b9c11386242487852f14b025ed6c67701 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Wed, 19 Aug 2015 16:47:21 +0200
4
+Subject: [PATCH 14/14] examples: OICMiddle: try to load security
5
+ configuration by default
6
+
7
+Load the security configuration from the default location by default.
8
+When it is not found security will just not work.
9
+
10
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
11
+---
12
+ examples/OICMiddle/OICMiddle.cpp |    9 ++++++++-
13
+ examples/OICMiddle/OICMiddle.h   |    1 +
14
+ 2 files changed, 9 insertions(+), 1 deletion(-)
15
+
16
+--- a/examples/OICMiddle/OICMiddle.cpp
17
++++ b/examples/OICMiddle/OICMiddle.cpp
18
+@@ -99,8 +99,15 @@ void Middle::startPlatform()
19
+     //std::string ipaddr = INADDR_ANY;
20
+     std::string ipaddr = "0.0.0.0";
21
+ 
22
++    // Initialize Persistent Storage for SVR database
23
++    middle.ps.open = fopen;
24
++    middle.ps.read = fread;
25
++    middle.ps.write = fwrite;
26
++    middle.ps.close = fclose;
27
++    middle.ps.unlink = unlink;
28
++
29
+     PlatformConfig cfg { ServiceType::InProc, ModeType::Both,
30
+-                  ipaddr, port, QualityOfService::LowQos};
31
++                  ipaddr, port, QualityOfService::LowQos, &middle.ps};
32
+ 
33
+     OC::OCPlatform::Configure(cfg);
34
+ }
35
+--- a/examples/OICMiddle/OICMiddle.h
36
++++ b/examples/OICMiddle/OICMiddle.h
37
+@@ -83,6 +83,7 @@ protected:
38
+     MiddleServer *m_server;
39
+     LineInput *m_lineInput;
40
+     RestInput *m_restInput;
41
++    OCPersistentStorage ps;
42
+ 
43
+ protected:
44
+     void startPlatform();