Make system-server start and run on tizen-common 45/22345/1
authorCorentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Tue, 27 May 2014 17:43:33 +0000 (19:43 +0200)
committerRomuald Texier-Marcadé <romuald.texier-marcade@open.eurogiciel.org>
Mon, 2 Jun 2014 09:45:16 +0000 (11:45 +0200)
* packaging: fix regpmon and set_pmon installation

These binaries were provided by system-server and sysman sub-package.
It conducts to an rpm conflict at installation time.

This fix generates correct binaries and only provide them in system-server
package.

* packaging: massive clean up

- remove useless system-server sub-package
- remove useless Apache-2.0 license sub-package
- remove useless systemd require(post/postun/preun) dependencies
- remove useless buildroot deletion in %install section
- gather all of the %post/%postun scriptlets above %files sections
- fix sysman sub-package dependencies

* Removed references to (useless) missing file.

* deviced.conf supersedes system-server.conf

* Removed useless and confusing files from utils/ (bash scripts and one
ARM binary(!))

* system-server.socket goes to sockets.target.wants, system-server.service
goes to multi-user.target.wants

* added missing condition to not include X11 specific code non-X targets

Bug-tizen: TC-16
Change-Id: I37fef948dd64b985a7a983e6e72083eec1e61c70
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
Signed-off-by: Romuald Texier-Marcadé <romuald.texier-marcade@open.eurogiciel.org>
CMakeLists.txt
packaging/system-server.spec
system-server.conf [deleted file]
systemd/system-server.service
utils/pmon [deleted file]
utils/regpmon [deleted file]
utils/set_pmon [deleted file]

index d4e7158..e271002 100755 (executable)
@@ -145,7 +145,9 @@ ADD_DEFINITIONS("-DLIBPATH=\"${LIB_INSTALL_DIR}/\"")
 ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
 
 ADD_DEFINITIONS("-DENABLE_KEY_FILTER")
+IF(X11_SUPPORT)
 ADD_DEFINITIONS("-DENABLE_X_LCD_ONOFF")
+ENDIF(X11_SUPPORT)
 ADD_DEFINITIONS("-DENABLE_DLOG_OUT")
 ADD_DEFINITIONS("-DENABLE_PM_LOG")
 
@@ -176,12 +178,9 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
 
 INSTALL(FILES ${MOVINAND_FORMAT} DESTINATION bin)
 INSTALL(PROGRAMS ${CMAKE_BINARY_DIR}/device-daemon DESTINATION bin)
-INSTALL(FILES system-server.conf DESTINATION /etc/dbus-1/system.d)
+INSTALL(FILES deviced.conf DESTINATION /etc/dbus-1/system.d)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/mmc-smack-label DESTINATION bin)
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/shutdown.sh DESTINATION ${LIB_INSTALL_DIR}/system-server)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/utils/set_pmon DESTINATION bin)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/utils/regpmon DESTINATION bin)
-INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/utils/pmon DESTINATION bin)
 
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/system-server.service DESTINATION lib/systemd/system)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/systemd/system-server.socket  DESTINATION lib/systemd/system)
index 533f010..a7fe1bc 100755 (executable)
@@ -40,45 +40,31 @@ BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(libtzplatform-config)
 
 %{?systemd_requires}
-Requires(preun): /usr/bin/systemctl
-Requires(post): /usr/bin/systemctl
 Requires(post): /usr/bin/vconftool
-Requires(postun): /usr/bin/systemctl
 
 %description
 system server
 
-%package system-server
-Summary:    System-server daemon
-Group:      System/Service
-Requires:   %{name} = %{version}-%{release}
-
-%description system-server
-system server daemon.
-
 %package -n sysman
 Summary:    Sysman library
-License:    Apache-2.0
 Group:      System/Libraries
 Requires:   %{name} = %{version}-%{release}
 
 %description -n sysman
-sysman library.
+System manager interface library.
 
 %package -n sysman-devel
 Summary:    Sysman devel library
-License:    Apache-2.0
 Group:      System/Development
-Requires:   %{name} = %{version}-%{release}
+Requires:   sysman = %{version}-%{release}
 
 %description -n sysman-devel
 sysman devel library.
 
 %package -n sysman-internal-devel
 Summary:    Sysman internal devel library
-License:    Apache-2.0
 Group:      System/Development
-Requires:   %{name} = %{version}-%{release}
+Requires:   sysman = %{version}-%{release}
 
 %description -n sysman-internal-devel
 sysman internal devel library.
@@ -118,6 +104,7 @@ Haptic library for device control (devel)
 %package -n libhaptic-plugin-devel
 Summary:    Haptic plugin library for (devel)
 Group:      Development/Libraries
+Requires:   libhaptic = %{version}-%{release}
 
 %description -n libhaptic-plugin-devel
 Haptic plugin library for device control (devel)
@@ -149,6 +136,7 @@ Haptic Device manager library for device control (devel)
 %package -n libdeviced
 Summary:    Deviced library
 Group:      System/Libraries
+Requires:   %{name} = %{version}-%{release}
 
 %description -n libdeviced
 Deviced library for device control
@@ -183,11 +171,10 @@ cp %{SOURCE6} .
 %cmake . -DTZ_SYS_ETC=%TZ_SYS_ETC
 
 %install
-rm -rf %{buildroot}
 %make_install
 
 %install_service multi-user.target.wants system-server.service
-%install_service sockets.target.wants system-server.service
+%install_service sockets.target.wants system-server.socket
 
 %install_service graphical.target.wants regpmon.service
 install -m 0644 %{SOURCE8} %{buildroot}%{_unitdir}/regpmon.service
@@ -282,10 +269,30 @@ fi
 systemctl daemon-reload
 /sbin/ldconfig
 
-%files -n system-server
+%post -n sysman -p /sbin/ldconfig
+
+%postun -n sysman -p /sbin/ldconfig
+
+%post -n libslp-pm -p /sbin/ldconfig
+
+%postun -n libslp-pm -p /sbin/ldconfig
+
+%post -n libhaptic -p /sbin/ldconfig
+
+%postun -n libhaptic -p /sbin/ldconfig
+
+%post -n libdevman -p /sbin/ldconfig
+
+%postun -n libdevman -p /sbin/ldconfig
+
+%post -n libdeviced -p /sbin/ldconfig
+
+%postun -n libdeviced -p /sbin/ldconfig
+
+%files
 %manifest %{name}.manifest
 %license LICENSE.APLv2
-%config %{_sysconfdir}/dbus-1/system.d/system-server.conf
+%config %{_sysconfdir}/dbus-1/system.d/deviced.conf
 %{_bindir}/system_server
 %{_libdir}/system-server/shutdown.sh
 %if %{undefined simulator}
@@ -296,35 +303,25 @@ systemctl daemon-reload
 %{_bindir}/pm_event
 %{_bindir}/regpmon
 %{_bindir}/set_pmon
-%{_bindir}/pmon
 %{_bindir}/sys_pci_noti
 %{_bindir}/mmc-smack-label
 %{_bindir}/device-daemon
 %{_bindir}/fsck_msdosfs
 %{_unitdir}/multi-user.target.wants/system-server.service
 %{_unitdir}/graphical.target.wants/regpmon.service
-%{_unitdir}/sockets.target.wants/system-server.service
+%{_unitdir}/sockets.target.wants/system-server.socket
 %{_unitdir}/system-server.service
 %{_unitdir}/system-server.socket
 %{_unitdir}/regpmon.service
 %{_unitdir}/graphical.target.wants/zbooting-done.service
 %{_unitdir}/zbooting-done.service
 %{_datadir}/system-server/sys_pci_noti/res/locale/*/LC_MESSAGES/*.mo
-%config %{_sysconfdir}/dbus-1/system.d/system-server.conf
 %{_datadir}/license/fsck_msdosfs
 
 %files -n sysman
 %manifest sysman.manifest
 %defattr(-,root,root,-)
 %{_libdir}/libsysman.so.*
-%{_bindir}/regpmon
-%{_bindir}/set_pmon
-
-%post -n sysman
-/sbin/ldconfig
-
-%postun -n sysman
-/sbin/ldconfig
 
 %files -n sysman-devel
 %defattr(-,root,root,-)
@@ -343,12 +340,6 @@ systemctl daemon-reload
 %manifest libslp-pm.manifest
 %{_libdir}/libpmapi.so.*
 
-%post -n libslp-pm
-/sbin/ldconfig
-
-%postun -n libslp-pm
-/sbin/ldconfig
-
 %files -n libslp-pm-devel
 %defattr(-,root,root,-)
 %{_includedir}/pmapi/pmapi.h
@@ -357,36 +348,17 @@ systemctl daemon-reload
 %{_libdir}/pkgconfig/pmapi.pc
 %{_libdir}/libpmapi.so
 
-%post -n libslp-pm-devel
-/sbin/ldconfig
-
-%postun -n libslp-pm-devel
-/sbin/ldconfig
-
 %files -n libhaptic
 %defattr(-,root,root,-)
 %{_libdir}/libhaptic.so.*
 %manifest haptic.manifest
 
-%post -n libhaptic
-/sbin/ldconfig
-
-%postun -n libhaptic
-/sbin/ldconfig
-
-
 %files -n libhaptic-devel
 %defattr(-,root,root,-)
 %{_includedir}/haptic/haptic.h
 %{_libdir}/libhaptic.so
 %{_libdir}/pkgconfig/haptic.pc
 
-%post -n libhaptic-devel
-/sbin/ldconfig
-
-%postun -n libhaptic-devel
-/sbin/ldconfig
-
 %files -n libhaptic-plugin-devel
 %defattr(-,root,root,-)
 %{_includedir}/haptic/haptic_module.h
@@ -399,13 +371,6 @@ systemctl daemon-reload
 %{_libdir}/libdevman.so.*
 %manifest devman.manifest
 
-
-%post -n libdevman
-/sbin/ldconfig
-
-%postun -n libdevman
-/sbin/ldconfig
-
 %files -n libdevman-devel
 %{_includedir}/devman/devman.h
 %{_includedir}/devman/devman_image.h
@@ -415,12 +380,6 @@ systemctl daemon-reload
 %{_libdir}/pkgconfig/devman.pc
 %{_libdir}/libdevman.so
 
-%post -n libdevman-devel
-/sbin/ldconfig
-
-%postun -n libdevman-devel
-/sbin/ldconfig
-
 %files -n libdevman-haptic-devel
 %{_includedir}/devman/devman_haptic_ext.h
 %{_includedir}/devman/devman_haptic_ext_core.h
@@ -431,12 +390,6 @@ systemctl daemon-reload
 %{_libdir}/libdeviced.so.*
 %manifest deviced.manifest
 
-%post -n libdeviced
-/sbin/ldconfig
-
-%postun -n libdeviced
-/sbin/ldconfig
-
 %files -n libdeviced-devel
 %defattr(-,root,root,-)
 %{_includedir}/deviced/dd-battery.h
@@ -451,8 +404,3 @@ systemctl daemon-reload
 %{_libdir}/libdeviced.so
 %{_libdir}/pkgconfig/deviced.pc
 
-%post -n libdeviced-devel
-/sbin/ldconfig
-
-%postun -n libdeviced-devel
-/sbin/ldconfig
diff --git a/system-server.conf b/system-server.conf
deleted file mode 100644 (file)
index 21a6638..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
-    <policy user="root">
-        <allow own="slp.system.server"/>
-    </policy>
-    <policy context="default">
-        <deny own="slp.system.server"/>
-    </policy>
-</busconfig>
index f548672..22540c9 100644 (file)
@@ -6,9 +6,7 @@ After=vconf-setup.service
 # set DISPLAY for usb_setting launching
 Type=forking
 Environment=DISPLAY=:0
-ExecStartPre=/etc/init.d/device-daemon stop
 ExecStart=/usr/bin/device-daemon
-ExecStop=/etc/init.d/device-daemon stop
 TimeoutStopSec=2
 NotifyAccess=all
 
diff --git a/utils/pmon b/utils/pmon
deleted file mode 100755 (executable)
index f389e5f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# clean up vip process history
-rm -f /tmp/vip/*
-
diff --git a/utils/regpmon b/utils/regpmon
deleted file mode 100755 (executable)
index 1507f41..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-source /etc/tizen-platform.conf
-# Don't regist processes on hibernation capturing sequence
-if [ -e $TZ_SYS_ETC/.hib_capturing ] ; then
-       exit 0
-elif [ -e $TZ_SYS_ETC/.hib_capturing_firstboot ]; then
-       exit 0
-fi
-
-set_pmon -v Xorg enlightenment dbus-daemon libsqlfs_mount telephony-server pulseaudio
-set_pmon -p wifid phonebook-engine voice-calld menu-daemon input_router indicator dlog-daemon ss-server media-server sf_server security-server dnet quickpanel sound_server audio-session-mgr-server launchpad_preloading_preinitializing_daemon voip-daemon drm_server calendar-serviced wrt_launchpad_daemon resourced
-
diff --git a/utils/set_pmon b/utils/set_pmon
deleted file mode 100755 (executable)
index 36c6f68..0000000
Binary files a/utils/set_pmon and /dev/null differ