There since 2016 r1.2
"fix pledge to allow loading modules (and a contrived case of unset HOME)"
but upstream "Avoid getpwuid for static linking" contained in 1.7 removed
the last code requiring "getpw":
https://github.com/jqlang/jq/commit/f1c49473a36bd5068031f2dca4f8cdc7c5dddb70

jq(1) still expands the tilder character in module/library search
paths, but does so purely via getenv(3).

Tests pass as before, scripts and manual tests are happy.
Feedback? OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/jq/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- Makefile    7 Sep 2023 10:43:39 -0000       1.15
+++ Makefile    21 Oct 2023 05:58:13 -0000
@@ -2,6 +2,7 @@ COMMENT =               lightweight and flexible comm
 
 V =                    1.7
 DISTNAME =             jq-$V
+REVISION =             0
 
 SHARED_LIBS += jq                        2.0 # 1.4
 
Index: patches/patch-main_c
===================================================================
RCS file: /cvs/ports/textproc/jq/patches/patch-main_c,v
retrieving revision 1.5
diff -u -p -r1.5 patch-main_c
--- patches/patch-main_c        7 Sep 2023 10:43:39 -0000       1.5
+++ patches/patch-main_c        21 Oct 2023 05:58:14 -0000
@@ -5,7 +5,7 @@ Index: src/main.c
    _setmode(fileno(stderr), _O_TEXT | _O_U8TEXT);
  #endif
  
-+  if (pledge("stdio getpw rpath", NULL) == -1) {
++  if (pledge("stdio rpath", NULL) == -1) {
 +    fprintf(stderr, "pledge\n");
 +    die();
 +  }

Reply via email to