iotivity.git
23 months agoMerge branch '1.3-rel' (0f2ae82) 77/23777/1
Philippe Coval [Mon, 18 Dec 2017 08:28:24 +0000 (09:28 +0100)]
Merge branch '1.3-rel' (0f2ae82)

Relate-to:
https://gerrit.iotivity.org/gerrit/#/c/23637/

Change-Id: I0f2ae826a9dbe6ad3f328c24a556d6786b31a6bc
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
23 months agoMerge "Merge branch '1.3-rel' (4239a6c)"
Phil Coval [Thu, 14 Dec 2017 17:45:48 +0000 (17:45 +0000)]
Merge "Merge branch '1.3-rel' (4239a6c)"

23 months agoRemove arduino support 2/3 03/23703/8
Mats Wichmann [Fri, 8 Dec 2017 15:38:31 +0000 (08:38 -0700)]
Remove arduino support 2/3

Arduino is now supported only in iotivity-constrained,
but all the support in the iotivity build remains.
Remove in three phases (just to make shorter commits
to review).  Part 2 removes arduino from all the other
build scripts which referenced it, and from auto_build.py
and the vagrant setup.

Change also removes the remaining arduino directories, as
follows:

    extlibs/arduino
    resource/c_common/ocatomic/src/arduino
    resource/c_common/ocrandom/test/arduino
    resource/csdk/connectivity/build/arduino
    resource/csdk/connectivity/lib/arduino
    resource/csdk/connectivity/src/bt_le_adapter/arduino
    resource/csdk/connectivity/src/ip_adapter/arduino
    resource/csdk/connectivity/src/tcp_adapter/arduino
    resource/csdk/logger/test/arduino
    resource/csdk/stack/samples/arduino
    resource/csdk/stack/test/arduino
    service/easy-setup/sampleapp/enrollee/arduino
    tools/arduino

which means some code files are removed as well.

Bug: https://jira.iotivity.org/browse/IOT-2927
Change-Id: Idd5001a810ff4f67022f60bcb9d3252f7de7ccc2
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoresource: Fix occlientbasicops to support coaps 37/23637/5
Philippe Coval [Tue, 5 Dec 2017 15:20:02 +0000 (16:20 +0100)]
resource: Fix occlientbasicops to support coaps

The fix is to do querry only on resource's address (to use CoAPs channel)

Observed issue was:

 ./ocserverbasicops

  ./occlientbasicops -u 0 -c 0 -d 1 -p 0 -t 2
  (...)

  INFO: occlientbasicops: Callback Context for GET query recvd successfully
  INFO: occlientbasicops: StackResult: OC_STACK_UNAUTHORIZED_REQ
  INFO: occlientbasicops: SEQUENCE NUMBER: 16777216
  INFO: PayloadLog: NULL Payload
  INFO: occlientbasicops: =============> Get Response

I fixed it to:

  INFO: occlientbasicops: StackResult: OC_STACK_OK (...)
  INFO: PayloadLog: Payload Type: Representation (...)
  INFO: PayloadLog:     URI:/a/led (...)
  INFO: PayloadLog:             state(bool):false (...)

Extra note, it look like the parse function is never returning false.

Change-Id: Id3e48c8a04453e87a09e7636ead9a9f64c499d44
Bug: https://jira.iotivity.org/browse/IOT-2390
Origin: https://gerrit.iotivity.org/gerrit/#/c/23637/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit f6394a488449831c0c9070b652c79630d80767ba)

2 years agonotification: Install examples 83/23683/3
Philippe Coval [Thu, 7 Dec 2017 13:29:45 +0000 (14:29 +0100)]
notification: Install examples

Yocto manually installed them,
so let's rely on scons from now on.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I58398d6cec1cbd5a08dd5fe365ebe83d4d377323
Origin: https://gerrit.iotivity.org/gerrit/#/c/23683/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Align to default for transport feat (all) 15/23715/3
Philippe Coval [Sat, 9 Dec 2017 00:33:55 +0000 (01:33 +0100)]
tizen: Align to default for transport feat (all)

Match value in build_common/SConscript.

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: I0d54e3b5388b5bdbee557a9ea555bc67b9baf867
Origin: https://gerrit.iotivity.org/gerrit/#/c/23715/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Align to default for CLOUD feature (off) 13/23713/4
Philippe Coval [Sat, 9 Dec 2017 00:26:45 +0000 (01:26 +0100)]
tizen: Align to default for CLOUD feature (off)

Match value in build_common/SConscript,
check linux_full build target for CLOUD status,
maybe tizen_full should be introduced, first.

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Id49455f9e1f85f352f11f7c00a80143ca1955c0a
Origin: https://gerrit.iotivity.org/gerrit/#/c/23713/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agocsdk: Declare void functions as strict prototype 99/23699/2
Philippe Coval [Mon, 13 Nov 2017 23:39:06 +0000 (00:39 +0100)]
csdk: Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I15ef08db79fd3e775dd063adf46410813268c238
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoc_common: Add missing stub function 97/23697/2
Philippe Coval [Mon, 13 Nov 2017 16:33:15 +0000 (17:33 +0100)]
c_common: Add missing stub function

oc_mutex_assert_owner was missing from "noop" flavour

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I80ac02ddaf4fcb7ad6785b7e81f891096f3a07a9
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoc_common: Declare strict void functions 95/23695/2
Philippe Coval [Mon, 13 Nov 2017 14:09:55 +0000 (15:09 +0100)]
c_common: Declare strict void functions

Declare void functions as strict prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-2539
Change-Id: I8586d443f4919802cdb45c8bdef0797eb355448e
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoMerge branch '1.3-rel' (4239a6c) 35/23735/1
Philippe Coval [Mon, 11 Dec 2017 15:00:47 +0000 (16:00 +0100)]
Merge branch '1.3-rel' (4239a6c)

Change-Id: I4239a6c37d27f1d0b776f32a211be6bba7e4d5f8
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years ago[IOT-2709] MOT 79/23579/3
Oleksii Beketov [Fri, 1 Dec 2017 12:54:11 +0000 (14:54 +0200)]
[IOT-2709] MOT

Multiple ownership enable

Change-Id: Ic6cff37ada8f84417c623bead93539f73d61b68d
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
2 years agoscene-manager: Install examples 81/23681/4
Philippe Coval [Thu, 7 Dec 2017 13:14:27 +0000 (14:14 +0100)]
scene-manager: Install examples

Yocto manually installed them,
so let's rely on scons from now on.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I5ff74e727a624d2c7bac4ec9c584ac5030836edc
Origin: https://gerrit.iotivity.org/gerrit/#/c/23681/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoplugins: Install examples 73/23673/4
Philippe Coval [Thu, 7 Dec 2017 13:14:26 +0000 (14:14 +0100)]
plugins: Install examples

Yocto manually installed them,
so let's rely on scons from now on.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ic3f5519397ff05c6084cd607f55633eed0f29045
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoAdded option for randompin_certificate 21/23721/2
Mushfiqul Islam Antu [Thu, 30 Nov 2017 12:25:31 +0000 (18:25 +0600)]
Added option for randompin_certificate

If a server supports both randompin and certificate
then the doxm.sct value should be 24, instead of
current default 16 on IoTivity.

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c3
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
(cherry picked from commit 6888f190c2e8a1f9bd875dc3f6f362905488eadb)

2 years agotizen: Enable to default for MOT feature (on) 91/23291/4
Philippe Coval [Tue, 3 Oct 2017 12:54:33 +0000 (14:54 +0200)]
tizen: Enable to default for MOT feature (on)

Match value in build_common/SConscript.

Bug: https://jira.iotivity.org/browse/IOT-2241
Origin: https://gerrit.iotivity.org/gerrit/#/c/23291
Change-Id: I0501472ca5b3735a89122053dd3fdb3f741be456
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Align to default for PROXY feature (on) 81/23281/3
Philippe Coval [Wed, 15 Nov 2017 15:55:51 +0000 (16:55 +0100)]
tizen: Align to default for PROXY feature (on)

Match value in build_common/SConscript

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Ic21e1579b9960611b0a8e5a24dc5214152a3107c
Origin: https://gerrit.iotivity.org/gerrit/#/c/23281/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoIOT-2774 Add getResourceHandleAtUri 59/23659/3 otgc-dekra-changes 1.3.1 1.3.1-RC7
George Nash [Wed, 6 Dec 2017 21:25:58 +0000 (13:25 -0800)]
IOT-2774 Add getResourceHandleAtUri

This is needed to be able to set a deivice type to
the /oic/d resource.

Bug: https://jira.iotivity.org/browse/IOT-2774
Change-Id: I179d593f4b1e0408c18f7c28e6f8bda586223a9e
Signed-off-by: George Nash <george.nash@intel.com>
2 years agoAdded option for randompin_certificate 45/23545/3
Mushfiqul Islam Antu [Thu, 30 Nov 2017 12:25:31 +0000 (18:25 +0600)]
Added option for randompin_certificate

If a server supports both randompin and certificate
then the doxm.sct value should be 24, instead of
current default 16 on IoTivity.

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c3
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
2 years ago[IOT-2788] Unlink Pairwise things doesn't work 35/23635/2
Vitalii Irkha [Tue, 5 Dec 2017 11:49:14 +0000 (13:49 +0200)]
[IOT-2788] Unlink Pairwise things doesn't work

This is workaround.

One of callbacks provide OC_STACK_INVALID_QUERY instead of OC_STACK_RESOURCE_DELETED.
Details please see in https://jira.iotivity.org/browse/IOT-2788.

Change-Id: Iccf2d6e5308ba2bc8322fa66c3acec395ef21811
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
2 years agoDon't delete in-use credInfo. 65/23365/2
Todd Malsbary [Fri, 20 Oct 2017 18:04:07 +0000 (11:04 -0700)]
Don't delete in-use credInfo.

Bug: https://jira.iotivity.org/browse/IOT-2828
Change-Id: Iac85f39806857767bbc6f5dcab02057f791bb5bc
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/22931/

2 years agoDon't delete in-use credInfo. 31/22931/2
Todd Malsbary [Fri, 20 Oct 2017 18:04:07 +0000 (11:04 -0700)]
Don't delete in-use credInfo.

Bug: https://jira.iotivity.org/browse/IOT-2828
Change-Id: Iac85f39806857767bbc6f5dcab02057f791bb5bc
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
2 years agoMerge "Merge branch '1.3-rel' (36c7f82)"
Phil Coval [Fri, 8 Dec 2017 10:16:20 +0000 (10:16 +0000)]
Merge "Merge branch '1.3-rel' (36c7f82)"

2 years agoRemove arduino support 1/3 67/23667/2
Mats Wichmann [Thu, 7 Dec 2017 15:02:37 +0000 (08:02 -0700)]
Remove arduino support 1/3

Arduino is now supported only in iotivity-constrained,
but all the support in the iotivity build remains.
Remove in three phases (just to make shorter commits
to review).  This patch removes from the top level
(root of the tree and build_common).

Assumption: the logic to avoid multi-transport and the
logic to build without dtls support were both written
in a general way, but the list of targets in both cases
contained just 'arduino', so this logic was dropped.

Change-Id: Ib120ab7d82ff91b5f744c638d31f1b430a50ccd7
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoresource: Fix occlientbasicops to support coaps 39/23639/2
Philippe Coval [Tue, 5 Dec 2017 15:20:02 +0000 (16:20 +0100)]
resource: Fix occlientbasicops to support coaps

The fix is to do querry only on resource's address (to use CoAPs channel)

Observed issue was:

 ./ocserverbasicops

  ./occlientbasicops -u 0 -c 0 -d 1 -p 0 -t 2
  (...)

  INFO: occlientbasicops: Callback Context for GET query recvd successfully
  INFO: occlientbasicops: StackResult: OC_STACK_UNAUTHORIZED_REQ
  INFO: occlientbasicops: SEQUENCE NUMBER: 16777216
  INFO: PayloadLog: NULL Payload
  INFO: occlientbasicops: =============> Get Response

I fixed it to:

  INFO: occlientbasicops: StackResult: OC_STACK_OK (...)
  INFO: PayloadLog: Payload Type: Representation (...)
  INFO: PayloadLog:     URI:/a/led (...)
  INFO: PayloadLog:             state(bool):false (...)

Extra note, it look like the parse function is never returning false.

Change-Id: Id3e48c8a04453e87a09e7636ead9a9f64c499d44
Bug: https://jira.iotivity.org/browse/IOT-2390
Origin: https://gerrit.iotivity.org/gerrit/#/c/23637/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Declare void function the strict style 05/23405/4
Philippe Coval [Mon, 13 Nov 2017 16:44:34 +0000 (17:44 +0100)]
build: Declare void function the strict style

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I35b4aedca3f8a89c3e0b6bf4b8180b99782d5f94
Origin: https://gerrit.iotivity.org/gerrit/#/c/23405/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Install configuration settings in package 93/23393/32
Philippe Coval [Wed, 22 Nov 2017 01:13:11 +0000 (02:13 +0100)]
tizen: Install configuration settings in package

To track versions config options (SCONSFLAGS)
are shared into dev package.

Also introduce EXTRA_RPM_SCONSFLAGS that could be used outside (ie: rpmbuild)

It will be helpful for ARTIK7 support on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I15a3dcc3d3f74078e561143804562c750d9c4660
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23393/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoprovisioning: Fix typo in documentation 25/23625/3
Philippe Coval [Mon, 4 Dec 2017 12:03:22 +0000 (13:03 +0100)]
provisioning: Fix typo in documentation

Change-Id: I0363faa632430ef7459af1bf4cf7041a52b83303
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agocsdk: Install more secure examples 23/23623/2
Philippe Coval [Mon, 4 Dec 2017 11:33:28 +0000 (12:33 +0100)]
csdk: Install more secure examples

Change-Id: Ie58e6b51310efcb68ba4932b29d7eb84eb10d09e
Bug: https://jira.iotivity.org/browse/IOT-524
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoMerge branch '1.3-rel' (36c7f82) 57/23657/1
Philippe Coval [Wed, 6 Dec 2017 11:29:57 +0000 (12:29 +0100)]
Merge branch '1.3-rel' (36c7f82)

Change-Id: I36c7f8238783cfd18f60221af6d477cb055ab274
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoresource: Remove DirectPairing json file 19/23619/2
Philippe Coval [Mon, 4 Dec 2017 10:26:39 +0000 (11:26 +0100)]
resource: Remove DirectPairing json file

oic_svr_db_client_directpairing.json is not more used
since DirectPairing was removed

Bug: https://jira.iotivity.org/browse/IOT-2338
Change-Id: I2131730b1a9344bb5d422722f04da53e82bcc3ba
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoMerge "Merge branch '1.3-rel' (5a1209c)"
Nathan Heldt-Sheller [Tue, 5 Dec 2017 16:25:01 +0000 (16:25 +0000)]
Merge "Merge branch '1.3-rel' (5a1209c)"

2 years agoprovisioning: Memory Leak removed 31/17031/9
Manoj Gupta [Fri, 3 Feb 2017 06:42:27 +0000 (12:12 +0530)]
provisioning: Memory Leak removed

Change-Id: If0f456485967d243be92886de6459c2992325b24
Signed-off-by: Manoj Gupta <manoj.g2@samsung.com>
2 years agoMerge branch '1.3-rel' (5a1209c) 79/23479/4
Philippe Coval [Sat, 2 Dec 2017 09:02:07 +0000 (10:02 +0100)]
Merge branch '1.3-rel' (5a1209c)

Relate-to:
        https://gerrit.iotivity.org/gerrit/#/c/23505/

Conflicts:
auto_build.py
build_common/tools/UnpackAll.py
resource/csdk/security/tool/svrdbeditor_src/svrdbeditorcred.c

Change-Id: Id698f81a3ff115d6f31021bbe5fc2c9a325373e8
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years ago[ES] Changes in Easysetup for spec compliance. 31/23431/5
Senthil Kumar G S [Thu, 23 Nov 2017 15:18:43 +0000 (20:48 +0530)]
[ES] Changes in Easysetup for spec compliance.

It includes the following:-
1. [IOT-2909] Exclude read-only properties.
Read-Write interface response for "/WiFiConfResURI" is currently
including the read-only properties ("swat" and "swet") which is incorrect.
These read-only properties should not be added in the "oic.if.rw" response
for '/WiFiConfResURI'.

2. [IOT-2910] Handling post request to "/WiFiConfResURI" with baseline
interface when there is no interface in the query paramter.

3. [IOT-2911] Remove "href" from the baseline response for "/WiFiConfResURI".

Change-Id: I730efa70cedda4dbdb1f21df6e38fec657bc9bb7
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 years agobuild: Install security tools 03/23503/4
Philippe Coval [Tue, 28 Nov 2017 12:13:54 +0000 (13:13 +0100)]
build: Install security tools

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Idb2b2da72104f91d4a1257f571abdea4ca10d88a
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoMerge branch '1.3-rel' (e5418f06) 19/23419/6
Philippe Coval [Tue, 28 Nov 2017 10:36:29 +0000 (11:36 +0100)]
Merge branch '1.3-rel' (e5418f06)

Relate-to: https://gerrit.iotivity.org/gerrit/#/c/23103/

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: I93f67455f3fa092223067620368e82c185c47641
Origin: https://gerrit.iotivity.org/gerrit/#/c/23419/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Add all BuildRequires for fedora 73/23373/8
Philippe Coval [Sun, 19 Nov 2017 01:45:23 +0000 (02:45 +0100)]
build: Add all BuildRequires for fedora

This was needed for ARTIK7 on fedora-24

Change-Id: Ice95627b6afdf19f16c1e9277015f63938d2c132
Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/23373/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agocoap-http-proxy: Build shared lib also on linux 75/23275/7
Philippe Coval [Wed, 15 Nov 2017 17:57:55 +0000 (18:57 +0100)]
coap-http-proxy: Build shared lib also on linux

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ie7196851c3e623f383e6727b5cbd1c29cf1ae6ac
Origin: https://gerrit.iotivity.org/gerrit/#/c/23275/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Install Extra Files for samples tests etc 07/23407/11
Philippe Coval [Wed, 22 Nov 2017 19:23:27 +0000 (20:23 +0100)]
build: Install Extra Files for samples tests etc

Working tests will be sorted out in later changes,
for now hierarchy is kept.

libcoap is installed as static lib used by com-oic-es-sample.

This was needed for ARTIK7 on Fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Idca20f1ddd00fbaf8c980e959a041397887f123b
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23407/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agopkg-config tweaks 73/23173/4
Mats Wichmann [Sat, 11 Nov 2017 16:47:06 +0000 (09:47 -0700)]
pkg-config tweaks

A couple of tizen sconscripts had pkg-config embedded in a CFLAGS
setting, which isn't going to work (these were in example code).
Change to run ParseConfig('pkg-config ...')  separately, like
everywhere else.

pkg-config lines split in past reformattings were joined back
up for readability.

In some cases, changed to consecutive runs of pkg-config divided
by topic, instead of one long pkg-config line. e.g. tizen instances
might run once with tizen-specific pkgs, a second time with
glib-related pkgs.  This is mainly for readability, maybe
improves maintainability a little.

Change-Id: Iddaa973ef9e82298d60a35db40a6620e798e6927
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agobuild: Support scons install 03/23403/12
Philippe Coval [Wed, 22 Nov 2017 17:17:00 +0000 (18:17 +0100)]
build: Support scons install

Fixed some Install rules and where they were missued,
InstalTarget and UserInstall* were somehow overlapping.

If prefix is not used, then install to separate folder in tree.

See python comments for more details.

Maybe this could be refactored later, but this change tried
to keep the difference minimal.

Other related fixes are separated in obvious patches.
Instalation of supported examples to come later

This was needed for ARTIK7 on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I2143f41c6dba7356617186f2d9cb68ef82323f5e
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23403/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Enable JAVA in linux_full target 89/23189/2
Philippe Coval [Mon, 13 Nov 2017 08:21:36 +0000 (09:21 +0100)]
build: Enable JAVA in linux_full target

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: I1ac3ede2aaa9359bfbc183dee64d7b3754769d76
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years ago[IOT-2914] Update Randompin database(for sct) 05/23505/2
Mushfiqul Islam Antu [Wed, 29 Nov 2017 04:31:23 +0000 (10:31 +0600)]
[IOT-2914] Update Randompin database(for sct)

Current randompin database is having "sct" value 9.
Which is improper. Correct value should be 16

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c1
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
2 years agotizen: Add dependency to boost for devel package 91/23491/2
Philippe Coval [Tue, 28 Nov 2017 10:43:00 +0000 (11:43 +0100)]
tizen: Add dependency to boost for devel package

Bug: https://jira.iotivity.org/browse/IOT-2541
Bug-Tizen: https://bugs.tizen.org/jira/browse/TINF-861
Change-Id: Ia37aade9f23db37bb7e86a81e8639d2b6e0300cd
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years ago[IOT-2913] Mirror d.di to match doxm.deviceuuid 07/23507/2
Mushfiqul Islam Antu [Wed, 29 Nov 2017 06:08:07 +0000 (12:08 +0600)]
[IOT-2913] Mirror d.di to match doxm.deviceuuid

OCGetServerInstanceID() & OCGetServerInstanceID() these 2
APIs were keeping a local copy of doxm.deviceuuid, while
there is no way to keep track whether doxm.deviceuuid was
updated by the provisioning manager. So local copies are
removed, each time d.di is required, it will be fetched
doxm.deviceuuid

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c2
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
2 years agotizen: Install examples to usr,lib,iotivity 93/23293/11
Philippe Coval [Thu, 16 Nov 2017 18:40:02 +0000 (19:40 +0100)]
tizen: Install examples to usr,lib,iotivity

Previously .dat where placed in /bin this is not proper

Note yocto should align to this too

Bug: https://jira.iotivity.org/browse/IOT-2541
Bug-Tizen: https://bugs.tizen.org/browse/TINF-861
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23293/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Change-Id: I1ea8ebbe63b6ff8d029a195882b9c7e8ec69e640
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoconnectivity: Fix typo on detActed 09/23309/3
Philippe Coval [Fri, 17 Nov 2017 09:54:24 +0000 (10:54 +0100)]
connectivity: Fix typo on detActed

Change-Id: I4773c3f743ac51fda5a0ea164ee4ce09fb5bbcad
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoMerge "Merge branch '1.3-rel' (5fdb8a1)"
Nathan Heldt-Sheller [Mon, 27 Nov 2017 21:33:39 +0000 (21:33 +0000)]
Merge "Merge branch '1.3-rel' (5fdb8a1)"

2 years agobuild: Use global RPATH value 89/21589/23
Philippe Coval [Tue, 3 Oct 2017 15:59:49 +0000 (17:59 +0200)]
build: Use global RPATH value

Also introduce ORIGIN for crosscompiler.

RPATH can be convenient to avoid developer to deal with environment variables
(LD_LIBRARY_PATH or PATH on windows), as we're using them for now.

In longer term, this can be replaced by relative pathes,
once the installation process is fixed
(at least on systems supporting ORIGIN).

It was tested on yocto poky master.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ibaabc31b8dc744267e4c6c1c682d2090da9ada96
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/21589/

2 years agoClean up gcov code coverage usage 71/23171/6
Mats Wichmann [Sat, 11 Nov 2017 20:10:52 +0000 (13:10 -0700)]
Clean up gcov code coverage usage

Since this is enabled in target-specific sconscript,
stop setting it in individual scripts.  Add a flag to
disable gcov building.

Change-Id: Iab871e9462354f6b5b025d7787529b0f7fbf72ce
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agotizen: Enable CLOUD and LOGGING only on Tizen 97/23297/6
Philippe Coval [Thu, 16 Nov 2017 18:40:53 +0000 (19:40 +0100)]
tizen: Enable CLOUD and LOGGING only on Tizen

Overloaded params might be later aligned to default like linux base

Observed issue on fedora-24 for ARTIK7:

  g++ -o .../mq_subscriber ...
  .../messagequeue/mq_subscriber.o: In function `main':
  .../mq_subscriber.cpp:322: undefined reference to \
  `OC::OCResource::discoveryMQTopics...
  collect2: error: ld returned 1 exit status

Bug: https://jira.iotivity.org/browse/IOT-2241
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23297/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Change-Id: I0446dfa135d965280a0dec8a3f4f3e2f93ecdf28
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobridging: Add explicit dependency to libmpm 09/23409/9
Philippe Coval [Wed, 22 Nov 2017 17:16:45 +0000 (18:16 +0100)]
bridging: Add explicit dependency to libmpm

While working on "scons install", static lib were not resolved.
So I found this could be changed separately

Observed issue was:

 Linking shared .../libhueplugin.so
 g++: error: .../out/.../libmpmcommon.a: No such file or directory
 scons: *** [out/.../libhueplugin.so] Error 1

This was needed for ARTIK7 on fedora-24

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ibadd174bd84bcaf48d972fdb3071ba3b03ff1373
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23409
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoconnectivity: Use Copy for generated glue files 95/23395/5
Philippe Coval [Sat, 18 Nov 2017 02:41:51 +0000 (03:41 +0100)]
connectivity: Use Copy for generated glue files

Those files are local and should not be installed using
scons install, eventually they could be placed in outdir.
but in a 1st step original behaviour is kept.

This is useful for ARTIK7 support on fedora-24

Change-Id: Ie25e44be43dc3b286237e8c6c86be7cb7b58b575
Forwarded: https://gerrit.iotivity.org/gerrit/#/c/23395/
Origin: https://github.com/TizenTeam/iotivity/tree/sandbox/pcoval/on/master/fedora
Bug: https://jira.iotivity.org/browse/IOT-524
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years ago[IOT-2906][ES] Remove "href" from child response. 99/23399/2 1.3.1-RC6
Senthil Kumar G S [Wed, 22 Nov 2017 17:25:16 +0000 (22:55 +0530)]
[IOT-2906][ES] Remove "href" from child response.

For requests which come directly to child resources
(/WiFiConfResURI, /CoapCloudConfResURI and /DevConfResURI),
this patch will remove the "href" property from the response
as spec doesn't mandate the addition of "href" in the response.

And also, CTT expects the response from direct request to any child
to be same as the response which comes for the same child
through collection.

For example:
Properties in "rep" for '/WiFiConfResURI' should be same as
the properties in the direct response for GET from '/WiFiConfResURI' resource.

Currently "href" is not included in "rep" for child resources.
But it is included in the direct response for GET/POST.
When CTT compares both responses, it finds them different due of "href".

This patch resolves the issue and still conforms to spec.

Change-Id: I017bed18d3e0ad568b662a03d9bd80134538a8c0
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 years ago[IOT-2904][ES] Fix for issues found through CTT. 89/23389/4
Senthil Kumar G S [Wed, 22 Nov 2017 11:51:03 +0000 (17:21 +0530)]
[IOT-2904][ES] Fix for issues found through CTT.

1. If one of the resources in the POST request over batch
has invalid properties, then the response should include an
empty "rep" for those resources.
For all other resources with valid properties in the request,
"rep" should include all the properties.

2. Allowing "cn" property to be set to ES_CONNECT_NONE.

Change-Id: Ib819bed7a126717cc56df0fb32b3d9f3ec570682
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 years ago[IOT-2494] SVR DB Editor : Add cred edit features 93/23193/3
Vadym Riznyk [Tue, 14 Nov 2017 10:57:44 +0000 (12:57 +0200)]
[IOT-2494] SVR DB Editor : Add cred edit features

Add Cred add symmetric key pair
Add Cred modification

TrustCA cert is saved in cred->publicdata
instead of optional data.
(see https://gerrit.iotivity.org/gerrit/#/c/21983/)

[IOT-2494] SVR DB Editor : Clean codes

Fix typo, memleak
Remove unnecessary codes.

New Feature: https://jira.iotivity.org/browse/IOT-2494
Signed-off-by: Sangjoon Je <sangjoon.je@samsung.com>
Change-Id: I487786c432c7d51ead84d08fca0326d34b10e27a
Signed-off-by: Vadym Riznyk <v.riznyk@samsung.com>
2 years ago[IOT-2883] SVR DB editor is broken in 1.3-rel 07/23107/8
Vadym Riznyk [Thu, 9 Nov 2017 15:52:39 +0000 (17:52 +0200)]
[IOT-2883] SVR DB editor is broken in 1.3-rel

Adding InitPstatResourceToDefault() to svrdbeditor,
for initialize gPstat and correctly get dos.state

Change-Id: I5eefd50d6dcfcc35fd20ffd3e6e147acbf924e45
Signed-off-by: Vadym Riznyk <v.riznyk@samsung.com>
2 years agorpm: Also support OS without manifest 71/23371/3
Philippe Coval [Sun, 19 Nov 2017 01:08:19 +0000 (02:08 +0100)]
rpm: Also support OS without manifest

This was needed for ARTIK7 on fedora-24

Change-Id: I9a5081fe78299ca57dd2fbfa4efb70b051e4ad28
Bug: https://jira.iotivity.org/browse/IOT-524
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoFixing Build Errors after applying -Werror 03/23303/2
Abhishek Pandey [Thu, 26 Oct 2017 08:43:31 +0000 (14:13 +0530)]
Fixing Build Errors after applying -Werror

JIRA IOT-2845: https://jira.iotivity.org/browse/IOT-2845

This seems to be side effect of JIRA [IOT-2539]. Build is
breaking on some linux platforms (i.e. i686). Most
compilation errors are related to printf format
specifiers. Probably this wasn't caught by jenkins
when merging patch for IOT-2845 due to its system
configuration matches expected size for all data types.

Fixed the error by using portable format specifiers while
logging.

%PRId - for int64_t
%PRIu - for unit64_t
%PRIuPTR - for size_t (unsigned)

Change-Id: I30a21cacdddc84776392100ee783ccbe7e1eae0d
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
2 years agotizen: Use OS enrollee 99/23299/4
Philippe Coval [Thu, 16 Nov 2017 18:41:19 +0000 (19:41 +0100)]
tizen: Use OS enrollee

To support fedora-24 for ARTIK7

Change-Id: I8d40700b8f19fcbc71cb3ad3235cda990290792d
Origin: https://gerrit.iotivity.org/gerrit/#/c/23299/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: make linux shared libs with as-needed flag 13/22613/6
Mats Wichmann [Tue, 26 Sep 2017 16:31:19 +0000 (10:31 -0600)]
build: make linux shared libs with as-needed flag

The shared libraries in the Linux build sometimes link with other shared
libraries they don't actually use.  It's "cleaner" if the dependencies
are only real ones.  Adding the linker flag only for shared library builds
(SHLINKFLAGS) improves this situation, and leads to the changes documented
in the referenced bug (IOT-2354).

The scons scripts which build these libraries should presumably
be examined, to stop them listing dependencies they don't use,
but that is currently a separate topic.

Change-Id: I0b55c2048af36a28ae26829aa934cfadc4665651
Bug: IOT-2354
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoIOT-1375 Use mbedtls base64 implementation 01/23101/9
George Nash [Tue, 7 Nov 2017 22:33:05 +0000 (14:33 -0800)]
IOT-1375 Use mbedtls base64 implementation

Maintaining only one copy is easier, and may have security
benefits since the input to base64 decode is often untrusted
input (e.g., a peer certificate).

Comparing the implementation of base64 from mbedtls the output
follows the rules specified in RFC 1521 for doing base64
encoding.

As best I can tell IoTivity's implementation follows the rules
specified in RFC 4648.

The major difference is that RFC 1521 has a limit on line length
of 76 characters. While RFC 4648 does not have the line length
limitation and will typically encode the data as one long
string.

Originally there was a lot of concern that if the base64 encoded
string were stored anywhere changing to the mbedtls
implementation could cause backward compatibility problems. For
that reason unit tests were added that encoded using IoTivity
base64 and decoded using mbedtls as well as encoding using
mbedtls and decoding base64. Both implementations were able to
handle data encoded by the other implementation.

JniSecureUtils::convertUUIDtoStr was removed after discovering it
was not use anywhere in the code.  Also there was no clear use case to convert a 128 bit UUID to a base64 string.

Bug: https://jira.iotivity.org/browse/IOT-1375
Change-Id: If7f178ff550c5d529452593ed7998a082ec1fab3
Signed-off-by: George Nash <george.nash@intel.com>
2 years agobuild: Ship IPCA in Linux RPM 95/23295/3
Philippe Coval [Thu, 16 Nov 2017 18:41:04 +0000 (19:41 +0100)]
build: Ship IPCA in Linux RPM

This was needed for fedora-24 for ARTIK7

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I177a277a07a0684e58f5935b5785de50b3d78af1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years ago[IOT-2895] Make DevConf resource non-observable. 99/23199/2
Senthil Kumar G S [Tue, 14 Nov 2017 16:36:22 +0000 (22:06 +0530)]
[IOT-2895] Make DevConf resource non-observable.

Required to make the successful execution of the CTT test case
which expects observe notification from DevConf.
As DevConf is a read-only resource, it is not possible to update its
properties and hence there can't be any observe notifications.
So this change makes DevConf non-observable.

Change-Id: I8c73865aa995a61729e41063dfa0a74d0bea1400
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 years ago[IOT-2899][ES] Notifying collection's observers. 55/23355/1
Senthil Kumar G S [Mon, 20 Nov 2017 06:40:09 +0000 (12:10 +0530)]
[IOT-2899][ES] Notifying collection's observers.

When there is an update in the properties of child resources
(WifiConf, CloudConf) of collection(EasySetup),
a notification should be sent to EasySetup's observers.

Change-Id: I9d4d4ab0b0f7e21995d29376819e014c90408d9c
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 years agotizen: Fix typo on chrpath 01/23301/3
Philippe Coval [Thu, 16 Nov 2017 18:42:19 +0000 (19:42 +0100)]
tizen: Fix typo on chrpath

Could be done in scons install too

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: I60f4684d17d260e1917fe5840b4eda626c196056
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Set variable as version 73/23273/4
Philippe Coval [Wed, 15 Nov 2017 19:46:59 +0000 (20:46 +0100)]
tizen: Set variable as version

This will be useful for creating snapshot versions ie:
1.3.0+99+1.3.1+RC5~B4DC0DE

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: Ib95ee7c53cc226e411bacc03313ffd6829b7e7d1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agobuild: Ship plugins on Linux RPM 71/23271/4
Philippe Coval [Wed, 15 Nov 2017 19:03:34 +0000 (20:03 +0100)]
build: Ship plugins on Linux RPM

This was needed for fedora-24 for ARTIK7

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I1dab992c31013170d2ec068e8ac05ef9c4d9c84a
Origin: https://gerrit.iotivity.org/gerrit/#/c/23271/
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agotizen: Install all from builddir 55/21855/9
Philippe Coval [Thu, 10 Aug 2017 22:13:27 +0000 (00:13 +0200)]
tizen: Install all from builddir

This way we will find uninstalled files, and fix in scons.

In longer term scons should do all needed steps,
to avoid double maintenance.

Bug: https://jira.iotivity.org/browse/IOT-524
Change-Id: Ie8f40e0727835821f623e31e785a7d1074038315
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/21855/

2 years agotizen: Ship resource_directory in main subpackage 31/23131/6
Philippe Coval [Fri, 10 Nov 2017 08:16:56 +0000 (09:16 +0100)]
tizen: Ship resource_directory in main subpackage

It's part of resource, not service.

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/23131/
Change-Id: I502591a8db1c48bc21d9dd0b768c46efb353b6c3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
(cherry picked from commit 57f121d6fdb887752eeeaa452d942a8c30ca9af9)

2 years agoFix arm64-v8a build errors 35/23235/2
George Nash [Wed, 15 Nov 2017 23:21:57 +0000 (15:21 -0800)]
Fix arm64-v8a build errors

Change-Id: Iecff451094731616bbab6b680954e0ec333a61a3
Signed-off-by: George Nash <george.nash@intel.com>
2 years agoMerge branch '1.3-rel' (5fdb8a1) 33/22733/9
Philippe Coval [Fri, 17 Nov 2017 00:19:39 +0000 (01:19 +0100)]
Merge branch '1.3-rel' (5fdb8a1)

Change-Id: I3040a9e4ab81d6b4485bcb390a643955719ab8f5
Bug: https://jira.iotivity.org/browse/IOT-2453
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agologger: Declare as void prototype 79/23179/2
Philippe Coval [Mon, 13 Nov 2017 14:10:20 +0000 (15:10 +0100)]
logger: Declare as void prototype

If built along -Wstrict-prototypes it will raise and error,
this is the case on TizenRT.

More patches to come to enable this flag by default.

Bug: Bug:https://jira.iotivity.org/browse/IOT-2539
Change-Id: Id588411af8c625898d2f89288750d8bdb82603da
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoignore: android ouput files 07/23207/2
Philippe Coval [Wed, 15 Nov 2017 11:57:13 +0000 (12:57 +0100)]
ignore: android ouput files

Change-Id: Ie54313a0437c8bdffe2d0c6484524a1fc6775f7d
Bug: https://jira.iotivity.org/browse/IOT-1745
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoContinue improving libcoap build script 93/23093/2
Mats Wichmann [Mon, 6 Nov 2017 15:36:01 +0000 (08:36 -0700)]
Continue improving libcoap build script

* The variable-substitution section in building the coap.h
  config file (for the "upstream" version) not working, repaired.
* Move the coap.h comment down to where the work is done for
  easier reading.
* Use "with" statement for file handling (conventions)
* Clean up the glob handling to generate the file lists: use
  scons internal Glob.
* Save the correct coap path into a construction var LIBCOAP_INC.
  Other scripts will later be modified to use this, but as of
  this patch it has no active effect.

Along the way, found build script in plugins was using
WITH_UNFORKED_LIBCOAP (which is never set in the environment)
rather than WITH_UPSTREAM_LIBCOAP - this is adjusted.

Change-Id: I0398b440c5318516578426253a653024f3277fe4
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoRevert "[IOT-2761] Multiple CAs allowed" 29/23229/1
Nathan Heldt-Sheller [Wed, 15 Nov 2017 17:56:05 +0000 (09:56 -0800)]
Revert "[IOT-2761] Multiple CAs allowed"

This reverts commit 7f9d8c71fadc2eb8968e953f78e3b4afce262c52.

22967 caused a regression in the CTT; we'll fix and re-submit
after regression testing.

Change-Id: Ie06cf59b6463072c54b23c61d322bdb7f09cc22f
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
2 years agotizen: Ship resource_directory in main subpackage 33/23133/2
Philippe Coval [Fri, 10 Nov 2017 08:16:56 +0000 (09:16 +0100)]
tizen: Ship resource_directory in main subpackage

It's part of resource, not service.

Bug: https://jira.iotivity.org/browse/IOT-524
Origin: https://gerrit.iotivity.org/gerrit/#/c/23131/
Change-Id: I502591a8db1c48bc21d9dd0b768c46efb353b6c3
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoImprove on test/valgrind setup 75/22275/11
Mats Wichmann [Wed, 30 Aug 2017 17:49:49 +0000 (11:49 -0600)]
Improve on test/valgrind setup

Problem: when Jenkins runs the unit_test configuration on Linux,
it looks for files suffixed .xml in the top directory, but it
does not know where they come from, and in a multi-stage run (as
unit_test currently is), since the collection happens only at the
end, there can be some confusion about which results apply to the
"failure count".

As a first stage in cleanup, to avoid programmer errors when
calling run_tests, the filename for the valgrind run is now
generated from the pathname of the test.  Until further cleanup,
the passed filename is ignored and just used as a boolean (that
aspect was already documented - empty string meaning do not
use valgrind).

Whether or not valgrind runs happen was selected based on platform.
An environment flag is added to allow it to be turned of for
small-memory platforms, or for testing whether valgrind is adding
problems (that is, if unit tests fail, can try again with valgrind
disabled to help narrow down where the problem is).

As a note, to combat the "overwrite" effect when unit_test
builder runs non-secure followed by secure build+test, was
attempting to separate those two builds by putting them in
distinct paths, but apparently the path is computed other places
than build_common/SConscript.  android, darwin and tizen all found
some existing instance of the current path style even after it
was changed and so broke.  So as of this commit, this topic is
not addressed.

Change-Id: I57213dce98a9a0f8ced3a18e82d0a51691b024bd
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agobuild: Generate iotivity_config.h in build_dir 89/21989/8
Philippe Coval [Thu, 17 Aug 2017 13:48:20 +0000 (15:48 +0200)]
build: Generate iotivity_config.h in build_dir

The file from "out" dir will be also installed to system include path
using scons install (to /usr/include/ on linux)

Bug: https://jira.iotivity.org/browse/IOT-2599
Change-Id: Icddfb9354f47fd40ba998fe336b4963be7ade871
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Origin: https://gerrit.iotivity.org/gerrit/#/c/21989/

2 years agobuild: Add linux_full for MOT, RA and SECURED 85/23185/4
Philippe Coval [Wed, 19 Jul 2017 09:34:09 +0000 (11:34 +0200)]
build: Add linux_full for MOT, RA and SECURED

More features could be turned on later

Bug: https://jira.iotivity.org/browse/IOT-2241
Change-Id: Ie58e4f4f54ab08e2f0a7f7273e4e9943f9389534
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21539
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Alex Kelley <alexke@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Mats Wichmann <mats@linux.com>
2 years ago[IOT-2815][IOT-2844] 67/22967/20
Oleksandr Dmytrenko [Mon, 23 Oct 2017 14:37:09 +0000 (17:37 +0300)]
[IOT-2815][IOT-2844]

provisioningclient set rowneruuid for all the SVRs

Change-Id: I46df6479aeb313955639df32b7e73c52b14691e0
Signed-off-by: Oleksandr Dmytrenko <o.dmytrenko@samsung.com>
2 years ago[IOT-2761] Multiple CAs allowed 87/22987/4
Oleksii Beketov [Thu, 2 Nov 2017 12:33:38 +0000 (14:33 +0200)]
[IOT-2761] Multiple CAs allowed

Allow to parse all CA certificates when SVR DB
contains more than one root CA.

Change-Id: Ie82632b459a9a064a90ff14e100e4db9ab60492d
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
2 years agosecurity: Remove Direct Pairing (Again) 69/23069/4
Philippe Coval [Fri, 14 Jul 2017 08:51:47 +0000 (11:51 +0300)]
security: Remove Direct Pairing (Again)

Remove direct pairing and pconfresource

It was reintroduced by mistake in:
https://gerrit.iotivity.org/gerrit/#/c/21193/

Change-Id: Ia71db37f0c2ecbf2d7a62a8363c0949a00000001
Credit-to: v.riznyk <v.riznyk@samsung.com>
Bug: https://jira.iotivity.org/browse/IOT-2306
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
2 years agoAdapt gcc version-compare to deal with gcc7, py3 17/23117/1
Mats Wichmann [Thu, 26 Oct 2017 16:02:36 +0000 (10:02 -0600)]
Adapt gcc version-compare to deal with gcc7, py3

cherry-pick because this is causing problems for me.

For gcc starting with 7, gcc -dumpversion returns a single (non
dotted) number. This is actually an illegal version to distutils'
version.StrictVersion, so use LooseVersion instead, where that is a
legal number but the comparison still works fine.

For Python 3.x, subprocess.check_output returns a byte string,
which needs to be decoded before it can be passed to the version
comparator function. Instead of bothering with the decoder, which is
hard to get right so it works for both Py2 and Py3 case, call the new
subprocess.getoutput() method, falling back to check_output if not
available.

Change-Id: I29e1f43f8fbde130103099be1972b574a23442cf
Bug: https://jira.iotivity.org/browse/IOT-2862
Signed-off-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit 754d84d22e253e3b3d54be827d3e8f071bc919b0)

2 years agoMerge "Merge branch '1.3-rel' (5cfded4d) into 'master'"
Dan Mihai [Thu, 9 Nov 2017 20:48:27 +0000 (20:48 +0000)]
Merge "Merge branch '1.3-rel' (5cfded4d) into 'master'"

2 years agoPrepare for scons3: change prints and more 09/22809/4
Mats Wichmann [Thu, 28 Sep 2017 12:51:47 +0000 (06:51 -0600)]
Prepare for scons3: change prints and more

A previous change updated all the scons scripts:

https://gerrit.iotivity.org/gerrit/#/c/22525/

This change picks up the semi-external scripts that are called
by the build, and thus are run in the scons context and need updating.

Print statements are surrounded with parens so they look like function
calls.  This is an scons3 syntax requirement even if still using Python 2.

The old exception format "except FooErr, err" is no longer supported
in Python 3; since the Python 3 format "except FooErr as err" has been
available since Python 2.6, there is no problem switching these and it
makes sense to remove one way things could fail if Py3 is used.

A few comparisons which used <> are changed to the preferred != form.

Reformatted Builder call without changing it, and added a comment in the
forked version to help explain why there are two copies of UnpackAll.py.

With these changes, a full build completes successfully using scons3.0.

Change-Id: Ia8df28d12c6504d6466dcf793779535d1ad3aa8b
Signed-off-by: Mats Wichmann <mats@linux.com>
(cherry picked from commit b34da4aa281cfdf94e6bcbe2e6709773c1ed9de7)

2 years agoDelete links lazily when TTL is reached. 09/22709/6
Habib Virji [Tue, 3 Oct 2017 16:28:50 +0000 (17:28 +0100)]
Delete links lazily when TTL is reached.

Add ttl parameter to RD client APIs.

Bug: https://jira.iotivity.org/browse/IOT-1935
Change-Id: Ic189cebebbcf8127bea1d127dd11a116e09743bb
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Signed-off-by: Todd Malsbary <todd.malsbary@intel.com>
2 years ago/pstat Resource CBOR fix 89/23089/7
Nathan Heldt-Sheller [Mon, 6 Nov 2017 12:51:58 +0000 (04:51 -0800)]
/pstat Resource CBOR fix

Fix for a binary->CBOR marshaling case, where payload
is to contain "dos", but not "p".  This in in turns causes
the next Property to be incorrectly placed inside the "dos"
CBOR map (and then skipped over by the CBOR->binary
un-marshaling code).

Also improved logging.

Change-Id: Ib28fc1e30fdaf1e639afa940ee2626ba14e77584
Signed-off-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
2 years agoCherry Pick change to enable building with SCons3 03/23103/2
Ibrahim Esmat [Tue, 19 Sep 2017 23:41:18 +0000 (17:41 -0600)]
Cherry Pick change to enable building with SCons3

Cherry Pick Mats change from master to enable building with SCons 3.0
in 1.3-rel branch. This change and the change in review
https://gerrit.iotivity.org/gerrit/#/c/22809 will be needed to merge
together.

With these 2 changes merged to 1.3-rel, you can successfully build
IoTivity with SCons 3.0. Which will also allow you to build the
UWP versions of the libraries needed for UWP Apps.

Change in master:
Prepare for scons3: change prints and others

In preparation for scons3, recently released, modify remaining print
statements by surrounding them with parens so they look like function
calls. That takes care of the scons3 syntax requirement.

The remaining instances of the sequence "print FOO; Exit(1)" were
changed to "msg = FOO; Exit(msg)" - this helps with the change by
not even using the print statement, and by giving the message to
the output function, it is sent to the error stream rather than
the output stream.

Calls to dictionary keys() and values() are now wrapped in list(),
on Python 3 these return special objects, not the expected list.
That's harmless to Python 2 usage.

The old exception format "except FooErr, err" is no longer supported;
since the Python 3 format "except FooErr as err" has been available
since Python 2.6, there is no problem switching these.

Some instances of using the commands module in extlibs changes to use
subprocess module. Change is transparent.

A couple of instances of filter(lambda ...)) were changes to
a python list comprehension, this is considered preferred for
Python 3 (change was suggested by a conversion tool)

Note on print() change:

  When running with Python2, the print statement is still used. That
  has a bit of an impact: print(a) is just prints the argument, but
  print(a, b, c) is interpreted as printing a tuple (a, b, c), so we
  could see:

  >>> print "This", "is", "a", "test"
  This is a test
  >>> print("This", "is", "a", "test")
  ('This', 'is', 'a', 'test')

  The second is not pretty.  You can make Python2 code use the function
  instead of the statement:

  >>> from __future__ import print_function
  >>> print("This", "is", "a", "test")
  This is a test

  but that's a pain, so the small number of existing prints which
  used a comma as argument separators were updated to use addition,
  so now we're concatenating a string to produce one arg instead
  of supplying multiple "arguments" that would be misinterpreted
  as a tuple in print().  It's fine to add the import statement
  if it's needed.

Change-Id: Idac00e1389b79ee65da4a2eb6ef3246551b66843
Signed-off-by: Mats Wichmann <mats@linux.com>
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
2 years agoBuild gtest output paths correctly 87/23087/3
Mats Wichmann [Sun, 5 Nov 2017 16:08:49 +0000 (09:08 -0700)]
Build gtest output paths correctly

Currently, when the run_tests function is called twice from the
the same scons script (that is, the script has more than one unit
test binary to register), the GTEST_OUTPUT environment variable
becomes malformed.  This is because the string to add is added
to a list instead of just being appended as a string.  The result
is that while all the test output binaries are expected to go to
BUILD_DIR/test_out, in these cases they go deep down underneath
that directory.  Here are the unexpected paths in an unmodified
testing run:

out/linux/x86_64/debug/test_out/:xml:
out/linux/x86_64/debug/test_out/:xml:/home
out/linux/x86_64/debug/test_out/:xml:/home/mats
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/unittest.xml
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/stacktests.xml
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/cbortests.xml
out/linux/x86_64/debug/test_out/:xml:/home/mats/iotivity.work/out/linux/x86_64/debug/test_out/provisiontests.xml

The :xml: is intended as a tag used to signal gtest, it is never
supposed to be part of the real filesystem path.

Note fix was already proposed as part of
https://gerrit.iotivity.org/gerrit/#/c/22275/ but since it's a
distinct error with a very simple fix, wanted to get it pushed
through by itself while that one is under consideration.

Change-Id: I05c57d54034686a7c77c783eab758e7f501e86ea
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoWindows: Enable UWP to be built on master 35/23035/2
Ibrahim Esmat [Thu, 26 Oct 2017 21:09:31 +0000 (14:09 -0700)]
Windows: Enable UWP to be built on master

If you are building for UWP, then you can't build and run a regular
desktop program/exe. Therefore, needed tools like json2cbor will
fail to run and the build will fail to generate the .dat files that
are needed.
- Change run.bat to build the win32 version of the security tool
(resource/csdk/security/tool) which will be copied to the uwp output
directory to use for the build.
- Change the security tool SConscript file to check for this when
building for UWP.

Change-Id: I2d83cdf3d78cc73a9e31be2741251d533c1ae93a
Signed-off-by: Ibrahim Esmat <iesmat@microsoft.com>
2 years ago[IOT-2874] Do not drop CON duplicated requests 95/23095/4
Veeraj Khokale [Tue, 7 Nov 2017 05:20:44 +0000 (10:50 +0530)]
[IOT-2874] Do not drop CON duplicated requests

According to COAP spec section 4.5, confirmable duplicated
requests should not be silently dropped, instead they need
to be acknowledged every time. Therefore check if message
is confirmable before dropping it.

Change-Id: Ie7a49da9f7869fc11f679054fe8dd5c78684eb53
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
2 years ago[IOT-2618] Fix filter check for interface query 33/23033/3 1.3.1-RC5
Srikrishna Gurugubelli [Fri, 27 Oct 2017 17:30:43 +0000 (10:30 -0700)]
[IOT-2618] Fix filter check for interface query

Introspection resource was not checking for interface filter properly
resulting in missing mandatory properties expected on baseline interface
query.

Signed-off-by: Srikrishna Gurugubelli <srikguru@microsoft.com>
Change-Id: I920d4a1ecc4442e34fc1de8633291de6f341a123
Bug: https://jira.iotivity.org/browse/IOT-2618

2 years agoUpdate default return status to OC_STACK_ERROR. 95/22995/2
Sushil Yadav [Wed, 25 Oct 2017 05:34:44 +0000 (11:04 +0530)]
Update default return status to OC_STACK_ERROR.

Change-Id: I42ab6d08a64fa1a5b60f39384617f00160686afc
Signed-off-by: Sushil Yadav <sushil.ky@samsung.com>
2 years ago[IOT-2879][ES] Handling read-only properties. 85/23085/5
Senthil Kumar G S [Fri, 3 Nov 2017 11:28:22 +0000 (16:58 +0530)]
[IOT-2879][ES] Handling read-only properties.

If a post request comes with read-only properties,
OC_EH_BAD_REQUEST(400) will be sent.

Change-Id: I26cd3f8f7c24f8d197a39ac96a27c80018d62f2a
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
2 years agobuilds: stop defeating Variant dir Part 2/3 79/21979/9
Mats Wichmann [Wed, 16 Aug 2017 14:50:21 +0000 (08:50 -0600)]
builds: stop defeating Variant dir Part 2/3

This intends to pick up only three stray misplaced files from resource/
which were actually also being built in normal sequence in the expected
places and added to their respective libraries there; thus the problem
was a reference from elsewhere in the tree - which turned out to be the
Zigbee wrapper. The files in question are oic_malloc.c, oic_string.c
and logger.c.  There are no executables built in this tree, only some
libraries.  In the original form these files are just built in to the
libraries as follows:

$ ar t out/linux/x86_64/debug/plugins/zigbee_wrapper/telegesis_wrapper/src/libtelegesis_wrapper.a
oic_string.o
logger.o
twsocketlist.o
telegesis_socket.o
telegesis_wrapper.o
$ ar t out/linux/x86_64/debug/plugins/zigbee_wrapper/src/libzigbee_wrapper.a
oic_malloc.o
logger.o
zigbee_wrapper.o
$ ar t out/linux/x86_64/debug/plugins/src/libplugin_interface.a
logger.o
pluginlist.o
plugininterface.o

Binaries should just get these interfaces by linking with libc_common
(for oic_string and oic_malloc) and liblogger (for logger). The unit
test here is the only binary built, and it doesn't seem to need either.

Meanwhile, all the build scripts in plugins were cleaned up a bit.
They now use the SCons #-at-start-of-string reference to refer to
the top of the tree, instead of fetching saved src_dir and joining it
to paths, and a bit of other cleanup also done.

Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I01d95a757aea8e955fd5af4951e1ba3ad52228d3
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoUpdate vagrant config to ubuntu 16.04LTS 81/23081/7
Mats Wichmann [Thu, 2 Nov 2017 19:27:37 +0000 (13:27 -0600)]
Update vagrant config to ubuntu 16.04LTS

Provisions the current Ubuntu LTS release with a usable iotivity
build environment.

Also adds commented-out options to provision the other two
current (non-LTS) Ubuntu releases, 17.04 and 17.10

Change-Id: Ia5cda2e77d00de65367a57c1faaf226558a5e7b6
Signed-off-by: Mats Wichmann <mats@linux.com>
2 years agoManufacturer certificate based OTM fix 73/23073/3
Oleksii Beketov [Tue, 31 Oct 2017 12:27:23 +0000 (14:27 +0200)]
Manufacturer certificate based OTM fix

Improper callbacks registration removed.
Manufacturer certificate related info and ciphers
callbacks are already set in StartOwnershipTransfer.

Change-Id: Id1cb14cb31e4325d17961737fa87e0224735235a
Signed-off-by: Oleksii Beketov <ol.beketov@samsung.com>
2 years agoFix a build problem on recent linux host 31/23031/4
Mats Wichmann [Fri, 27 Oct 2017 12:42:21 +0000 (06:42 -0600)]
Fix a build problem on recent linux host

Provisioning unittest will not link when pointed at
connectivity_abstraction_insternal due to dependency of other libs on
connectivity_abstraction.  Leads to this error:

/bin/ld: out/linux/x86_64/debug/libroutingmanager.a(routingmanager.o): undefined reference to symbol 'u_linklist_length'
/home/mats/iotivity.work/out/linux/x86_64/debug//libconnectivity_abstraction.so: error adding symbols: DSO missing from command line

It works fine to link against connectivity_abstraction so use that instead.

Other changes in the SConscript are just cleanup.

Change-Id: I47b846111f4bbaee0ce4d38de7d9e8a0ccc3885b
Bug: https://jira.iotivity.org/browse/IOT-2864
Signed-off-by: Mats Wichmann <mats@linux.com>