From 4725260e575eec8371cc30afc93fbe09f855d85d Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Sat, 24 Oct 2015 15:27:53 +0900 Subject: tizen 2.4 release --- Makefile.am | 168 +++++++++++--------------- configure.ac | 49 ++++++++ packaging/system-plugin-common.manifest | 10 +- packaging/system-plugin-common.spec | 36 ++++-- scripts/check-mount.sh | 5 + units/check-mount.service | 14 --- units/check-mount.service.m4 | 17 +++ units/cleanup-storage.service | 10 -- units/cleanup-storage.service.m4 | 13 ++ units/init-conf.service | 14 --- units/init-conf.service.m4 | 17 +++ units/remount-rootfs.service.m4 | 17 +++ units/tizen-fstrim-user.service | 9 -- units/tizen-fstrim-user.service.m4 | 12 ++ units/tizen-generate-env.service | 12 -- units/tizen-generate-env.service.m4 | 16 +++ units/tizen-init-check.service.in | 11 -- units/tizen-init-check.service.m4.in | 15 +++ units/tizen-init-done.service.in | 11 -- units/tizen-init-done.service.m4.in | 14 +++ units/tizen-initial-boot-done.service.in | 11 -- units/tizen-initial-boot-done.service.m4.in | 14 +++ units/tizen-journal-flush.service | 11 -- units/tizen-journal-flush.service.m4 | 14 +++ units/tizen-readahead-collect-stop.service | 14 --- units/tizen-readahead-collect-stop.service.m4 | 17 +++ units/tizen-readahead-collect.service.in | 20 --- units/tizen-readahead-collect.service.m4.in | 23 ++++ units/tizen-readahead-replay.service.in | 19 --- units/tizen-readahead-replay.service.m4.in | 22 ++++ units/tizen-runtime.target | 4 +- units/tizen-system.target | 4 +- units/wm_ready.service | 12 -- units/wm_ready.service.m4 | 15 +++ 34 files changed, 383 insertions(+), 287 deletions(-) create mode 100644 scripts/check-mount.sh delete mode 100644 units/check-mount.service create mode 100644 units/check-mount.service.m4 delete mode 100644 units/cleanup-storage.service create mode 100644 units/cleanup-storage.service.m4 delete mode 100644 units/init-conf.service create mode 100644 units/init-conf.service.m4 create mode 100644 units/remount-rootfs.service.m4 delete mode 100644 units/tizen-fstrim-user.service create mode 100644 units/tizen-fstrim-user.service.m4 delete mode 100644 units/tizen-generate-env.service create mode 100644 units/tizen-generate-env.service.m4 delete mode 100644 units/tizen-init-check.service.in create mode 100644 units/tizen-init-check.service.m4.in delete mode 100644 units/tizen-init-done.service.in create mode 100644 units/tizen-init-done.service.m4.in delete mode 100644 units/tizen-initial-boot-done.service.in create mode 100644 units/tizen-initial-boot-done.service.m4.in delete mode 100644 units/tizen-journal-flush.service create mode 100644 units/tizen-journal-flush.service.m4 delete mode 100644 units/tizen-readahead-collect-stop.service create mode 100644 units/tizen-readahead-collect-stop.service.m4 delete mode 100644 units/tizen-readahead-collect.service.in create mode 100644 units/tizen-readahead-collect.service.m4.in delete mode 100644 units/tizen-readahead-replay.service.in create mode 100644 units/tizen-readahead-replay.service.m4.in delete mode 100644 units/wm_ready.service create mode 100644 units/wm_ready.service.m4 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 @@ -184,41 +235,6 @@ GRAPHICAL_TARGET_WANTS += \ tizen-journal-flush.service \ tizen-readahead-replay.service -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 @@ -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 @@ -116,6 +116,53 @@ AC_ARG_ENABLE([mobile], 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]), @@ -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 @@ - - - + + + + + + + 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 deleted file mode 100644 index 9eede2a..0000000 --- a/units/check-mount.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Check Mount -ConditionPathIsMountPoint=!/opt/usr -After=tizen-boot.target starter.service -Requires=tizen-boot.target -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' -ExecStartPost=/bin/sleep 3 - -[Install] -WantedBy=tizen-system.target diff --git a/units/check-mount.service.m4 b/units/check-mount.service.m4 new file mode 100644 index 0000000..c8b8589 --- /dev/null +++ b/units/check-mount.service.m4 @@ -0,0 +1,17 @@ +[Unit] +Description=Check Mount +ConditionPathIsMountPoint=!/opt/usr +After=tizen-boot.target starter.service +Requires=tizen-boot.target +Before=tizen-system.target + +[Service] +Type=oneshot +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 deleted file mode 100644 index 426a02d..0000000 --- a/units/cleanup-storage.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Cleanup Storage -DefaultDependencies=no - -[Service] -Type=oneshot -ExecStart=/usr/bin/cleanup-storage.sh - -[Install] -WantedBy=basic.target diff --git a/units/cleanup-storage.service.m4 b/units/cleanup-storage.service.m4 new file mode 100644 index 0000000..1f908bd --- /dev/null +++ b/units/cleanup-storage.service.m4 @@ -0,0 +1,13 @@ +[Unit] +Description=Cleanup Storage +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 deleted file mode 100644 index b62d0d6..0000000 --- a/units/init-conf.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Run init.%H.conf -DefaultDependencies=no -After=local-fs.target -Conflicts=shutdown.target -Before=sysinit.target shutdown.target -ConditionFileNotEmpty=/etc/init.%H.conf - -[Service] -Type=oneshot -ExecStart=/bin/bash -c '/etc/init.%H.conf' - -[Install] -WantedBy=sysinit.target diff --git a/units/init-conf.service.m4 b/units/init-conf.service.m4 new file mode 100644 index 0000000..0723574 --- /dev/null +++ b/units/init-conf.service.m4 @@ -0,0 +1,17 @@ +[Unit] +Description=Run init.%H.conf +DefaultDependencies=no +After=local-fs.target +Conflicts=shutdown.target +Before=sysinit.target shutdown.target +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 deleted file mode 100644 index a0cfe33..0000000 --- a/units/tizen-fstrim-user.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Discard unused blocks on user partition -Requires=opt-usr.mount - -[Service] -Type=oneshot -ExecStart=/usr/bin/tizen-fstrim-on-charge.sh /opt/usr -StandardOutput=journal -StandardError=inherit diff --git a/units/tizen-fstrim-user.service.m4 b/units/tizen-fstrim-user.service.m4 new file mode 100644 index 0000000..abbefc7 --- /dev/null +++ b/units/tizen-fstrim-user.service.m4 @@ -0,0 +1,12 @@ +[Unit] +Description=Discard unused blocks on user partition +Requires=opt-usr.mount + +[Service] +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 deleted file mode 100644 index ae5bc98..0000000 --- a/units/tizen-generate-env.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Generate environment from /etc/profile.d -DefaultDependencies=no -After=opt.mount -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' - -[Install] -WantedBy=basic.target diff --git a/units/tizen-generate-env.service.m4 b/units/tizen-generate-env.service.m4 new file mode 100644 index 0000000..da78852 --- /dev/null +++ b/units/tizen-generate-env.service.m4 @@ -0,0 +1,16 @@ +[Unit] +Description=Generate environment from /etc/profile.d +DefaultDependencies=no +After=opt.mount +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.in deleted file mode 100644 index 31ec3ca..0000000 --- a/units/tizen-init-check.service.in +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Tizen Initialized check -DefaultDependencies=no -After=opt.mount -Before=tizen-init-done.service tizen-initial-boot-done.service -ConditionPathExists=@INITAILBOOT_DONE@ -ConditionPathExists=!@INITIALIZE_DONE@ -RefuseManualStart=yes - -[Service] -ExecStart=/usr/bin/systemctl start tizen-init.target diff --git a/units/tizen-init-check.service.m4.in b/units/tizen-init-check.service.m4.in new file mode 100644 index 0000000..e57ae88 --- /dev/null +++ b/units/tizen-init-check.service.m4.in @@ -0,0 +1,15 @@ +[Unit] +Description=Tizen Initialized check +DefaultDependencies=no +After=opt.mount +Before=tizen-init-done.service tizen-initial-boot-done.service +ConditionPathExists=@INITAILBOOT_DONE@ +ConditionPathExists=!@INITIALIZE_DONE@ +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.in deleted file mode 100644 index df4c5c1..0000000 --- a/units/tizen-init-done.service.in +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Tizen initialized flag done -After=default.target -ConditionPathExists=!@INITIALIZE_DONE@ -RefuseManualStart=yes - -[Service] -ExecStart=/bin/touch @INITIALIZE_DONE@ - -[Install] -WantedBy=tizen-init.target diff --git a/units/tizen-init-done.service.m4.in b/units/tizen-init-done.service.m4.in new file mode 100644 index 0000000..a2535c8 --- /dev/null +++ b/units/tizen-init-done.service.m4.in @@ -0,0 +1,14 @@ +[Unit] +Description=Tizen initialized flag done +After=default.target +ConditionPathExists=!@INITIALIZE_DONE@ +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.in deleted file mode 100644 index 7e8ae55..0000000 --- a/units/tizen-initial-boot-done.service.in +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Tizen initial boot flag generate -After=default.target -ConditionPathExists=!@INITAILBOOT_DONE@ -RefuseManualStart=yes - -[Service] -ExecStart=/bin/touch @INITAILBOOT_DONE@ - -[Install] -WantedBy=default.target diff --git a/units/tizen-initial-boot-done.service.m4.in b/units/tizen-initial-boot-done.service.m4.in new file mode 100644 index 0000000..bba3f6f --- /dev/null +++ b/units/tizen-initial-boot-done.service.m4.in @@ -0,0 +1,14 @@ +[Unit] +Description=Tizen initial boot flag generate +After=default.target +ConditionPathExists=!@INITAILBOOT_DONE@ +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 deleted file mode 100644 index 9a2d2ee..0000000 --- a/units/tizen-journal-flush.service +++ /dev/null @@ -1,11 +0,0 @@ -# This file is copied from systemd to modify. - -[Unit] -Description=Trigger Flushing of Journal to Persistent Storage -Documentation=man:systemd-journald.service(8) man:journald.conf(5) -Requires=systemd-journald.service -After=systemd-journald.service default.target - -[Service] -ExecStart=/usr/bin/systemctl kill --kill-who=main --signal=SIGUSR1 systemd-journald.service -Type=oneshot diff --git a/units/tizen-journal-flush.service.m4 b/units/tizen-journal-flush.service.m4 new file mode 100644 index 0000000..aa5a95f --- /dev/null +++ b/units/tizen-journal-flush.service.m4 @@ -0,0 +1,14 @@ +# This file is copied from systemd to modify. + +[Unit] +Description=Trigger Flushing of Journal to Persistent Storage +Documentation=man:systemd-journald.service(8) man:journald.conf(5) +Requires=systemd-journald.service +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 deleted file mode 100644 index 9d4aeaa..0000000 --- a/units/tizen-readahead-collect-stop.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Stop Read-Ahead Data Collection -DefaultDependencies=no -Conflicts=shutdown.target -After=tizen-readahead-collect.service boot-animation.service -Before=shutdown.target tizen-system.target -ConditionVirtualization=no - -[Service] -Type=oneshot -ExecStart=/usr/bin/systemd-notify --readahead=done - -[Install] -Also=tizen-readahead-collect.service diff --git a/units/tizen-readahead-collect-stop.service.m4 b/units/tizen-readahead-collect-stop.service.m4 new file mode 100644 index 0000000..bd5f49f --- /dev/null +++ b/units/tizen-readahead-collect-stop.service.m4 @@ -0,0 +1,17 @@ +[Unit] +Description=Stop Read-Ahead Data Collection +DefaultDependencies=no +Conflicts=shutdown.target +After=tizen-readahead-collect.service boot-animation.service +Before=shutdown.target tizen-system.target +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.in deleted file mode 100644 index 8b0c5c3..0000000 --- a/units/tizen-readahead-collect.service.in +++ /dev/null @@ -1,20 +0,0 @@ -[Unit] -Description=Collect Read-Ahead Data -DefaultDependencies=no -Wants=tizen-readahead-collect-stop.service -Conflicts=shutdown.target -After=smack.service smack-default-labeling.service tizen-readahead-replay.service -Before=sysinit.target shutdown.target -ConditionPathExists=!/run/systemd/readahead/cancel -ConditionPathExists=!/run/systemd/readahead/done -ConditionPathExists=!@READAHEAD_DIR@/.readahead -ConditionVirtualization=no - -[Service] -Type=notify -ExecStart=@rootlibexecdir@/systemd-readahead collect --savedir=@READAHEAD_DIR@ -RemainAfterExit=yes -StandardOutput=null - -[Install] -WantedBy=tizen-init.target diff --git a/units/tizen-readahead-collect.service.m4.in b/units/tizen-readahead-collect.service.m4.in new file mode 100644 index 0000000..93465f8 --- /dev/null +++ b/units/tizen-readahead-collect.service.m4.in @@ -0,0 +1,23 @@ +[Unit] +Description=Collect Read-Ahead Data +DefaultDependencies=no +Wants=tizen-readahead-collect-stop.service +Conflicts=shutdown.target +After=smack.service smack-default-labeling.service tizen-readahead-replay.service +Before=sysinit.target shutdown.target +ConditionPathExists=!/run/systemd/readahead/cancel +ConditionPathExists=!/run/systemd/readahead/done +ConditionPathExists=!@READAHEAD_DIR@/.readahead +ConditionVirtualization=no + +[Service] +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.in deleted file mode 100644 index 22f00dd..0000000 --- a/units/tizen-readahead-replay.service.in +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=Replay Read-Ahead Data -DefaultDependencies=no -Conflicts=shutdown.target -After=smack.service smack-default-labeling.service -Before=sysinit.target shutdown.target -ConditionPathExists=!/run/systemd/readahead/noreplay -ConditionPathExists=@READAHEAD_DIR@/.readahead -ConditionVirtualization=no - -[Service] -Type=notify -ExecStart=@rootlibexecdir@/systemd-readahead replay --savedir=@READAHEAD_DIR@ -RemainAfterExit=yes -StandardOutput=null -OOMScoreAdjust=1000 - -[Install] -WantedBy=graphical.target diff --git a/units/tizen-readahead-replay.service.m4.in b/units/tizen-readahead-replay.service.m4.in new file mode 100644 index 0000000..1440829 --- /dev/null +++ b/units/tizen-readahead-replay.service.m4.in @@ -0,0 +1,22 @@ +[Unit] +Description=Replay Read-Ahead Data +DefaultDependencies=no +Conflicts=shutdown.target +After=smack.service smack-default-labeling.service +Before=sysinit.target shutdown.target +ConditionPathExists=!/run/systemd/readahead/noreplay +ConditionPathExists=@READAHEAD_DIR@/.readahead +ConditionVirtualization=no + +[Service] +Type=notify +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 deleted file mode 100644 index e3f260b..0000000 --- a/units/wm_ready.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=waiting for window mananger -After=xorg.service -Before=tizen-boot.target - -[Service] -Type=oneshot -ExecStart=/bin/sh -c 'while [ ! -e /tmp/.wm_ready ]; do sleep 0.1 ; done' -TimeoutSec=10s - -[Install] -WantedBy=tizen-boot.target diff --git a/units/wm_ready.service.m4 b/units/wm_ready.service.m4 new file mode 100644 index 0000000..014e1c2 --- /dev/null +++ b/units/wm_ready.service.m4 @@ -0,0 +1,15 @@ +[Unit] +Description=waiting for window mananger +After=xorg.service +Before=tizen-boot.target + +[Service] +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 -- cgit v1.2.3