pkgsrc-WIP-changes archive

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

wip/halfempty: import halfempty-0.30



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <tk%giga.or.at@localhost>
Pushed By:	wiz
Date:		Wed Jan 8 17:39:03 2020 +0100
Changeset:	eab27622db39a82cf14d2a0d91aef886f5ccdd47

Added Files:
	halfempty/DESCR
	halfempty/Makefile
	halfempty/PLIST
	halfempty/TODO
	halfempty/distinfo
	halfempty/patches/patch-bisect.c
	halfempty/patches/patch-limits.c
	halfempty/patches/patch-proc.c
	halfempty/patches/patch-util.c

Log Message:
wip/halfempty: import halfempty-0.30

Halfempty is a new testcase minimization tool, designed with
parallelization in mind. Halfempty was built to use strategies and
techniques that dramatically speed up the minimization process.

TODO:

Uses Linux-specific functions:

ld: proc.o: in function `write_pipe':
/scratch/wip/halfempty/work/halfempty-0.30/proc.c:93: undefined reference to `splice'
ld: util.o: in function `g_sendfile':
/scratch/wip/halfempty/work/halfempty-0.30/util.c:175: undefined reference to `sendfile'

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

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

diffstat:
 halfempty/DESCR                  |  3 +++
 halfempty/Makefile               | 16 ++++++++++++++++
 halfempty/PLIST                  |  4 ++++
 halfempty/TODO                   |  8 ++++++++
 halfempty/distinfo               | 10 ++++++++++
 halfempty/patches/patch-bisect.c | 25 +++++++++++++++++++++++++
 halfempty/patches/patch-limits.c | 24 ++++++++++++++++++++++++
 halfempty/patches/patch-proc.c   | 24 ++++++++++++++++++++++++
 halfempty/patches/patch-util.c   | 16 ++++++++++++++++
 9 files changed, 130 insertions(+)

diffs:
diff --git a/halfempty/DESCR b/halfempty/DESCR
new file mode 100644
index 0000000000..ca59d4339a
--- /dev/null
+++ b/halfempty/DESCR
@@ -0,0 +1,3 @@
+Halfempty is a new testcase minimization tool, designed with
+parallelization in mind. Halfempty was built to use strategies and
+techniques that dramatically speed up the minimization process.
diff --git a/halfempty/Makefile b/halfempty/Makefile
new file mode 100644
index 0000000000..10312f504e
--- /dev/null
+++ b/halfempty/Makefile
@@ -0,0 +1,16 @@
+# $NetBSD$
+
+DISTNAME=	halfempty-0.30
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GITHUB:=googleprojectzero/}
+GITHUB_TAG=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/googleprojectzero/halfempty/
+COMMENT=	Fast, parallel test case minimization tool
+LICENSE=	apache-2.0
+
+USE_TOOLS+=	gmake pkg-config
+
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/halfempty/PLIST b/halfempty/PLIST
new file mode 100644
index 0000000000..92ba51a2d7
--- /dev/null
+++ b/halfempty/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/halfempty/TODO b/halfempty/TODO
new file mode 100644
index 0000000000..4ed28bd5e8
--- /dev/null
+++ b/halfempty/TODO
@@ -0,0 +1,8 @@
+Uses Linux-specific functions:
+
+ld: proc.o: in function `write_pipe':
+/scratch/wip/halfempty/work/halfempty-0.30/proc.c:93: undefined reference to `splice'
+ld: util.o: in function `g_sendfile':
+/scratch/wip/halfempty/work/halfempty-0.30/util.c:175: undefined reference to `sendfile'
+
+https://github.com/googleprojectzero/halfempty/issues/12
diff --git a/halfempty/distinfo b/halfempty/distinfo
new file mode 100644
index 0000000000..e78dd180b6
--- /dev/null
+++ b/halfempty/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+SHA1 (halfempty-0.30.tar.gz) = 488244faa408bb33331a30a0e482ad46d0968c85
+RMD160 (halfempty-0.30.tar.gz) = e4f3b6840c973a116dc066b6bdc7040d848ff39e
+SHA512 (halfempty-0.30.tar.gz) = 99a78723fd70f06f6059379062cb700e4f571ef476e48b5fa61a3afa2d2290536ad287cee8a62441d4528cb4849755daa36aef9989239bdb59510e562dc0bedd
+Size (halfempty-0.30.tar.gz) = 1097760 bytes
+SHA1 (patch-bisect.c) = e78d35cb18ec1d59eff66ee31afac3f42753cdd5
+SHA1 (patch-limits.c) = 3999440235ddff9b2d48b5f639d1fd22cb37f698
+SHA1 (patch-proc.c) = 638b8b9b7c0f74b004cf19a40ef7acea1ca9be66
+SHA1 (patch-util.c) = 9998ae7bf0c860f1c6483010f61a0fa35e2f0554
diff --git a/halfempty/patches/patch-bisect.c b/halfempty/patches/patch-bisect.c
new file mode 100644
index 0000000000..10ce7da189
--- /dev/null
+++ b/halfempty/patches/patch-bisect.c
@@ -0,0 +1,25 @@
+$NetBSD$
+
+%m is only allowed in syslog(3) like functions [-Wformat=]
+https://github.com/googleprojectzero/halfempty/pull/11
+
+--- bisect.c.orig	2019-03-16 17:55:00.000000000 +0000
++++ bisect.c
+@@ -202,7 +202,7 @@ static task_t * strategy_bisect_data(GNo
+                        source->fd,
+                        0,
+                        childstatus->offset) == false) {
+-        g_error("sendfile failed while trying to construct new file, %m");
++        g_error("sendfile failed while trying to construct new file, %s", strerror(errno));
+         goto nochildunlock;
+     }
+ 
+@@ -215,7 +215,7 @@ static task_t * strategy_bisect_data(GNo
+                            source->size
+                                 - childstatus->chunksize
+                                 - childstatus->offset) == false) {
+-            g_error("sendfile failed while trying to construct new file, %m");
++            g_error("sendfile failed while trying to construct new file, %s", strerror(errno));
+             goto nochildunlock;
+         }
+ 
diff --git a/halfempty/patches/patch-limits.c b/halfempty/patches/patch-limits.c
new file mode 100644
index 0000000000..4114ec681c
--- /dev/null
+++ b/halfempty/patches/patch-limits.c
@@ -0,0 +1,24 @@
+$NetBSD$
+
+%m is only allowed in syslog(3) like functions [-Wformat=]
+https://github.com/googleprojectzero/halfempty/pull/11
+
+--- limits.c.orig	2019-03-16 17:55:00.000000000 +0000
++++ limits.c
+@@ -25,6 +25,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <assert.h>
++#include <errno.h>
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ #include <sys/time.h>
+@@ -127,7 +128,7 @@ static void __attribute__((constructor))
+ 
+     for (gint i = 0; i < RLIMIT_NLIMITS; i++) {
+         if (getrlimit(i, &kChildLimits[i]) != 0) {
+-            g_warning("failed to getrlimit for %u, %m", i);
++            g_warning("failed to getrlimit for %u, %s", i, strerror(errno));
+         }
+ 
+         g_debug("Configured rlimit %s => { %llu, %llu }",
diff --git a/halfempty/patches/patch-proc.c b/halfempty/patches/patch-proc.c
new file mode 100644
index 0000000000..0756a95913
--- /dev/null
+++ b/halfempty/patches/patch-proc.c
@@ -0,0 +1,24 @@
+$NetBSD$
+
+warning: %m is only allowed in syslog(3) like functions [-Wformat=]
+
+use more portable version of setpgrp()
+https://github.com/googleprojectzero/halfempty/pull/11
+
+--- proc.c.orig	2019-03-16 17:55:00.000000000 +0000
++++ proc.c
+@@ -50,12 +50,12 @@ static void configure_child_limits(gpoin
+     // Some of these may fail, not sure what to do.
+     for (gint i = 0; i < RLIMIT_NLIMITS; i++) {
+         if (setrlimit(i, &kChildLimits[i]) == -1) {
+-            g_critical("a call to setrlimit for %u failed(), %m", i);
++            g_critical("a call to setrlimit for %u failed(), %s", i, strerror(errno));
+         }
+     }
+ 
+     // Make sure we create a new pgrp so that we can kill all subprocesses.
+-    setpgrp();
++    setpgid(0, 0);
+ 
+ #ifdef __linux__
+     // Try to cleanup if we get killed.
diff --git a/halfempty/patches/patch-util.c b/halfempty/patches/patch-util.c
new file mode 100644
index 0000000000..16a0703f15
--- /dev/null
+++ b/halfempty/patches/patch-util.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+%m is only allowed in syslog(3) like functions [-Wformat=]
+https://github.com/googleprojectzero/halfempty/pull/11
+
+--- util.c.orig	2019-03-16 17:55:00.000000000 +0000
++++ util.c
+@@ -129,7 +129,7 @@ gboolean generate_dot_tree(GNode *root, 
+     FILE *out = fopen(filename, "w");
+ 
+     if (!out) {
+-        g_warning("failed to open file `%s` to save dot file, %m", filename);
++        g_warning("failed to open file `%s` to save dot file, %s", filename, strerror(errno));
+         return false;
+     }
+ 


Home | Main Index | Thread Index | Old Index