intel / iotivity-node

Node.js bindings for IoTivity
https://www.iotivity.org/
42 stars 44 forks source link

Latest version (1.2.0-1) not compatible with Ubuntu snap #109

Closed poussa closed 7 years ago

poussa commented 7 years ago

I try to create a Ubuntu Snap package of iot-rest-api-server. The store upload fails with the message:

package contains external symlinks: lib/node_modules/iot-rest-api-server/node_modules/iotivity-node/iotivity-native/resource/csdk/connectivity/src/bt_le_adapter/linux/object_manager-glue.h, lib/node_modules/iot-rest-api-server/node_modules/iotivity-node/iotivity-native/resource/csdk/connectivity/src/bt_le_adapter/linux/bluez-glue.h lint-snap-v2_external_symlinks

This is because the iotivity-node has 2 weird symlinks in node_modules/iotivity-node/iotivity-native/resource/csdk/connectivity/src/bt_le_adapter/linux/

bluez-glue.h -> /home/spoussa/src/iot/iot-rest-api-server/node_modules/iotivity-node/iotivity-native/out/linux/x86_64/release/resource/csdk/connectivity/src/bt_le_adapter/linux/bluez-glue.h
 object_manager-glue.h -> /home/spoussa/src/iot/iot-rest-api-server/node_modules/iotivity-node/iotivity-native/out/linux/x86_64/release/resource/csdk/connectivity/src/bt_le_adapter/linux/object_manager-glue.h

Snap is a self contained blob which can't have any external references. Even though the symlinks point to the same area, the Snap Store considers them external to the snap application.

NOTE: this used to work with 1.1.1 release of iotivity-node.

poussa commented 7 years ago

This the the PR that triggered me filing the issue:

https://github.com/01org/iot-rest-api-server/pull/48

However, that PR is not the root cause. It is the fact that before the PR I was using a version of iotivity-node (via package.json) 1.1.1, and it got updated to 1.2.0 while I was updating the snap.

gabrielschulhof commented 7 years ago

Based on our conversation this issue has been resolved.