[packages/pound] - rediff patches
baggins
baggins at pld-linux.org
Mon Oct 4 21:59:43 CEST 2021
commit 4eb5032cd4635dbd48a862bddec74dabb6ef67c5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Oct 4 21:59:30 2021 +0200
- rediff patches
pound-hash-UL.patch | 32 ++++++++++++++-------------
pound-logfile.patch | 64 ++++++++++++++++++++++++++++-------------------------
2 files changed, 51 insertions(+), 45 deletions(-)
---
diff --git a/pound-hash-UL.patch b/pound-hash-UL.patch
index 39d465f..0222cf5 100644
--- a/pound-hash-UL.patch
+++ b/pound-hash-UL.patch
@@ -1,22 +1,24 @@
---- Pound-2.4.3/svc.c~ 2008-12-11 00:13:10.000000000 +0200
-+++ Pound-2.4.3/svc.c 2008-12-11 00:13:13.019321050 +0200
-@@ -435,7 +435,7 @@
- BACKEND *res, *tb;
- int pri;
-
-- hv = 2166136261;
-+ hv = 2166136261UL;
- while(*key)
- hv = (hv ^ *key++) * 16777619;
- pri = hv % abs_pri;
---- Pound-2.4.3/config.c~ 2008-12-11 00:15:45.000000000 +0200
-+++ Pound-2.4.3/config.c 2008-12-11 00:15:57.745970699 +0200
-@@ -367,7 +367,7 @@
+diff -urNp -x '*.orig' Pound-2.8.org/config.c Pound-2.8/config.c
+--- Pound-2.8.org/config.c 2018-05-11 12:16:05.000000000 +0200
++++ Pound-2.8/config.c 2021-10-04 21:55:51.816168060 +0200
+@@ -521,7 +521,7 @@ t_hash(const TABNODE *e)
char *k;
k = e->key;
- res = 2166136261;
+ res = 2166136261UL;
while(*k)
- res = (res ^ *k++) * 16777619;
+ res = ((res ^ *k++) * 16777619) & 0xFFFFFFFF;
return res;
+diff -urNp -x '*.orig' Pound-2.8.org/svc.c Pound-2.8/svc.c
+--- Pound-2.8.org/svc.c 2018-05-11 12:16:05.000000000 +0200
++++ Pound-2.8/svc.c 2021-10-04 21:55:51.812834729 +0200
+@@ -553,7 +553,7 @@ hash_backend(BACKEND *be, int abs_pri, c
+ BACKEND *res, *tb;
+ int pri;
+
+- hv = 2166136261;
++ hv = 2166136261UL;
+ while(*key)
+ hv = ((hv ^ *key++) * 16777619) & 0xFFFFFFFF;
+ pri = hv % abs_pri;
diff --git a/pound-logfile.patch b/pound-logfile.patch
index 187a82b..9603e7d 100644
--- a/pound-logfile.patch
+++ b/pound-logfile.patch
@@ -1,6 +1,7 @@
---- Pound-2.4.3-logfile/config.c 2008-12-11 00:22:22.509353295 +0200
-+++ Pound-2.4.3.logs/config.c 2009-01-08 17:47:08.523739629 +0200
-@@ -72,7 +72,7 @@
+diff -urNp -x '*.orig' Pound-2.8.org/config.c Pound-2.8/config.c
+--- Pound-2.8.org/config.c 2021-10-04 21:55:51.849501382 +0200
++++ Pound-2.8/config.c 2021-10-04 21:55:51.876168039 +0200
+@@ -73,7 +73,7 @@ static CODE facilitynames[] = {
};
#endif
@@ -9,7 +10,7 @@
static regex_t ListenHTTP, ListenHTTPS, End, Address, Port, Cert, xHTTP, Client, CheckURL;
static regex_t Err414, Err500, Err501, Err503, MaxRequest, HeadRemove, RewriteLocation, RewriteDestination;
static regex_t Service, ServiceName, URL, HeadRequire, HeadDeny, BackEnd, Emergency, Priority, HAport, HAportAddr;
-@@ -1104,6 +1104,18 @@
+@@ -1330,6 +1330,18 @@ parse_file(void)
def_facility = facilitynames[i].c_val;
break;
}
@@ -28,9 +29,9 @@
} else if(!regexec(&Grace, lin, 4, matches, 0)) {
grace = atoi(lin + matches[1].rm_so);
} else if(!regexec(&LogLevel, lin, 4, matches, 0)) {
-@@ -1204,7 +1216,9 @@
- || regcomp(&RootJail, "^[ \t]*RootJail[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
+@@ -1436,7 +1448,9 @@ config_parse(const int argc, char **cons
|| regcomp(&Daemon, "^[ \t]*Daemon[ \t]+([01])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
+ || regcomp(&Threads, "^[ \t]*Threads[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&LogFacility, "^[ \t]*LogFacility[ \t]+([a-z0-9-]+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
+ || regcomp(&LogFile, "^[ \t]*LogFile[ \t]+(.+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&LogLevel, "^[ \t]*LogLevel[ \t]+([0-5])[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
@@ -38,18 +39,18 @@
|| regcomp(&Grace, "^[ \t]*Grace[ \t]+([0-9]+)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&Alive, "^[ \t]*Alive[ \t]+([1-9][0-9]*)[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
|| regcomp(&SSLEngine, "^[ \t]*SSLEngine[ \t]+\"(.+)\"[ \t]*$", REG_ICASE | REG_NEWLINE | REG_EXTENDED)
-@@ -1329,6 +1343,8 @@
+@@ -1572,6 +1586,8 @@ config_parse(const int argc, char **cons
group = NULL;
root_jail = NULL;
ctrl_name = NULL;
+ log_file = NULL;
+ error_log = NULL;
+ numthreads = 128;
alive_to = 30;
- daemonize = 1;
-@@ -1358,7 +1374,9 @@
- regfree(&RootJail);
+@@ -1601,7 +1617,9 @@ config_parse(const int argc, char **cons
regfree(&Daemon);
+ regfree(&Threads);
regfree(&LogFacility);
+ regfree(&LogFile);
regfree(&LogLevel);
@@ -57,9 +58,10 @@
regfree(&Grace);
regfree(&Alive);
regfree(&SSLEngine);
---- Pound-2.4.3/pound.c 2009-01-08 19:02:26.160354939 +0200
-+++ Pound-2.4.3.logsz/pound.c 2009-01-09 15:43:41.595643815 +0200
-@@ -33,6 +33,8 @@
+diff -urNp -x '*.orig' Pound-2.8.org/pound.c Pound-2.8/pound.c
+--- Pound-2.8.org/pound.c 2018-05-11 12:16:05.000000000 +0200
++++ Pound-2.8/pound.c 2021-10-04 21:55:51.876168039 +0200
+@@ -32,6 +32,8 @@ char *user, /* user
*group, /* group to run as */
*root_jail, /* directory to chroot to */
*pid_name, /* file to record pid in */
@@ -68,7 +70,7 @@
*ctrl_name; /* control socket name */
int alive_to, /* check interval for resurrection */
-@@ -54,6 +56,7 @@
+@@ -54,6 +56,7 @@ regex_t HEADER, /* Allowed h
AUTHORIZATION; /* the Authorisation header */
static int shut_down = 0;
@@ -76,8 +78,8 @@
#ifndef SOL_TCP
/* for systems without the definition */
-@@ -105,6 +108,33 @@
- return (unsigned long)pthread_self();
+@@ -183,6 +186,33 @@ get_thr_qlen(void)
+ return res;
}
+static void
@@ -110,7 +112,7 @@
/*
* handle SIGTERM/SIGQUIT - exit
*/
-@@ -142,6 +172,21 @@
+@@ -220,6 +250,21 @@ h_shut(const int sig)
}
/*
@@ -132,7 +134,7 @@
* Pound: the reverse-proxy/load-balancer
*
* Arguments:
-@@ -175,6 +220,7 @@
+@@ -254,6 +299,7 @@ main(const int argc, char **argv)
signal(SIGINT, h_shut);
signal(SIGTERM, h_term);
signal(SIGQUIT, h_term);
@@ -140,7 +142,7 @@
signal(SIGPIPE, SIG_IGN);
srandom(getpid());
-@@ -289,11 +335,23 @@
+@@ -386,11 +432,23 @@ main(const int argc, char **argv)
/* daemonize - make ourselves a subprocess. */
switch (fork()) {
case 0:
@@ -155,7 +157,7 @@
+ if (log_facility != -1) {
+ close(2);
+ }
-+ }
+ }
+ if (log_file) {
+ stdout = freopen(log_file, "a", stdout);
+ setlinebuf(stdout);
@@ -163,12 +165,12 @@
+ if (log_facility != -1) {
+ close(1);
+ }
- }
++ }
+ close(0);
break;
case -1:
logmsg(LOG_ERR, "fork: %s - aborted", strerror(errno));
-@@ -351,7 +409,6 @@
+@@ -448,7 +506,6 @@ main(const int argc, char **argv)
logmsg(LOG_ERR, "MONITOR: worker exited (stopped?) %d, restarting...", status);
} else if (son == 0) {
#endif
@@ -176,7 +178,7 @@
/* thread stuff */
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-@@ -392,6 +449,11 @@
+@@ -499,6 +556,11 @@ main(const int argc, char **argv)
(void)unlink(ctrl_name);
exit(0);
}
@@ -188,9 +190,10 @@
for(lstn = listeners, i = 0; i < n_listeners; lstn = lstn->next, i++) {
polls[i].events = POLLIN | POLLPRI;
polls[i].revents = 0;
---- Pound-2.4.3-logfile/pound.h 2008-12-11 00:16:43.449299956 +0200
-+++ Pound-2.4.3.logs/pound.h 2009-01-08 17:47:38.940178535 +0200
-@@ -236,6 +236,8 @@
+diff -urNp -x '*.orig' Pound-2.8.org/pound.h Pound-2.8/pound.h
+--- Pound-2.8.org/pound.h 2018-05-11 12:16:05.000000000 +0200
++++ Pound-2.8/pound.h 2021-10-04 21:55:51.876168039 +0200
+@@ -264,6 +264,8 @@ extern char *user, /* user
*group, /* group to run as */
*root_jail, /* directory to chroot to */
*pid_name, /* file to record pid in */
@@ -198,10 +201,11 @@
+ *error_log, /* print error messages to this file, instead of syslog */
*ctrl_name; /* control socket name */
- extern int alive_to, /* check interval for resurrection */
---- Pound-2.4.3/svc.c 2009-01-14 15:16:55.002576968 +0200
-+++ Pound-2.4.3/svc.c 2009-01-14 15:20:43.342553651 +0200
-@@ -172,49 +172,47 @@
+ extern int numthreads, /* number of worker threads */
+diff -urNp -x '*.orig' Pound-2.8.org/svc.c Pound-2.8/svc.c
+--- Pound-2.8.org/svc.c 2021-10-04 21:55:51.849501382 +0200
++++ Pound-2.8/svc.c 2021-10-04 21:55:51.876168039 +0200
+@@ -220,49 +220,47 @@ t_clean(LHASH_OF(TABNODE) *const tab, vo
#ifdef HAVE_STDARG_H
void
logmsg(const int priority, const char *fmt, ...)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/pound.git/commitdiff/4eb5032cd4635dbd48a862bddec74dabb6ef67c5
More information about the pld-cvs-commit
mailing list