From 99afd3d194ee4601c84dd5954876c3f6d93e5f68 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Wed, 21 Oct 2020 21:43:31 +0200 Subject: [PATCH] - added strsignal patch (use strsignal() instead of sys_siglist removed in glibc 2.32) - adjusted lingerd patch to include missing function prototypes - adjusted db4 patch to support compilation with db 6.x --- apache1-db4.patch | 2 +- apache1-lingerd.patch | 8 +++++--- apache1-strsignal.patch | 20 ++++++++++++++++++++ apache1.spec | 4 +++- 4 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 apache1-strsignal.patch diff --git a/apache1-db4.patch b/apache1-db4.patch index cd9b242..c88e85e 100644 --- a/apache1-db4.patch +++ b/apache1-db4.patch @@ -5,7 +5,7 @@ #define DB3 #endif -#if (DB_VERSION_MAJOR == 4) -+#if (DB_VERSION_MAJOR == 4) || (DB_VERSION_MAJOR == 5) ++#if (DB_VERSION_MAJOR >= 4) #define DB4 #endif #endif diff --git a/apache1-lingerd.patch b/apache1-lingerd.patch index 068102f..a2cf1d7 100644 --- a/apache1-lingerd.patch +++ b/apache1-lingerd.patch @@ -34,16 +34,18 @@ $(CC) -c $(INCLUDES) $(CFLAGS) $< --- apache_1.3.39/src/main/http_main.c~ 2007-10-23 01:51:50.000000000 +0300 +++ apache_1.3.39/src/main/http_main.c 2007-10-23 01:52:32.306586698 +0300 -@@ -102,6 +102,8 @@ +@@ -102,6 +102,10 @@ #include "http_vhost.h" #include "util_script.h" /* to force util_script.c linking */ #include "util_uri.h" +#define IN_APACHE +#include "li_config.h" ++void lingerd_connect(void); ++int lingerd_sendfd(int); #include "scoreboard.h" #include "multithread.h" #include -@@ -1575,6 +1576,19 @@ +@@ -1575,6 +1578,19 @@ return; } @@ -63,7 +65,7 @@ /* Set up to wait for readable data on socket... */ FD_ZERO(&lfds); -@@ -4484,6 +4484,8 @@ +@@ -4484,6 +4486,8 @@ ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *)); pid_table = ap_make_table(pglobal, HARD_SERVER_LIMIT); diff --git a/apache1-strsignal.patch b/apache1-strsignal.patch new file mode 100644 index 0000000..d2454ca --- /dev/null +++ b/apache1-strsignal.patch @@ -0,0 +1,20 @@ +--- apache_1.3.42/src/main/http_main.c.orig 2020-10-21 06:15:09.769289887 +0200 ++++ apache_1.3.42/src/main/http_main.c 2020-10-21 20:49:16.125163593 +0200 +@@ -5494,7 +5494,7 @@ + "child pid %d exit signal %s (%d), " + "possible coredump in %s", + pid, (WTERMSIG(status) >= NumSIG) ? "" : +- SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status), ++ strsignal(WTERMSIG(status)), WTERMSIG(status), + ap_coredump_dir); + } + else { +@@ -5502,7 +5502,7 @@ + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, + server_conf, + "child pid %d exit signal %s (%d)", pid, +- SYS_SIGLIST[WTERMSIG(status)], WTERMSIG(status)); ++ strsignal(WTERMSIG(status)), WTERMSIG(status)); + #ifdef WCOREDUMP + } + #endif diff --git a/apache1.spec b/apache1.spec index 439228f..09412b8 100644 --- a/apache1.spec +++ b/apache1.spec @@ -113,6 +113,7 @@ Patch42: %{name}-lingerd.patch Patch43: %{name}-getline.patch Patch44: %{name}-format-security.patch Patch45: apache-std.patch +Patch46: %{name}-strsignal.patch URL: http://httpd.apache.org/ BuildRequires: bash BuildRequires: db-devel >= 4.1 @@ -1363,12 +1364,13 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env. %if %{with lingerd} mkdir -p lingerd cp -a lingerd-*/{README,TUNING,LICENSE,TODO,ChangeLog} lingerd -cp -a lingerd-*/{apache-1.3/ap_lingerd.c,li_config.h} src/main +cp -a lingerd-*/{apache-1.3/ap_lingerd.c,li_config.h,lingerd.h} src/main %patch42 -p1 %endif %patch43 -p1 %patch44 -p1 %patch45 -p0 +%patch46 -p1 # make manual link with full path %{__sed} -i -e 's,href="manual/,href="/manual/,i' htdocs/index.html.* -- 2.44.0