forked from pool/apache2
This commit is contained in:
parent
50e8112f11
commit
7f3079be99
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 13 16:58:03 CET 2007 - ro@suse.de
|
||||||
|
|
||||||
|
- remove sysconf_addword, now in aaa_base (#328599)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 22 17:38:19 CEST 2007 - sbrabec@suse.cz
|
Mon Oct 22 17:38:19 CEST 2007 - sbrabec@suse.cz
|
||||||
|
|
||||||
|
13
apache2.spec
13
apache2.spec
@ -55,7 +55,7 @@ License: The Apache Software License
|
|||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
%define realver 2.2.4
|
%define realver 2.2.4
|
||||||
Version: 2.2.4
|
Version: 2.2.4
|
||||||
Release: 75
|
Release: 88
|
||||||
#Source0: http://www.apache.org/dist/httpd-%{version}.tar.bz2
|
#Source0: http://www.apache.org/dist/httpd-%{version}.tar.bz2
|
||||||
Source0: http://httpd.apache.org/dev/dist/httpd-%{realver}.tar.bz2
|
Source0: http://httpd.apache.org/dev/dist/httpd-%{realver}.tar.bz2
|
||||||
Source10: SUSE-NOTICE
|
Source10: SUSE-NOTICE
|
||||||
@ -76,7 +76,6 @@ Source41: find_mpm
|
|||||||
Source42: get_module_list
|
Source42: get_module_list
|
||||||
Source43: get_includes
|
Source43: get_includes
|
||||||
Source44: find_httpd2_includes
|
Source44: find_httpd2_includes
|
||||||
Source45: sysconf_addword
|
|
||||||
Source46: a2enflag
|
Source46: a2enflag
|
||||||
Source47: a2enmod
|
Source47: a2enmod
|
||||||
Source48: apache2.xml
|
Source48: apache2.xml
|
||||||
@ -172,6 +171,7 @@ Authors:
|
|||||||
Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE
|
Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE
|
||||||
|
|
||||||
%if %worker
|
%if %worker
|
||||||
|
|
||||||
%package worker
|
%package worker
|
||||||
Summary: Apache 2 worker MPM (Multi-Processing Module)
|
Summary: Apache 2 worker MPM (Multi-Processing Module)
|
||||||
Group: Productivity/Networking/Web/Servers
|
Group: Productivity/Networking/Web/Servers
|
||||||
@ -214,6 +214,7 @@ Authors:
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
%if %prefork
|
%if %prefork
|
||||||
|
|
||||||
%description prefork
|
%description prefork
|
||||||
"prefork" MPM (Multi-Processing Module)
|
"prefork" MPM (Multi-Processing Module)
|
||||||
|
|
||||||
@ -229,6 +230,7 @@ Authors:
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
%if %event
|
%if %event
|
||||||
|
|
||||||
%description event
|
%description event
|
||||||
The event MPM (multi-Processing Module) is experimental, so it may or
|
The event MPM (multi-Processing Module) is experimental, so it may or
|
||||||
may not work as expected.
|
may not work as expected.
|
||||||
@ -248,6 +250,7 @@ Authors:
|
|||||||
Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE
|
Too many to list here -- see /usr/share/doc/packages/apache2/ABOUT_APACHE
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Apache 2.0 Header and Include Files
|
Summary: Apache 2.0 Header and Include Files
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
@ -308,6 +311,7 @@ Authors:
|
|||||||
|
|
||||||
%if 0%{?opensuse_bs}
|
%if 0%{?opensuse_bs}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
#
|
#
|
||||||
# O/ ._ .__ ._
|
# O/ ._ .__ ._
|
||||||
@ -571,7 +575,6 @@ install -m 755 $RPM_SOURCE_DIR/apache-20-22-upgrade $RPM_BUILD_ROOT/%{_prefix}/s
|
|||||||
sed 's+/usr/lib+/usr/%_lib+' $RPM_SOURCE_DIR/get_module_list \
|
sed 's+/usr/lib+/usr/%_lib+' $RPM_SOURCE_DIR/get_module_list \
|
||||||
> $RPM_BUILD_ROOT/%{_prefix}/share/%{pname}/get_module_list
|
> $RPM_BUILD_ROOT/%{_prefix}/share/%{pname}/get_module_list
|
||||||
chmod 755 $RPM_BUILD_ROOT/%{_prefix}/share/%{pname}/get_module_list
|
chmod 755 $RPM_BUILD_ROOT/%{_prefix}/share/%{pname}/get_module_list
|
||||||
install -m 755 $RPM_SOURCE_DIR/sysconf_addword $RPM_BUILD_ROOT/%{_sbindir}
|
|
||||||
install -m 755 $RPM_SOURCE_DIR/a2enflag $RPM_BUILD_ROOT/%{_sbindir}
|
install -m 755 $RPM_SOURCE_DIR/a2enflag $RPM_BUILD_ROOT/%{_sbindir}
|
||||||
ln -s a2enflag $RPM_BUILD_ROOT/%{_sbindir}/a2disflag
|
ln -s a2enflag $RPM_BUILD_ROOT/%{_sbindir}/a2disflag
|
||||||
install -m 755 $RPM_SOURCE_DIR/a2enmod $RPM_BUILD_ROOT/%{_sbindir}
|
install -m 755 $RPM_SOURCE_DIR/a2enmod $RPM_BUILD_ROOT/%{_sbindir}
|
||||||
@ -916,7 +919,6 @@ mv $RPM_BUILD_ROOT/%{sysconfdir}/original .
|
|||||||
%{_sbindir}/logresolve.pl%{vers}
|
%{_sbindir}/logresolve.pl%{vers}
|
||||||
%{_sbindir}/logresolve%{vers}
|
%{_sbindir}/logresolve%{vers}
|
||||||
%{_sbindir}/rotatelogs%{vers}
|
%{_sbindir}/rotatelogs%{vers}
|
||||||
%{_sbindir}/sysconf_addword
|
|
||||||
%verify(not mode) %attr(0755,root,root) %_sbindir/suexec2
|
%verify(not mode) %attr(0755,root,root) %_sbindir/suexec2
|
||||||
%if %prefork
|
%if %prefork
|
||||||
|
|
||||||
@ -1029,7 +1031,10 @@ exit 0
|
|||||||
if ! test -f /.buildenv; then
|
if ! test -f /.buildenv; then
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 13 2007 - ro@suse.de
|
||||||
|
- remove sysconf_addword, now in aaa_base (#328599)
|
||||||
* Mon Oct 22 2007 - sbrabec@suse.cz
|
* Mon Oct 22 2007 - sbrabec@suse.cz
|
||||||
- Use correct SuSEfirewall2 rule directory.
|
- Use correct SuSEfirewall2 rule directory.
|
||||||
* Mon Sep 03 2007 - skh@suse.de
|
* Mon Sep 03 2007 - skh@suse.de
|
||||||
|
129
sysconf_addword
129
sysconf_addword
@ -1,129 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Copyright 2005 Peter Poeml <apache@suse.de>. All Rights Reserved.
|
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
|
|
||||||
debug=false
|
|
||||||
|
|
||||||
function usage() {
|
|
||||||
cat <<-EOF
|
|
||||||
usage: $(basename $0) [-r] FILE VAR WORD
|
|
||||||
|
|
||||||
Add word WORD to variable VAR in file FILE, or remove
|
|
||||||
it if the -r option is given.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
$(basename $0) /etc/sysconfig/apache2 APACHE_SERVER_FLAGS asdf
|
|
||||||
leads to the change:
|
|
||||||
-APACHE_SERVER_FLAGS="SSL STATUS ruby"
|
|
||||||
+APACHE_SERVER_FLAGS="SSL STATUS ruby asdf"
|
|
||||||
|
|
||||||
If multiple lines matching ^VAR= are found (which happens to be a habit of
|
|
||||||
mine), only the last one is manipulated.
|
|
||||||
|
|
||||||
It does not work for WORD starting with characters like a dash which
|
|
||||||
prevent word boundary matching.
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
function word_present () {
|
|
||||||
. $file
|
|
||||||
case " ${!var} " in
|
|
||||||
*" $word "*) true;;
|
|
||||||
*) false;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
function add_word() {
|
|
||||||
local word=$1
|
|
||||||
local word_quoted=$2
|
|
||||||
if ! word_present; then
|
|
||||||
$debug && cp $file $tmpf
|
|
||||||
|
|
||||||
cat <<-EOT_ED | ed -s $file &>/dev/null
|
|
||||||
H
|
|
||||||
# search backwards to last occurrence of var
|
|
||||||
?^$var
|
|
||||||
s/^\($var=".*\)\(".*\)/\1 $word_quoted\2/
|
|
||||||
s/=" /="/
|
|
||||||
wq
|
|
||||||
EOT_ED
|
|
||||||
|
|
||||||
$debug && diff -u $tmpf $file
|
|
||||||
else
|
|
||||||
echo \"$word\" already present
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
function remove_word() {
|
|
||||||
local word=$1
|
|
||||||
local word_quoted=$2
|
|
||||||
if word_present; then
|
|
||||||
$debug && cp $file $tmpf
|
|
||||||
|
|
||||||
cat <<-EOT_ED | ed -s $file &>/dev/null
|
|
||||||
H
|
|
||||||
# search backwards to last occurrence of var
|
|
||||||
?^$var
|
|
||||||
s/\(['" ]\)$word_quoted\(['" ]\)/\1 \2/g
|
|
||||||
s/ / /g
|
|
||||||
wq
|
|
||||||
EOT_ED
|
|
||||||
|
|
||||||
$debug && diff -u $tmpf $file
|
|
||||||
else
|
|
||||||
echo \"$word\" not present
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# poor man's option parsing
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
-h) usage; exit 0;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ $# -lt 3 ]; then
|
|
||||||
echo not enough arguments
|
|
||||||
echo
|
|
||||||
usage; exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
action=add
|
|
||||||
case "$1" in
|
|
||||||
-r) action=remove; shift;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
file=$1; shift
|
|
||||||
var=$1; shift
|
|
||||||
word=$1
|
|
||||||
word_quoted=${1//\//\\\/}
|
|
||||||
|
|
||||||
if $debug; then
|
|
||||||
echo FILE: $file
|
|
||||||
echo VAR: $var
|
|
||||||
echo WORD: $word
|
|
||||||
echo current content:
|
|
||||||
grep "^$var=" $file | tail -n 1
|
|
||||||
echo
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
$debug && tmpf=$(mktemp /tmp/$(basename $0).XXXXXX)
|
|
||||||
|
|
||||||
if [ $action = add ]; then
|
|
||||||
add_word $word $word_quoted
|
|
||||||
else
|
|
||||||
remove_word $word $word_quoted
|
|
||||||
fi
|
|
||||||
|
|
||||||
$debug && rm -f $tmpf
|
|
||||||
|
|
||||||
exit 0
|
|
Loading…
x
Reference in New Issue
Block a user