-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[18.09] Keybase updates #55429
[18.09] Keybase updates #55429
Conversation
I'm getting an error when I try to run keybase-gui. It says that keybase is not found, but the path does exist. pure λ nix-shell -p nix-review --run 'nix-review pr 55429'
impure λ keybase service &
[1] 5415
▶ INFO | net.Listen on unix:/run/user/2000/keybase/keybased.sock
impure λ NIX_SKIP_KEYBASE_CHECKS=1 keybase-gui
Could not find kbfsfuse client in keybase status.
You might need to run: kbfsfuse
/nix/store/n00sfd4bvlc3q4gckxa8a4v5d7cfa91r-keybase-gui-3.0.0/bin/.keybase-gui-wrapped: line 23: /nix/store/n00sfd4bvlc3q4gckxa8a4v5d7cfa91r-keybase-gui-3.0.0/share/keybase/Keybase: No such file or directory
impure λ ls -la /nix/store/n00sfd4bvlc3q4gckxa8a4v5d7cfa91r-keybase-gui-3.0.0/share/keybase/Keybase
.r-xr-xr-x 116M root 31 Dec 1969 /nix/store/n00sfd4bvlc3q4gckxa8a4v5d7cfa91r-keybase-gui-3.0.0/share/keybase/Keybase EDIT: I also tried running kbfsfuse first, I still got the same error. @worldofpeace does it work for you? In the sh-session below, the first run is this PR, the second one is #55429 . impure λ strace /nix/store/n00sfd4bvlc3q4gckxa8a4v5d7cfa91r-keybase-gui-3.0.0/share/keybase/Keybase
execve("/nix/store/n00sfd4bvlc3q4gckxa8a4v5d7cfa91r-keybase-gui-3.0.0/share/keybase/Keybase", ["/nix/store/n00sfd4bvlc3q4gckxa8a"...], 0x7ffc5c00ee80 /* 196 vars */) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=2997, ...}) = 0
read(3, "# Locale name alias data base.\n#"..., 4096) = 2997
read(3, "", 4096) = 0
close(3) = 0
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/en_US.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/en_US.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/en_US/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/en.UTF-8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/en.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/nix/store/7gx4kiv5m0i7d7qkixq2cwzbr10lvxwc-glibc-2.27/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 15), ...}) = 0
write(2, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
getpid() = 26099
exit_group(1) = ?
+++ exited with 1 +++
impure λ strace /nix/store/n7fkpxygw1fq3hwfy3bmg8y5zrmbdjrd-keybase-gui-3.0.0/share/keybase/Keybase
execve("/nix/store/n7fkpxygw1fq3hwfy3bmg8y5zrmbdjrd-keybase-gui-3.0.0/share/keybase/Keybase", ["/nix/store/n7fkpxygw1fq3hwfy3bmg"...], 0x7ffd47cd9690 /* 196 vars */) = 0
brk(NULL) = 0x55c13c7f8000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd7841f6000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fd7841f4000
access("/etc/ld-nix.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/tls/haswell/x86_64/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/tls/haswell/x86_64", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/tls/haswell/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/tls/haswell", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/tls/x86_64/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/tls/x86_64", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/tls/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/tls", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/haswell/x86_64/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/haswell/x86_64", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/haswell/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/haswell", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/x86_64/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib/x86_64", 0x7fff39395fe0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/opengl-driver/lib/libffmpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/run/opengl-driver/lib", {st_mode=S_IFDIR|0555, st_size=1138, ...}) = 0
o
...SNIP... |
repo = "client"; | ||
rev = "v${version}"; | ||
sha256 = "1gfxnqzs8msxmykg1zrhrrl2slmb29gl7b8s4m2g44zxaj91gfi9"; | ||
src = fetchurl { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using fetchFromGitHub
does not work on Darwin. Please see 8da3c3648a0279f78a130abe10941a68fec7240a for context.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just redefine fetchFromGitHub
as(simplified):
{
fetchFromGitHub = {owner, repo, rev, sha256}: fetchurl {
inherit sha256;
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz"
};
}
Then?
There are plenty of packages using the function(which AFAIK was considered the best practice), and so we'd need to change all invocations in nixpkgs
to ensure consistency and compatibility with Darwin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd get a major loss there as the automatically generated archives are not stable and can result in a different hash, which is something we don't want. It's less a problem to just use fetchurl for darwin and open that risk as this would never build on that platform if we didn't.
Commit msg for context
fetchFromGitHub and thus fetchzip hashes the contents of the archive and
not the archive itself. Unicode file names lead to different checksums
on HFS+ vs. other file systems because of Unicode normalisation
Though it might be worth checking if we can eliminate this problem in the near future by identifying the problematic file upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though it might be worth checking if we can eliminate this problem in the near future by identifying the problematic file upstream.
I did not like this solution either, I would love to find a way for us to hash the contents regardless of the Filesystem. Keep in mind also that most Darwin machines are now sold pre-installed with APFS, which does not suffer from this issue.
Just got wind that our kbfs is out of date. See #50999 (comment) |
@kalbasit I can reproduce the issue you're having with the 18.09 version. On master works fine. |
@heronhaye we're having an interesting issue with the latest Keybase on release 18.09 (see my comment above). Do you know what could be causing this? |
Possible solution for |
Ok, realized that it's obviously a problem with Not sure if that could cause problems for stable, but I'd like to care for |
@worldofpeace #55538 has been merged, you should probably rebase this PR so I can give it another try. |
(cherry picked from commit a3a0742)
(cherry picked from commit 563d4e2)
(cherry picked from commit 239dc14)
fetchFromGitHub and thus fetchzip hashes the contents of the archive and not the archive itself. Unicode file names lead to different checksums on HFS+ vs. other file systems because of Unicode normalisation (cherry picked from commit f466c9f)
(cherry picked from commit 1f332e7)
(cherry picked from commit 3bc3772)
(cherry picked from commit 66d844b)
(cherry picked from commit 6d9c525)
(cherry picked from commit ce8c243)
21ca92b
to
c0a99a5
Compare
@worldofpeace it looks good now, thanks! |
You're welcome @kalbasit ❇️ |
…port [18.09] Keybase updates
Motivation for this change
Thought it would be a good idea to backport as certain users were having problems, and it seems keybase has certain restrictions with which client versions can communicate with their servers.
cc @rvolosatovs
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)