]> git.pld-linux.org Git - packages/apache1-mod_suphp.git/blame - apache1-mod_suphp.spec
- C: logrotate < 3.7.4 due to archiv -> archive transition
[packages/apache1-mod_suphp.git] / apache1-mod_suphp.spec
CommitLineData
2459bb24
AG
1#
2# Available build options:
2f710cc9 3%bcond_with checkpath # enable check if php execution is within DOCUMENT_ROOT of the vhost
2459bb24
AG
4#
5%define mod_name suphp
6%define apxs /usr/sbin/apxs1
7Summary: Apache module: suPHP - execute PHP scripts with the permissions of their owners
626f4d51 8Summary(pl.UTF-8): Moduł do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich właścicieli
2459bb24 9Name: apache1-mod_%{mod_name}
d9dee5ee
JB
10Version: 0.6.1
11Release: 1
2459bb24
AG
12License: GPL
13Group: Networking/Daemons
2f710cc9 14Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
8578b27a 15# Source0-md5: 7eb8ae29404392d9eb07c69d5242d716
d9dee5ee
JB
16Source1: %{name}.logrotate
17Source2: %{name}.conf
18Source2: %{name}-suphp.conf
19Patch0: %{name}-apr.patch
20Patch1: %{name}-notallowed.patch
2459bb24 21URL: http://www.suphp.org/
88a511b6 22BuildRequires: apache1-apxs
2f710cc9 23BuildRequires: apache1-devel >= 1.3.33-2
2459bb24
AG
24BuildRequires: autoconf
25BuildRequires: automake
d9dee5ee
JB
26BuildRequires: libstdc++-devel
27BuildRequires: rpmbuild(macros) >= 1.268
2f710cc9
ER
28Requires(triggerpostun): %{apxs}
29Requires(triggerpostun): grep
30Requires(triggerpostun): sed >= 4.0
d9dee5ee 31Requires: apache1
2459bb24 32Requires: php-cgi
518a7116 33Conflicts: logrotate < 3.7.4
2459bb24
AG
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
2f710cc9
ER
36%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
37%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)
2459bb24
AG
38
39%description
2f710cc9
ER
40suPHP is a tool for executing PHP scripts with the permissions of
41their owners. It consists of an Apache module (mod_suphp) and a setuid
42root binary (suphp) that is called by the Apache module to change the
43uid of the process executing the PHP interpreter.
2459bb24 44
2ae448b3
JR
45%description -l pl.UTF-8
46suPHP jest narzędziem pozwalającym na wykonywanie skryptów w PHP z
47uprawnieniami ich właścicieli. Składa się z modułu (mod_suphp) oraz
48programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez
49moduł w celu zmiany uid procesu uruchamiającego interpreter PHP.
2459bb24
AG
50
51%prep
52%setup -q -n %{mod_name}-%{version}
d9dee5ee
JB
53%patch0 -p1
54%patch1 -p1
89962859 55
2459bb24
AG
56%build
57%{__aclocal}
58%{__autoconf}
59%{__autoheader}
d9dee5ee
JB
60%{__automake}
61export APACHE_VERSION=$(rpm -q --qf '%%{version}' apache1-apxs)
2459bb24
AG
62%configure \
63 %{?with_checkpath: --enable-checkpath} \
64 %{!?with_checkpath: --disable-checkpath} \
65 --with-apache-user=http \
66 --with-min-uid=500 \
67 --with-min-gid=1000 \
68 --with-apxs=%{apxs} \
69 --disable-checkuid \
d9dee5ee
JB
70 --disable-checkgid \
71 --with-setid-mode=owner \
72 --with-logfile=/var/log/apache/suphp_log
2459bb24
AG
73
74%{__make}
75
76%install
77rm -rf $RPM_BUILD_ROOT
2f710cc9 78install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_sysconfdir}/conf.d}
2459bb24
AG
79
80install src/suphp $RPM_BUILD_ROOT%{_sbindir}
d9dee5ee
JB
81install src/apache/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
82install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
83install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{mod_name}.conf
2459bb24
AG
84
85install -d $RPM_BUILD_ROOT/etc/logrotate.d
2f710cc9 86# TODO: apache1-mod_suphp + trigger
d9dee5ee 87install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
2459bb24
AG
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%post
bc1164b7 93%service -q apache restart
2459bb24 94
f75a3dad 95%postun
2459bb24 96if [ "$1" = "0" ]; then
bc1164b7 97 %service -q apache restart
2459bb24
AG
98fi
99
2f710cc9
ER
100# TODO remove the trigger, if no longer needed
101%triggerpostun -- %{name} <= 0.5.2-1
102if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
103 %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
104 sed -i -e '
105 /^Include.*mod_%{mod_name}\.conf/d
106 ' /etc/apache/apache.conf
2da50204 107
bc1164b7 108 %service -q apache restart
2f710cc9
ER
109fi
110
2459bb24
AG
111%files
112%defattr(644,root,root,755)
d9dee5ee 113%doc AUTHORS ChangeLog README doc
2459bb24 114%attr(4755,root,root) %{_sbindir}/suphp
d9dee5ee 115%attr(755,root,root) %{_pkglibdir}/*.so
2f710cc9
ER
116%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
117%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
d9dee5ee 118%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{mod_name}.conf
This page took 0.072121 seconds and 4 git commands to generate.