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(glib-2.0)
15 BuildRequires: pkgconfig(aul)
16 BuildRequires: pkgconfig(bundle)
17 BuildRequires: pkgconfig(libtzplatform-config)
18 BuildRequires: pkgconfig(cynara-client)
19 BuildRequires: pkgconfig(libcrypto)
20 BuildRequires: pkgconfig(libsmack)
21 BuildRequires: pkgconfig(blkid)
24 %global key_storage_plugin_dir %{_libdir}/ode-key-storage-plugin/
25 %global softreset_dir /usr/system/RestoreDir/softreset/
28 The ode package provides a daemon which is responsible for encrypting/decryption storages and secure erasing.
31 %manifest ode.manifest
32 %defattr(644,root,root,755)
33 %attr(755,root,root) %{_bindir}/oded
34 %{_unitdir}/ode.service
35 %{_unitdir}/multi-user.target.wants/ode.service
36 %attr(700,root,root) %{TZ_SYS_SBIN}/ode-admin-cli
37 %attr(700,root,root) %{softreset_dir}/ode_softreset.sh
38 %attr(750,root,system_share) %{TZ_SYS_SBIN}/ode-fota
40 %dir %{key_storage_plugin_dir}
46 %{!?build_type:%define build_type "RELEASE"}
48 %if %{build_type} == "DEBUG" || %{build_type} == "PROFILING" || %{build_type} == "CCOV"
49 CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
50 CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
53 %cmake . -DVERSION=%{version} \
54 -DCMAKE_BUILD_TYPE=%{build_type} \
55 -DRUN_DIR=%{TZ_SYS_RUN} \
56 -DBIN_DIR=%{TZ_SYS_BIN} \
57 -DSBIN_DIR=%{TZ_SYS_SBIN} \
58 -DSYSTEMD_UNIT_DIR=%{_unitdir} \
59 -DAPP_INSTALL_PREFIX="%{TZ_SYS_RO_APP}" \
60 -DAPP_SHARE_PACKAGES_DIR="%{TZ_SYS_RO_PACKAGES}" \
61 -DSOFTRESET_DIR="%{softreset_dir}" \
62 -DKEY_STORAGE_PLUGIN_DIR="%{key_storage_plugin_dir}"
68 %install_service multi-user.target.wants ode.service
74 systemctl daemon-reload
77 systemctl start ode.service
80 systemctl restart ode.service
86 systemctl stop ode.service
91 ## ODE Client Package ########################################################
93 Summary: Library for Tizen device encryption and secure erase
94 Group: Security/Libraries
95 BuildRequires: pkgconfig(libtzplatform-config)
96 Requires: %{name} = %{version}-%{release}
97 Requires(post): /sbin/ldconfig
98 Requires(postun): /sbin/ldconfig
100 %description -n libode
101 The libode package contains the libraries needed to encrypt/decrypt storages and secure erasing.
103 %post -n libode -p /sbin/ldconfig
105 %postun -n libode -p /sbin/ldconfig
108 %manifest ode.manifest
109 %defattr(644,root,root,755)
110 %attr(755,root,root) %{_libdir}/libode.so.%{version}
111 %{_libdir}/libode.so.0
113 ## Devel Package ##############################################################
114 %package -n libode-devel
115 Summary: Libraries and header files for device encryption client development
116 Group: Development/Libraries
117 Requires: libode = %{version}-%{release}
119 %description -n libode-devel
120 The libode-devel package includes the libraries and header files necessary for
121 developing device encryption client program.
123 %files -n libode-devel
124 %manifest ode.manifest
125 %defattr(644,root,root,755)
128 %{_libdir}/pkgconfig/ode.pc
130 ## Plugin Devel Package ##############################################################
132 Summary: Header files for key storage plugin development
133 Group: Development/Libraries
135 %description ksp-devel
136 The ode-ksp-devel package includes header files necessary for key storage
140 %manifest ode.manifest
141 %defattr(644,root,root,755)
142 %{_includedir}/ode-key-storage-plugin
143 %{_libdir}/pkgconfig/ode-key-storage-plugin.pc
145 ## Unittest Package ###########################################################
147 Summary: Unit tests to verify components of device encryption
148 Group: Security/Testing
149 Requires: libode = %{version}-%{release}
151 %description unit-tests
152 The libode-devel package includes the libraries and header files necessary for
153 developing device encryption client program.
156 %manifest ode.manifest
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_bindir}/ode-engine-unit-tests
160 ## Dummy key storage plugin Package ###########################################################
162 Summary: Dummy key storage plugin for FOTA binary upgrade testing
163 Group: Security/Testing
165 %description dummy-ksp
166 The ode-dummy-ksp package includes the dummy key storage plugin that can be used
167 for testing the binary upgrade process (FOTA). The plugin will be used by ode to
168 store the master encryption key in a file to use during FOTA process.
171 %manifest ode.manifest
172 %attr(755,root,root) %{key_storage_plugin_dir}/*