Closed andinus closed 3 years ago
The tar thing is curious. Do you have gzip
in your path too (git relies on it for archiving).
Yes, gzip
is in $PATH
.
andinus@hafnium ~> which gzip
/usr/bin/gzip
From what I understand, Fez::Util::Tar
will fail with .able
call.
andinus@hafnium ~> tar --help
tar: unknown option -- -
usage: tar {crtux}[014578befHhjLmNOoPpqsvwXZz]
[blocking-factor | archive | replstr] [-C directory] [-I file]
[file ...]
tar {-crtux} [-014578eHhjLmNOoPpqvwXZz] [-b blocking-factor]
[-C directory] [-f archive] [-I file] [-s replstr] [file ...]
Not sure why Fez::Util::Git
fails.
Gotcha - taking me a few to get an openbsd box configured with that new of a raku (newest I'm seeing is 2018 via pkg). After that we'll get to the bottom of it
I'm having trouble replicating this issue on a new openbsd install (6.8).
I'm imagining that Tar
is failing looking for the -z
flag on standard tar instead of gnu. Can you tell me what the output of this is with and without the following patch?
use Fez::Util::Tar; say Fez::Util::Tar.able;
diff --git a/lib/Fez/Util/Tar.rakumod b/lib/Fez/Util/Tar.rakumod
index a97bd28..c1ac78a 100644
--- a/lib/Fez/Util/Tar.rakumod
+++ b/lib/Fez/Util/Tar.rakumod
@@ -21,6 +21,8 @@ method ls($file) {
}
method able {
- my $p = run 'tar', '--help', :out, :err;
+ my @cmd = 'tar', '--help';
+ @cmd = ('man', '-c', 'tar') if $*KERNEL.name ~~ m:i/bsd/;
+ my $p = run @cmd, :out, :err;
$p.exitcode == 0 && $p.out.slurp.contains: '-z';
}
> use Fez::Util::Tar; say Fez::Util::Tar.able;
True
This patch fixes it.
@andinus before i publish version 27 of fez - can you verify that what's in master right now fixes this issue on your side?
Yes, it installs after this fix.
andinus@hafnium ~> zef install fez
[...]
===> Testing: fez:ver<27>:auth<zef:tony-o>:api<0>
[...]
===> Testing [OK] for fez:ver<27>:auth<zef:tony-o>:api<0>
===> Installing: fez:ver<27>:auth<zef:tony-o>:api<0>
1 bin/ script [fez] installed [...]
Thanks!
zef install fez
fails on OpenBSD with:I have both
git
&tar
in my$PATH
.