]>
Commit | Line | Data |
---|---|---|
71eb528e JR |
1 | %define mod_name ruid2 |
2 | %define apxs /usr/sbin/apxs | |
3 | Summary: Apache module: run all httpd process under user's access right | |
4 | Summary(pl.UTF-8): Moduł do apache: uruchamiania procesów httpd na prawach użytkowniów | |
5 | Name: apache-mod_%{mod_name} | |
6 | Version: 0.9.4 | |
7 | Release: 0.1 | |
8 | License: ASL v2.0 | |
9 | Group: Networking/Daemons/HTTP | |
10 | Source0: http://sourceforge.net/projects/mod-ruid/files/mod_ruid2/mod_%{mod_name}-%{version}.tar.bz2 | |
11 | # Source0-md5: 23e43b818c578142689de4d36868391a | |
12 | Source1: mod_%{mod_name}.conf | |
13 | URL: http://mod-ruid.sourceforge.net/ | |
14 | BuildRequires: %{apxs} | |
15 | BuildRequires: apache-devel >= 2.0.0 | |
16 | BuildRequires: libcap-devel | |
17 | BuildRequires: rpmbuild(macros) >= 1.268 | |
18 | Requires: apache(modules-api) = %apache_modules_api | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) | |
22 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) | |
23 | ||
24 | %description | |
25 | With this module, all httpd process run under user's access right, | |
26 | not nobody or http. mod_ruid2 makes use of kernel capabilites | |
27 | and after receiving a new request suids again. If you want to run | |
28 | apache modules, i.e. WebDAV, PHP, and so on under user's right, | |
29 | this module is useful. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Przy pomocy tego modułu wszystkie procesy httpd są uruchamiane na | |
33 | prawach użytkowników zamiast nobody czy http. mod_ruid2 wykorzystuje | |
34 | implementację "capability" jądra linuksa do zmiany właściciela | |
35 | procesu. | |
36 | ||
37 | %prep | |
38 | %setup -q -n mod_%{mod_name}-%{version} | |
39 | ||
40 | %build | |
41 | %{apxs} -l cap -c mod_%{mod_name}.c | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/httpd.conf} | |
46 | ||
47 | install .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} | |
48 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/90_mod_%{mod_name}.conf | |
49 | ||
50 | %clean | |
51 | rm -rf $RPM_BUILD_ROOT | |
52 | ||
53 | %post | |
54 | %service -q httpd restart | |
55 | ||
56 | %postun | |
57 | if [ "$1" = "0" ]; then | |
58 | %service -q httpd restart | |
59 | fi | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %doc README | |
64 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf | |
65 | %attr(755,root,root) %{_pkglibdir}/*.so |