X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=apache-mod_suphp.spec;h=120fa13c3b2dd91375db637f8d562838951bdb6e;hb=f6a19d9b2bfe00e14568624d20b0817f6d064248;hp=a399bb667aa5647c160563b707e48a92521fdfbc;hpb=48cd0203b9c80a63f218d8aec8b635a471d5848c;p=packages%2Fapache-mod_suphp.git diff --git a/apache-mod_suphp.spec b/apache-mod_suphp.spec index a399bb6..120fa13 100644 --- a/apache-mod_suphp.spec +++ b/apache-mod_suphp.spec @@ -1,21 +1,33 @@ +# +# Available build options: +%bcond_with checkpath # enable check if php execution is within + # DOCUMENT_ROOT of the vhost +# %define mod_name suphp %define apxs /usr/sbin/apxs Summary: Apache module: suPHP - execute PHP scripts with the permissions of their owners Summary(pl): Modu³ do apache: suPHP - uruchamianie skryptów PHP z uprawnieniami ich w³a¶cicieli Name: apache-mod_%{mod_name} -Version: 0.3 -Release: 0.1 +Version: 0.5.2 +Release: 4 License: GPL Group: Networking/Daemons Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz -# Source0-md5: f80d54de6aff5db4ab76670f1c5b3c6d +# Source0-md5: 337909e87027af124052baddddbd2994 +Source1: %{name}.logrotate +Source2: %{name}.conf +Patch0: %{name}-apr.patch URL: http://www.suphp.org/ BuildRequires: %{apxs} -BuildRequires: apache-devel <= 1.4 +BuildRequires: apache-devel >= 2.0.52-2 +BuildRequires: autoconf +BuildRequires: automake Requires(post,preun): %{apxs} -Requires: apache +Requires: apache >= 2.0.52-2 +Requires: php-cgi BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +%define _sysconfdir %(%{apxs} -q SYSCONFDIR) %define _pkglibdir %(%{apxs} -q LIBEXECDIR) %description @@ -25,33 +37,43 @@ binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter. %description -l pl -suPHP jest narzêdziem pozwalaj±cym na wykonywanie skryptów PHP z +suPHP jest narzêdziem pozwalaj±cym na wykonywanie skryptów w PHP z uprawnieniami ich w³a¶cicieli. Sk³ada siê z modu³u (mod_suphp) oraz programu (suphp) z ustawionym bitem suid, który uruchamiany jest przez modu³ w celu zmiany uid procesu uruchamiaj±cego interpreter PHP. %prep %setup -q -n %{mod_name}-%{version} +%patch0 -p1 %build %{__aclocal} %{__autoconf} %{__autoheader} +chmod 755 configure %configure \ - --with-http-user=http \ + %{?with_checkpath: --enable-checkpath} \ + %{!?with_checkpath: --disable-checkpath} \ + --with-apache-user=http \ --with-min-uid=500 \ - --with-min-gid=1000 + --with-min-gid=1000 \ + --with-apxs=%{apxs} \ + --disable-checkuid \ + --disable-checkgid %{__make} -#%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lz - %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir}} +install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf install src/suphp $RPM_BUILD_ROOT%{_sbindir} -install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} +install src/apache2/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} +install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf/70_mod-suphp.conf + +install -d $RPM_BUILD_ROOT/etc/logrotate.d +install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp %clean rm -rf $RPM_BUILD_ROOT @@ -73,5 +95,7 @@ fi %files %defattr(644,root,root,755) %doc README AUTHORS ChangeLog doc -%attr(4755,root,root) %{_sbindir}/* +%attr(4755,root,root) %{_sbindir}/suphp %attr(755,root,root) %{_pkglibdir}/* +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/* +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*