pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/jq



Module Name:    pkgsrc
Committed By:   leot
Date:           Sun Jun  1 18:43:09 UTC 2025

Modified Files:
        pkgsrc/devel/jq: Makefile distinfo
Added Files:
        pkgsrc/devel/jq/patches: patch-Makefile.am
Removed Files:
        pkgsrc/devel/jq/patches: patch-src_builtin.c

Log Message:
jq: Update to 1.8.0

Changes:
# 1.8.0
We are pleased to announce the release of version 1.8.0.
This release includes a number of improvements since the last version.
Note that some changes may introduce breaking changes to existing scripts,
so be sure to read the following information carefully.

## Security fixes
- CVE-2024-23337: Fix signed integer overflow in `jvp_array_write` and `jvp_object_rehash`.
  - The fix for this issue now limits the maximum size of arrays and objects to 536870912 (`2^29`) elements.
- CVE-2024-53427: Reject NaN with payload while parsing JSON.
  - The fix for this issue now drops support for NaN with payload in JSON (like `NaN123`).
    Other JSON extensions like `NaN` and `Infinity` are still supported.
- CVE-2025-48060: Fix heap buffer overflow in `jv_string_vfmt`.
- Fix use of uninitialized value in `check_literal`.
- Fix segmentation fault on `strftime/1`, `strflocaltime/1`.
- Fix unhandled overflow in `@base64d`.

## CLI changes
- Fix `--indent 0` implicitly enabling `--compact-output`
- Improve error messages to show problematic position in the filter
- Include column number in parser and compiler error messages
- Fix error message for string literal beginning with single quote
- Improve `JQ_COLORS` environment variable to support larger escapes like truecolor
- Add `--library-path` long option for `-L`
- Fix `--slurp --stream` when input has no trailing newline character
- Fix `--indent` option to error for malformed values
- Fix option parsing of `--binary` on non-Windows platforms
- Fix issue with `~/.jq` on Windows where `$HOME` is not set
- Fix broken non-Latin output in the command help on Windows
- Increase the maximum parsing depth for JSON to 10000
- Parse short options in order given
- Consistently reset color formatting

## New functions
- Add `trim/0`, `ltrim/0` and `rtrim/0` to trim leading and trailing white spaces
- Add `trimstr/1` to trim string from both ends
- Add `add/1`. Generator variant of `add/0`
- Add `skip/2` as the counterpart to `limit/2`
- Add `toboolean/0` to convert strings to booleans
- Add `@urid` format. Reverse of `@uri`

## Changes to existing functions
- Use code point index for `indices/1`, `index/1` and `rindex/1`
  - This is a breaking change. Use `utf8bytelength/0` to get byte index.
- Improve `tonumber/0` performance and rejects numbers with leading or trailing
  white spaces
  - This is a breaking change. Use `trim/0` to remove leading and trailing white spaces.
- Populate timezone data when formatting time. This fixes timezone name in
  `strftime/1`, `strflocaltime/1` for DST.
- Preserve numerical precision on unary negation, `abs/0`, `length/0`.
- Make `last(empty)` yield no output values like `first(empty)`.
- Make `ltrimstr/1` and `rtrimstr/1` error for non-string inputs.
- Make `limit/2` error for negative count.
- Fix `mktime/0` overflow and allow fewer elements in date-time representation array.
- Fix non-matched optional capture group.
- Provide `strptime/1` on all systems.
- Fix `_WIN32` port of `strptime`.
- Improve `bsearch/1` performance by implementing in C.
- Improve `unique/0` and `unique_by/1` performance.
- Fix error messages including long string literal not to break Unicode characters.
- Remove `pow10/0` as it has been deprecated in glibc 2.27. Use `exp10/0` instead.
- Remove private (and undocumented) `_nwise` filter.

## Language changes
- Fix precedence of binding syntax against unary and binary operators.
  Also, allow some expressions as object values.
  - This is a breaking change that may change the output of filters with binding syntax.
- Support Tcl-style multiline comments
- Fix `foreach` not to break init backtracking with `DUPN`
- Fix `reduce`/`foreach` state variable should not be reset each iteration
- Support CRLF line breaks in filters
- Improve performance of repeating strings


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 pkgsrc/devel/jq/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/devel/jq/distinfo
cvs rdiff -u -r0 -r1.4 pkgsrc/devel/jq/patches/patch-Makefile.am
cvs rdiff -u -r1.1 -r0 pkgsrc/devel/jq/patches/patch-src_builtin.c

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

Modified files:

Index: pkgsrc/devel/jq/Makefile
diff -u pkgsrc/devel/jq/Makefile:1.21 pkgsrc/devel/jq/Makefile:1.22
--- pkgsrc/devel/jq/Makefile:1.21       Thu Jul 11 19:59:07 2024
+++ pkgsrc/devel/jq/Makefile    Sun Jun  1 18:43:09 2025
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.21 2024/07/11 19:59:07 riastradh Exp $
+# $NetBSD: Makefile,v 1.22 2025/06/01 18:43:09 leot Exp $
 
-DISTNAME=      jq-1.7.1
-PKGREVISION=   1
+DISTNAME=      jq-1.8.0
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=jqlang/}
 GITHUB_RELEASE=        ${DISTNAME}

Index: pkgsrc/devel/jq/distinfo
diff -u pkgsrc/devel/jq/distinfo:1.18 pkgsrc/devel/jq/distinfo:1.19
--- pkgsrc/devel/jq/distinfo:1.18       Thu Jul 11 19:59:07 2024
+++ pkgsrc/devel/jq/distinfo    Sun Jun  1 18:43:09 2025
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.18 2024/07/11 19:59:07 riastradh Exp $
+$NetBSD: distinfo,v 1.19 2025/06/01 18:43:09 leot Exp $
 
-BLAKE2s (jq-1.7.1.tar.gz) = ff4a9505b42b62ef0efd45fab9fd2b4b560596f9779f41f93e6893b67fb20435
-SHA512 (jq-1.7.1.tar.gz) = 464861fb2e0d6934b616f1dc7f8002d7dae727c8c0c07b385b813e7522ba1ada8ead4165e1d99c892e3ea76e238c55a15b718c738805419721920f88f8d8478c
-Size (jq-1.7.1.tar.gz) = 1950645 bytes
-SHA1 (patch-Makefile.in) = 657b308e7276a687ffdcdf86b0b70bd805dd9947
-SHA1 (patch-src_builtin.c) = ea034595e15817cbf978ee3da5014d98aea6bfb0
-SHA1 (patch-src_main.c) = d4b671e62853dd8a072f14851892e48a127ea599
+BLAKE2s (jq-1.8.0.tar.gz) = 5c80da8304630ba309ff79275656dbc765e2786a15247aea838eef012fa5e366
+SHA512 (jq-1.8.0.tar.gz) = eaa991e43d3fc716dd57f6722a42d4119dcd8ba272eb2fcab882f83efb0b11c10a35c3dc8ad2067f30440dad988d34b5955601499eae1bb9e43db53db02bc4cf
+Size (jq-1.8.0.tar.gz) = 1908285 bytes
+SHA1 (patch-Makefile.am) = 956dd33679a07635e4682441e26973e0d12c3d4e
+SHA1 (patch-Makefile.in) = fc63d83ff4c2134ec7dbaa068dfa04ec54ecb85e
+SHA1 (patch-src_main.c) = ab7c5c54a980727e2040927ebaea771dec9800ba

Added files:

Index: pkgsrc/devel/jq/patches/patch-Makefile.am
diff -u /dev/null pkgsrc/devel/jq/patches/patch-Makefile.am:1.4
--- /dev/null   Sun Jun  1 18:43:09 2025
+++ pkgsrc/devel/jq/patches/patch-Makefile.am   Sun Jun  1 18:43:09 2025
@@ -0,0 +1,18 @@
+$NetBSD: patch-Makefile.am,v 1.4 2025/06/01 18:43:09 leot Exp $
+
+Actually escape the "#".
+
+If "\x23d" is used it can get substituted with "=" and that will mess up
+src/version.h.
+
+--- Makefile.am.orig   2025-06-01 18:07:55.412230053 +0000
++++ Makefile.am
+@@ -99,7 +99,7 @@ endif
+ # Remake the version.h header file if, and only if, the git ID has changed
+ .PHONY: .FORCE
+ .FORCE:
+-generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | sed 's/.*/\x23define JQ_VERSION \"&\"/'`"
++generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | sed 's/.*/\#define JQ_VERSION \"&\"/'`"
+ .remake-version-h: .FORCE
+       @ $(generate_ver); test "x`cat src/version.h 2>/dev/null`" = "x$$ver" || touch .remake-version-h
+ src/version.h: .remake-version-h



Home | Main Index | Thread Index | Old Index