pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kafkacat: Import kafkacat-1.6.0 as wip/kafkacat



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Fri Feb 5 17:28:51 2021 +0100
Changeset:	f0f0894c720228029c0cbc169bc0e499a7ba1d5c

Added Files:
	kafkacat/DESCR
	kafkacat/Makefile
	kafkacat/PLIST
	kafkacat/distinfo
	kafkacat/patches/patch-kafkacat.c

Log Message:
kafkacat: Import kafkacat-1.6.0 as wip/kafkacat

kafkacat is a generic non-JVM producer and consumer for Apache Kafka
>=0.8, think of it as a netcat for Kafka.

In producer mode kafkacat reads messages from stdin, delimited with a
configurable delimiter (-D, defaults to newline), and produces them to
the provided Kafka cluster (-b), topic (-t) and partition (-p).

In consumer mode kafkacat reads messages from a topic and partition and
prints them to stdout using the configured message delimiter.

There's also support for the Kafka >=0.9 high-level balanced consumer,
use the -G <group> switch and provide a list of topics to join the
group.

kafkacat also features a Metadata list (-L) mode to display the current
state of the Kafka cluster and its topics and partitions.

Supports Avro message deserialization using the Confluent
Schema-Registry, and generic primitive deserializers (see examples
below).

kafkacat is fast and lightweight; statically linked it is no more than
150Kb.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f0f0894c720228029c0cbc169bc0e499a7ba1d5c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 kafkacat/DESCR                    | 23 +++++++++++++++++++++++
 kafkacat/Makefile                 | 35 +++++++++++++++++++++++++++++++++++
 kafkacat/PLIST                    |  3 +++
 kafkacat/distinfo                 |  7 +++++++
 kafkacat/patches/patch-kafkacat.c | 21 +++++++++++++++++++++
 5 files changed, 89 insertions(+)

diffs:
diff --git a/kafkacat/DESCR b/kafkacat/DESCR
new file mode 100644
index 0000000000..aeabfd48c1
--- /dev/null
+++ b/kafkacat/DESCR
@@ -0,0 +1,23 @@
+kafkacat is a generic non-JVM producer and consumer for Apache Kafka
+>=0.8, think of it as a netcat for Kafka.
+
+In producer mode kafkacat reads messages from stdin, delimited with a
+configurable delimiter (-D, defaults to newline), and produces them to
+the provided Kafka cluster (-b), topic (-t) and partition (-p).
+
+In consumer mode kafkacat reads messages from a topic and partition and
+prints them to stdout using the configured message delimiter.
+
+There's also support for the Kafka >=0.9 high-level balanced consumer,
+use the -G <group> switch and provide a list of topics to join the
+group.
+
+kafkacat also features a Metadata list (-L) mode to display the current
+state of the Kafka cluster and its topics and partitions.
+
+Supports Avro message deserialization using the Confluent
+Schema-Registry, and generic primitive deserializers (see examples
+below).
+
+kafkacat is fast and lightweight; statically linked it is no more than
+150Kb.
diff --git a/kafkacat/Makefile b/kafkacat/Makefile
new file mode 100644
index 0000000000..55fb22fe54
--- /dev/null
+++ b/kafkacat/Makefile
@@ -0,0 +1,35 @@
+# $NetBSD$
+
+DISTNAME=	kafkacat-1.6.0
+CATEGORIES=	net
+MASTER_SITES=	${MASTER_SITE_GITHUB:=edenhill/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/edenhill/kafkacat/
+COMMENT=	Generic command line non-JVM Apache Kafka producer and consumer
+LICENSE=	2-clause-bsd
+
+CONFIG_SHELL=	bash
+HAS_CONFIGURE=	yes
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	bash gmake pkg-config
+
+CONFIGURE_ARGS+=	--prefix=${PREFIX}
+CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+=	--enable-json
+CONFIGURE_ARGS+=	--disable-avro
+
+REPLACE_BASH+=	bootstrap.sh
+REPLACE_BASH+=	configure
+REPLACE_BASH+=	configure.self
+REPLACE_BASH+=	mklove/modules/*
+
+INSTALLATION_DIRS+=	${PKGMANDIR}/man1
+
+post-install:
+	${INSTALL_MAN} ${WRKSRC}/kafkacat.1 \
+	    ${DESTDIR}/${PREFIX}/${PKGMANDIR}/man1
+
+.include "../../devel/librdkafka/buildlink3.mk"
+.include "../../devel/yajl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/kafkacat/PLIST b/kafkacat/PLIST
new file mode 100644
index 0000000000..94e0f25675
--- /dev/null
+++ b/kafkacat/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD$
+bin/kafkacat
+man/man1/kafkacat.1
diff --git a/kafkacat/distinfo b/kafkacat/distinfo
new file mode 100644
index 0000000000..11354466b2
--- /dev/null
+++ b/kafkacat/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+SHA1 (kafkacat-1.6.0.tar.gz) = 9e4b7fe17a0d57115e32f7865c3c8f6cae7b2680
+RMD160 (kafkacat-1.6.0.tar.gz) = eb27f921ae704fa8f7924c542b91049e14b677f8
+SHA512 (kafkacat-1.6.0.tar.gz) = a203f3db21fef7b885d5b394458541c830078ae3fe4c8d2d59226db14db6ef470e167bd9491982751086cd96837ff10699709e4379d007857a4058335207e858
+Size (kafkacat-1.6.0.tar.gz) = 131314 bytes
+SHA1 (patch-kafkacat.c) = 6c74eb423a8c67065ca74abff03ce7da1f8dc92f
diff --git a/kafkacat/patches/patch-kafkacat.c b/kafkacat/patches/patch-kafkacat.c
new file mode 100644
index 0000000000..b329870dcb
--- /dev/null
+++ b/kafkacat/patches/patch-kafkacat.c
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Avoid possible undefined behaviour when using ctype(3) functions.
+
+--- kafkacat.c.orig	2020-07-21 07:09:21.000000000 +0000
++++ kafkacat.c
+@@ -1540,12 +1540,12 @@ static int read_conf_file (const char *p
+                 line++;
+ 
+                 /* Left-trim */
+-                while (isspace(*s))
++                while (isspace((unsigned char)*s))
+                         s++;
+ 
+                 /* Right-trim and remove newline */
+                 t = s + strlen(s) - 1;
+-                while (t > s && isspace(*t)) {
++                while (t > s && isspace((unsigned char)*t)) {
+                         *t = 0;
+                         t--;
+                 }


Home | Main Index | Thread Index | Old Index