summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjk7744.park <jk7744.park@samsung.com>2015-10-24 15:27:53 +0900
committerjk7744.park <jk7744.park@samsung.com>2015-10-24 15:27:53 +0900
commit4725260e575eec8371cc30afc93fbe09f855d85d (patch)
tree87c410179e6a4c3e06d31b31565f0d46215b6c79
parentf66f61d6d5c9f9928f140ebfbda80284d1331529 (diff)
downloadsystem-plugin-common-4725260e575eec8371cc30afc93fbe09f855d85d.tar.gz
system-plugin-common-4725260e575eec8371cc30afc93fbe09f855d85d.tar.bz2
system-plugin-common-4725260e575eec8371cc30afc93fbe09f855d85d.zip
-rw-r--r--Makefile.am168
-rw-r--r--configure.ac49
-rw-r--r--packaging/system-plugin-common.manifest10
-rw-r--r--packaging/system-plugin-common.spec36
-rw-r--r--scripts/check-mount.sh5
-rw-r--r--units/check-mount.service.m4 (renamed from units/check-mount.service)5
-rw-r--r--units/cleanup-storage.service.m4 (renamed from units/cleanup-storage.service)3
-rw-r--r--units/init-conf.service.m4 (renamed from units/init-conf.service)3
-rw-r--r--units/remount-rootfs.service.m417
-rw-r--r--units/tizen-fstrim-user.service.m4 (renamed from units/tizen-fstrim-user.service)3
-rw-r--r--units/tizen-generate-env.service.m4 (renamed from units/tizen-generate-env.service)4
-rw-r--r--units/tizen-init-check.service.m4.in (renamed from units/tizen-init-check.service.in)4
-rw-r--r--units/tizen-init-done.service.m4.in (renamed from units/tizen-init-done.service.in)3
-rw-r--r--units/tizen-initial-boot-done.service.m4.in (renamed from units/tizen-initial-boot-done.service.in)3
-rw-r--r--units/tizen-journal-flush.service.m4 (renamed from units/tizen-journal-flush.service)3
-rw-r--r--units/tizen-readahead-collect-stop.service.m4 (renamed from units/tizen-readahead-collect-stop.service)3
-rw-r--r--units/tizen-readahead-collect.service.m4.in (renamed from units/tizen-readahead-collect.service.in)3
-rw-r--r--units/tizen-readahead-replay.service.m4.in (renamed from units/tizen-readahead-replay.service.in)3
-rw-r--r--units/tizen-runtime.target4
-rw-r--r--units/tizen-system.target4
-rw-r--r--units/wm_ready.service.m4 (renamed from units/wm_ready.service)3
21 files changed, 216 insertions, 120 deletions
diff --git a/Makefile.am b/Makefile.am
index cb7c5bc..ef18e97 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,9 @@ userunitdir=$(prefix)/lib/systemd/user
udevlibexecdir=$(rootprefix)/lib/udev
udevhomedir=$(udevlibexecdir)
udevrulesdir=$(udevlibexecdir)/rules.d
-if MOBILE
+
+if WEARABLE
+else # MOBILE or TV profile
sysctldir=$(prefix)/lib/sysctl.d
endif
@@ -28,7 +30,8 @@ if WITH_ENGMODE
engbindir=/opt/usr/devel/$(rootbindir)
endif
-if MOBILE
+if WEARABLE
+else # MOBILE or TV profile
noinst_LTLIBRARIES =
noinst_DATA =
sysctl_DATA =
@@ -48,7 +51,8 @@ if WITH_ENGMODE
engbin_PROGRAMS =
endif
-if MOBILE
+if WEARABLE
+else # MOBILE or TV profile
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I $(top_srcdir)/src \
@@ -76,7 +80,8 @@ MULTI_USER_TARGET_WANTS =
DEFAULT_TARGET_WANTS =
SYSCONF_LOCAL_FS_TARGET_WANTS =
-if MOBILE
+if WEARABLE
+else # MOBILE or TV profile
GRAPHICAL_TARGET_WANTS =
endif
@@ -94,7 +99,8 @@ install-target-wants-hook:
where=$(systemunitdir) && what="$(TIZEN_SYSTEM_TARGET_WANTS)" && wants=tizen-system.target && $(add-wants)
where=$(systemunitdir) && what="$(TIZEN_RUNTIME_TARGET_WANTS)" && wants=tizen-runtime.target && $(add-wants)
where=$(systemunitdir) && what="$(TIZEN_RUNTIME_TARGET_WANTS)" && wants=tizen-runtime.target && $(add-wants)
-if MOBILE
+if WEARABLE
+else # MOBILE or TV profile
where=$(systemunitdir) && what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && $(add-wants)
endif
where=$(systemunitdir) && what="$(DEFAULT_TARGET_WANTS)" && wants=default.target && $(add-wants)
@@ -130,17 +136,59 @@ INSTALL_EXEC_HOOKS += \
# AM_V_LN_0 = @echo " LN " $@;
# ------------------------------------------------------------------------------
-if MOBILE
+
+if WEARABLE
+bin_SCRIPTS += \
+ scripts/change-booting-mode.sh \
+ scripts/tizen-fstrim-on-charge.sh \
+ scripts/check-mount.sh
+
+systemunit_DATA += \
+ units/check-mount.service \
+ units/tizen-generate-env.service \
+ units/tizen-readahead-collect.service \
+ units/tizen-readahead-collect-stop.service \
+ units/tizen-readahead-replay.service \
+ units/tizen-fstrim-user.service \
+ units/tizen-fstrim-user.timer \
+ units/tizen-init.target \
+ units/tizen-init-check.service \
+ units/tizen-initial-boot-done.service \
+ units/tizen-init-done.service \
+ units/remount-rootfs.service
+
+BASIC_TARGET_WANTS += \
+ tizen-generate-env.service \
+ tizen-init-check.service
+
+TIZEN_INIT_TARGET_WANTS += \
+ tizen-readahead-collect.service \
+ tizen-init-done.service
+
+MULTI_USER_TARGET_WANTS += \
+ tizen-readahead-replay.service
+
+DEFAULT_TARGET_WANTS += \
+ tizen-fstrim-user.timer \
+ tizen-initial-boot-done.service
+
+LOCAL_FS_TARGET_WANTS += \
+ remount-rootfs.service
+
+udevrules_DATA += \
+ rules/51-tizen-udev-default.rules
+
+else # MOBILE or TV profile
bin_SCRIPTS += \
scripts/change-booting-mode.sh \
scripts/cleanup-storage.sh \
- scripts/tizen-fstrim-on-charge.sh
+ scripts/tizen-fstrim-on-charge.sh \
+ scripts/check-mount.sh
systemunit_DATA += \
units/check-mount.service \
units/cleanup-storage.service \
units/cleanup-storage.timer \
- units/ghost.service \
units/init-conf.service \
units/tizen-boot.target \
units/tizen-fstrim-user.service \
@@ -155,7 +203,8 @@ systemunit_DATA += \
units/tizen-readahead-collect-stop.service \
units/tizen-readahead-replay.service \
units/tizen-runtime.target \
- units/tizen-system.target
+ units/tizen-system.target \
+ units/remount-rootfs.service
SYSINIT_TARGET_WANTS += \
init-conf.service
@@ -163,6 +212,9 @@ SYSINIT_TARGET_WANTS += \
TIMERS_TARGET_WANTS += \
cleanup-storage.timer
+LOCAL_FS_TARGET_WANTS += \
+ remount-rootfs.service
+
BASIC_TARGET_WANTS += \
cleanup-storage.service \
tizen-generate-env.service \
@@ -173,7 +225,6 @@ TIZEN_INIT_TARGET_WANTS += \
tizen-readahead-collect.service
MULTI_USER_TARGET_WANTS += \
- ghost.service \
tizen-boot.target \
tizen-runtime.target \
tizen-system.target
@@ -186,41 +237,6 @@ GRAPHICAL_TARGET_WANTS += \
udevrules_DATA += \
rules/51-tizen-udev-default.rules
-else
-bin_SCRIPTS += \
- scripts/change-booting-mode.sh \
- scripts/tizen-fstrim-on-charge.sh
-
-systemunit_DATA += \
- units/check-mount.service \
- units/tizen-generate-env.service \
- units/tizen-readahead-collect.service \
- units/tizen-readahead-collect-stop.service \
- units/tizen-readahead-replay.service \
- units/tizen-fstrim-user.service \
- units/tizen-fstrim-user.timer \
- units/tizen-init.target \
- units/tizen-init-check.service \
- units/tizen-initial-boot-done.service \
- units/tizen-init-done.service
-
-BASIC_TARGET_WANTS += \
- tizen-generate-env.service \
- tizen-init-check.service
-
-TIZEN_INIT_TARGET_WANTS += \
- tizen-readahead-collect.service \
- tizen-init-done.service
-
-MULTI_USER_TARGET_WANTS += \
- tizen-readahead-replay.service
-
-DEFAULT_TARGET_WANTS += \
- tizen-fstrim-user.timer \
- tizen-initial-boot-done.service
-
-udevrules_DATA += \
- rules/51-tizen-udev-default.rules
endif
systemdignoreunit_DATA += \
@@ -234,16 +250,17 @@ systemunit_DATA += \
units/systemd-udevd-kill.service \
units/systemd-udevd-kill.timer
-if MOBILE
-GRAPHICAL_TARGET_WANTS += \
- systemd-udevd-kill.timer
-else
+if WEARABLE
DEFAULT_TARGET_WANTS += \
systemd-udevd-kill.timer
+else # MOBILE or TV profile
+GRAPHICAL_TARGET_WANTS += \
+ systemd-udevd-kill.timer
endif
endif
-if MOBILE
+if WEARABLE
+else # MOBILE or TV profile
sysctl_DATA += \
sysctl.d/50-tizen-default.conf
endif
@@ -256,54 +273,6 @@ TIZEN_BOOT_TARGET_WANTS += \
wm_ready.service
endif
-if MOBILE
-sysconf_DATA += \
- src/ghost/ghost.conf
-
-ghost_SOURCES = \
- src/ghost/ghost.c
-
-ghost_CFLAGS = \
- $(AM_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GIO_CFLAGS)
-
-bin_PROGRAMS = \
- ghost
-
-ghost_LDADD = \
- libsystem-plugin-shared.la \
- $(DBUS_LIBS) \
- $(GLIB_LIBS) \
- $(GIO_LIBS)
-
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
- libsystem-plugin-shared.la
-
-libsystem_plugin_shared_la_SOURCES = \
- src/shared/conf-parser.c \
- src/shared/conf-parser.h \
- src/shared/dbus-common.h \
- src/shared/fileio.c \
- src/shared/fileio.h \
- src/shared/macro.h \
- src/shared/systemd.c \
- src/shared/systemd.h \
- src/shared/util.c \
- src/shared/util.h
-
-libsystem_plugin_shared_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(DBUS_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GIO_CFLAGS)
-
-libsystem_plugin_shared_la_LIBADD = \
- $(DBUS_LIBS)
-endif
-
# ------------------------------------------------------------------------------
substitutions = \
'|rootlibexecdir=$(rootlibexecdir)|' \
@@ -368,7 +337,8 @@ units/%: units/%.in Makefile
$(SED_PROCESS)
$(AM_V_GEN)chmod +x $@
-if MOBILE
+if WEARABLE
+else # MOBILE or TV profile
src/%: src/%.m4
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
diff --git a/configure.ac b/configure.ac
index cf97dd4..4514438 100644
--- a/configure.ac
+++ b/configure.ac
@@ -117,6 +117,53 @@ AC_SUBST(MOBILE)
AM_CONDITIONAL([MOBILE], [test "x$enable_mobile" != xno])
# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([wearable],
+ AS_HELP_STRING([--enable-wearable],
+ [enable wearable configuration]),
+ [case "${enableval}" in
+ yes) enable_wearable=yes ;;
+ no) enable_wearable=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-wearable) ;;
+ esac],
+ enable_wearable=no)
+AC_SUBST(WEARABLE)
+AM_CONDITIONAL([WEARABLE], [test "x$enable_wearable" != xno])
+
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([tv],
+ AS_HELP_STRING([--enable-tv],
+ [enable tv configuration]),
+ [case "${enableval}" in
+ yes) enable_tv=yes ;;
+ no) enable_tv=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-tv) ;;
+ esac],
+ enable_tv=no)
+AC_SUBST(TV)
+AM_CONDITIONAL([TV], [test "x$enable_tv" != xno])
+
+if test "x$enable_tv" == "xyes"; then
+ M4_DEFINES="$M4_DEFINES -DTV"
+fi
+
+# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([smack-label],
+ AS_HELP_STRING([--enable-smack-label],
+ [enable smack process label configuration]),
+ [case "${enableval}" in
+ yes) enable_smack_label=yes ;;
+ no) enable_smack_label=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-smack-label) ;;
+ esac],
+ enable_smack-label=no)
+AC_SUBST(SMACK_LABEL)
+AM_CONDITIONAL([SMACK_LABEL], [test "x$enable_smack_label" != xno])
+
+if test "x$enable_smack_label" == "xyes"; then
+ M4_DEFINES="$M4_DEFINES -DSMACK_LABEL"
+fi
+
+# ------------------------------------------------------------------------------
AC_ARG_ENABLE([wmready],
AS_HELP_STRING([--disable-wmready], [without window manager waiting]),
[case "${enableval}" in
@@ -185,4 +232,6 @@ AC_MSG_RESULT([
udevd killer: ${enable_udevd_killer}
frequent fstrim: ${enable_frequent_fstrim}
enable mobile: ${enable_mobile}
+ enable wearable: ${enable_wearable}
+ enable tv: ${enable_tv}
])
diff --git a/packaging/system-plugin-common.manifest b/packaging/system-plugin-common.manifest
index 93c2194..dfa4a2c 100644
--- a/packaging/system-plugin-common.manifest
+++ b/packaging/system-plugin-common.manifest
@@ -1,7 +1,11 @@
<manifest>
- <request>
- <domain name="_"/>
- </request>
+ <define>
+ <domain name="system-plugin-common::script"/>
+ <request>
+ <smack request="e17" type="r" />
+ <smack request="system::sys_logging" type="rwx" />
+ </request>
+ </define>
<assign>
<filesystem path="/bin/*" label="_" exec_label="none" />
<filesystem path="/sbin/*" label="_" exec_label="none" />
diff --git a/packaging/system-plugin-common.spec b/packaging/system-plugin-common.spec
index cb66572..a912aba 100644
--- a/packaging/system-plugin-common.spec
+++ b/packaging/system-plugin-common.spec
@@ -65,6 +65,12 @@ cp %{SOURCE1001} .
%if "%{?tizen_profile_name}" == "mobile"
--enable-mobile
%endif
+%if "%{?tizen_profile_name}" == "wearable"
+ --enable-wearable
+%endif
+%if "%{?tizen_profile_name}" == "tv"
+ --enable-tv
+%endif
make %{?_smp_mflags}
@@ -74,7 +80,7 @@ make %{?_smp_mflags}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/license
cat LICENSE > $RPM_BUILD_ROOT%{_datadir}/license/%{name}
-%if "%{?tizen_profile_name}" == "mobile"
+%if "%{?tizen_profile_name}" == "mobile" || "%{?tizen_profile_name}" == "tv"
mkdir -p %{buildroot}%{_libdir}/sysctl.d
mkdir -p %{buildroot}%{_sysconfdir}
touch %{buildroot}%{_sysconfdir}/machine-id
@@ -88,6 +94,7 @@ touch %{_sysconfdir}/ld.so.nohwcap
%{_datadir}/license/%{name}
%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units
%{_bindir}/change-booting-mode.sh
+%{_bindir}/check-mount.sh
# systemd service units
%{_libdir}/systemd/system/tizen-generate-env.service
@@ -98,6 +105,8 @@ touch %{_sysconfdir}/ld.so.nohwcap
%endif
%{_libdir}/systemd/system/check-mount.service
%{_libdir}/systemd/system/tizen-system.target.wants/check-mount.service
+%{_libdir}/systemd/system/remount-rootfs.service
+%{_libdir}/systemd/system/local-fs.target.wants/remount-rootfs.service
# system initialize units
%{_libdir}/systemd/system/tizen-init.target
@@ -123,27 +132,31 @@ touch %{_sysconfdir}/ld.so.nohwcap
%{_libdir}/systemd/system/systemd-udevd-kill.service
%{_libdir}/systemd/system/systemd-udevd-kill.timer
-%if "%{?tizen_profile_name}" == "mobile"
+%if "%{?tizen_profile_name}" == "mobile" || "%{?tizen_profile_name}" == "tv"
%{_libdir}/systemd/system/graphical.target.wants/systemd-udevd-kill.timer
-%elseif "%{?tizen_profile_name}" == "wearable"
+%else
+%if "%{?tizen_profile_name}" == "wearable"
%{_libdir}/systemd/system/default.target.wants/systemd-udevd-kill.timer
%endif
+%endif
%endif
%manifest %{name}.manifest
-# mobile & wearable difference
-%if "%{?tizen_profile_name}" == "mobile"
+# mobile & wearable & tv difference
+%if "%{?tizen_profile_name}" == "mobile" || "%{?tizen_profile_name}" == "tv"
%{_libdir}/systemd/system/graphical.target.wants/tizen-initial-boot-done.service
%{_libdir}/systemd/system/graphical.target.wants/tizen-fstrim-user.timer
%{_libdir}/systemd/system/graphical.target.wants/tizen-readahead-replay.service
-%elseif "%{?tizen_profile_name}" == "wearable"
+%else
+%if "%{?tizen_profile_name}" == "wearable"
%{_libdir}/systemd/system/default.target.wants/tizen-initial-boot-done.service
%{_libdir}/systemd/system/default.target.wants/tizen-fstrim-user.timer
%{_libdir}/systemd/system/multi-user.target.wants/tizen-readahead-replay.service
%endif
+%endif
-%if "%{?tizen_profile_name}" == "mobile"
+%if "%{?tizen_profile_name}" == "mobile" || "%{?tizen_profile_name}" == "tv"
%ghost %config(noreplace) %{_sysconfdir}/machine-id
%{_libdir}/udev/rules.d/51-tizen-udev-default.rules
@@ -154,11 +167,6 @@ touch %{_sysconfdir}/ld.so.nohwcap
%{_libdir}/systemd/system/tizen-runtime.target
%{_libdir}/systemd/system/multi-user.target.wants/tizen-runtime.target
-%config(noreplace) %{_sysconfdir}/ghost.conf
-%{_bindir}/ghost
-%{_libdir}/systemd/system/ghost.service
-%{_libdir}/systemd/system/multi-user.target.wants/ghost.service
-
# sysctl
%{_libdir}/sysctl.d/50-tizen-default.conf
@@ -174,6 +182,8 @@ touch %{_sysconfdir}/ld.so.nohwcap
%{_libdir}/systemd/system/init-conf.service
%{_libdir}/systemd/system/sysinit.target.wants/init-conf.service
-%elseif "%{?tizen_profile_name}" == "wearable"
+%else
+%if "%{?tizen_profile_name}" == "wearable"
%{_libdir}/udev/rules.d/51-tizen-udev-default.rules
%endif
+%endif
diff --git a/scripts/check-mount.sh b/scripts/check-mount.sh
new file mode 100644
index 0000000..ef9ae16
--- /dev/null
+++ b/scripts/check-mount.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+while [ "z`/bin/grep /opt/usr /proc/mounts`" == "z" ]
+do /bin/sleep 0.5
+done
diff --git a/units/check-mount.service b/units/check-mount.service.m4
index 9eede2a..c8b8589 100644
--- a/units/check-mount.service
+++ b/units/check-mount.service.m4
@@ -7,8 +7,11 @@ Before=tizen-system.target
[Service]
Type=oneshot
-ExecStart=/bin/sh -c 'while [ "z`/bin/grep /opt/usr /proc/mounts`" == "z" ]; do /bin/sleep 0.5; done'
+ExecStart=/usr/bin/check-mount.sh
ExecStartPost=/bin/sleep 3
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=tizen-system.target
diff --git a/units/cleanup-storage.service b/units/cleanup-storage.service.m4
index 426a02d..1f908bd 100644
--- a/units/cleanup-storage.service
+++ b/units/cleanup-storage.service.m4
@@ -5,6 +5,9 @@ DefaultDependencies=no
[Service]
Type=oneshot
ExecStart=/usr/bin/cleanup-storage.sh
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=basic.target
diff --git a/units/init-conf.service b/units/init-conf.service.m4
index b62d0d6..0723574 100644
--- a/units/init-conf.service
+++ b/units/init-conf.service.m4
@@ -9,6 +9,9 @@ ConditionFileNotEmpty=/etc/init.%H.conf
[Service]
Type=oneshot
ExecStart=/bin/bash -c '/etc/init.%H.conf'
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=sysinit.target
diff --git a/units/remount-rootfs.service.m4 b/units/remount-rootfs.service.m4
new file mode 100644
index 0000000..2a41337
--- /dev/null
+++ b/units/remount-rootfs.service.m4
@@ -0,0 +1,17 @@
+[Unit]
+Description=Remount rootfs
+After=-.mount
+Wants=-.mount
+ConditionKernelCommandLine=ro
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "/usr/bin/change-booting-mode.sh --update"
+ExecStartPost=/bin/touch /run/.root_rw_complete
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
+
+[Install]
+WantedBy=local-fs.target
diff --git a/units/tizen-fstrim-user.service b/units/tizen-fstrim-user.service.m4
index a0cfe33..abbefc7 100644
--- a/units/tizen-fstrim-user.service
+++ b/units/tizen-fstrim-user.service.m4
@@ -7,3 +7,6 @@ Type=oneshot
ExecStart=/usr/bin/tizen-fstrim-on-charge.sh /opt/usr
StandardOutput=journal
StandardError=inherit
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
diff --git a/units/tizen-generate-env.service b/units/tizen-generate-env.service.m4
index ae5bc98..da78852 100644
--- a/units/tizen-generate-env.service
+++ b/units/tizen-generate-env.service.m4
@@ -7,6 +7,10 @@ Before=basic.target
[Service]
Type=oneshot
ExecStart=/usr/bin/env -i sh -c 'source /etc/profile; env | /bin/egrep -v "^(HOME|PWD|SHLVL|_)=" > /run/tizen-mobile-env'
+ExecStartPost=/usr/bin/chsmack -a "_" /run/tizen-mobile-env
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=basic.target
diff --git a/units/tizen-init-check.service.in b/units/tizen-init-check.service.m4.in
index 31ec3ca..e57ae88 100644
--- a/units/tizen-init-check.service.in
+++ b/units/tizen-init-check.service.m4.in
@@ -9,3 +9,7 @@ RefuseManualStart=yes
[Service]
ExecStart=/usr/bin/systemctl start tizen-init.target
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
+
diff --git a/units/tizen-init-done.service.in b/units/tizen-init-done.service.m4.in
index df4c5c1..a2535c8 100644
--- a/units/tizen-init-done.service.in
+++ b/units/tizen-init-done.service.m4.in
@@ -6,6 +6,9 @@ RefuseManualStart=yes
[Service]
ExecStart=/bin/touch @INITIALIZE_DONE@
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=tizen-init.target
diff --git a/units/tizen-initial-boot-done.service.in b/units/tizen-initial-boot-done.service.m4.in
index 7e8ae55..bba3f6f 100644
--- a/units/tizen-initial-boot-done.service.in
+++ b/units/tizen-initial-boot-done.service.m4.in
@@ -6,6 +6,9 @@ RefuseManualStart=yes
[Service]
ExecStart=/bin/touch @INITAILBOOT_DONE@
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=default.target
diff --git a/units/tizen-journal-flush.service b/units/tizen-journal-flush.service.m4
index 9a2d2ee..aa5a95f 100644
--- a/units/tizen-journal-flush.service
+++ b/units/tizen-journal-flush.service.m4
@@ -9,3 +9,6 @@ After=systemd-journald.service default.target
[Service]
ExecStart=/usr/bin/systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service
Type=oneshot
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
diff --git a/units/tizen-readahead-collect-stop.service b/units/tizen-readahead-collect-stop.service.m4
index 9d4aeaa..bd5f49f 100644
--- a/units/tizen-readahead-collect-stop.service
+++ b/units/tizen-readahead-collect-stop.service.m4
@@ -9,6 +9,9 @@ ConditionVirtualization=no
[Service]
Type=oneshot
ExecStart=/usr/bin/systemd-notify --readahead=done
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
Also=tizen-readahead-collect.service
diff --git a/units/tizen-readahead-collect.service.in b/units/tizen-readahead-collect.service.m4.in
index 8b0c5c3..93465f8 100644
--- a/units/tizen-readahead-collect.service.in
+++ b/units/tizen-readahead-collect.service.m4.in
@@ -15,6 +15,9 @@ Type=notify
ExecStart=@rootlibexecdir@/systemd-readahead collect --savedir=@READAHEAD_DIR@
RemainAfterExit=yes
StandardOutput=null
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=tizen-init.target
diff --git a/units/tizen-readahead-replay.service.in b/units/tizen-readahead-replay.service.m4.in
index 22f00dd..1440829 100644
--- a/units/tizen-readahead-replay.service.in
+++ b/units/tizen-readahead-replay.service.m4.in
@@ -14,6 +14,9 @@ ExecStart=@rootlibexecdir@/systemd-readahead replay --savedir=@READAHEAD_DIR@
RemainAfterExit=yes
StandardOutput=null
OOMScoreAdjust=1000
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=graphical.target
diff --git a/units/tizen-runtime.target b/units/tizen-runtime.target
index b1bc216..2988127 100644
--- a/units/tizen-runtime.target
+++ b/units/tizen-runtime.target
@@ -1,6 +1,6 @@
[Unit]
Description=Tizen Runtime
-Requires=basic.target tizen-boot.target tizen-system.target
+Requires=tizen-system.target
Conflicts=rescue.service rescue.target
-After=basic.target tizen-boot.target tizen-system.target rescue.service rescue.target
+After=tizen-system.target rescue.service rescue.target
Before=multi-user.target
diff --git a/units/tizen-system.target b/units/tizen-system.target
index 4240819..e8c8e36 100644
--- a/units/tizen-system.target
+++ b/units/tizen-system.target
@@ -1,6 +1,6 @@
[Unit]
Description=Tizen System
-Requires=basic.target tizen-boot.target
+Requires=tizen-boot.target
Conflicts=rescue.service rescue.target
-After=basic.target tizen-boot.target rescue.service rescue.target
+After=tizen-boot.target rescue.service rescue.target
Before=multi-user.target
diff --git a/units/wm_ready.service b/units/wm_ready.service.m4
index e3f260b..014e1c2 100644
--- a/units/wm_ready.service
+++ b/units/wm_ready.service.m4
@@ -7,6 +7,9 @@ Before=tizen-boot.target
Type=oneshot
ExecStart=/bin/sh -c 'while [ ! -e /tmp/.wm_ready ]; do sleep 0.1 ; done'
TimeoutSec=10s
+m4_ifdef(`SMACK_LABEL',
+SmackProcessLabel=system-plugin-common::script
+)m4_dnl
[Install]
WantedBy=tizen-boot.target