Stefan Hagen wrote:
>> Looking at tests/testsuite.dir/089/testsuite.log in the work directory
>> shows
>>
>> chmod a-r . ..
>> tar -xvf archive.tar -C extract f
>> [...]
>>+tar: .: Cannot getcwd: Permission denied
>>+tar: Error is not recoverable: exiting now
>>
>> I don't think our getcwd(3) fails this way. Which makes me think a
>> gnulib wrapper has been enabled. Ah, yes, from the configure output:
>
> What triggers the test to fail is an additional check of the getcwd
> return value. This check was introduced in this commit:
>
> https://git.savannah.gnu.org/cgit/tar.git/commit/?id=66162927ebdfe9dd4ef570a132663fd76217952f
>
> The problem is, that after chmod a-r . .., getcwd(NULL,0) is called and
> it behaves differently than on other platforms.
>
> - OpenBSD returns a NULL pointer and errno=EACCES (code 13).
> - Linux returns a pointer and no error.
>
> [...]
>
> The diff below reverts the getcwd check in question and the testsuite
> will pass.
New patch. The previous was full with stuff I tried...
*adding patch review to my port submission check list*
Index: archivers/gtar/Makefile
===================================================================
RCS file: /cvs/ports/archivers/gtar/Makefile,v
retrieving revision 1.85
diff -u -p -u -p -r1.85 Makefile
--- archivers/gtar/Makefile 16 Jul 2019 21:29:41 -0000 1.85
+++ archivers/gtar/Makefile 11 Jan 2021 18:50:28 -0000
@@ -2,9 +2,8 @@
COMMENT= GNU version of the traditional tape archiver
-DISTNAME= tar-1.32
+DISTNAME= tar-1.33
PKGNAME= g${DISTNAME}
-REVISION= 1
CATEGORIES= archivers
HOMEPAGE= https://www.gnu.org/software/tar/
Index: archivers/gtar/distinfo
===================================================================
RCS file: /cvs/ports/archivers/gtar/distinfo,v
retrieving revision 1.26
diff -u -p -u -p -r1.26 distinfo
--- archivers/gtar/distinfo 25 Feb 2019 21:01:58 -0000 1.26
+++ archivers/gtar/distinfo 11 Jan 2021 18:50:28 -0000
@@ -1,2 +1,2 @@
-SHA256 (tar-1.32.tar.xz) = 0NOuB/EDMjvoCbw+rA3MOG1SxSYkmf4FURrEeIrx/dg=
-SIZE (tar-1.32.tar.xz) = 2103348
+SHA256 (tar-1.33.tar.xz) = Zqg0Sx3IOkEdMRvRVH4BduVswxHyjulKMPhNr7PZBn4=
+SIZE (tar-1.33.tar.xz) = 2224824
Index: archivers/gtar/patches/patch-configure
===================================================================
RCS file: /cvs/ports/archivers/gtar/patches/patch-configure,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 patch-configure
--- archivers/gtar/patches/patch-configure 13 Jan 2019 15:34:55 -0000
1.18
+++ archivers/gtar/patches/patch-configure 11 Jan 2021 18:50:28 -0000
@@ -2,7 +2,7 @@ $OpenBSD: patch-configure,v 1.18 2019/01
Index: configure
--- configure.orig
+++ configure
-@@ -36944,7 +36944,7 @@ fi
+@@ -40537,7 +40537,7 @@ fi
$as_echo "$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
acl_libext="$acl_cv_libext"
Index: archivers/gtar/patches/patch-src_misc_c
===================================================================
RCS file: archivers/gtar/patches/patch-src_misc_c
diff -N archivers/gtar/patches/patch-src_misc_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ archivers/gtar/patches/patch-src_misc_c 11 Jan 2021 18:50:28 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+
+Fix regression from upstream commit
+66162927ebdfe9dd4ef570a132663fd76217952f
+
+Index: src/misc.c
+--- src/misc.c.orig
++++ src/misc.c
+@@ -920,8 +920,6 @@ chdir_arg (char const *dir)
+ {
+ wd[wd_count].name = ".";
+ wd[wd_count].abspath = xgetcwd ();
+- if (!wd[wd_count].abspath)
+- call_arg_fatal ("getcwd", ".");
+ wd[wd_count].fd = AT_FDCWD;
+ wd_count++;
+ }