forked from pool/apache2
Accepting request 317540 from Apache
1 OBS-URL: https://build.opensuse.org/request/show/317540 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache2?expand=0&rev=109
This commit is contained in:
commit
e9db5f12dc
@ -38,4 +38,5 @@ NOTES:
|
||||
will add access_compat and status modules to APACHE_MODULES
|
||||
variable of /etc/sysconfig/apache2@myweb.org and then starts
|
||||
myweb.org instance.
|
||||
|
||||
* /usr/sbin/httpd link is created according to setup of default
|
||||
instance (/etc/sysconfig/apache2:APACHE_MPM)
|
||||
|
@ -1,3 +1,34 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 18 03:50:24 UTC 2015 - i@marguerite.su
|
||||
|
||||
- add patch: httpd-2.4.12-lua-5.2.patch
|
||||
* lua_dump introduced a new strip option in 5.3, set it to 0
|
||||
to get the old behavior
|
||||
* luaL_register was deprecated in 5.2, use luaL_setfuncs and
|
||||
luaL_newlib instead
|
||||
* luaL_optint was deprecated in 5.3, use luaL_optinteger instead
|
||||
* lua_strlen and lua_objlen wad deprecated in 5.2, use lua_rawlen
|
||||
instead
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 16 08:46:22 UTC 2015 - pgajdos@suse.com
|
||||
|
||||
- change Provides: from suse_maintenance_mmn = # to
|
||||
suse_maintenance_mmn_#
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 15 14:47:33 UTC 2015 - pgajdos@suse.com
|
||||
|
||||
- apache2 Suggests:, not Recommends: apache2-prefork; that means
|
||||
for example, that `zypper in apache2-worker` will not pull
|
||||
apache2-prefork also
|
||||
- installing /usr/sbin/httpd link:
|
||||
* do not try to install it in '%post <MPM>' when apache2 (which
|
||||
includes /usr/share/apache2/script-helpers) is not installed
|
||||
yet (fixes installation on 11sp3)
|
||||
* install it in '%post' if apache2 is installed after
|
||||
apache2-<MPM> to be sure it is there
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 14 07:32:00 UTC 2015 - pgajdos@suse.com
|
||||
|
||||
|
63
apache2.spec
63
apache2.spec
@ -123,6 +123,8 @@ Patch111: httpd-visibility.patch
|
||||
# PATCH-FIX-UPSTREAM bnc#918352 kstreitova@suse.com -- fix mod_lua - maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash
|
||||
Patch112: httpd-2.4.x-mod_lua_websocket_DoS.patch
|
||||
Patch113: httpd-2.4.12-CVE-2015-0253.patch
|
||||
# PATCH-FIX-UPSTREAM marguerite@opensuse.org -- compability for lua 5.2+
|
||||
Patch114: httpd-2.4.12-lua-5.2.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: db-devel
|
||||
BuildRequires: ed
|
||||
@ -140,6 +142,7 @@ BuildRequires: xz
|
||||
BuildRequires: zlib-devel
|
||||
Requires: %{_sysconfdir}/mime.types
|
||||
Requires: %{name}-MPM
|
||||
Suggests: apache2-%{default_mpm}
|
||||
Requires: logrotate
|
||||
Requires(post): %insserv_prereq %fillup_prereq permissions pwdutils
|
||||
Requires(post): %{name}-utils
|
||||
@ -147,9 +150,8 @@ Requires(post): fileutils
|
||||
Requires(post): grep
|
||||
Requires(post): sed
|
||||
Requires(post): textutils
|
||||
Recommends: apache2-%{default_mpm}
|
||||
Provides: %{apache_mmn}
|
||||
Provides: suse_maintenance_mmn = %{suse_maintenance_mmn}
|
||||
Provides: suse_maintenance_mmn_%{suse_maintenance_mmn}
|
||||
Provides: http_daemon
|
||||
Provides: httpd
|
||||
Provides: suse_help_viewer
|
||||
@ -306,6 +308,7 @@ to administrators of web servers in general.
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch113 -p3
|
||||
%patch114 -p1
|
||||
cat $RPM_SOURCE_DIR/SUSE-NOTICE >> NOTICE
|
||||
# install READMEs
|
||||
a=$(basename %{SOURCE22})
|
||||
@ -1244,28 +1247,52 @@ mv %{buildroot}/%{sysconfdir}/original .
|
||||
|
||||
%if %{prefork}
|
||||
%post prefork
|
||||
# install /usr/sbin/httpd
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
# install /usr/sbin/httpd link
|
||||
if [ -f /usr/share/apache2/script-helpers ]; then
|
||||
# it might happen that apache2 including
|
||||
# /usr/share/apache2/script-helpers is not installed
|
||||
# yet even if apache2-<MPM> has Requires(post): apache2
|
||||
# because of circular dependency between apache2
|
||||
# and apache2-MPM
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
fi
|
||||
#
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%if %{worker}
|
||||
%post worker
|
||||
# install /usr/sbin/httpd
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
# install /usr/sbin/httpd link
|
||||
if [ -f /usr/share/apache2/script-helpers ]; then
|
||||
# it might happen that apache2 including
|
||||
# /usr/share/apache2/script-helpers is not installed
|
||||
# yet even if apache2-<MPM> has Requires(post): apache2
|
||||
# because of circular dependency between apache2
|
||||
# and apache2-MPM
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
fi
|
||||
#
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
%if %{event}
|
||||
%post event
|
||||
# install /usr/sbin/httpd
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
# install /usr/sbin/httpd link
|
||||
if [ -f /usr/share/apache2/script-helpers ]; then
|
||||
# it might happen that apache2 including
|
||||
# /usr/share/apache2/script-helpers is not installed
|
||||
# yet even if apache2-<MPM> has Requires(post): apache2
|
||||
# because of circular dependency between apache2
|
||||
# and apache2-MPM
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
fi
|
||||
#
|
||||
exit 0
|
||||
%endif
|
||||
|
||||
@ -1347,6 +1374,14 @@ if [ $1 -gt 1 ] ; then
|
||||
fi
|
||||
|
||||
rm -rf $tmpdir
|
||||
# install /usr/bin/httpd link (the code here is
|
||||
# needed when apache2 was installed after apache2-<MPM>)
|
||||
. /usr/share/apache2/script-helpers
|
||||
find_mpm
|
||||
if [ -n "$HTTPD_MPM" ]; then
|
||||
ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE
|
||||
fi
|
||||
#
|
||||
exit 0
|
||||
|
||||
%posttrans
|
||||
|
164
httpd-2.4.12-lua-5.2.patch
Normal file
164
httpd-2.4.12-lua-5.2.patch
Normal file
@ -0,0 +1,164 @@
|
||||
Index: httpd-2.4.12/modules/lua/mod_lua.c
|
||||
===================================================================
|
||||
--- httpd-2.4.12.orig/modules/lua/mod_lua.c
|
||||
+++ httpd-2.4.12/modules/lua/mod_lua.c
|
||||
@@ -1072,9 +1072,17 @@ static const char *register_named_block_
|
||||
else {
|
||||
luaL_Buffer b;
|
||||
luaL_buffinit(lvm, &b);
|
||||
+#if LUA_VERSION_NUM < 503
|
||||
lua_dump(lvm, ldump_writer, &b);
|
||||
+#else
|
||||
+ lua_dump(lvm, ldump_writer, &b, 0);
|
||||
+#endif
|
||||
luaL_pushresult(&b);
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
spec->bytecode_len = lua_strlen(lvm, -1);
|
||||
+#else
|
||||
+ spec->bytecode_len = lua_rawlen(lvm, -1);
|
||||
+#endif
|
||||
spec->bytecode = apr_pstrmemdup(cmd->pool, lua_tostring(lvm, -1),
|
||||
spec->bytecode_len);
|
||||
lua_close(lvm);
|
||||
Index: httpd-2.4.12/modules/lua/lua_apr.c
|
||||
===================================================================
|
||||
--- httpd-2.4.12.orig/modules/lua/lua_apr.c
|
||||
+++ httpd-2.4.12/modules/lua/lua_apr.c
|
||||
@@ -82,7 +82,11 @@ static const luaL_Reg lua_table_methods[
|
||||
int ap_lua_init(lua_State *L, apr_pool_t *p)
|
||||
{
|
||||
luaL_newmetatable(L, "Apr.Table");
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
luaL_register(L, "apr_table", lua_table_methods);
|
||||
+#else
|
||||
+ luaL_newlib(L, lua_table_methods);
|
||||
+#endif
|
||||
lua_pushstring(L, "__index");
|
||||
lua_pushstring(L, "get");
|
||||
lua_gettable(L, 2);
|
||||
Index: httpd-2.4.12/modules/lua/lua_config.c
|
||||
===================================================================
|
||||
--- httpd-2.4.12.orig/modules/lua/lua_config.c
|
||||
+++ httpd-2.4.12/modules/lua/lua_config.c
|
||||
@@ -263,13 +263,20 @@ void ap_lua_load_config_lmodule(lua_Stat
|
||||
lua_pushvalue(L, -1);
|
||||
|
||||
lua_setfield(L, -2, "__index");
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
luaL_register(L, NULL, cfg_methods); /* [metatable] */
|
||||
-
|
||||
+#else
|
||||
+ luaL_setfuncs(L, cfg_methods, 0);
|
||||
+#endif
|
||||
|
||||
luaL_newmetatable(L, "Apache2.CommandParameters");
|
||||
lua_pushvalue(L, -1);
|
||||
|
||||
lua_setfield(L, -2, "__index");
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
luaL_register(L, NULL, cmd_methods); /* [metatable] */
|
||||
+#else
|
||||
+ luaL_setfuncs(L, cmd_methods, 0);
|
||||
+#endif
|
||||
|
||||
}
|
||||
Index: httpd-2.4.12/modules/lua/lua_request.c
|
||||
===================================================================
|
||||
--- httpd-2.4.12.orig/modules/lua/lua_request.c
|
||||
+++ httpd-2.4.12/modules/lua/lua_request.c
|
||||
@@ -149,7 +149,11 @@ static int req_aprtable2luatable_cb(void
|
||||
}
|
||||
case LUA_TTABLE:{
|
||||
/* [array, table<s,t>, table<s,s>] */
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
int size = lua_objlen(L, -1);
|
||||
+#else
|
||||
+ int size = lua_rawlen(L, -1);
|
||||
+#endif
|
||||
lua_pushnumber(L, size + 1); /* [#, array, table<s,t>, table<s,s>] */
|
||||
lua_pushstring(L, value); /* [string, #, array, table<s,t>, table<s,s>] */
|
||||
lua_settable(L, -3); /* [array, table<s,t>, table<s,s>] */
|
||||
@@ -198,7 +202,11 @@ static int req_aprtable2luatable_cb_len(
|
||||
}
|
||||
case LUA_TTABLE:{
|
||||
/* [array, table<s,t>, table<s,s>] */
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
int size = lua_objlen(L, -1);
|
||||
+#else
|
||||
+ int size = lua_rawlen(L, -1);
|
||||
+#endif
|
||||
lua_pushnumber(L, size + 1); /* [#, array, table<s,t>, table<s,s>] */
|
||||
lua_pushlstring(L, value, len); /* [string, #, array, table<s,t>, table<s,s>] */
|
||||
lua_settable(L, -3); /* [array, table<s,t>, table<s,s>] */
|
||||
@@ -346,7 +354,7 @@ static int req_parsebody(lua_State *L)
|
||||
char *multipart;
|
||||
const char *contentType;
|
||||
request_rec *r = ap_lua_check_request_rec(L, 1);
|
||||
- max_post_size = (apr_size_t) luaL_optint(L, 2, MAX_STRING_LEN);
|
||||
+ max_post_size = (apr_size_t) luaL_optinteger(L, 2, MAX_STRING_LEN);
|
||||
multipart = apr_pcalloc(r->pool, 256);
|
||||
contentType = apr_table_get(r->headers_in, "Content-Type");
|
||||
lua_newtable(L);
|
||||
@@ -419,7 +427,7 @@ static int lua_ap_requestbody(lua_State
|
||||
|
||||
r = ap_lua_check_request_rec(L, 1);
|
||||
filename = luaL_optstring(L, 2, 0);
|
||||
- maxSize = luaL_optint(L, 3, 0);
|
||||
+ maxSize = luaL_optinteger(L, 3, 0);
|
||||
|
||||
if (r) {
|
||||
apr_off_t size;
|
||||
@@ -1709,7 +1717,7 @@ static int lua_ap_make_etag(lua_State *L
|
||||
luaL_checktype(L, 1, LUA_TUSERDATA);
|
||||
r = ap_lua_check_request_rec(L, 1);
|
||||
luaL_checktype(L, 2, LUA_TBOOLEAN);
|
||||
- force_weak = luaL_optint(L, 2, 0);
|
||||
+ force_weak = luaL_optinteger(L, 2, 0);
|
||||
returnValue = ap_make_etag(r, force_weak);
|
||||
lua_pushstring(L, returnValue);
|
||||
return 1;
|
||||
@@ -2040,7 +2048,7 @@ static int lua_set_cookie(lua_State *L)
|
||||
/* expiry */
|
||||
lua_pushstring(L, "expires");
|
||||
lua_gettable(L, -2);
|
||||
- expires = luaL_optint(L, -1, 0);
|
||||
+ expires = luaL_optinteger(L, -1, 0);
|
||||
lua_pop(L, 1);
|
||||
|
||||
/* secure */
|
||||
@@ -2878,7 +2886,11 @@ void ap_lua_load_request_lmodule(lua_Sta
|
||||
lua_pushvalue(L, -1);
|
||||
|
||||
lua_setfield(L, -2, "__index");
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
luaL_register(L, NULL, request_methods); /* [metatable] */
|
||||
+#else
|
||||
+ luaL_setfuncs(L, request_methods, 0);
|
||||
+#endif
|
||||
|
||||
lua_pop(L, 2);
|
||||
|
||||
@@ -2886,7 +2898,11 @@ void ap_lua_load_request_lmodule(lua_Sta
|
||||
lua_pushvalue(L, -1);
|
||||
|
||||
lua_setfield(L, -2, "__index");
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
luaL_register(L, NULL, connection_methods); /* [metatable] */
|
||||
+#else
|
||||
+ luaL_setfuncs(L, connection_methods, 0);
|
||||
+#endif
|
||||
|
||||
lua_pop(L, 2);
|
||||
|
||||
@@ -2894,7 +2910,11 @@ void ap_lua_load_request_lmodule(lua_Sta
|
||||
lua_pushvalue(L, -1);
|
||||
|
||||
lua_setfield(L, -2, "__index");
|
||||
+#if LUA_VERSION_NUM < 502
|
||||
luaL_register(L, NULL, server_methods); /* [metatable] */
|
||||
+#else
|
||||
+ luaL_setfuncs(L, server_methods, 0);
|
||||
+#endif
|
||||
|
||||
lua_pop(L, 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user