5 Source0: file://%{name}-%{version}.tar.gz
6 Summary: Tizen device encryption and secure erase manager
7 Group: Security/Service
12 BuildRequires: gettext-tools
13 BuildRequires: pkgconfig(klay)
14 BuildRequires: pkgconfig(vconf)
15 BuildRequires: pkgconfig(glib-2.0)
16 BuildRequires: pkgconfig(libtzplatform-config)
17 BuildRequires: pkgconfig(cynara-client)
18 BuildRequires: pkgconfig(libcrypto)
19 BuildRequires: pkgconfig(libsmack)
20 BuildRequires: pkgconfig(blkid)
21 BuildRequires: pkgconfig(capi-system-device)
22 BuildRequires: pkgconfig(libsystemd)
23 BuildRequires: pkgconfig(ext2fs)
24 BuildRequires: pkgconfig(com_err)
27 %global key_storage_plugin_dir %{_libdir}/ode-key-storage-plugin/
28 %global softreset_dir /usr/system/RestoreDir/softreset/
29 %define upgrade_script_dir /usr/share/upgrade/scripts/
32 The ode package provides a daemon which is responsible for encrypting/decryption storages and secure erasing.
35 %manifest ode.manifest
36 %defattr(644,root,root,755)
37 %attr(755,root,root) %{_bindir}/oded
38 %{_unitdir}/ode.service
39 %{_unitdir}/multi-user.target.wants/ode.service
40 %attr(700,root,root) %{TZ_SYS_SBIN}/ode-admin-cli
41 %attr(700,root,root) %{softreset_dir}/ode_softreset.sh
42 %attr(750,root,system_share) %{TZ_SYS_SBIN}/ode-fota
44 %dir %{key_storage_plugin_dir}
45 %attr(755,root,root) %{upgrade_script_dir}/500.ode_upgrade.sh
51 %{!?build_type:%define build_type "RELEASE"}
53 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
54 CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
55 CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
58 %cmake . -DVERSION=%{version} \
59 -DCMAKE_BUILD_TYPE=%{build_type} \
60 -DRUN_DIR=%{TZ_SYS_RUN} \
61 -DBIN_DIR=%{TZ_SYS_BIN} \
62 -DSBIN_DIR=%{TZ_SYS_SBIN} \
63 -DSYSTEMD_UNIT_DIR=%{_unitdir} \
64 -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
65 -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}" \
66 -DSOFTRESET_DIR="%{softreset_dir}" \
67 -DKEY_STORAGE_PLUGIN_DIR="%{key_storage_plugin_dir}" \
68 -DUPGRADE_SCRIPT_DIR="%{upgrade_script_dir}"
74 %install_service multi-user.target.wants ode.service
80 systemctl daemon-reload
83 systemctl start ode.service
86 systemctl restart ode.service
92 systemctl stop ode.service
97 ## ODE Client Package ########################################################
99 Summary: Library for Tizen device encryption and secure erase
100 Group: Security/Libraries
101 BuildRequires: pkgconfig(libtzplatform-config)
102 Requires: %{name} = %{version}-%{release}
103 Requires(post): /sbin/ldconfig
104 Requires(postun): /sbin/ldconfig
106 %description -n libode
107 The libode package contains the libraries needed to encrypt/decrypt storages and secure erasing.
109 %post -n libode -p /sbin/ldconfig
111 %postun -n libode -p /sbin/ldconfig
114 %manifest ode.manifest
115 %defattr(644,root,root,755)
116 %attr(755,root,root) %{_libdir}/libode.so.%{version}
117 %{_libdir}/libode.so.0
119 ## Devel Package ##############################################################
120 %package -n libode-devel
121 Summary: Libraries and header files for device encryption client development
122 Group: Development/Libraries
123 Requires: libode = %{version}-%{release}
125 %description -n libode-devel
126 The libode-devel package includes the libraries and header files necessary for
127 developing device encryption client program.
129 %files -n libode-devel
130 %manifest ode.manifest
131 %defattr(644,root,root,755)
134 %{_libdir}/pkgconfig/ode.pc
136 ## Plugin Devel Package ##############################################################
138 Summary: Header files for key storage plugin development
139 Group: Development/Libraries
141 %description ksp-devel
142 The ode-ksp-devel package includes header files necessary for key storage
146 %manifest ode.manifest
147 %defattr(644,root,root,755)
148 %{_includedir}/ode-key-storage-plugin
149 %{_libdir}/pkgconfig/ode-key-storage-plugin.pc
151 ## Unittest Package ###########################################################
153 Summary: Unit tests to verify components of device encryption
154 Group: Security/Testing
155 Requires: libode = %{version}-%{release}
157 %description unit-tests
158 The libode-devel package includes the libraries and header files necessary for
159 developing device encryption client program.
162 %manifest ode.manifest
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_bindir}/ode-engine-unit-tests
166 ## Dummy key storage plugin Package ###########################################################
168 Summary: Dummy key storage plugin for FOTA binary upgrade testing
169 Group: Security/Testing
171 %description dummy-ksp
172 The ode-dummy-ksp package includes the dummy key storage plugin that can be used
173 for testing the binary upgrade process (FOTA). The plugin will be used by ode to
174 store the master encryption key in a file to use during FOTA process.
177 %manifest ode.manifest
178 %attr(755,root,root) %{key_storage_plugin_dir}/*