Change zonesPath and ExecStart command in service 84/32084/7
authorDariusz Michaluk <d.michaluk@samsung.com>
Mon, 15 Dec 2014 12:13:52 +0000 (13:13 +0100)
committerDariusz Michaluk <d.michaluk@samsung.com>
Tue, 16 Dec 2014 14:43:27 +0000 (06:43 -0800)
[Bug/Feature]   N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: Ie51e3bd436f039f926c93b92ea5343e27e7314c0
Signed-off-by: Dariusz Michaluk <d.michaluk@samsung.com>
CMakeLists.txt
packaging/vasum.spec
server/configs/CMakeLists.txt
server/configs/daemon.conf.in [moved from server/configs/daemon.conf with 84% similarity]
server/configs/systemd/vasum.service.in

index cd999d7..a12367f 100644 (file)
@@ -152,6 +152,10 @@ IF(NOT DEFINED SYSTEMD_UNIT_DIR)
     SET(SYSTEMD_UNIT_DIR "${LIB_INSTALL_DIR}/systemd/system")
 ENDIF(NOT DEFINED SYSTEMD_UNIT_DIR)
 
+IF(NOT DEFINED DATA_DIR)
+    SET(DATA_DIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}")
+ENDIF(NOT DEFINED DATA_DIR)
+
 SET(VSM_CONFIG_INSTALL_DIR ${SYSCONF_INSTALL_DIR}/vasum)
 SET(VSM_DATA_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/vasum)
 
index 78db5de..887409e 100644 (file)
@@ -51,6 +51,7 @@ between them. A process from inside a zone can request a switch of context
 %{_unitdir}/vasum.service
 %{_unitdir}/multi-user.target.wants/vasum.service
 /etc/dbus-1/system.d/org.tizen.vasum.host.conf
+%dir %{_datadir}/.zones
 
 %prep
 %setup -q
@@ -67,6 +68,7 @@ between them. A process from inside a zone can request a switch of context
          -DCMAKE_BUILD_TYPE=%{build_type} \
          -DSCRIPT_INSTALL_DIR=%{script_dir} \
          -DSYSTEMD_UNIT_DIR=%{_unitdir} \
+         -DDATA_DIR=%{_datadir} \
          -DPYTHON_SITELIB=%{python_sitelib} \
          -DVASUM_USER=%{vsm_user} \
          -DINPUT_EVENT_GROUP=%{input_event_group} \
@@ -78,6 +80,7 @@ make -k %{?jobs:-j%jobs}
 %make_install
 mkdir -p %{buildroot}/%{_unitdir}/multi-user.target.wants
 ln -s ../vasum.service %{buildroot}/%{_unitdir}/multi-user.target.wants/vasum.service
+mkdir -p %{buildroot}/%{_datadir}/.zones
 
 %clean
 rm -rf %{buildroot}
index b5c9286..9c0fa4b 100644 (file)
@@ -29,7 +29,10 @@ CONFIGURE_FILE(systemd/vasum.service.in
 
 
 ## Install #####################################################################
-INSTALL(FILES       daemon.conf
+CONFIGURE_FILE(daemon.conf.in
+               ${CMAKE_BINARY_DIR}/daemon.conf)
+
+INSTALL(FILES       ${CMAKE_BINARY_DIR}/daemon.conf
         DESTINATION ${VSM_CONFIG_INSTALL_DIR})
 
 # preprocess d-bus configs
similarity index 84%
rename from server/configs/daemon.conf
rename to server/configs/daemon.conf.in
index 714640e..296c1c7 100644 (file)
@@ -1,7 +1,7 @@
 {
     "zoneConfigs" : ["zones/private.conf", "zones/business.conf"],
-    "zonesPath" : "/opt/usr/zones",
-    "zoneImagePath" : "/opt/usr/zones/img/system-data.img",
+    "zonesPath" : "${DATA_DIR}/.zones",
+    "zoneImagePath" : "${DATA_DIR}/.zones/img/system-data.img",
     "zoneTemplatePath" : "templates",
     "zoneNewConfigPrefix" : "/var/lib/vasum",
     "runMountPointPrefix" : "/var/run/zones",
index f36622a..8131ed5 100644 (file)
@@ -4,7 +4,7 @@ ConditionVirtualization=no
 
 [Service]
 Type=simple
-ExecStart=${CMAKE_INSTALL_PREFIX}/bin/vasum-server
+ExecStart=${CMAKE_INSTALL_PREFIX}/bin/vasum-server -r
 Restart=on-failure
 ExecReload=/bin/kill -HUP $MAINPID