Received: by mail.netbsd.org (Postfix, from userid 605) id 83B7B84D78; Sun, 19 Aug 2018 18:08:08 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 87F5F84CD0 for ; Sun, 19 Aug 2018 18:08:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id yIRGv54AIfS3 for ; Sun, 19 Aug 2018 18:08:06 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 3106C84D77 for ; Sun, 19 Aug 2018 18:08:06 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 20676FBEC; Sun, 19 Aug 2018 18:08:06 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_153470208692320" MIME-Version: 1.0 Date: Sun, 19 Aug 2018 18:08:06 +0000 From: "Leonardo Taccari" Subject: CVS commit: pkgsrc/devel/jq To: pkgsrc-changes@NetBSD.org Reply-To: leot@netbsd.org X-Mailer: log_accum Message-Id: <20180819180806.20676FBEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_153470208692320 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: leot Date: Sun Aug 19 18:08:06 UTC 2018 Modified Files: pkgsrc/devel/jq: Makefile distinfo Added Files: pkgsrc/devel/jq/patches: patch-builtin.c patch-compile.c patch-configure.ac patch-inject__errors.c patch-util.c Log Message: jq: Avoid SIGSEGVs when using date builtins Apply patch written by and shared with upstream as part of in order to fix crashes of jq when using date builtin functions. Also add a SUBST class intended to avoid invoking git as part of pre-configure phase when invoking autoreconf. While here take the MAINTAINERship and reformat a bit the Makefile (NFCI). Thanks a lot to , Takehiko NOZAKI and for investigating the issue, writing the patches, sharing them with upstream and as part of PR pkg/52460! Bump PKGREVISION To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 pkgsrc/devel/jq/Makefile cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/jq/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/devel/jq/patches/patch-builtin.c \ pkgsrc/devel/jq/patches/patch-compile.c \ pkgsrc/devel/jq/patches/patch-inject__errors.c \ pkgsrc/devel/jq/patches/patch-util.c cvs rdiff -u -r0 -r1.3 pkgsrc/devel/jq/patches/patch-configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_153470208692320 Content-Disposition: inline Content-Length: 7529 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/devel/jq/Makefile diff -u pkgsrc/devel/jq/Makefile:1.15 pkgsrc/devel/jq/Makefile:1.16 --- pkgsrc/devel/jq/Makefile:1.15 Wed May 30 16:03:48 2018 +++ pkgsrc/devel/jq/Makefile Sun Aug 19 18:08:05 2018 @@ -1,26 +1,32 @@ -# $NetBSD: Makefile,v 1.15 2018/05/30 16:03:48 ginsbach Exp $ +# $NetBSD: Makefile,v 1.16 2018/08/19 18:08:05 leot Exp $ DISTNAME= jq-1.5 -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GITHUB:=stedolan/} +GITHUB_TAG= ${DISTNAME} -MAINTAINER= pkgsrc-users@NetBSD.org +MAINTAINER= leot@NetBSD.org HOMEPAGE= https://github.com/stedolan/jq/ COMMENT= Command-line JSON processor LICENSE= mit -GITHUB_TAG= ${DISTNAME} - USE_LANGUAGES= c99 USE_LIBTOOL= yes -USE_TOOLS+= bison flex gmake +USE_TOOLS+= autoreconf autoconf automake bison flex gmake GNU_CONFIGURE= yes -.include "options.mk" - -CFLAGS.SunOS+= -D_XPG6 -D__EXTENSIONS__ +SUBST_CLASSES+= tag +SUBST_STAGE.tag= pre-configure +SUBST_MESSAGE.tag= Avoid to run `git describe' to fetch the tag +SUBST_FILES.tag= configure.ac scripts/version +SUBST_SED.tag+= -e 's/git describe .*|/echo "jq-1.5-1-g940132e-dirty" |/' TEST_TARGET= check +pre-configure: + cd ${WRKSRC} && autoreconf -fi + +.include "options.mk" + .include "../../mk/bsd.pkg.mk" Index: pkgsrc/devel/jq/distinfo diff -u pkgsrc/devel/jq/distinfo:1.9 pkgsrc/devel/jq/distinfo:1.10 --- pkgsrc/devel/jq/distinfo:1.9 Wed May 30 16:03:48 2018 +++ pkgsrc/devel/jq/distinfo Sun Aug 19 18:08:05 2018 @@ -1,9 +1,14 @@ -$NetBSD: distinfo,v 1.9 2018/05/30 16:03:48 ginsbach Exp $ +$NetBSD: distinfo,v 1.10 2018/08/19 18:08:05 leot Exp $ SHA1 (jq-1.5.tar.gz) = 664638b560d9e734178e8cafb21d98817af5b5f3 RMD160 (jq-1.5.tar.gz) = 33ac77ac93e0539f6d66d29cd717013cdab8cf61 SHA512 (jq-1.5.tar.gz) = 3f9049321e8430b04dbccf81d7f2ab691b89383e91526eaf585bbeeb67698dea73a36b3aa179f6a95ef97cd73a8a9b6dc53cb1a5b0398b6422c11289b705de7b Size (jq-1.5.tar.gz) = 1118086 bytes SHA1 (patch-Makefile.in) = 446be0fa3517fb6fc1e2f5761d1f8fb28339c79c +SHA1 (patch-builtin.c) = ab8572304d39680b19337aec525beaa88e6506da +SHA1 (patch-compile.c) = a9d2f8eadaddcd6bd3e467740f6826073b40720e +SHA1 (patch-configure.ac) = 5ac2b2c744f554a716189239446a5c5a13c58bea +SHA1 (patch-inject__errors.c) = 863086a96be3b81011a141bdf293d3ef5693ef10 SHA1 (patch-src_jv__parse.c) = efca86e70daf27291a01bf538487b745b7bd600c SHA1 (patch-src_jv__print.c) = 4d53dc1a1f0bb1cc827dd1adb62ecef2b7393970 +SHA1 (patch-util.c) = c6b9062312206267b0e83bc7284646f64e133f58 Added files: Index: pkgsrc/devel/jq/patches/patch-builtin.c diff -u /dev/null pkgsrc/devel/jq/patches/patch-builtin.c:1.1 --- /dev/null Sun Aug 19 18:08:06 2018 +++ pkgsrc/devel/jq/patches/patch-builtin.c Sun Aug 19 18:08:05 2018 @@ -0,0 +1,22 @@ +$NetBSD: patch-builtin.c,v 1.1 2018/08/19 18:08:05 leot Exp $ + +Defining _GNU_SOURCE, _BSD_SOURCE etc. in C sources is problematic, +because the result of the configure command may be inconsistent with it. +to be consistent, such macros have to be defined in the early stage of +the configure command, and the AC_USE_SYSTEM_EXTENSIONS macro does the job. + +Part of pull request 1458, commit id `df9a0963f8fa6fca773b059dce22c598152f3edb': + + + +Also shared via PR pkg/52460. + +--- builtin.c.orig 2015-08-18 04:25:04.000000000 +0000 ++++ builtin.c +@@ -1,6 +1,3 @@ +-#define _BSD_SOURCE +-#define _GNU_SOURCE +-#define _XOPEN_SOURCE + #include + #include + #include Index: pkgsrc/devel/jq/patches/patch-compile.c diff -u /dev/null pkgsrc/devel/jq/patches/patch-compile.c:1.1 --- /dev/null Sun Aug 19 18:08:06 2018 +++ pkgsrc/devel/jq/patches/patch-compile.c Sun Aug 19 18:08:05 2018 @@ -0,0 +1,22 @@ +$NetBSD: patch-compile.c,v 1.1 2018/08/19 18:08:05 leot Exp $ + +Defining _GNU_SOURCE, _BSD_SOURCE etc. in C sources is problematic, +because the result of the configure command may be inconsistent with it. +to be consistent, such macros have to be defined in the early stage of +the configure command, and the AC_USE_SYSTEM_EXTENSIONS macro does the job. + +Part of pull request 1458, commit id `df9a0963f8fa6fca773b059dce22c598152f3edb': + + + +Also shared via PR pkg/52460. + +--- compile.c.orig 2015-08-18 04:25:04.000000000 +0000 ++++ compile.c +@@ -1,6 +1,3 @@ +-#ifndef _GNU_SOURCE +-#define _GNU_SOURCE // for strdup +-#endif + #include + #include + #include Index: pkgsrc/devel/jq/patches/patch-inject__errors.c diff -u /dev/null pkgsrc/devel/jq/patches/patch-inject__errors.c:1.1 --- /dev/null Sun Aug 19 18:08:06 2018 +++ pkgsrc/devel/jq/patches/patch-inject__errors.c Sun Aug 19 18:08:05 2018 @@ -0,0 +1,21 @@ +$NetBSD: patch-inject__errors.c,v 1.1 2018/08/19 18:08:05 leot Exp $ + +Defining _GNU_SOURCE, _BSD_SOURCE etc. in C sources is problematic, +because the result of the configure command may be inconsistent with it. +to be consistent, such macros have to be defined in the early stage of +the configure command, and the AC_USE_SYSTEM_EXTENSIONS macro does the job. + +Part of pull request 1458, commit id `df9a0963f8fa6fca773b059dce22c598152f3edb': + + + +Also shared via PR pkg/52460. + +--- inject_errors.c.orig 2015-08-18 04:25:04.000000000 +0000 ++++ inject_errors.c +@@ -1,5 +1,3 @@ +- +-#define _GNU_SOURCE /* for RTLD_NEXT */ + #include + #include + #include Index: pkgsrc/devel/jq/patches/patch-util.c diff -u /dev/null pkgsrc/devel/jq/patches/patch-util.c:1.1 --- /dev/null Sun Aug 19 18:08:06 2018 +++ pkgsrc/devel/jq/patches/patch-util.c Sun Aug 19 18:08:05 2018 @@ -0,0 +1,24 @@ +$NetBSD: patch-util.c,v 1.1 2018/08/19 18:08:05 leot Exp $ + +Defining _GNU_SOURCE, _BSD_SOURCE etc. in C sources is problematic, +because the result of the configure command may be inconsistent with it. +to be consistent, such macros have to be defined in the early stage of +the configure command, and the AC_USE_SYSTEM_EXTENSIONS macro does the job. + +Part of pull request 1458, commit id `df9a0963f8fa6fca773b059dce22c598152f3edb': + + + +Also shared via PR pkg/52460. + +--- util.c.orig 2015-08-18 04:25:04.000000000 +0000 ++++ util.c +@@ -1,8 +1,3 @@ +- +-#ifdef HAVE_MEMMEM +-#define _GNU_SOURCE +-#endif +- + #include + #include + #include Index: pkgsrc/devel/jq/patches/patch-configure.ac diff -u /dev/null pkgsrc/devel/jq/patches/patch-configure.ac:1.3 --- /dev/null Sun Aug 19 18:08:06 2018 +++ pkgsrc/devel/jq/patches/patch-configure.ac Sun Aug 19 18:08:05 2018 @@ -0,0 +1,23 @@ +$NetBSD: patch-configure.ac,v 1.3 2018/08/19 18:08:05 leot Exp $ + +Defining _GNU_SOURCE, _BSD_SOURCE etc. in C sources is problematic, +because the result of the configure command may be inconsistent with it. +to be consistent, such macros have to be defined in the early stage of +the configure command, and the AC_USE_SYSTEM_EXTENSIONS macro does the job. + +Part of pull request 1458, commit id `df9a0963f8fa6fca773b059dce22c598152f3edb': + + + +Also shared via PR pkg/52460. + +--- configure.ac.orig 2015-08-18 04:25:04.000000000 +0000 ++++ configure.ac +@@ -11,6 +11,7 @@ AC_PREREQ([2.64]) + AC_CONFIG_AUX_DIR([config]) + AM_INIT_AUTOMAKE([1.11.2 parallel-tests foreign -Wall]) + AM_SILENT_RULES([yes]) ++AC_USE_SYSTEM_EXTENSIONS + AM_PROG_AR + AM_MAINTAINER_MODE([enable]) + AC_PROG_CC --_----------=_153470208692320--