[MediaWiki-commits] [Gerrit] add debian patches to upstream - change (operations...statsite)
Filippo Giunchedi has submitted this change and it was merged. Change subject: add debian patches to upstream .. add debian patches to upstream Bug: T90111 Change-Id: Ib2f6817ac714c7663adb2cca1b409dd38dc51cd3 --- A debian/patches/0001-add-missing-includes-from-ev.c.patch A debian/patches/0002-dynamically-link-libev-if-available.patch A debian/patches/0003-provide-libev-multiloop-support.patch A debian/patches/series 4 files changed, 282 insertions(+), 0 deletions(-) Approvals: Filippo Giunchedi: Verified; Looks good to me, approved diff --git a/debian/patches/0001-add-missing-includes-from-ev.c.patch b/debian/patches/0001-add-missing-includes-from-ev.c.patch new file mode 100644 index 000..232ec50 --- /dev/null +++ b/debian/patches/0001-add-missing-includes-from-ev.c.patch @@ -0,0 +1,25 @@ +From: Filippo Giunchedi fgiunch...@wikimedia.org +Date: Wed, 25 Feb 2015 23:40:31 + +Subject: add missing includes from ev.c + +if including only ev.h these headers are missing +--- + src/networking.c | 5 + + 1 file changed, 5 insertions(+) + +diff --git a/src/networking.c b/src/networking.c +index dabd2b8..20f720f 100644 +--- a/src/networking.c b/src/networking.c +@@ -8,6 +8,11 @@ + #include syslog.h + #include unistd.h + #include netdb.h ++#include string.h ++#include stdio.h ++#include stdlib.h ++#include errno.h ++#include assert.h + + #include networking.h + #include conn_handler.h diff --git a/debian/patches/0002-dynamically-link-libev-if-available.patch b/debian/patches/0002-dynamically-link-libev-if-available.patch new file mode 100644 index 000..b0e0bee --- /dev/null +++ b/debian/patches/0002-dynamically-link-libev-if-available.patch @@ -0,0 +1,57 @@ +From: Filippo Giunchedi fgiunch...@wikimedia.org +Date: Wed, 25 Feb 2015 23:42:17 + +Subject: dynamically link libev if available + +--- + SConstruct | 13 +++-- + src/networking.c | 5 + + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 629880c..4bfeaac 100644 +--- a/SConstruct b/SConstruct +@@ -6,8 +6,15 @@ murmur = envmurmur.Library('murmur', Glob(deps/murmurhash/*.c)) + envinih = Environment(CPATH = ['deps/inih/'], CFLAGS=-O3) + inih = envinih.Library('inih', Glob(deps/inih/*.c)) + +-env_statsite_with_err = Environment(CCFLAGS = '-g -std=c99 -D_GNU_SOURCE -Wall -Werror -Wstrict-aliasing=0 -O3 -pthread -Ideps/inih/ -Ideps/libev/ -Isrc/') +-env_statsite_without_err = Environment(CCFLAGS = '-g -std=c99 -D_GNU_SOURCE -O3 -pthread -Ideps/inih/ -Ideps/libev/ -Isrc/') ++ccflags = '-g -std=c99 -D_GNU_SOURCE -O3 -pthread -Ideps/inih/ -Isrc/' ++ ++conf_libev = Environment().Configure() ++libev = conf_libev.CheckLibWithHeader('ev', 'ev.h', 'c', autoadd=0) ++if not libev: ++ ccflags += ' -Ideps/libev/ -D_DEPS_LIBEV' ++ ++env_statsite_with_err = Environment(CCFLAGS = ccflags + ' -Wall -Wstrict-aliasing=0 -Werror') ++env_statsite_without_err = Environment(CCFLAGS = ccflags) + + objs = env_statsite_with_err.Object('src/hashmap', 'src/hashmap.c') + \ + env_statsite_with_err.Object('src/heap', 'src/heap.c') + \ +@@ -25,6 +32,8 @@ objs = env_statsite_with_err.Object('src/hashmap', 'src/hashmap.c') + + env_statsite_without_err.Object('src/conn_handler', 'src/conn_handler.c') + + statsite_libs = [m, pthread, murmur, inih] ++if libev: ++ statsite_libs.append(ev) + if platform.system() == 'Linux': +statsite_libs.append(rt) + +diff --git a/src/networking.c b/src/networking.c +index 20f720f..498d31d 100644 +--- a/src/networking.c b/src/networking.c +@@ -32,7 +32,12 @@ + #ifdef __MACH__ + #define EV_USE_KQUEUE 1 + #endif ++ ++#ifdef _DEPS_LIBEV + #include ev.c ++#else ++#include ev.h ++#endif + + /** + * Default listen backlog size for diff --git a/debian/patches/0003-provide-libev-multiloop-support.patch b/debian/patches/0003-provide-libev-multiloop-support.patch new file mode 100644 index 000..c3505d0 --- /dev/null +++ b/debian/patches/0003-provide-libev-multiloop-support.patch @@ -0,0 +1,197 @@ +From: Filippo Giunchedi fgiunch...@wikimedia.org +Date: Thu, 26 Feb 2015 12:59:28 + +Subject: provide libev multiloop support + +--- + src/networking.c | 49 + + 1 file changed, 25 insertions(+), 24 deletions(-) + +diff --git a/src/networking.c b/src/networking.c +index 498d31d..8625375 100644 +--- a/src/networking.c b/src/networking.c +@@ -21,9 +21,7 @@ + #define MAX_PORT_LEN 6 + + #define EV_STANDALONE 1 +-#define EV_API_STATIC 1 + #define EV_COMPAT3 0 +-#define EV_MULTIPLICITY 0 + #define EV_USE_MONOTONIC 1 + #ifdef __linux__ + #define EV_USE_CLOCK_SYSCALL 0 +@@ -34,8 +32,11 @@ + #endif + + #ifdef _DEPS_LIBEV ++#define EV_MULTIPLICITY 0 ++#define EV_API_STATIC 1 + #include ev.c + #else ++#define EV_MULTIPLICITY 1 + #include ev.h + #endif + +@@ -108,10 +109,10 @@ struct
[MediaWiki-commits] [Gerrit] add debian patches to upstream - change (operations...statsite)
Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/193097 Change subject: add debian patches to upstream .. add debian patches to upstream Bug: T90111 Change-Id: Ib2f6817ac714c7663adb2cca1b409dd38dc51cd3 --- A debian/patches/0001-add-missing-includes-from-ev.c.patch A debian/patches/0002-dynamically-link-libev-if-available.patch A debian/patches/0003-provide-libev-multiloop-support.patch A debian/patches/series 4 files changed, 282 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/debs/statsite refs/changes/97/193097/2 diff --git a/debian/patches/0001-add-missing-includes-from-ev.c.patch b/debian/patches/0001-add-missing-includes-from-ev.c.patch new file mode 100644 index 000..232ec50 --- /dev/null +++ b/debian/patches/0001-add-missing-includes-from-ev.c.patch @@ -0,0 +1,25 @@ +From: Filippo Giunchedi fgiunch...@wikimedia.org +Date: Wed, 25 Feb 2015 23:40:31 + +Subject: add missing includes from ev.c + +if including only ev.h these headers are missing +--- + src/networking.c | 5 + + 1 file changed, 5 insertions(+) + +diff --git a/src/networking.c b/src/networking.c +index dabd2b8..20f720f 100644 +--- a/src/networking.c b/src/networking.c +@@ -8,6 +8,11 @@ + #include syslog.h + #include unistd.h + #include netdb.h ++#include string.h ++#include stdio.h ++#include stdlib.h ++#include errno.h ++#include assert.h + + #include networking.h + #include conn_handler.h diff --git a/debian/patches/0002-dynamically-link-libev-if-available.patch b/debian/patches/0002-dynamically-link-libev-if-available.patch new file mode 100644 index 000..b0e0bee --- /dev/null +++ b/debian/patches/0002-dynamically-link-libev-if-available.patch @@ -0,0 +1,57 @@ +From: Filippo Giunchedi fgiunch...@wikimedia.org +Date: Wed, 25 Feb 2015 23:42:17 + +Subject: dynamically link libev if available + +--- + SConstruct | 13 +++-- + src/networking.c | 5 + + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/SConstruct b/SConstruct +index 629880c..4bfeaac 100644 +--- a/SConstruct b/SConstruct +@@ -6,8 +6,15 @@ murmur = envmurmur.Library('murmur', Glob(deps/murmurhash/*.c)) + envinih = Environment(CPATH = ['deps/inih/'], CFLAGS=-O3) + inih = envinih.Library('inih', Glob(deps/inih/*.c)) + +-env_statsite_with_err = Environment(CCFLAGS = '-g -std=c99 -D_GNU_SOURCE -Wall -Werror -Wstrict-aliasing=0 -O3 -pthread -Ideps/inih/ -Ideps/libev/ -Isrc/') +-env_statsite_without_err = Environment(CCFLAGS = '-g -std=c99 -D_GNU_SOURCE -O3 -pthread -Ideps/inih/ -Ideps/libev/ -Isrc/') ++ccflags = '-g -std=c99 -D_GNU_SOURCE -O3 -pthread -Ideps/inih/ -Isrc/' ++ ++conf_libev = Environment().Configure() ++libev = conf_libev.CheckLibWithHeader('ev', 'ev.h', 'c', autoadd=0) ++if not libev: ++ ccflags += ' -Ideps/libev/ -D_DEPS_LIBEV' ++ ++env_statsite_with_err = Environment(CCFLAGS = ccflags + ' -Wall -Wstrict-aliasing=0 -Werror') ++env_statsite_without_err = Environment(CCFLAGS = ccflags) + + objs = env_statsite_with_err.Object('src/hashmap', 'src/hashmap.c') + \ + env_statsite_with_err.Object('src/heap', 'src/heap.c') + \ +@@ -25,6 +32,8 @@ objs = env_statsite_with_err.Object('src/hashmap', 'src/hashmap.c') + + env_statsite_without_err.Object('src/conn_handler', 'src/conn_handler.c') + + statsite_libs = [m, pthread, murmur, inih] ++if libev: ++ statsite_libs.append(ev) + if platform.system() == 'Linux': +statsite_libs.append(rt) + +diff --git a/src/networking.c b/src/networking.c +index 20f720f..498d31d 100644 +--- a/src/networking.c b/src/networking.c +@@ -32,7 +32,12 @@ + #ifdef __MACH__ + #define EV_USE_KQUEUE 1 + #endif ++ ++#ifdef _DEPS_LIBEV + #include ev.c ++#else ++#include ev.h ++#endif + + /** + * Default listen backlog size for diff --git a/debian/patches/0003-provide-libev-multiloop-support.patch b/debian/patches/0003-provide-libev-multiloop-support.patch new file mode 100644 index 000..c3505d0 --- /dev/null +++ b/debian/patches/0003-provide-libev-multiloop-support.patch @@ -0,0 +1,197 @@ +From: Filippo Giunchedi fgiunch...@wikimedia.org +Date: Thu, 26 Feb 2015 12:59:28 + +Subject: provide libev multiloop support + +--- + src/networking.c | 49 + + 1 file changed, 25 insertions(+), 24 deletions(-) + +diff --git a/src/networking.c b/src/networking.c +index 498d31d..8625375 100644 +--- a/src/networking.c b/src/networking.c +@@ -21,9 +21,7 @@ + #define MAX_PORT_LEN 6 + + #define EV_STANDALONE 1 +-#define EV_API_STATIC 1 + #define EV_COMPAT3 0 +-#define EV_MULTIPLICITY 0 + #define EV_USE_MONOTONIC 1 + #ifdef __linux__ + #define EV_USE_CLOCK_SYSCALL 0 +@@ -34,8 +32,11 @@ + #endif + + #ifdef _DEPS_LIBEV ++#define EV_MULTIPLICITY 0 ++#define EV_API_STATIC 1 + #include ev.c + #else ++#define EV_MULTIPLICITY 1 +