Skip to content
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

keybase-gui: fix kbfs mount path check #40080

Merged
merged 1 commit into from Jul 17, 2018
Merged

Conversation

brainrake
Copy link
Contributor

Motivation for this change

Fixes #31261
keybase-gui did not work out of the box with the default configuration of the keybase nixos service.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@joncojonathan
Copy link
Member

While this does look like it'll work in most scenarios it doesn't solve the overall problem in #31261 as it's now just looking at two options of hardcoded mountpoint. A better solution would be to have the wrapper (I may have used the wrong word, if so, sorry) check for where keybase is mounted and then use that.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: keybase-gui

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79
shrinking /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libffmpeg.so
shrinking /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libnode.so
shrinking /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/Keybase
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79/bin
patching script interpreter paths in /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79
/nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/post_install.sh: interpreter directive changed from " /usr/bin/env bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79...
/nix/store/c0pb37bcrs7v90rd11b0fi0rdci9szz2-keybase-gui-1.0.44-20180223200436.9a9ccec79

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: keybase-gui

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79
shrinking /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libnode.so
shrinking /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libffmpeg.so
shrinking /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/Keybase
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79/bin
patching script interpreter paths in /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79
/nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/post_install.sh: interpreter directive changed from " /usr/bin/env bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79...
/nix/store/qiz9p527cdg9x3pdv0wsdw7jnyqp30n6-keybase-gui-1.0.44-20180223200436.9a9ccec79

@brainrake
Copy link
Contributor Author

brainrake commented May 7, 2018

Updated the check to look for kbfsfuse in keybase status. Couldn't find a better way to find the mount path and check it.
That's half an hour I could have spend not debugging bash quoting:)

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: keybase-gui

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79
shrinking /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libnode.so
shrinking /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libffmpeg.so
shrinking /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/Keybase
strip is /nix/store/gp7fylxwn18b7pl2c18ks89hsiaxyfvf-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79/bin
patching script interpreter paths in /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79
/nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/post_install.sh: interpreter directive changed from " /usr/bin/env bash" to "/nix/store/a4qslf0yfs44mhnbagarn232sjnckhy0-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79...
/nix/store/mx8a42iva2fgj7abyv3gscvmwy1h264k-keybase-gui-1.0.44-20180223200436.9a9ccec79

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: keybase-gui

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79
shrinking /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/Keybase
shrinking /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libffmpeg.so
shrinking /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/libnode.so
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79/bin
patching script interpreter paths in /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79
/nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79/share/keybase/post_install.sh: interpreter directive changed from " /usr/bin/env bash" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/bash"
checking for references to /build in /nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79...
/nix/store/9vz09f6dxpshbx2ngi86ck2i89czm4kl-keybase-gui-1.0.44-20180223200436.9a9ccec79

@colonelpanic8
Copy link
Contributor

merge?

@brainrake
Copy link
Contributor Author

@puffnfresh can you take a look and merge please? Thanks!

Copy link
Member

@benley benley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with kbfs mounted on /mnt/kbfs, /keybase, ~/keybase, looks good.

@benley benley merged commit b3c3df4 into NixOS:master Jul 17, 2018
benley pushed a commit to benley/nixpkgs that referenced this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants