Podsyłam diff do apache1-mod_suphp.spec oraz pozostałe pliki.
Versja suphp 0.6.1
Log z budowania:
http://83.14.10.186/~antic/buildlog/suphp
SRPM:
http://83.14.10.186/~antic/SRPMS/apache1-mod_suphp-0.6.1-1.src.rpm
Pakiet przetestowany na i686.
Proszę o dodanie do cvs i STBR.
a,
--- suphp-0.6.1/src/apache/mod_suphp.orig 2006-02-21 01:52:59.000000000 +0100
+++ suphp-0.6.1/src/apache/mod_suphp.c 2006-02-21 01:53:31.000000000 +0100
@@ -249,9 +249,9 @@
{"suPHP_UserGroup", suphp_handle_cmd_user_group, NULL,
RSRC_CONF|ACCESS_CONF, TAKE2, "User and group scripts shall be run as"},
#endif
- {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, ACCESS_CONF,
+ {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF|ACCESS_CONF,
ITERATE, "Tells mod_suphp to handle these MIME-types"},
- {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, ACCESS_CONF,
+ {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF|ACCESS_CONF,
ITERATE, "Tells mod_suphp not to handle these MIME-types"},
{NULL}
};
[global]
;Path to logfile
logfile=/var/log/apache/suphp_log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=http
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false
;Send minor error messages to browser
errors_to_browser=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=500
; Minimum GID
min_gid=1000
[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/bin/php.cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self
# $Id: apache-mod_suphp.conf,v 1.5 2006/01/30 12:42:11 baggins Exp $
LoadModule suphp_module modules/mod_suphp.so
<IfModule mod_suphp.c>
suPHP_Configpath /etc/php
suPHP_Engine on
suPHP_AddHandler x-httpd-php
AddHandler x-httpd-php .php .inc
</IfModule>
/var/log/apache/suphp_log {
olddir /var/log/archiv/apache
postrotate
/etc/rc.d/init.d/apache graceful
endscript
}
diff -ur suphp-0.6.1/acinclude.m4 suphp-0.6.1.apr/acinclude.m4
--- suphp-0.6.1/acinclude.m4 2005-11-26 20:45:49.000000000 +0100
+++ suphp-0.6.1.apr/acinclude.m4 2006-01-27 18:53:40.000000000 +0100
@@ -40,7 +40,7 @@
dnl value of apr_config to fetch any necessary build/link information.
dnl
-AC_DEFUN(APR_FIND_APR, [
+AC_DEFUN([APR_FIND_APR], [
apr_found="no"
if test "$ac_cv_emxos2" = "yes"; then
@@ -53,18 +53,18 @@
AC_MSG_CHECKING(for APR)
AC_ARG_WITH(apr,
[ --with-apr=DIR|FILE prefix for installed APR, path to APR build tree,
- or the full path to apr-config],
+ or the full path to apr-1-config],
[
if test "$withval" = "no" || test "$withval" = "yes"; then
AC_MSG_ERROR([--with-apr requires a directory to be provided])
fi
- if $TEST_X "$withval/bin/apr-config"; then
+ if $TEST_X "$withval/bin/apr-1-config"; then
apr_found="yes"
- apr_config="$withval/bin/apr-config"
- elif $TEST_X "$withval/apr-config"; then
+ apr_config="$withval/bin/apr-1-config"
+ elif $TEST_X "$withval/apr-1-config"; then
apr_found="yes"
- apr_config="$withval/apr-config"
+ apr_config="$withval/apr-1-config"
elif $TEST_X "$withval" && $withval --help > /dev/null 2>&1 ; then
apr_found="yes"
apr_config="$withval"
@@ -73,7 +73,7 @@
dnl if --with-apr is used, then the target prefix/directory must be valid
if test "$apr_found" != "yes"; then
AC_MSG_ERROR([the --with-apr parameter is incorrect. It must specify an install prefix, a
-build directory, or an apr-config file.])
+build directory, or an apr-1-config file.])
fi
],[
dnl if we have a bundled source directory, use it
@@ -81,21 +81,21 @@
apr_temp_abs_srcdir="`cd $1 && pwd`"
apr_found="reconfig"
if test -n "$2"; then
- apr_config="$2/apr-config"
+ apr_config="$2/apr-1-config"
else
- apr_config="$1/apr-config"
+ apr_config="$1/apr-1-config"
fi
fi
if test "$apr_found" = "no" && test -n "$3" && test "$3" = "1"; then
- if apr-config --help > /dev/null 2>&1 ; then
+ if apr-1-config --help > /dev/null 2>&1 ; then
apr_found="yes"
- apr_config="apr-config"
+ apr_config="apr-1-config"
else
dnl look in some standard places (apparently not in builtin/default)
for lookdir in /usr /usr/local /opt/apr /usr/local/apache2 ; do
- if $TEST_X "$lookdir/bin/apr-config"; then
+ if $TEST_X "$lookdir/bin/apr-1-config"; then
apr_found="yes"
- apr_config="$lookdir/bin/apr-config"
+ apr_config="$lookdir/bin/apr-1-config"
break
fi
done
--- apache1-mod_suphp.spec 2006-02-21 22:11:04.000000000 +0100
+++ apache1-mod_suphp.spec.m 2006-02-21 21:16:19.000000000 +0100
@@ -8,22 +8,25 @@
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: apache1-mod_%{mod_name}
-Version: 0.5.2
-Release: 1.12
+Version: 0.6.1
+Release: 1
License: GPL
Group: Networking/Daemons
Source0: http://www.suphp.org/download/%{mod_name}-%{version}.tar.gz
-# Source0-md5: 337909e87027af124052baddddbd2994
-Source1: %{name}.conf
-Source2: %{name}.logrotate
+# Source0-md5: 7eb8ae29404392d9eb07c69d5242d716
+Source1: %{name}.logrotate
+Source2: %{name}.conf
+Source3: %{name}-suphp.conf
+Patch0: %{name}-apr.patch
+Patch1: %{name}-notallowed.patch
URL: http://www.suphp.org/
+BuildRequires: %{apxs}
BuildRequires: apache1-devel >= 1.3.33-2
BuildRequires: autoconf
BuildRequires: automake
-Requires(triggerpostun): %{apxs}
-Requires(triggerpostun): grep
-Requires(triggerpostun): sed >= 4.0
-Requires: apache
+BuildRequires: libstdc++-devel
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires: apache1
Requires: php-cgi
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -44,17 +47,15 @@
%prep
%setup -q -n %{mod_name}-%{version}
-
-# common GPL license
-rm -f doc/{de,en}/LICENSE
-# common Apache license
-rm -f doc/{de,en}/apache/LICENSE
+%patch0 -p1
+%patch1 -p1
%build
%{__aclocal}
%{__autoconf}
%{__autoheader}
-chmod 755 configure
+%{__automake}
+export APACHE_VERSION=$(rpm -q --qf '%%{version}' apache1-apxs)
%configure \
%{?with_checkpath: --enable-checkpath} \
%{!?with_checkpath: --disable-checkpath} \
@@ -62,59 +63,49 @@
--with-min-uid=500 \
--with-min-gid=1000 \
--with-apxs=%{apxs} \
- --with-php=/usr/bin/php.cgi \
--disable-checkuid \
- --disable-checkgid
+ --disable-checkgid \
+ --with-setid-mode=owner \
+ --with-logfile=/var/log/apache/suphp_log
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_sysconfdir}/conf.d}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_pkglibdir},%{_datadir}/suphp}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
install src/suphp $RPM_BUILD_ROOT%{_sbindir}
-install src/apache/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf
+install src/apache/.libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
+install %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/19_mod_%{mod_name}.conf
+install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{mod_name}.conf
install -d $RPM_BUILD_ROOT/etc/logrotate.d
-# TODO: apache1-mod_suphp + trigger
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/apache-mod_suphp
+
+install doc/suphp.conf-example $RPM_BUILD_ROOT%{_datadir}/suphp
%clean
rm -rf $RPM_BUILD_ROOT
%post
-if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
-fi
+%service -q apache restart
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
-fi
-
-# TODO remove the trigger, if no longer needed
-%triggerpostun -- %{name} <= 0.5.2-1
-if grep -q '^Include conf\.d' /etc/apache/apache.conf; then
- %{apxs} -e -A -n %{mod_name} %{_pkglibdir}/mod_%{mod_name}.so 1>&2
- sed -i -e '
- /^Include.*mod_%{mod_name}\.conf/d
- ' /etc/apache/apache.conf
-
- if [ -f /var/lock/subsys/apache ]; then
- /etc/rc.d/init.d/apache restart 1>&2
- fi
+ %service -q apache restart
fi
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog doc/en doc/de
+%doc README AUTHORS ChangeLog doc
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{mod_name}.conf
+%attr(755,root,root) %{_pkglibdir}/*.so
%attr(4755,root,root) %{_sbindir}/suphp
-%attr(755,root,root) %{_pkglibdir}/*
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf
+%dir %{_datadir}/suphp
+%{_datadir}/suphp/*
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl