summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINSUN PYO <insun.pyo@samsung.com>2018-08-17 14:02:55 +0900
committerINSUN PYO <insun.pyo@samsung.com>2018-08-23 22:14:47 +0000
commit57c273eb9592f85f6f8b50ce13742e4cab29d1ab (patch)
treead6f1a0bbd6e4b2d8b4e4e096dd0aaaa5c6d1461
parentd433ba9e0a64f194a6a60393810975b0120e29fb (diff)
downloadsystem-plugin-57c273eb9592f85f6f8b50ce13742e4cab29d1ab.tar.gz
system-plugin-57c273eb9592f85f6f8b50ce13742e4cab29d1ab.tar.bz2
system-plugin-57c273eb9592f85f6f8b50ce13742e4cab29d1ab.zip
Signed-off-by: INSUN PYO <insun.pyo@samsung.com> Change-Id: I8e61739a9bdbf4055c91ff42cabfb58ee2ff0fee
-rw-r--r--Makefile.am256
-rwxr-xr-xautogen.sh21
-rw-r--r--configure.ac147
-rw-r--r--packaging/liblazymount.manifest5
-rw-r--r--packaging/system-plugin.spec54
-rw-r--r--scripts/mount-user.sh26
-rw-r--r--src/liblazymount/lazy_mount.h75
-rw-r--r--src/liblazymount/lazy_mount_interface.c138
-rw-r--r--src/liblazymount/liblazymount.pc.in17
-rw-r--r--units/lazy_mount.path5
-rw-r--r--units/lazy_mount.service8
-rw-r--r--units/wait-user-mount.service11
12 files changed, 0 insertions, 763 deletions
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index aa3caec..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,256 +0,0 @@
-ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-
-SUBDIRS = .
-
-# legacy rc script dir
-rcdir=$(sysconfdir)/rc.d
-
-# Inherit from systemd
-systemdsysconfdir=$(sysconfdir)/systemd
-systemconfigunitdir=$(systemdsysconfdir)/system
-userconfigunitdir=$(systemdsysconfdir)/user
-systemdignoreunitdir=$(systemdsysconfdir)/default-extra-dependencies
-systemunitdir=$(rootprefix)/lib/systemd/system
-userunitdir=$(prefix)/lib/systemd/user
-udevlibexecdir=$(rootprefix)/lib/udev
-udevhomedir=$(udevlibexecdir)
-udevrulesdir=$(udevlibexecdir)/rules.d
-sysctldir=$(prefix)/lib/sysctl.d
-tmpfilesdir=$(prefix)/lib/tmpfiles.d
-
-# DBus
-dbussystemservicedir=$(prefix)/share/dbus-1/system-services
-
-pkgconfiglibdir=$(libdir)/pkgconfig
-
-# And these are the special ones for /
-rootprefix=@rootprefix@
-rootbindir=$(rootprefix)/bin
-rootlibexecdir=$(rootprefix)/lib/system
-
-CLEANFILES =
-EXTRA_DIST =
-
-lib_LTLIBRARIES =
-noinst_LTLIBRARIES =
-noinst_DATA =
-pkgconfiglib_DATA =
-
-bin_SCRIPTS =
-rc_SCRIPTS =
-SCRIPT_IN_FILES =
-sysconf_DATA =
-sysctl_DATA =
-systemdsysconf_DATA =
-systemdignoreunit_DATA =
-systemconfigunit_DATA =
-systemunit_DATA =
-udevrules_DATA =
-tmpfiles_DATA =
-dbussystemservice_DATA =
-
-DEFAULT_CFLAGS = \
- $(OUR_CFLAGS)
-
-DEFAULT_LDFLAGS = \
- $(OUR_LDFLAGS)
-
-AM_CPPFLAGS = \
- -include $(top_builddir)/config.h \
- -I $(top_srcdir)/src \
- -I $(top_srcdir)/src/shared \
- $(DEFAULT_CFLAGS)
-
-AM_CFLAGS = $(DEFAULT_CFLAGS)
-AM_LDFLAGS = $(DEFAULT_LDFLAGS)
-
-INSTALL_EXEC_HOOKS =
-UNINSTALL_EXEC_HOOKS =
-
-SHUTDOWN_TARGET_WANTS =
-LOCAL_FS_TARGET_WANTS =
-BASIC_TARGET_WANTS =
-SYSINIT_TARGET_WANTS =
-SOCKETS_TARGET_WANTS =
-TIMERS_TARGET_WANTS =
-TIZEN_INIT_TARGET_WANTS =
-TIZEN_BOOT_TARGET_WANTS =
-TIZEN_SYSTEM_TARGET_WANTS =
-TIZEN_RUNTIME_TARGET_WANTS =
-MULTI_USER_TARGET_WANTS =
-GRAPHICAL_TARGET_WANTS =
-DEFAULT_TARGET_WANTS =
-SYSCONF_LOCAL_FS_TARGET_WANTS =
-
-install-target-wants-hook:
- where=$(systemunitdir) && what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
- where=$(systemunitdir) && what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
- where=$(systemunitdir) && what="$(BASIC_TARGET_WANTS)" && wants=basic.target && $(add-wants)
- where=$(systemunitdir) && what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
- where=$(systemunitdir) && what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
- where=$(systemunitdir) && what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
- where=$(systemunitdir) && what="$(TIMERS_TARGET_WANTS)" && wants=timers.target && $(add-wants)
- where=$(systemunitdir) && what="$(SLICES_TARGET_WANTS)" && wants=slices.target && $(add-wants)
- where=$(systemunitdir) && what="$(TIZEN_INIT_TARGET_WANTS)" && wants=tizen-init.target && $(add-wants)
- where=$(systemunitdir) && what="$(TIZEN_BOOT_TARGET_WANTS)" && wants=tizen-boot.target && $(add-wants)
- 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)
- where=$(systemunitdir) && what="$(GRAPHICAL_TARGET_WANTS)" && wants=graphical.target && $(add-wants)
- where=$(systemunitdir) && what="$(DEFAULT_TARGET_WANTS)" && wants=default.target && $(add-wants)
- where=$(systemunitdir) && what="$(CHARGING_MODE_TARGET_WANTS)" && wants=charging-mode.target && $(add-wants)
- where=$(systemconfigunitdir) && what="$(SYSCONF_LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
-
-define add-wants
-[ -z "$$what" -o -z "$$where" ] || ( \
- dir=$(DESTDIR)$$where/$$wants.wants && \
- $(MKDIR_P) -m 0755 $$dir && \
- cd $$dir && \
- rm -f $$what && \
- for i in $$what; do $(LN_S) ../$$i . || exit $$? ; done )
-endef
-
-INSTALL_EXEC_HOOKS += \
- install-target-wants-hook
-
-# ------------------------------------------------------------------------------
-pkgconfiglib_DATA += \
- src/liblazymount/liblazymount.pc
-
-EXTRA_DIST += \
- src/liblazymount/liblazymount.pc.in
-
-CLEANFILES += \
- src/liblazymount/liblazymount.pc
-
-liblazymount_pkgincludedir=$(includedir)/lazymount
-liblazymount_pkginclude_HEADERS =
-
-liblazymount_pkginclude_HEADERS += src/liblazymount/lazy_mount.h
-
-lib_LTLIBRARIES += \
- liblazymount.la
-
-liblazymount_la_SOURCES = \
- src/liblazymount/lazy_mount.h \
- src/liblazymount/lazy_mount_interface.c
-
-liblazymount_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(LIBLAZYMOUNT_PC_CFLAGS)
-
-liblazymount_la_LIBADD = \
- -L$(prefix)/lib \
- -lvconf
-
-noinst_liblazymount_la_SOURCES = \
- src/liblazymount/lazy_mount.h \
- src/liblazymount/lazy_mount_interface.c
-
-# ------------------------------------------------------------------------------
-systemunit_DATA += \
- units/lazy_mount.path \
- units/lazy_mount.service
-
-BASIC_TARGET_WANTS += \
- lazy_mount.path
-
-bin_SCRIPTS = \
- scripts/mount-user.sh
-
-# ------------------------------------------------------------------------------
-substitutions = \
- '|rootlibexecdir=$(rootlibexecdir)|' \
- '|rootbindir=$(rootbindir)|' \
- '|bindir=$(bindir)|' \
- '|SYSTEMCTL=$(rootbindir)/systemctl|' \
- '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
- '|systemdsysconfdir=$(systemdsysconfdir)|' \
- '|SYSTEM_CONFIG_UNIT_PATH=$(systemdsysconfdir)/system|' \
- '|USER_CONFIG_UNIT_PATH=$(systemdsysconfdir)/user|' \
- '|pkgdatadir=$(pkgdatadir)|' \
- '|systemunitdir=$(systemunitdir)|' \
- '|userunitdir=$(userunitdir)|' \
- '|systempresetdir=$(systempresetdir)|' \
- '|userpresetdir=$(userpresetdir)|' \
- '|udevhwdbdir=$(udevhwdbdir)|' \
- '|udevrulesdir=$(udevrulesdir)|' \
- '|catalogdir=$(catalogdir)|' \
- '|tmpfilesdir=$(tmpfilesdir)|' \
- '|sysctldir=$(sysctldir)|' \
- '|PACKAGE_VERSION=$(PACKAGE_VERSION)|' \
- '|PACKAGE_NAME=$(PACKAGE_NAME)|' \
- '|PACKAGE_URL=$(PACKAGE_URL)|' \
- '|LIBLAZYMOUNT_PC_REQUIRES=$(LIBLAZYMOUNT_PC_REQUIRES)|' \
- '|LIBLAZYMOUNT_PC_CFLAGS=$(LIBLAZYMOUNT_PC_CFLAGS)|' \
- '|LIBLAZYMOUNT_PC_LIBS=$(LIBLAZYMOUNT_PC_LIBS)|' \
- '|RANDOM_SEED=$(localstatedir)/lib/random-seed|' \
- '|prefix=$(prefix)|' \
- '|exec_prefix=$(exec_prefix)|' \
- '|libdir=$(libdir)|' \
- '|includedir=$(includedir)|' \
- '|VERSION=$(VERSION)|' \
- '|rootprefix=$(rootprefix)|' \
- '|udevlibexecdir=$(udevlibexecdir)|' \
- '|SUSHELL=$(SUSHELL)|' \
- '|DEBUGTTY=$(DEBUGTTY)|' \
- '|KILL=$(KILL)|' \
- '|KMOD=$(KMOD)|' \
- '|MKDIR_P=$(MKDIR_P)|' \
- '|QUOTAON=$(QUOTAON)|' \
- '|QUOTACHECK=$(QUOTACHECK)|' \
- '|SYSTEM_SYSVINIT_PATH=$(sysvinitdir)|' \
- '|VARLOGDIR=$(varlogdir)|' \
- '|RC_LOCAL_SCRIPT_PATH_START=$(RC_LOCAL_SCRIPT_PATH_START)|' \
- '|RC_LOCAL_SCRIPT_PATH_STOP=$(RC_LOCAL_SCRIPT_PATH_STOP)|' \
- '|PYTHON=$(PYTHON)|' \
- '|PYTHON_BINARY=$(PYTHON_BINARY)|' \
- '|INITAILBOOT_DONE=$(INITAILBOOT_DONE)|' \
- '|INITIALIZE_DONE=$(INITIALIZE_DONE)|' \
- '|READAHEAD_DIR=$(READAHEAD_DIR)|' \
- '|DIRTY_WRITEBACK_CENTISECS=$(DIRTY_WRITEBACK_CENTISECS)|'
-
-SED_PROCESS = \
- $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
- < $< > $@
-
-units/%: units/%.in Makefile
- $(SED_PROCESS)
-
-%.rules: %.rules.in Makefile
- $(SED_PROCESS)
-
-%.sh: %.sh.in Makefile
- $(SED_PROCESS)
- $(AM_V_GEN)chmod +x $@
-
-src/%: src/%.m4
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
-
-%.pc: %.pc.in
- $(SED_PROCESS)
-
-units/%: units/%.m4 Makefile
- $(AM_V_M4)$(MKDIR_P) $(dir $@)
- $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
-
-sysctl.d/%: sysctl.d/%.in Makefile
- $(SED_PROCESS)
-
-conf/%: conf/%.in
- $(SED_PROCESS)
-
-conf/%: conf/%.m4
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
-
-scripts/%: scripts/%.in
- $(SED_PROCESS)
-
-scripts/%: scripts/%.m4
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
-
-install-exec-hook: $(INSTALL_EXEC_HOOKS)
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 968bc8e..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
- # This part is allowed to fail
- cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
- chmod +x .git/hooks/pre-commit && \
- echo "Activated pre-commit hook." || :
-fi
-
-# README and INSTALL are required by automake, but may be deleted by
-# clean up rules. to get automake to work, simply touch these here,
-# they will be regenerated from their corresponding *.in files by
-# ./configure anyway.
-touch README INSTALL
-
-# Make sure m4 directory exist
-mkdir -p m4
-
-autoreconf --force --install --verbose || exit $?
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 5f0e9de..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,147 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.68])
-AC_INIT(liblazymount, 0.1, [BUG-REPORT-ADDRESS])
-
-AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADERS([config.h])
-
-AC_USE_SYSTEM_EXTENSIONS
-AC_SYS_LARGEFILE
-AC_PREFIX_DEFAULT([/usr])
-AM_INIT_AUTOMAKE([foreign])
-
-LT_PREREQ(2.2)
-LT_INIT([disable-static])
-
-# Checks for programs.
-AC_PROG_MKDIR_P
-AC_PROG_LN_S
-AC_PROG_SED
-AC_PROG_GREP
-AC_PROG_AWK
-#AC_PROG_INSTALL
-
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PATH_PROG([M4], [m4])
-M4_DEFINES=
-
-# ------------------------------------------------------------------------------
-our_cflags=" \
- -g -O2 \
- -Werror \
- -fpie"
-
-our_ldflags=" \
- -Wl,--as-needed \
- -Wl,--no-undefined \
- -Wl,--gc-sections \
- -Wl,-z,relro \
- -Wl,-z,now \
- -pie"
-# -Wl,-fuse-ld=gold"
-
-AC_SUBST([OUR_CFLAGS], "$our_cflags")
-dnl AC_SUBST([OUR_CPPFLAGS], "$OUR_CFLAGS -Wp,-D_FORTIFY_SOURCE=2")
-AC_SUBST([OUR_LDFLAGS], "$our_ldflags")
-
-# ------------------------------------------------------------------------------
-AC_ARG_WITH([rootprefix],
- AS_HELP_STRING([--with-rootprefix=DIR],
- [rootfs directory prefix for config files and kernel modules]),
- [], [with_rootprefix=${ac_default_prefix}])
-AC_SUBST([rootprefix], [$with_rootprefix])
-
-# ------------------------------------------------------------------------------
-AC_ARG_WITH([rootlibdir],
- AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
- [],
- [with_rootlibdir=${libdir}])
-AC_SUBST([rootlibdir], [$with_rootlibdir])
-
-# ------------------------------------------------------------------------------
-AC_ARG_ENABLE([debug-mode],
- AS_HELP_STRING([--disable-debug-mode], [disable debug mode]),
- [case "${enableval}" in
- yes) enable_debug_mode=yes ;;
- no) enable_debug_mode=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-debug-mode) ;;
- esac],
- enable_debug_mode=yes)
-if test "x$enable_debug_mode" == "xyes"; then
- M4_DEFINES="$M4_DEFINES -DDEBUG_MODE"
- AC_SUBST([OUR_CFLAGS], "$OUR_CFLAGS -DDEBUG_MODE -DTIZEN_DEBUG_ENABLE")
-fi
-
-AC_SUBST(DEBUG_MODE)
-AM_CONDITIONAL([DEBUG_MODE], [test "x$enable_debug_mode" == "xyes"])
-
-# ------------------------------------------------------------------------------
-AC_ARG_ENABLE([eng-mode],
- AS_HELP_STRING([--disable-eng-mode], [disable engineer mode]),
- [case "${enableval}" in
- yes) enable_eng_mode=yes ;;
- no) enable_eng_mode=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --disable-eng-mode) ;;
- esac],
- enable_eng_mode=yes)
-if test "x$enable_eng_mode" == "xyes"; then
- M4_DEFINES="$M4_DEFINES -DENG_MODE"
- AC_SUBST([OUR_CFLAGS], "$OUR_CFLAGS -DENG_MODE")
-fi
-
-AC_SUBST(ENG_MODE)
-AM_CONDITIONAL([ENG_MODE], [test "x$enable_eng_mode" != "xno"])
-
-# ------------------------------------------------------------------------------
-AC_ARG_ENABLE([release-mode],
- AS_HELP_STRING([--enable-release-mode], [enable release mode]),
- [case "${enableval}" in
- yes) enable_release_mode=yes ;;
- no) enable_release_mode=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-release-mode) ;;
- esac],
- enable_release_mode=no)
-if test "x$enable_release_mode" == "xyes"; then
- M4_DEFINES="$M4_DEFINES -DRELEASE_MODE"
- AC_SUBST([OUR_CFLAGS], "$OUR_CFLAGS -DRELEASE_MODE")
-fi
-
-AC_SUBST(RELEASE_MODE)
-AM_CONDITIONAL([RELEASE_MODE], [test "x$enable_release_mode" != "xno"])
-
-# ------------------------------------------------------------------------------
-AC_SUBST(M4_DEFINES)
-
-# ------------------------------------------------------------------------------
-PKG_CHECK_MODULES(VCONF, vconf)
-
-# ------------------------------------------------------------------------------
-AC_SUBST([LIBLAZYMOUNT_PC_REQUIRES], "")
-AC_SUBST([LIBLAZYMOUNT_PC_CFLAGS], "-D_GNU_SOURCE -I${prefix}/include/lazymount")
-AC_SUBST([LIBLAZYMOUNT_PC_LIBS], "-L${libdir} -llazymount")
-
-AC_SUBST([LIBLAZYMOUNT_PC_REQUIRES], "${LIBLAZYMOUNT_PC_REQUIRES} ${VCONF_REQUIRES}")
-AC_SUBST([LIBLAZYMOUNT_PC_CFLAGS], "${LIBLAZYMOUNT_PC_CFLAGS} ${VCONF_CFLAGS}")
-AC_SUBST([LIBLAZYMOUNT_PC_LIBS], "${LIBLAZYMOUNT_PC_LIBS} ${VCONF_LIBS}")
-
-# ------------------------------------------------------------------------------
-AC_CONFIG_FILES([Makefile])
-
-AC_OUTPUT
-AC_MSG_RESULT([
- $PACKAGE_NAME $VERSION
-
- prefix: ${prefix}
- rootprefix: ${with_rootprefix}
- sysconf dir: ${sysconfdir}
- datarootdir: ${datarootdir}
- lib dir: ${libdir}
- rootlib dir: ${with_rootlibdir}
- debug mode: ${enable_debug_mode}
- engineer mode: ${enable_eng_mode}
-
- OUR CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
-])
diff --git a/packaging/liblazymount.manifest b/packaging/liblazymount.manifest
deleted file mode 100644
index 2a0cec5..0000000
--- a/packaging/liblazymount.manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
- <request>
- <domain name="_"/>
- </request>
-</manifest>
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec
index 6bca532..5936bda 100644
--- a/packaging/system-plugin.spec
+++ b/packaging/system-plugin.spec
@@ -9,11 +9,9 @@ Group: Base/Startup
License: Apache-2.0
Source0: %{name}-%{version}.tar.bz2
Source1: %{name}.manifest
-Source2: liblazymount.manifest
Requires(post): /usr/bin/systemctl
Requires(post): /usr/bin/udevadm
-BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(libsystemd)
%description
@@ -76,22 +74,6 @@ BuildArch: noarch
This package provides init.wrapper and init symlink file for init wrapper booting.
In addition, overlayfs is mounted upon the rootfs.
-%package feature-lazymount
-Summary: Library for lazy mount feature
-Requires(post): /usr/bin/vconftool
-Requires: vconf
-
-%description feature-lazymount
-Library for lazy mount feature. It supports some interface functions.
-
-%package feature-lazymount-devel
-Summary: Development library for lazy mount feature
-Requires: vconf
-Requires: %{name}-feature-lazymount = %{version}
-
-%description feature-lazymount-devel
-Development library for lazy mount feature. It supports some interface functions.
-
%package feature-image-reduction
Summary: System configuration files for reducing image size
Requires: %{name} = %{version}-%{release}
@@ -155,21 +137,9 @@ This package provides configuration files for /etc/fstab(remount) and resize2fs@
%build
cp %{SOURCE1} .
-cp %{SOURCE2} .
-
-./autogen.sh
-%reconfigure \
- --disable-static \
- --prefix=%{_prefix} \
- --disable-debug-mode \
- --disable-eng-mode
-
-%__make %{?jobs:-j%jobs} \
- CFLAGS+=-DLIBDIR=\\\"%{_libdir}\\\"
%install
rm -rf %{buildroot}
-%make_install
mkdir -p %{buildroot}%{_unitdir}
mkdir -p %{buildroot}%{_userunitdir}
@@ -328,30 +298,6 @@ ln -s /sbin/init.wrapper.overlayfs /sbin/init
mkdir -p /.overlayfs_merged
mkdir -p /.rootfs_old
-%files feature-lazymount
-%defattr(-,root,root,-)
-%manifest liblazymount.manifest
-%license LICENSE.Apache-2.0
-%{_libdir}/liblazymount.so.*
-%{_unitdir}/basic.target.wants/lazy_mount.path
-%{_unitdir}/lazy_mount.path
-%{_unitdir}/lazy_mount.service
-%{_bindir}/mount-user.sh
-
-%post feature-lazymount
-/sbin/ldconfig
-systemctl daemon-reload
-
-%postun feature-lazymount -p /sbin/ldconfig
-
-%files feature-lazymount-devel
-%defattr(-,root,root,-)
-%manifest liblazymount.manifest
-%license LICENSE.Apache-2.0
-%{_libdir}/liblazymount.so
-%{_includedir}/lazymount/lazy_mount.h
-%{_libdir}/pkgconfig/liblazymount.pc
-
%posttrans feature-image-reduction
# platform/upstream/dbus
rm -f %{_bindir}/dbus-cleanup-sockets
diff --git a/scripts/mount-user.sh b/scripts/mount-user.sh
deleted file mode 100644
index 2210516..0000000
--- a/scripts/mount-user.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-PATH=/bin:/usr/bin:/sbin:/usr/sbin
-
-USER_DISK=`ls /dev/disk/by-partlabel/ | grep -i user`
-USER_MNT=/opt/usr
-
-if [ -f /tmp/.lazy_mount ]
-then
-rm -f /tmp/.lazy_mount
-fi
-
-if [ -f /run/.unlock_mnt ]
-then
-rm -f /run/.unlock_mnt
-fi
-
-mount | grep "$USER_MNT " > /dev/null
-
-if [ $? = "0" ]
-then
-touch /run/.unlock_mnt
-else
-/usr/bin/mount PARTLABEL=$USER_DISK $USER_MNT
-touch /run/.unlock_mnt
-chsmack -a "_" $USER_MNT
-fi
diff --git a/src/liblazymount/lazy_mount.h b/src/liblazymount/lazy_mount.h
deleted file mode 100644
index c534b6c..0000000
--- a/src/liblazymount/lazy_mount.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/*
- * liblazymount
- *
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _LAZY_MOUNT_H_
-#define _LAZY_MOUNT_H_ 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Get the check value wheter system need the ui for lazy mount feature.
- * @return 1 if system should show the ui for lazy mount feature, otherwise 0.
- * @par Example
- @code
- #include <lazy_mount.h>
-
- int show_ui;
-
- show_ui = get_need_ui_for_lazy_mount();
-
- @endcode
- */
-int get_need_ui_for_lazy_mount();
-
-/**
- * @brief Create /tmp/.lazy_mount file to mount user partion to /opt/usr.
- * @return 0 if success to create /tmp/.lazy_mount, otherwise -errno.
- * @par Example
- @code
- #include <lazy_mount.h>
-
- int result;
-
- result = do_mount_user();
-
- @endcode
- */
-int do_mount_user();
-
-/**
- * @brief Wait for complete to mount user partion to /opt/usr.
- * @return 0 if success to mount it, otherwise -errno.
- * @par Example
- @code
- #include <lazy_mount.h>
-
- int result;
-
- result = wait_mount_user();
-
- @endcode
- */
-int wait_mount_user();
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#endif // _LAZY_MOUNT_H_
diff --git a/src/liblazymount/lazy_mount_interface.c b/src/liblazymount/lazy_mount_interface.c
deleted file mode 100644
index 25fcdea..0000000
--- a/src/liblazymount/lazy_mount_interface.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/*
- * liblazymount
- *
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <poll.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/inotify.h>
-#include <vconf.h>
-
-#ifndef VCONFKEY_SYSTEM_LAZY_MOUNT_SHOW_UI
-#define VCONFKEY_SYSTEM_LAZY_MOUNT_SHOW_UI "db/system/lazy_mount_show_ui"
-#endif
-#define DEFAULT_VALUE_LAZY_MOUNT_SHOW_UI 0
-
-#define LAZY_MOUNT_FILE "/tmp/.lazy_mount"
-#define LAZY_MOUNT_CHECK_DIR "/run"
-#define UNLOCK_MNT_STR ".unlock_mnt"
-#define LAZY_MOUNT_CHECK_FILE LAZY_MOUNT_CHECK_DIR "/" UNLOCK_MNT_STR
-
-#define EVENT_NAME_MAX 256
-#define EVENT_SIZE (sizeof(struct inotify_event))
-#define EVENT_BUF_LEN (512 * (EVENT_SIZE + EVENT_NAME_MAX))
-
-/* Enumerate list of FDs to poll */
-enum {
- FD_POLL_INOTIFY = 0,
- FD_POLL_MAX
-};
-
-int get_need_ui_for_lazy_mount()
-{
- int sl_result = 0;
- /* get touchkey light duration setting */
- if (vconf_get_int(VCONFKEY_SYSTEM_LAZY_MOUNT_SHOW_UI, &sl_result) < 0)
- return DEFAULT_VALUE_LAZY_MOUNT_SHOW_UI;
-
- if (sl_result != 1 && sl_result != 0)
- return DEFAULT_VALUE_LAZY_MOUNT_SHOW_UI;
-
- return sl_result;
-}
-
-int do_mount_user()
-{
- FILE *f = NULL;
-
- f = fopen(LAZY_MOUNT_FILE, "w");
- if (!f)
- return -errno;
-
- fclose(f);
- return 0;
-}
-
-int wait_mount_user()
-{
- int fd, wd;
- char buffer[EVENT_BUF_LEN];
- int length;
- struct pollfd fds[FD_POLL_MAX];
- int i;
-
- fd = access(LAZY_MOUNT_CHECK_FILE, F_OK);
-
- if (fd == 0)
- return 0;
-
- fd = inotify_init();
-
- if (fd < 0)
- return -errno;
-
- wd = inotify_add_watch(fd, LAZY_MOUNT_CHECK_DIR, IN_CREATE|IN_MODIFY|IN_ATTRIB);
-
- fds[FD_POLL_INOTIFY].fd = fd;
- fds[FD_POLL_INOTIFY].events = POLLIN;
-
- while (1) {
- if (poll(fds, FD_POLL_MAX, -1) < 0) {
- inotify_rm_watch(fd, wd);
- close(fd);
- return -errno;
- }
-
- if (fds[FD_POLL_INOTIFY].revents & POLLIN) {
- length = read(fds[FD_POLL_INOTIFY].fd, buffer, EVENT_BUF_LEN);
-
- if (length < 0) {
- inotify_rm_watch(fd, wd);
- close(fd);
- return -errno;
- }
-
- i = 0;
- while (i < length) {
- struct inotify_event *event = (struct inotify_event *) &buffer[i];
- if (event->len > 0 && event->len < EVENT_NAME_MAX) {
- if (event->mask & (IN_CREATE|IN_MODIFY|IN_ATTRIB)) {
- if (!(event->mask & IN_ISDIR)) {
- if (!strncmp(event->name, UNLOCK_MNT_STR, sizeof(UNLOCK_MNT_STR))) {
- inotify_rm_watch(fd, wd);
- close(fd);
- return 0;
- }
- }
- }
- }
- i += EVENT_SIZE + event->len;
- }
- }
- }
-
- inotify_rm_watch(fd, wd);
- close(fd);
-
- return -1;
-}
diff --git a/src/liblazymount/liblazymount.pc.in b/src/liblazymount/liblazymount.pc.in
deleted file mode 100644
index cf9c9cc..0000000
--- a/src/liblazymount/liblazymount.pc.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# Package Information for pkg-config
-#
-# Copyright (c) 2016 Samsung Electronics Co., Ltd.
-# All rights reserved.
-#
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: liblazymount
-Description: system utility libraries for lazy-mount
-Version: @PACKAGE_VERSION@
-Requires.private: @LIBLAZYMOUNT_PC_REQUIRES@
-Cflags: @LIBLAZYMOUNT_PC_CFLAGS@
-Libs: @LIBLAZYMOUNT_PC_LIBS@
diff --git a/units/lazy_mount.path b/units/lazy_mount.path
deleted file mode 100644
index b27079f..0000000
--- a/units/lazy_mount.path
+++ /dev/null
@@ -1,5 +0,0 @@
-[Unit]
-Description=Path activator of lazy mount service
-
-[Path]
-PathExists=/tmp/.lazy_mount
diff --git a/units/lazy_mount.service b/units/lazy_mount.service
deleted file mode 100644
index 8d4d492..0000000
--- a/units/lazy_mount.service
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Mount /opt/usr
-
-[Service]
-Type=oneshot
-SmackProcessLabel=System::Privileged
-ExecStart=/usr/bin/mount-user.sh
-SuccessExitStatus=0
diff --git a/units/wait-user-mount.service b/units/wait-user-mount.service
deleted file mode 100644
index b648197..0000000
--- a/units/wait-user-mount.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Wait user mount
-After=starter.service
-Before=basic.target
-DefaultDependencies=no
-
-[Service]
-Type=notify
-ExecStart=/usr/bin/test_lazymount wait
-TimeoutStartSec=365d
-RemainAfterExit=yes