forked from pool/apache2
Accepting request 99421 from Apache
Fix building OBS-URL: https://build.opensuse.org/request/show/99421 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache2?expand=0&rev=55
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Dec 10 10:34:26 CET 2011 - meissner@suse.de
|
||||
|
||||
- openldap2 is not necessary, just openldap2-devel as buildrequires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 07:18:56 UTC 2011 - coolo@suse.com
|
||||
|
||||
- add automake as buildrequire to avoid implicit dependency
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 18 15:04:12 CET 2011 - draht@suse.de
|
||||
|
||||
- update to /etc/init.d/apache2: handle reload with deleted
|
||||
binaries after package update more thoughtfully: If the binaries
|
||||
have been replaced, then a dlopen(3) on the apache modules is
|
||||
prone to fail. => Don't reload then, but complain and fail.
|
||||
Especially important for logrotate!
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 7 17:11:56 CEST 2011 - draht@suse.de
|
||||
|
||||
|
28
apache2.spec
28
apache2.spec
@@ -15,12 +15,17 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: apache2
|
||||
BuildRequires: db-devel ed libapr-util1-devel libapr1-devel >= 1.4.2 openldap2 openldap2-devel
|
||||
BuildRequires: openssl-devel pcre-devel zlib-devel
|
||||
BuildRequires: automake
|
||||
BuildRequires: db-devel
|
||||
BuildRequires: ed
|
||||
BuildRequires: libapr-util1-devel
|
||||
BuildRequires: libapr1-devel >= 1.4.2
|
||||
BuildRequires: openldap2-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: zlib-devel
|
||||
%if %{?suse_version:1}0 && 0%{?sles_version} == 9
|
||||
BuildRequires: libcap
|
||||
%else
|
||||
@@ -69,11 +74,9 @@ BuildRequires: expat-devel
|
||||
# "Server:" header
|
||||
%define VENDOR SUSE
|
||||
%define platform_string Linux/%VENDOR
|
||||
License: ASLv..
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
%define realver 2.2.21
|
||||
Version: 2.2.21
|
||||
Release: 1
|
||||
Release: 0
|
||||
#Source0: http://www.apache.org/dist/httpd-%{version}.tar.bz2
|
||||
Source0: http://httpd.apache.org/dev/dist/httpd-%{realver}.tar.bz2
|
||||
# Add file to take mtime from it in prep section
|
||||
@@ -140,7 +143,8 @@ Patch106: httpd-2.2.x-CVE-2011-3368-server_protocl_c.diff
|
||||
Url: http://httpd.apache.org/
|
||||
Icon: Apache.xpm
|
||||
Summary: The Apache Web Server Version 2.2
|
||||
AutoReqProv: on
|
||||
License: Apache-2.0
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Provides: httpd http_daemon %{apache_mmn} suse_help_viewer
|
||||
Requires: %{pname}-MPM /etc/mime.types
|
||||
PreReq: %{name}-utils
|
||||
@@ -200,7 +204,6 @@ http://httpd.apache.org/docs-2.2/upgrading.html.
|
||||
%if %worker
|
||||
|
||||
%package worker
|
||||
License: ASLv..
|
||||
Summary: Apache 2 worker MPM (Multi-Processing Module)
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Provides: %{pname}-MPM
|
||||
@@ -209,7 +212,6 @@ Requires: %{name} = %{version}
|
||||
%if %prefork
|
||||
|
||||
%package prefork
|
||||
License: ASLv..
|
||||
Summary: Apache 2 "prefork" MPM (Multi-Processing Module)
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Provides: %{pname}-MPM
|
||||
@@ -221,7 +223,6 @@ Requires: %{name} = %{version}
|
||||
%if %event
|
||||
|
||||
%package event
|
||||
License: ASLv..
|
||||
Summary: Apache 2 event MPM (Multi-Processing Module)
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Provides: %{pname}-MPM
|
||||
@@ -230,7 +231,6 @@ Requires: %{name} = %{version}
|
||||
%if %itk
|
||||
|
||||
%package itk
|
||||
License: ASLv..
|
||||
Summary: Apache 2 "ITK" MPM (Multi-Processing Module)
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
Provides: %{pname}-MPM
|
||||
@@ -288,7 +288,6 @@ See http://mpm-itk.sesse.net/
|
||||
%endif
|
||||
|
||||
%package devel
|
||||
License: ASLv..
|
||||
Summary: Apache 2.2 Header and Include Files
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{name} = %{version} %{pname}-MPM
|
||||
@@ -302,7 +301,6 @@ for development using the Apache API.
|
||||
|
||||
|
||||
%package doc
|
||||
License: ASLv..
|
||||
Summary: Additional Package Documentation.
|
||||
Group: Documentation/Other
|
||||
%if 0%{?suse_version} >= 901 && 0%{?sles_version} != 9
|
||||
@@ -320,7 +318,6 @@ this package's base documentation.
|
||||
|
||||
|
||||
%package example-pages
|
||||
License: ASLv..
|
||||
Summary: Example Pages for the Apache 2 Web Server
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
%if 0%{?suse_version} >= 901 && 0%{?sles_version} != 9
|
||||
@@ -333,7 +330,6 @@ Some Example pages for Apache that show information about the installed
|
||||
server.
|
||||
|
||||
%package utils
|
||||
License: ASLv..
|
||||
Summary: Apache 2 utilities
|
||||
Group: Productivity/Networking/Web/Servers
|
||||
|
||||
|
26
rc.apache2
26
rc.apache2
@@ -6,8 +6,8 @@
|
||||
# Copyright (c) 2004(?), 2005, 2006, 2007, 2008 SUSE Linux Products GmbH
|
||||
#
|
||||
# Authors: Rolf Haberrecker <apache@suse.de>, 2001
|
||||
# Peter Poeml <apache@suse.de>, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
# 2008, 2009, 2010
|
||||
# Peter Poeml <apache@suse.de>, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
|
||||
# Roman Drahtmueller <draht@suse.de>, 2010, 2011, 2012.
|
||||
#
|
||||
#
|
||||
# /etc/init.d/apache2
|
||||
@@ -162,6 +162,8 @@ case "$action" in
|
||||
echo -n "(not running)"
|
||||
else
|
||||
pid=$(<$pidfile)
|
||||
# re-read exe symlink, it could be (deleted) in the meanwhile.
|
||||
apache_bin=$(readlink /proc/$pid/exe 2>/dev/null)
|
||||
kill -TERM $pid 2>/dev/null
|
||||
case $? in
|
||||
1) echo -n "(not running)";;
|
||||
@@ -175,7 +177,7 @@ case "$action" in
|
||||
if ! test -f /proc/$pid/exe; then
|
||||
break
|
||||
fi
|
||||
if test "$(readlink /proc/$pid/exe 2>/dev/null)" = $apache_bin; then
|
||||
if test "$(readlink /proc/$pid/exe 2>/dev/null)" = "$apache_bin"; then
|
||||
usleep 500000
|
||||
else
|
||||
break
|
||||
@@ -261,7 +263,25 @@ case "$action" in
|
||||
rc_status
|
||||
;;
|
||||
reload|force-reload|graceful)
|
||||
# check if there is a deleted binary. If there is, then logrotate
|
||||
# or other occasions will fail to reload, as dlopen(3) of apache
|
||||
# modules is prone to fail due to symbol mismatches.
|
||||
# in this case, we only complain and fail.
|
||||
if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
|
||||
executable=$( readlink /proc/$(cat $pidfile)/exe 2> /dev/null )
|
||||
case "$executable" in
|
||||
*httpd*delete*)
|
||||
echo -n "Reload httpd2 after package update: ignoring request. Please do a manual restart explicitly! "
|
||||
rc_failed 1
|
||||
rc_status -v
|
||||
rc_exit
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -n "Reload httpd2 (graceful restart)"
|
||||
|
||||
cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
|
||||
if eval $cmdline -t &> $logdir/rc$pname.out; then
|
||||
killproc -USR1 $apache_bin || return=$rc_failed
|
||||
|
Reference in New Issue
Block a user