tizen 2.4 release
[framework/security/smack.git] / packaging / smack.spec
1 Name:       smack
2 Version:    1.0+s14
3 Release:    1
4 Summary:    Package to interact with Smack
5 Group:      System/Kernel
6 License:    LGPL-2.1+
7 URL:        https://github.com/organizations/smack-team/smack
8 Source0:    smack-%{version}.tar.gz
9 Source1:    smack.manifest
10 Source2:    smack-devel.manifest
11 Source3:    smack-utils.manifest
12 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
13
14 BuildRequires: automake autoconf libtool
15 Provides: libsmack
16
17 %description
18 Library allows applications to work with Smack
19
20 %package devel
21 Summary:    Developmnent headers and libs for libsmack
22 Group:      Development/Libraries
23 License:    LGPL-2.1+
24 Requires:   %{name} = %{version}-%{release}
25
26 %description devel
27 Standard header files for use when developing Smack enabled applications
28
29 %package utils
30 Summary:    Selection of tools for developers working with Smack
31 Group:      System/Kernel
32 License:    LGPL-2.1+ and GPL-2.0+
33 Requires:   %{name} = %{version}-%{release}
34
35 %description utils
36 Tools provided to load and unload rules from the kernel and query the policy
37
38 %prep
39 %setup -q
40 autoreconf --install --symlink
41
42 %build
43 %configure --with-systemdsystemunitdir=%{_libdir}/systemd/system CFLAGS=-fPIE LDFLAGS=-pie
44
45 make %{?_smp_mflags}
46
47 %install
48 rm -rf %{buildroot}
49 make install DESTDIR=%{buildroot}
50 install -d %{buildroot}/smack
51 install -d %{buildroot}/etc
52 install -D -d %{buildroot}/etc/smack/accesses.d
53 install -D -d %{buildroot}/etc/smack/cipso.d
54 #install -D -d %{buildroot}/etc/rc.d/rc3.d/
55 #install -D -d %{buildroot}/etc/rc.d/rc4.d/
56 install -D init/smack.rc %{buildroot}/etc/init.d/smack-utils
57 #ln -sf /etc/init.d/smack-utils %{buildroot}/etc/rc.d/rc3.d/S01smack
58 #ln -sf /etc/init.d/smack-utils %{buildroot}/etc/rc.d/rc4.d/S01smack
59 install -D -d %{buildroot}%{_libdir}/systemd/system/local-fs.target.wants
60 install -D -d %{buildroot}%{_libdir}/systemd/system/basic.target.wants
61 ln -sf ../%{name}.mount %{buildroot}%{_libdir}/systemd/system/local-fs.target.wants/
62 ln -sf ../%{name}.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants/
63 rm -rf %{buildroot}/%{_docdir}
64 mkdir -p %{buildroot}/usr/share/license
65 cp COPYING %{buildroot}/usr/share/license/%{name}
66 cp COPYING %{buildroot}/usr/share/license/%{name}-utils
67 cat LICENSE >> %{buildroot}/usr/share/license/%{name}-utils
68
69 %clean
70 rm -rf %{buildroot}
71
72 %postun -p /sbin/ldconfig
73
74 %files
75 %manifest packaging/smack.manifest
76 %defattr(644,root,root,755)
77 %{_libdir}/libsmack.so.*
78 %{_datadir}/license/%{name}
79
80 %files devel
81 %manifest packaging/smack-devel.manifest
82 %defattr(644,root,root,755)
83 %{_includedir}/*
84 %{_libdir}/libsmack.so
85 %{_libdir}/libsmack.la
86 %{_libdir}/pkgconfig/*
87 %{_mandir}/man3/*
88
89 %files utils
90 %manifest packaging/smack-utils.manifest
91 %defattr(644,root,root,755)
92 %attr(755,root,root) %{_bindir}/*
93 %attr(755,root,root) /etc/init.d/smack-utils
94 %{_sysconfdir}/smack/*
95 #/etc/rc.d/*
96 %{_libdir}/systemd/system/%{name}.mount
97 %{_libdir}/systemd/system/local-fs.target.wants/%{name}.mount
98 %{_libdir}/systemd/system/%{name}.service
99 %{_libdir}/systemd/system/basic.target.wants/%{name}.service
100 /smack/
101 %{_mandir}/man1/*
102 %{_mandir}/man8/*
103 %{_datadir}/license/%{name}-utils
104
105 %changelog
106 * Wed Dec 04 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0+s14
107 - smackload-fast: revert untracked changes to original source.
108 - smackload-fast: add support for legacy kernel with no multi-line support.
109 - smackload-fast: sanitize struct rule definition and usage.
110 - Change smack.service to use smackload-fast.
111
112 * Thu Nov 28 2013 Krzysztof Jackiewicz <k.jackiewicz@samsung.com> - 1.0+s13
113 - Prevent potentially unterminated buffers while adding rule to the list
114 - Add util smackloadfast
115 - Fix parse error messages in smackloadfast.
116 - Fix parsing bug in smackloadfast util.
117 - Add automake generation for smackloadfast
118 - Elimination of floor (_) labeled executables
119
120 * Tue Aug 13 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0+s12
121 - Fix symlink creation on smack-utils install.
122 - libsmack: add support for new access mode for setting locks ("l")
123
124 * Mon May 27 2013 Kidong Kim <kd0228.kim@samsung.com> - 1.0+s11-4
125 - remove rc.d scripts
126
127 * Tue May 14 2013 Kidong Kim <kd0228.kim@samsung.com> - 1.0+s11-3
128 - fix systemd service file
129
130 * Mon May 06 2013 Kidong Kim <kd0228.kim@samsung.com> - 1.0+s11-2
131 - fix %post
132
133 * Fri May 03 2013 Kidong Kim <kd0228.kim@samsung.com> - 1.0+s11-1
134 - fix directory installation problem
135 - fix %post bug
136
137 * Thu Apr 25 2013 Krzysztof Jackiewicz <k.jackiewicz@samsung.com> - 1.0+s11
138 - fix smackcipso can't set CIPSO correctly
139 - disable services for new systemd versions
140
141 * Mon Feb 18 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0+s10
142 - libsmack: check label length in smack_revoke_subject().
143 - Merge changes from upstream repository:
144   - libsmack: fallback to short labels.
145   - Declare smack_mnt as non-static in init.c.
146   - Removed dso.h.
147   - smack.service: provide [Install] section in systemd unit file.
148   - smack.mount: "WantedBy" is illegal in [Unit] context.
149   - Move cipso_free,cipso_new,cipso_apply from utils/common.c to libsmack/libsmack.c.
150   - Add support for smackfs directory: /sys/fs/smackfs/
151   - Run AM_PROG_AR to fix build with newer automake.
152
153 * Thu Feb 07 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0+s9
154 - Add systemd support scripts.
155 - Polish init script.
156 - execute init script between local-fs.target and basic.target.
157 - libsmack: try not to fail if accesses_apply cannot access some kernel interface.
158
159 * Tue Feb 05 2013 Rafal Krypa <r.krypa@samsung.com> - 1.0+s8
160 - libsmack: fix access type parsing.
161 - libsmack: fix label removal.
162 - Don't fail when removing label from file, that doesn't have it.
163
164 * Mon Nov 26 2012 Kidong Kim <kd0228.kim@samsung.com> - 1.0+s7
165 - change initialization script order
166
167 * Mon Sep 17 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0+s6
168 - Modified typo access.d --> accesses.d
169 - packaging: fix location of symlinks to smack-utils init script.
170 - Merge with upstream.
171
172 * Wed Aug  1 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0+s5
173 - Rebuild, no source changes.
174
175 * Mon Jul 30 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0+s4
176 - Rebuild, no source changes.
177
178 * Thu Jul 19 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0+s3
179 - Rebuild, change versioning schema.
180
181 * Wed Jul 11 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0+s2
182 - Release with my source patches after review with the upstream maintainer.
183
184 * Wed May  9 2012 Rafal Krypa <r.krypa@samsung.com> - 1.0+s1
185 - Initial spec file