Normally, /dev/mapper and /dev/mapper/control are created by the in-kernel dm driver
and the smack label is set by Systemd as '*'.
When the dm driver is loaded as a module (dm-mod.ko), however,
/dev/mapper's label cannot be initialized by Systemd.
drwxr-xr-x root root * /dev/mapper
crw------- root root * /dev/mapper/control
Change-Id: I74f7b58cbfb80294bb19bd5cff683359d26c1b22
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
--- /dev/null
+KERNEL=="device-mapper", NAME="mapper/control", SECLABEL{smack}="*", RUN+="/bin/chsmack -a * /dev/mapper"
Url: http://sources.redhat.com/dm
Group: Base/Device Management
Source0: ftp://sources.redhat.com/pub/lvm2/lvm2-v%{lvm2_version}.tar.gz
+Source101: 99-dm-tizen.rules
Source1001: device-mapper.manifest
BuildRequires: pkgconfig(libsystemd)
%install
make install_device-mapper DESTDIR=%{buildroot} usrlibdir=%{buildroot}/usr/%{_lib}
sed -i 's/ (.*)//g' %{buildroot}%{_libdir}/pkgconfig/*.pc
+install -m644 99-dm-tizen.rules %{buildroot}/%{udev_dir}/99-dm-tizen.rules
rm -rf %{buildroot}/usr/share/man