Skip to content

Instantly share code, notes, and snippets.

@silkeh
Last active July 16, 2018 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silkeh/338e1104d3d19b4ff547aab9f7f6e851 to your computer and use it in GitHub Desktop.
Save silkeh/338e1104d3d19b4ff547aab9f7f6e851 to your computer and use it in GitHub Desktop.
Keybase for Solus
---
packaging/linux/build_binaries.sh | 10 +++++-----
packaging/linux/post_install.sh | 2 +-
packaging/linux/run_keybase | 6 +++---
packaging/linux/systemd/keybase.gui.service | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/packaging/linux/build_binaries.sh b/packaging/linux/build_binaries.sh
index b7b7e1d16..194ba7cc0 100755
--- a/packaging/linux/build_binaries.sh
+++ b/packaging/linux/build_binaries.sh
@@ -99,10 +99,10 @@ build_one_architecture() {
cp "$here/run_keybase" "$layout_dir/usr/bin/"
- # In include-KBFS mode, create the /opt/keybase dir, and include post_install.sh.
- mkdir -p "$layout_dir/opt/keybase"
- cp "$here/post_install.sh" "$layout_dir/opt/keybase/"
- cp "$here/crypto_squirrel.txt" "$layout_dir/opt/keybase/"
+ # In include-KBFS mode, create the /usr/share/keybase dir, and include post_install.sh.
+ mkdir -p "$layout_dir/usr/share/keybase"
+ cp "$here/post_install.sh" "$layout_dir/usr/share/keybase/"
+ cp "$here/crypto_squirrel.txt" "$layout_dir/usr/share/keybase/"
# Build the kbfsfuse binary. Currently, this always builds from master.
echo "Building kbfs for $GOARCH..."
@@ -136,7 +136,7 @@ build_one_architecture() {
cd "$this_repo/shared"
yarn run package -- --platform linux --arch "$electron_arch" --appVersion "$version"
rsync -a "desktop/release/linux-${electron_arch}/Keybase-linux-${electron_arch}/" \
- "$layout_dir/opt/keybase"
+ "$layout_dir/usr/share/keybase"
)
# Copy in the icon images.
diff --git a/packaging/linux/post_install.sh b/packaging/linux/post_install.sh
index b00b2dc1d..9c732724f 100755
--- a/packaging/linux/post_install.sh
+++ b/packaging/linux/post_install.sh
@@ -15,7 +15,7 @@ disableConfigKey="disable-root-redirector"
vardirDeprecated="/var/lib/keybase"
khuserDeprecated="keybasehelper"
khbinDeprecated="/usr/bin/keybase-mount-helper"
-optDeprecated="/opt/keybase/mount-readme"
+optDeprecated="/usr/share/keybase/mount-readme"
redirector_enabled() {
disableRedirector="false"
diff --git a/packaging/linux/run_keybase b/packaging/linux/run_keybase
index eb66f30a2..bc5c2f8c3 100755
--- a/packaging/linux/run_keybase
+++ b/packaging/linux/run_keybase
@@ -119,7 +119,7 @@ kill_all() {
# Remove any existing legacy mount. This should never happen
# because it should have already been done by post_install.sh.
# Just in case, let the user know how to fix it.
- echo Unmounting /keybase. Run `sudo rmdir /keybase; sudo ln -s /opt/keybase/mount-readme /keybase; sudo chown root:root /keybase` and then run this command again.
+ echo Unmounting /keybase. Run `sudo rmdir /keybase; sudo ln -s /usr/share/keybase/mount-readme /keybase; sudo chown root:root /keybase` and then run this command again.
exit -1
fi
if fusermount -uz $mountdir &> /dev/null ; then
@@ -231,7 +231,7 @@ start_background() {
run_redirector
kbfsfuse -debug -log-to-file "$mountdir" &>> "$logdir/keybase.start.log" &
echo Launching Keybase GUI...
- /opt/keybase/Keybase &>> "$logdir/Keybase.app.log" &
+ /usr/share/keybase/Keybase &>> "$logdir/Keybase.app.log" &
write_startup_token "background"
}
@@ -275,7 +275,7 @@ main() {
echo 'Success!'
# Magical squirrel produced by https://github.com/erkin/ponysay
if [ "${KEYBASE_NO_SQUIRREL:-}" != "1" ]; then
- cat /opt/keybase/crypto_squirrel.txt
+ cat /usr/share/keybase/crypto_squirrel.txt
fi
}
diff --git a/packaging/linux/systemd/keybase.gui.service b/packaging/linux/systemd/keybase.gui.service
index ea42d38f6..eef29d25a 100644
--- a/packaging/linux/systemd/keybase.gui.service
+++ b/packaging/linux/systemd/keybase.gui.service
@@ -4,7 +4,7 @@ Wants=keybase.service kbfs.service
[Service]
Type=simple
-ExecStart=/opt/keybase/Keybase
+ExecStart=/usr/share/keybase/Keybase
# The environment file lets run_keybase pass along KEYBASE_START_UI. The
# autostart file will set that to suppress showing the main window during boot.
# %t is the XDG_RUNTIME_DIR, and the leading - means it's ok if the file is
--
2.18.0
name : keybase
version : 2.3.0
release : 1
source :
- git|https://github.com/keybase/client : v2.3.0
- git|https://github.com/keybase/kbfs : v2.3.0
license : BSD-3-Clause
component : security.crypto
networking : yes
summary : Keybase command-line client, filesystem and GUI
description: |
The Keybase app helps you perform cryptographically-secure operations with
people you know on the Internet: chatting, file sharing, even publishing
public documents. It's all easier and safer with Keybase.
builddeps :
- pkgconfig(alsa)
- pkgconfig(atk)
- pkgconfig(gconf-2.0)
- pkgconfig(gdk-x11-2.0)
- pkgconfig(pango)
- pkgconfig(xcomposite)
- pkgconfig(xcursor)
- pkgconfig(xi)
- pkgconfig(xrandr)
- pkgconfig(xscrnsaver)
- pkgconfig(xtst)
- git
- golang
- rsync
- yarn
rundeps :
- fuse
- gconf
- nodejs
setup : |
%patch -p1 < $pkgfiles/0001-Replace-opt-by-usr-share.patch
# The installer expects the kbfs data in `..`
ln -s "$sources/kbfs.git" "../kbfs"
build : |
export KEYBASE_SKIP_32_BIT=1
./packaging/linux/build_binaries.sh prerelease ./build_dir
install : |
# Create required directories
install -dm00755 $installdir/keybase
# Copy files
cp -Rv ./build_dir/binaries/amd64/usr $installdir/
# Keybase redirector maps /keybase to the /run/user/$UID/keybase/kbfs.
# It requires set-uid to function.
chmod 4755 $installdir/usr/bin/keybase-redirector
# Cleanup extra files
rm $installdir/usr/share/keybase/post_install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment