summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMyoungJune Park <mj2004.park@samsung.com>2017-03-27 13:37:59 +0900
committerMyoungJune Park <mj2004.park@samsung.com>2017-06-12 16:15:18 +0900
commit98d02ddb1a4b4bf4b0879fb189707543d06bc6bf (patch)
tree05be6983bb828d98b320899e31b09f3794ec1c57 /packaging
parent41f717fb0857f466c34797859cc0c5525daa4e54 (diff)
downloadfactory-reset-98d02ddb1a4b4bf4b0879fb189707543d06bc6bf.tar.gz
factory-reset-98d02ddb1a4b4bf4b0879fb189707543d06bc6bf.tar.bz2
factory-reset-98d02ddb1a4b4bf4b0879fb189707543d06bc6bf.zip
init code
Change-Id: Ie6cb5cdbcabca325d23d3a230027d40f67c09644 Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/factory-reset-launch.service7
-rw-r--r--packaging/factory-reset.service12
-rwxr-xr-xpackaging/factory-reset.spec110
-rw-r--r--packaging/org.tizen.factory-reset.service5
4 files changed, 134 insertions, 0 deletions
diff --git a/packaging/factory-reset-launch.service b/packaging/factory-reset-launch.service
new file mode 100644
index 0000000..664a931
--- /dev/null
+++ b/packaging/factory-reset-launch.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=launching factory reset by dbus
+
+[Service]
+Type=dbus
+BusName=org.tizen.factoryreset
+ExecStart=/usr/bin/factory-reset
diff --git a/packaging/factory-reset.service b/packaging/factory-reset.service
new file mode 100644
index 0000000..7c4d371
--- /dev/null
+++ b/packaging/factory-reset.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=factory reset on booting
+Before=tizen-boot.target
+
+ConditionPathExists=|/opt/.factoryreset
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/factory-reset
+
+[Install]
+WantedBy=multi-user.target
diff --git a/packaging/factory-reset.spec b/packaging/factory-reset.spec
new file mode 100755
index 0000000..44979f1
--- /dev/null
+++ b/packaging/factory-reset.spec
@@ -0,0 +1,110 @@
+Name: factory-reset
+Summary: factory-reset scripts and uitls
+Version: 0.19.6
+Release: 2
+Group: Applications/Core Applications
+License: po/ms.po:3
+Source0: %{name}-%{version}.tar.gz
+Source1: factory-reset.service
+Source2: factory-reset-launch.service
+Source3: org.tizen.factory-reset.service
+ExclusiveArch: %{arm}
+BuildRequires: cmake
+BuildRequires: gettext-tools
+BuildRequires: edje-bin
+BuildRequires: embryo-bin
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(elementary)
+#BuildRequires: pkgconfig(ecore-x)
+#BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(libsmack)
+BuildRequires: pkgconfig(dbus-1)
+BuildRequires: pkgconfig(dbus-glib-1)
+
+Requires: /bin/tar
+Requires: unzip >= 6.0
+Requires: /bin/ps
+Requires: /bin/grep
+Requires: /bin/sleep
+Requires: /bin/mount
+Requires: /bin/umount
+Requires: /usr/bin/md5sum
+Requires: /usr/bin/expr
+Requires: /usr/bin/tr
+Requires: /usr/bin/awk
+
+%description
+Factory-reset is for returning the phone to the initial state. This makes the
+data of the phone to the default state and (if required) writes default
+preconfiguration
+It would be not only called by testers after many kind of verification tests
+but it also be called by Manufacture Steps for all products.
+
+%prep
+%setup -q
+
+%build
+%if 0%{?sec_product_feature_telephony_disable}
+export CFLAGS+=" -DTELEPHONY_DISABLE"
+%endif
+
+%if 0%{?sec_product_feature_csc_disable}
+export CFLAGS+=" -DCSC_DISABLE"
+%endif
+
+%if 0%{?sec_build_binary_debug_enable}
+export CFLAGS+=" -DDEBUG_BINARY"
+%endif
+
+%if 0%{?sec_product_feature_security_mdfpp_enable}
+export CFLAGS+=" -DTIZEN_CC"
+%endif
+
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+-DDISPLAY_RESOLUTION=%{sec_product_feature_display_resolution}
+
+make %{?jobs:-j%jobs}
+
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/
+install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/factory-reset.service
+install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/factory-reset-launch.service
+ln -s ../factory-reset.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/factory-reset.service
+mkdir -p %{buildroot}%{_datadir}/dbus-1/system-services
+#install -m 0644 %SOURCE3 %{buildroot}%{_datadir}/dbus-1/services/org.tizen.factory-reset.service
+install -m 0644 %SOURCE3 %{buildroot}%{_datadir}/dbus-1/system-services/org.tizen.factory-reset.service
+
+%post
+
+%postun
+
+
+%files
+%{_libdir}/systemd/system/factory-reset.service
+%{_libdir}/systemd/system/factory-reset-launch.service
+%{_libdir}/systemd/system/multi-user.target.wants/factory-reset.service
+%license LICENSE
+/etc/smack/accesses2.d/%{name}.rule
+%attr(700,root,root) %{_bindir}/*.sh
+%attr(755,root,root) %{_bindir}/rstsmack
+%attr(700,root,root) %{_bindir}/factory-reset-util
+%attr(744,root,root) %{_bindir}/factory-reset
+%{_datadir}/edje/factory-reset-util.edj
+%{_datadir}/locale/*/*/*.mo
+#%{_datadir}/dbus-1/services/org.tizen.factory-reset.service
+%{_datadir}/dbus-1/system-services/org.tizen.factory-reset.service
+%manifest factory-reset.manifest
+%attr(110,root,root) /opt/etc/dump.d/module.d/dump-frlog.sh
+
+%if 0%{?sec_product_feature_security_mdfpp_enable}
+%attr(700,root,root) %{_bindir}/resetCCMode
+%endif
+
+
+
diff --git a/packaging/org.tizen.factory-reset.service b/packaging/org.tizen.factory-reset.service
new file mode 100644
index 0000000..7feaa92
--- /dev/null
+++ b/packaging/org.tizen.factory-reset.service
@@ -0,0 +1,5 @@
+[D-BUS Service]
+Name=org.tizen.factoryreset
+Exec=/bin/false
+SystemdService=factory-reset-launch.service
+User=root