diff options
author | Michael Sterrett <mr_bones_@gentoo.org> | 2011-10-24 16:22:23 +0000 |
---|---|---|
committer | Michael Sterrett <mr_bones_@gentoo.org> | 2011-10-24 16:22:23 +0000 |
commit | 4bec5512464dc70f9c9c106a35eb89fb04b42080 (patch) | |
tree | d7287bcef9791f549c11b8808b854e183d036717 /app-admin/syslog-ng | |
parent | [media-sound/amarok] Replace the mysql dependency - bug 388059. (diff) | |
download | gentoo-2-4bec5512464dc70f9c9c106a35eb89fb04b42080.tar.gz gentoo-2-4bec5512464dc70f9c9c106a35eb89fb04b42080.tar.bz2 gentoo-2-4bec5512464dc70f9c9c106a35eb89fb04b42080.zip |
add upstream patch to fix filter function
(Portage version: 2.1.10.11/cvs/Linux i686)
Diffstat (limited to 'app-admin/syslog-ng')
-rw-r--r-- | app-admin/syslog-ng/ChangeLog | 6 | ||||
-rw-r--r-- | app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch | 76 | ||||
-rw-r--r-- | app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch | 8 | ||||
-rw-r--r-- | app-admin/syslog-ng/syslog-ng-3.3.1.ebuild | 6 |
4 files changed, 85 insertions, 11 deletions
diff --git a/app-admin/syslog-ng/ChangeLog b/app-admin/syslog-ng/ChangeLog index a78a47a2186f..e0322d9e5d24 100644 --- a/app-admin/syslog-ng/ChangeLog +++ b/app-admin/syslog-ng/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-admin/syslog-ng # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.308 2011/10/19 06:19:38 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/ChangeLog,v 1.309 2011/10/24 16:22:23 mr_bones_ Exp $ + + 24 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> syslog-ng-3.3.1.ebuild, + +files/syslog-ng-3.3.1-filter.patch: + add upstream patch to fix filter function 19 Oct 2011; Michael Sterrett <mr_bones_@gentoo.org> files/syslog-ng.rc6.3.3: move reload to extra_started_commands diff --git a/app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch b/app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch new file mode 100644 index 000000000000..bc09406b8824 --- /dev/null +++ b/app-admin/syslog-ng/files/syslog-ng-3.3.1-filter.patch @@ -0,0 +1,76 @@ +commit 4b438115f6387eb52b6c39c1f751ecf0c4a5ac5f +Author: Balazs Scheidler <bazsi@balabit.hu> +Date: Sun Oct 23 20:19:58 2011 +0200 + + filters: fixed filter() evaluation when embedded as an AND/OR subexpression + + When introducing the "init" method for filters one case was omitted: even + though AND and OR expressions don't want to do anything on init, their + subexpressions might, so this patch adds an init function to AND and OR + which does nothing but calls the same for its "left" and "right" + subexpression. + + This patch fixes filter("xxx") expression evaluation when that is + not a single expression, but rather included in an AND or OR. + + Reported-By: Leonid Isaev <lisaev@umail.iu.edu> + Cc: <syslog-ng-stable@balabit.hu> + Signed-off-by: Balazs Scheidler <bazsi@balabit.hu> + +--- a/lib/filter.c ++++ b/lib/filter.c +@@ -84,6 +84,17 @@ typedef struct _FilterOp + } FilterOp; + + static void ++fop_init(FilterExprNode *s, GlobalConfig *cfg) ++{ ++ FilterOp *self = (FilterOp *) s; ++ ++ if (self->left && self->left->init) ++ self->left->init(self->left, cfg); ++ if (self->right && self->right->init) ++ self->right->init(self->right, cfg); ++} ++ ++static void + fop_free(FilterExprNode *s) + { + FilterOp *self = (FilterOp *) s; +@@ -92,6 +103,14 @@ fop_free(FilterExprNode *s) + filter_expr_unref(self->right); + } + ++static void ++fop_init_instance(FilterOp *self) ++{ ++ filter_expr_node_init(&self->super); ++ self->super.init = fop_init; ++ self->super.free_fn = fop_free; ++} ++ + static gboolean + fop_or_eval(FilterExprNode *s, LogMessage *msg) + { +@@ -105,9 +124,8 @@ fop_or_new(FilterExprNode *e1, FilterExprNode *e2) + { + FilterOp *self = g_new0(FilterOp, 1); + +- filter_expr_node_init(&self->super); ++ fop_init_instance(self); + self->super.eval = fop_or_eval; +- self->super.free_fn = fop_free; + self->super.modify = e1->modify || e2->modify; + self->left = e1; + self->right = e2; +@@ -128,9 +146,8 @@ fop_and_new(FilterExprNode *e1, FilterExprNode *e2) + { + FilterOp *self = g_new0(FilterOp, 1); + +- filter_expr_node_init(&self->super); ++ fop_init_instance(self); + self->super.eval = fop_and_eval; +- self->super.free_fn = fop_free; + self->super.modify = e1->modify || e2->modify; + self->left = e1; + self->right = e2; diff --git a/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch b/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch index ebb9b1df1b7a..f269ee254d97 100644 --- a/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch +++ b/app-admin/syslog-ng/files/syslog-ng-3.3.1-ssl.patch @@ -13,8 +13,6 @@ Signed-off-by: Gergely Nagy <algernon@balabit.hu> tests/loggen/loggen.c | 3 +++ 4 files changed, 14 insertions(+), 0 deletions(-) -diff --git a/configure.in b/configure.in -index 13bc874..686911e 100644 --- a/configure.in +++ b/configure.in @@ -679,6 +679,10 @@ else @@ -28,8 +26,6 @@ index 13bc874..686911e 100644 dnl dnl Right now, openssl is never linked statically as it is only used by the dnl TLS build of the afsocket plugin which is loaded dynamically anyway. -diff --git a/lib/crypto.c b/lib/crypto.c -index 702609c..ac4d070 100644 --- a/lib/crypto.c +++ b/lib/crypto.c @@ -29,6 +29,8 @@ @@ -47,8 +43,6 @@ index 702609c..ac4d070 100644 /* the crypto options (seed) are handled in main.c */ + +#endif -diff --git a/modules/afsql/afsql.c b/modules/afsql/afsql.c -index eb59b57..02b9f83 100644 --- a/modules/afsql/afsql.c +++ b/modules/afsql/afsql.c @@ -35,7 +35,10 @@ @@ -62,8 +56,6 @@ index eb59b57..02b9f83 100644 /* field flags */ enum -diff --git a/tests/loggen/loggen.c b/tests/loggen/loggen.c -index c5399a7..bf11a1e 100644 --- a/tests/loggen/loggen.c +++ b/tests/loggen/loggen.c @@ -14,11 +14,14 @@ diff --git a/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild b/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild index 771278982f2c..850370381e84 100644 --- a/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild +++ b/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild,v 1.4 2011/10/18 20:21:58 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/syslog-ng-3.3.1.ebuild,v 1.5 2011/10/24 16:22:23 mr_bones_ Exp $ EAPI=2 inherit autotools fixheadtails eutils multilib @@ -39,7 +39,9 @@ DEPEND="${RDEPEND} S=${WORKDIR}/${PN}-${MY_PV} src_prepare() { - epatch "${FILESDIR}"/${P}-ssl.patch + epatch \ + "${FILESDIR}"/${P}-ssl.patch \ + "${FILESDIR}"/${P}-filter.patch ht_fix_file configure.in eautoreconf } |