From 845520ec3dcb56c2a32cf3d6c9f1805865ad022f Mon Sep 17 00:00:00 2001 From: Lubos Uhliarik Date: Tue, 25 Aug 2020 15:09:53 +0200 Subject: [PATCH] new version 2.4.46 remove obsolete parts of this spec file fix systemd detection patch --- .gitignore | 1 + httpd-2.4.43-detect-systemd.patch | 18 +++- httpd-2.4.43-r1876548.patch | 82 ------------------- ...ume.patch => httpd-2.4.46-lua-resume.patch | 40 +++++++-- httpd.spec | 25 ++---- sources | 4 +- 6 files changed, 58 insertions(+), 112 deletions(-) delete mode 100644 httpd-2.4.43-r1876548.patch rename httpd-2.4.43-lua-resume.patch => httpd-2.4.46-lua-resume.patch (75%) diff --git a/.gitignore b/.gitignore index b337b6b..09a5a07 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ x86_64 /apachectl.8 /httpd-2.4.43.tar.bz2.asc /KEYS +/httpd-2.4.46.tar.bz2.asc diff --git a/httpd-2.4.43-detect-systemd.patch b/httpd-2.4.43-detect-systemd.patch index 448f7d7..540687f 100644 --- a/httpd-2.4.43-detect-systemd.patch +++ b/httpd-2.4.43-detect-systemd.patch @@ -1,5 +1,5 @@ diff --git a/Makefile.in b/Makefile.in -index ea8366e..06b8c5a 100644 +index 0b088ac..9eeb5c7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ CLEAN_SUBDIRS = test @@ -11,8 +11,20 @@ index ea8366e..06b8c5a 100644 PROGRAM_PRELINK = $(COMPILE) -c $(top_srcdir)/server/buildmark.c PROGRAM_DEPENDENCIES = \ server/libmain.la \ +diff --git a/acinclude.m4 b/acinclude.m4 +index 2a7e5d1..eb28321 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -624,6 +624,7 @@ case $host in + if test "${ac_cv_header_systemd_sd_daemon_h}" = "no" || test -z "${SYSTEMD_LIBS}"; then + AC_MSG_WARN([Your system does not support systemd.]) + else ++ APR_ADDTO(HTTPD_LIBS, [$SYSTEMD_LIBS]) + AC_DEFINE(HAVE_SYSTEMD, 1, [Define if systemd is supported]) + fi + fi diff --git a/configure.in b/configure.in -index f276550..a63eada 100644 +index 3618a5a..74a782b 100644 --- a/configure.in +++ b/configure.in @@ -234,6 +234,7 @@ if test "$PCRE_CONFIG" != "false"; then @@ -23,7 +35,7 @@ index f276550..a63eada 100644 else AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/]) fi -@@ -679,6 +682,7 @@ APACHE_SUBST(OS_DIR) +@@ -710,6 +711,7 @@ APACHE_SUBST(OS_DIR) APACHE_SUBST(BUILTIN_LIBS) APACHE_SUBST(SHLIBPATH_VAR) APACHE_SUBST(OS_SPECIFIC_VARS) diff --git a/httpd-2.4.43-r1876548.patch b/httpd-2.4.43-r1876548.patch deleted file mode 100644 index 130ea17..0000000 --- a/httpd-2.4.43-r1876548.patch +++ /dev/null @@ -1,82 +0,0 @@ -# ./pullrev.sh 1876548 -http://svn.apache.org/viewvc?view=revision&revision=1876548 - ---- httpd-2.4.43/modules/ssl/ssl_util_stapling.c -+++ httpd-2.4.43/modules/ssl/ssl_util_stapling.c -@@ -130,6 +130,7 @@ - X509 *issuer = NULL; - OCSP_CERTID *cid = NULL; - STACK_OF(OPENSSL_STRING) *aia = NULL; -+ int rv = 1; /* until further notice */ - - if (x == NULL) - return 0; -@@ -154,16 +155,18 @@ - SSL_CTX_set_tlsext_status_cb(mctx->ssl_ctx, stapling_cb); - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, APLOGNO(10177) "OCSP stapling added via hook"); - } -- return 1; -+ goto cleanup; - } - - if (mctx->stapling_enabled != TRUE) { - /* mod_ssl's own implementation is not enabled */ -- return 1; -+ goto cleanup; - } - -- if (X509_digest(x, EVP_sha1(), idx, NULL) != 1) -- return 0; -+ if (X509_digest(x, EVP_sha1(), idx, NULL) != 1) { -+ rv = 0; -+ goto cleanup; -+ } - - cinf = apr_hash_get(stapling_certinfo, idx, sizeof(idx)); - if (cinf) { -@@ -177,18 +180,18 @@ - APLOGNO(02814) "ssl_stapling_init_cert: no OCSP URI " - "in certificate and no SSLStaplingForceURL " - "configured for server %s", mctx->sc->vhost_id); -- return 0; -+ rv = 0; - } -- return 1; -+ goto cleanup; - } - - cid = OCSP_cert_to_id(NULL, x, issuer); -- X509_free(issuer); - if (!cid) { - ssl_log_xerror(SSLLOG_MARK, APLOG_ERR, 0, ptemp, s, x, APLOGNO(02815) - "ssl_stapling_init_cert: can't create CertID " - "for OCSP request"); -- return 0; -+ rv = 0; -+ goto cleanup; - } - - aia = X509_get1_ocsp(x); -@@ -197,7 +200,8 @@ - ssl_log_xerror(SSLLOG_MARK, APLOG_ERR, 0, ptemp, s, x, - APLOGNO(02218) "ssl_stapling_init_cert: no OCSP URI " - "in certificate and no SSLStaplingForceURL set"); -- return 0; -+ rv = 0; -+ goto cleanup; - } - - /* At this point, we have determined that there's something to store */ -@@ -218,8 +222,10 @@ - mctx->sc->vhost_id); - - apr_hash_set(stapling_certinfo, cinf->idx, sizeof(cinf->idx), cinf); -- -- return 1; -+ -+cleanup: -+ X509_free(issuer); -+ return rv; - } - - static certinfo *stapling_get_certinfo(server_rec *s, X509 *x, modssl_ctx_t *mctx, diff --git a/httpd-2.4.43-lua-resume.patch b/httpd-2.4.46-lua-resume.patch similarity index 75% rename from httpd-2.4.43-lua-resume.patch rename to httpd-2.4.46-lua-resume.patch index c954338..1a22008 100644 --- a/httpd-2.4.43-lua-resume.patch +++ b/httpd-2.4.46-lua-resume.patch @@ -1,5 +1,27 @@ +diff --git a/modules/lua/config.m4 b/modules/lua/config.m4 +index 29fd563..abeba1c 100644 +--- a/modules/lua/config.m4 ++++ b/modules/lua/config.m4 +@@ -34,7 +34,7 @@ AC_DEFUN([CHECK_LUA_PATH], [dnl + fi + ]) + +-dnl Check for Lua 5.3/5.2/5.1 Libraries ++dnl Check for Lua Libraries + dnl CHECK_LUA(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]) + dnl Sets: + dnl LUA_CFLAGS +@@ -44,7 +44,7 @@ AC_DEFUN([CHECK_LUA], + + AC_ARG_WITH( + lua, +- [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua 5.3/5.2/5.1 prefix])], ++ [AC_HELP_STRING([--with-lua=PATH],[Path to the Lua installation prefix])], + lua_path="$withval", + :) + diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c -index 05f1e44..be3bedf 100644 +index 05f1e44..18b628c 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -342,7 +342,7 @@ static apr_status_t lua_setup_filter_ctx(ap_filter_t* f, request_rec* r, lua_fil @@ -34,7 +56,7 @@ index 05f1e44..be3bedf 100644 /* If Lua yielded, it means we have something to pass on */ - if (lua_resume(L, 0) == LUA_YIELD) { -+ if (lua_resume(L, 0, &nres) == LUA_YIELD) { ++ if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { size_t olen; const char* output = lua_tolstring(L, 1, &olen); if (olen > 0) { @@ -43,7 +65,7 @@ index 05f1e44..be3bedf 100644 lua_pushnil(L); lua_setglobal(L, "bucket"); - if (lua_resume(L, 0) == LUA_YIELD) { -+ if (lua_resume(L, 0, &nres) == LUA_YIELD) { ++ if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { apr_bucket *pbktOut; size_t olen; const char* output = lua_tolstring(L, 1, &olen); @@ -61,7 +83,7 @@ index 05f1e44..be3bedf 100644 /* If Lua yielded, it means we have something to pass on */ - if (lua_resume(L, 0) == LUA_YIELD) { -+ if (lua_resume(L, 0, &nres) == LUA_YIELD) { ++ if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { size_t olen; const char* output = lua_tolstring(L, 1, &olen); pbktOut = apr_bucket_heap_create(output, olen, 0, c->bucket_alloc); @@ -70,15 +92,15 @@ index 05f1e44..be3bedf 100644 lua_pushnil(L); lua_setglobal(L, "bucket"); - if (lua_resume(L, 0) == LUA_YIELD) { -+ if (lua_resume(L, 0, &nres) == LUA_YIELD) { ++ if (lua_resume(L, 0, &nres) == LUA_YIELD && nres == 1) { apr_bucket *pbktOut; size_t olen; const char* output = lua_tolstring(L, 1, &olen); diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h -index 0e49cdc..8921b87 100644 +index 0e49cdc..72b4de7 100644 --- a/modules/lua/mod_lua.h +++ b/modules/lua/mod_lua.h -@@ -48,7 +48,13 @@ +@@ -48,7 +48,15 @@ #if LUA_VERSION_NUM > 501 /* Load mode for lua_load() */ #define lua_load(a,b,c,d) lua_load(a,b,c,d,NULL) @@ -87,7 +109,9 @@ index 0e49cdc..8921b87 100644 +#if LUA_VERSION_NUM > 503 +#define lua_resume(a,b,c) lua_resume(a, NULL, b, c) +#else -+#define lua_resume(a,b,c) lua_resume(a, NULL, b) ++/* ### For version < 5.4, assume that exactly one stack item is on the ++ * stack, which is what the code did before but seems dubious. */ ++#define lua_resume(a,b,c) (*(c) = 1, lua_resume(a, NULL, b)) +#endif + #define luaL_setfuncs_compat(a,b) luaL_setfuncs(a,b,0) diff --git a/httpd.spec b/httpd.spec index 4ea3c83..f0778fc 100644 --- a/httpd.spec +++ b/httpd.spec @@ -12,8 +12,8 @@ Summary: Apache HTTP Server Name: httpd -Version: 2.4.43 -Release: 7%{?dist} +Version: 2.4.46 +Release: 1%{?dist} URL: https://httpd.apache.org/ Source0: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2 Source1: https://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2.asc @@ -83,13 +83,12 @@ Patch40: httpd-2.4.43-r1861269.patch Patch41: httpd-2.4.43-r1861793+.patch Patch42: httpd-2.4.43-r1828172+.patch Patch43: httpd-2.4.43-sslcoalesce.patch -Patch44: httpd-2.4.43-lua-resume.patch +Patch44: httpd-2.4.46-lua-resume.patch # Bug fixes # https://bugzilla.redhat.com/show_bug.cgi?id=1397243 Patch60: httpd-2.4.43-enable-sslv3.patch Patch62: httpd-2.4.43-r1870095+.patch -Patch63: httpd-2.4.43-r1876548.patch # Security fixes @@ -100,7 +99,6 @@ BuildRequires: zlib-devel, libselinux-devel, lua-devel, brotli-devel BuildRequires: apr-devel >= 1.5.0, apr-util-devel >= 1.5.0, pcre-devel >= 5.0 BuildRequires: gnupg2 Requires: /etc/mime.types, system-logos-httpd -Obsoletes: httpd-suexec Provides: webserver Provides: mod_dav = %{version}-%{release}, httpd-suexec = %{version}-%{release} Provides: httpd-mmn = %{mmn}, httpd-mmn = %{mmnisa} @@ -231,7 +229,6 @@ interface for storing and accessing per-user session data. %patch60 -p1 -b .enable-sslv3 %patch62 -p1 -b .r1870095 -%patch63 -p1 -b .r1876548 # Patch in the vendor string sed -i '/^#define PLATFORM/s/Unix/%{vstring}/' os/unix/os.h @@ -558,17 +555,6 @@ exit 0 %postun %systemd_postun httpd.service htcacheclean.service httpd.socket -# Trigger for conversion from SysV, per guidelines at: -# https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd -%triggerun -- httpd < 2.2.21-5 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply httpd -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save httpd.service >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del httpd >/dev/null 2>&1 || : - %posttrans test -f /etc/sysconfig/httpd-disable-posttrans || \ /bin/systemctl try-restart --no-block httpd.service htcacheclean.service >/dev/null 2>&1 || : @@ -755,6 +741,11 @@ exit $rv %{_rpmconfigdir}/macros.d/macros.httpd %changelog +* Tue Aug 25 2020 Lubos Uhliarik - 2.4.46-1 +- new version 2.4.46 +- remove obsolete parts of this spec file +- fix systemd detection patch + * Tue Jul 28 2020 Fedora Release Engineering - 2.4.43-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 9c6c825..a7871fb 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (httpd-2.4.43.tar.bz2) = 16cfeecc8f6fab6eca478065a384bdf1872f7ac42206b0bc2bcac6c0d9c576f392c07107201f39e0601dec1bbafcb33d66153544de4d87d79b9a52094d334b64 -SHA512 (httpd-2.4.43.tar.bz2.asc) = 7a1a12d6f58d8235dcf8b23bae3960e99dc99764928752f870f32e654aa5e3cf78a38fb14f3cb84c5a8ab9b05095beec4739a50c6efcf22e3ecbdf0255ac783d +SHA512 (httpd-2.4.46.tar.bz2) = 5936784bb662e9d8a4f7fe38b70c043b468114d931cd10ea831bfe74461ea5856b64f88f42c567ab791fc8907640a99884ba4b6a600f86d661781812735b6f13 +SHA512 (httpd-2.4.46.tar.bz2.asc) = 1f54c20d1aeedb7c745eb72acd79e1ed61d547b22c3dbe53cd3274ed3d897543cd8c49181d4b15d79c12755746cf0a2464d620f69e254ac3f998760133094df0 SHA512 (KEYS) = b776ca20863f8d9e4f66e8b56cbe020de34af5b268e93776d482392171f0e0aeee4f8d74477d128dc9fd24b30bbe33b39439964f1bd22a99782f1e4a08c85056