1. Modified to set LIB_DIR per architecture. 93/41493/3 accepted/tizen/mobile/20150619.085814 accepted/tizen/wearable/20150619.085412 submit/tizen_mobile/20150619.084344 submit/tizen_wearable/20150619.084333
authorYoung-Ae Kang <youngae.kang@samsung.com>
Tue, 16 Jun 2015 08:14:15 +0000 (17:14 +0900)
committerYoung-Ae Kang <youngae.kang@samsung.com>
Thu, 18 Jun 2015 06:08:08 +0000 (15:08 +0900)
2. Cynara was applied.

Signed-off-by: Young-Ae Kang <youngae.kang@samsung.com>
Change-Id: I400b5aabbf88d860ec18a6fce0a8e5683fd8ce56

CMakeLists.txt
lbs-server/CMakeLists.txt
lbs-server/config/lbs-server.conf [new file with mode: 0644]
lbs-server/include/gps_plugin_intf.h
lbs-server/lbs-server.provider [deleted file]
lbs-server/script/vconf-internal-location-keys.sh [deleted file]
lbs-server/src/gps_plugin_module.c
packaging/lbs-server.changes
packaging/lbs-server.manifest
packaging/lbs-server.spec

index 54ecc77..418b610 100644 (file)
@@ -32,10 +32,11 @@ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wextra -fvisibility=hidden -fPIC")
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-missing-field-initializers -Wno-missing-declarations -Wall -Wcast-align -Wno-sign-compare")
 
-ADD_DEFINITIONS("-DFEATURE_DLOG_DEBUG")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS(" -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" ")
+ADD_DEFINITIONS("-DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" ")
+ADD_DEFINITIONS("-DLIB_DIR=\"${LIB_DIR}\"")
 
+MESSAGE("<<< LIB_DIR=${LIB_DIR} >>>")
 MESSAGE(${CMAKE_C_FLAGS})
 MESSAGE(${CMAKE_EXE_LINKER_FLAGS})
 
index a6df38e..9373e90 100644 (file)
@@ -29,6 +29,7 @@ INSTALL(FILES script/lbs-server DESTINATION /etc/rc.d/init.d)
 
 CONFIGURE_FILE(lbs-server-plugin.pc.in lbs-server-plugin.pc @ONLY)
 INSTALL(FILES lbs-server-plugin.pc DESTINATION ${LIB_DIR}/pkgconfig)
+INSTALL(FILES config/lbs-server.conf DESTINATION ${SYSCONF_DIR}/dbus-1/system.d)
 
 ADD_EXECUTABLE(${PROJECT_NAME} ${SERVER_SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${server_pkgs_LDFLAGS} -lm)
@@ -37,4 +38,4 @@ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
 
 INSTALL(DIRECTORY include/ DESTINATION ${INCLUDE_DIR}/lbs-server-plugin FILES_MATCHING PATTERN "*.h")
 
-INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BIN_DIR})
\ No newline at end of file
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BIN_DIR})
diff --git a/lbs-server/config/lbs-server.conf b/lbs-server/config/lbs-server.conf
new file mode 100644 (file)
index 0000000..9bc13d9
--- /dev/null
@@ -0,0 +1,68 @@
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+
+       <!-- root can own the service -->
+       <policy user="root">
+               <allow own="org.tizen.lbs.Providers.LbsServer"/>
+
+               <!-- Allow all methods on interfaces -->
+               <allow send_destination="org.tizen.lbs.Providers.LbsServer"/>
+               <allow receive_sender="org.tizen.lbs.Providers.LbsServer"/>
+       </policy>
+
+       <policy user="system">
+               <allow own="org.tizen.lbs.Providers.LbsServer"/>
+               <allow send_destination="org.tizen.lbs.Providers.LbsServer"/>
+               <allow receive_sender="org.tizen.lbs.Providers.LbsServer"/>
+       </policy>
+
+       <!-- for Test
+       <policy at_console="true">
+               <allow own="org.tizen.lbs.Providers.LbsServer"/>
+               <allow send_destination="org.tizen.lbs.Providers.LbsServer"/>
+               <allow receive_sender="org.tizen.lbs.Providers.LbsServer"/>
+       </policy>
+       -->
+
+       <policy context="default">
+               <check send_destination="org.tizen.lbs.Providers.LbsServer"
+                       send_interface="org.tizen.lbs.Manager"
+                       privilege="http://tizen.org/privilege/location" />
+               <check send_destination="org.tizen.lbs.Providers.LbsServer"
+                       send_interface="org.tizen.lbs.Position"
+                       privilege="http://tizen.org/privilege/location" />
+               <check send_destination="org.tizen.lbs.Providers.LbsServer"
+                       send_interface="org.tizen.lbs.Nmea"
+                       privilege="http://tizen.org/privilege/location" />
+               <check send_destination="org.tizen.lbs.Providers.LbsServer"
+                       send_interface="org.tizen.lbs.Satellite"
+                       privilege="http://tizen.org/privilege/location" />
+               <check send_destination="org.tizen.lbs.Providers.LbsServer"
+                       send_interface="org.tizen.lbs.Batch"
+                       privilege="http://tizen.org/privilege/location" />
+               <check receive_sender="org.tizen.lbs.Providers.LbsServer"
+                       receive_interface="org.tizen.lbs.Manager"
+                       privilege="http://tizen.org/privilege/location" />
+               <check receive_sender="org.tizen.lbs.Providers.LbsServer"
+                       receive_interface="org.tizen.lbs.Position"
+                       privilege="http://tizen.org/privilege/location" />
+               <check receive_sender="org.tizen.lbs.Providers.LbsServer"
+                       receive_interface="org.tizen.lbs.Position"
+                       privilege="http://tizen.org/privilege/location" />
+               <check receive_sender="org.tizen.lbs.Providers.LbsServer"
+                       receive_interface="org.tizen.lbs.Nmea"
+                       privilege="http://tizen.org/privilege/location" />
+               <check receive_sender="org.tizen.lbs.Providers.LbsServer"
+                       receive_interface="org.tizen.lbs.Satellite"
+                       privilege="http://tizen.org/privilege/location" />
+               <check receive_sender="org.tizen.lbs.Providers.LbsServer"
+                       receive_interface="org.tizen.lbs.Batch"
+                       privilege="http://tizen.org/privilege/location" />
+
+               <!-- This tag is for HW geofence
+               <allow send_interface="org.tizen.lbs.Geofence"/>
+               <allow receive_interface="org.tizen.lbs.Geofence"/>
+               -->
+       </policy>
+</busconfig>
index b049445..c871906 100644 (file)
@@ -29,7 +29,7 @@
 extern "C" {
 #endif
 
-#define GPS_PLUGIN_PATH        "/usr/lib/libSLP-lbs-plugin.so"
+#define GPS_PLUGIN_PATH        LIB_DIR"/libSLP-lbs-plugin.so"
 #define MAX_REQUESTER_ID_LEN   (128)
 #define MAX_CLIENT_NAME_LEN    (128)
 #define MAX_SUPL_URL_LEN       (128)
diff --git a/lbs-server/lbs-server.provider b/lbs-server/lbs-server.provider
deleted file mode 100644 (file)
index ea52a06..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[LBS Server Provider]
-Name=Agps
-Service=org.tizen.lbs.Providers.LbsServer
-Path=/org/tizen/lbs/Providers/LbsServer
-Requires=RequiresLocation
-Provides=ProvidesUpdates
-Accuracy=Detailed
-Interfaces=org.tizen.lbs.Manager;org.tizen.lbs.Position;org.tizen.lbs.Nmea;org.tizen.lbs.Satellite
diff --git a/lbs-server/script/vconf-internal-location-keys.sh b/lbs-server/script/vconf-internal-location-keys.sh
deleted file mode 100644 (file)
index 586bb45..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/bash
-
-/usr/bin/vconftool2 set -t int "db/location/setting/Usemylocation"  "1" -s "tizen::vconf::location::enable" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/setting/GpsEnabled"  "1" -s "tizen::vconf::location::enable" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/setting/NetworkEnabled"  "1" -s "tizen::vconf::location::enable" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/setting/GpsPopup"  "1" -s "tizen::vconf::location::enable" -i  -g 6514
-/usr/bin/vconftool2 set -t int "memory/location/position/state"  "0" -s "tizen::vconf::public::r::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "memory/location/gps/state"  "0" -s "tizen::vconf::public::r::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "memory/location/wps/state"  "0" -s "tizen::vconf::public::r::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "memory/location/last/gps/Timestamp"  "0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/Latitude"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/Longitude"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/Altitude"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/Speed"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/Direction"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/HorAccuracy"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/gps/VerAccuracy"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/Timestamp"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/Latitude"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/Longitude"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/Altitude"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/Speed"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/Direction"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t double "memory/location/last/wps/HorAccuracy"  "0.0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/last/gps/LocTimestamp"  "0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/last/wps/LocTimestamp"  "0" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t string "db/location/last/gps/Location"  "0.0;0.0;0.0;0.0;0.0;0.0;0.0;" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t string "db/location/last/wps/Location"  "0.0;0.0;0.0;0.0;0.0;0.0;" -s "tizen::vconf::location" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/nmea/LoggingEnabled"  "0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/replay/ReplayEnabled"  "0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/replay/ReplayMode"  "1" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t string "db/location/replay/FileName"  "nmea_replay.log" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t double "db/location/replay/ManualLatitude"  "0.0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t double "db/location/replay/ManualLongitude"  "0.0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t double "db/location/replay/ManualAltitude"  "0.0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t double "db/location/replay/ManualHAccuracy"  "0.0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/gps/Operation"  "1" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/gps/OperationTest"  "0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/gps/Starting"  "0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/gps/Session"  "1" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t double "db/location/gps/XtraDownloadTime"  "0.0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t string "db/location/supl/Server"  "" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t string "db/location/supl/Port"  "7275" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/supl/SslEnabled"  "1" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/supl/FQDNType"  "0" -s "tizen::vconf::platform::rw" -i  -g 6514
-/usr/bin/vconftool2 set -t int "db/location/supl/Version"  "0" -s "tizen::vconf::platform::rw" -i  -g 6514
\ No newline at end of file
index 7332fe3..44c2e4c 100644 (file)
@@ -29,7 +29,7 @@
 #include "setting.h"
 #include "debug_util.h"
 
-#define SPECIFIC_PLUGIN_PATH_PREFIX    "/usr/lib/libSLP-lbs-plugin-"
+#define SPECIFIC_PLUGIN_PATH_PREFIX    LIB_DIR"/liblbs-server-plugin-"
 #define SPECIFIC_PLUGIN_PATH_POSTFIX   ".so"
 
 static const gps_plugin_interface *g_plugin = NULL;
index 9855b03..a97aa32 100644 (file)
@@ -1,3 +1,9 @@
+[Version]      lbs-server_0.6.8
+[Date]         16 Jun 2015
+[Title]                Cynara was applied.
+[Developer]    Young-Ae Kang <youngae.kang@samsung.com>
+
+================================================================================
 [Version]      lbs-server_0.6.7
 [Date]         12 Jun 2015
 [Title]                The user and group of lbs-server process was changed to system when it is activated by DBus automatically.
@@ -6,7 +12,6 @@
 [Developer]    Young-Ae Kang <youngae.kang@samsung.com>
 
 ================================================================================
-
 [Version]      lbs-server_0.6.4
 [Date]         17 Apr 2015
 [Title]                Dbus path changed to support auto activation
index e975c4a..7440090 100644 (file)
@@ -6,7 +6,6 @@
                        <label name="location_fw::client" />
                        <label name="location_fw::db" />
                        <label name="location_fw::vconf" />
-                       <label name="location_fw::maps" />
                        <label name="location_fw::geofence" />
                </provide>
                <request>
@@ -45,6 +44,7 @@
                <filesystem path="/etc/rc.d/init.d/lbs-server" label="_" exec_label="none" />
                <filesystem path="/etc/rc.d/rc5.d/S90lbs-server" label="_" exec_label="none" />
                <filesystem path="/usr/bin/lbs-server" label="_" exec_label="location_fw" />
+               <!--This tag is for Tizen 2.4
                <dbus name="org.tizen.lbs.Providers.LbsServer" own="location_fw" bus="system">
                        <node name="/org/tizen/lbs/Providers/LbsServer">
                                <interface name="org.tizen.lbs.Manager">
@@ -64,6 +64,7 @@
                                </interface>
                        </node>
                </dbus>
+               -->
        </assign>
        <request>
                <domain name="location_fw" />
index 02f2b92..003570b 100644 (file)
@@ -1,6 +1,6 @@
 Name:       lbs-server
 Summary:    LBS Server for Tizen
-Version:    0.6.7
+Version:    0.6.8
 Release:    1
 Group:         Location/Service
 License:       Apache-2.0
@@ -27,7 +27,7 @@ Requires:  sys-assert
 
 %description
 LBS Server for Tizen
-LBS Server provides geographical location information 
+LBS Server provides geographical location information
 
 
 %package -n location-lbs-server
@@ -37,7 +37,7 @@ Requires:   %{name} = %{version}-%{release}
 
 %description -n location-lbs-server
 Client of LBS Server for Tizen
-This package provides geographical location information received from LBS Server 
+This package provides geographical location information received from LBS Server
 
 
 %package -n lbs-server-plugin-devel
@@ -70,7 +70,7 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
 
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
-        -DLIB_DIR=%{_libdir} -DINCLUDE_DIR=%{_includedir} \
+        -DLIB_DIR=%{_libdir} -DINCLUDE_DIR=%{_includedir} -DSYSCONF_DIR=%{_sysconfdir} \
 #%if 0%{?model_build_feature_location_position_wps}
 #    -DENABLE_WPS=YES \
 #%endif
@@ -122,9 +122,9 @@ rm -rf %{buildroot}
 %{_bindir}/lbs-server
 /usr/share/dbus-1/system-services/org.tizen.lbs.Providers.LbsServer.service
 #/usr/share/lbs/lbs-server.provider
+%config %{_sysconfdir}/dbus-1/system.d/lbs-server.conf
 /etc/rc.d/init.d/lbs-server
 /etc/rc.d/rc5.d/S90lbs-server
-#/etc/rc.d/*
 %{_libdir}/systemd/system/lbs-server.service
 %{_libdir}/systemd/system/multi-user.target.wants/lbs-server.service
 /opt/etc/dump.d/module.d/dump_gps.sh