[arch-commits] Commit in keybase/repos (5 files)
Eli Schwartz
eschwartz at archlinux.org
Thu Oct 8 21:20:57 UTC 2020
Date: Thursday, October 8, 2020 @ 21:20:56
Author: eschwartz
Revision: 722016
archrelease: copy trunk to community-staging-x86_64
Added:
keybase/repos/community-staging-x86_64/
keybase/repos/community-staging-x86_64/0001-Don-t-use-electron-to-build.patch
(from rev 722013, keybase/trunk/0001-Don-t-use-electron-to-build.patch)
keybase/repos/community-staging-x86_64/PKGBUILD
(from rev 722013, keybase/trunk/PKGBUILD)
keybase/repos/community-staging-x86_64/kbfs.install
(from rev 722013, keybase/trunk/kbfs.install)
keybase/repos/community-staging-x86_64/keybase-gui
(from rev 722013, keybase/trunk/keybase-gui)
----------------------------------------+
0001-Don-t-use-electron-to-build.patch | 67 +++++++++++++++
PKGBUILD | 135 +++++++++++++++++++++++++++++++
kbfs.install | 15 +++
keybase-gui | 18 ++++
4 files changed, 235 insertions(+)
Copied: keybase/repos/community-staging-x86_64/0001-Don-t-use-electron-to-build.patch (from rev 722013, keybase/trunk/0001-Don-t-use-electron-to-build.patch)
===================================================================
--- community-staging-x86_64/0001-Don-t-use-electron-to-build.patch (rev 0)
+++ community-staging-x86_64/0001-Don-t-use-electron-to-build.patch 2020-10-08 21:20:56 UTC (rev 722016)
@@ -0,0 +1,67 @@
+From 7b4316eda537174fb8726d02c64584fa9d2b5650 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93 at gmail.com>
+Date: Thu, 21 Jun 2018 05:00:37 -0400
+Subject: [PATCH] Don't use electron to build
+
+---
+ shared/desktop/package.desktop.tsx | 4 ++--
+ shared/desktop/yarn-helper/index.tsx | 2 --
+ shared/package.json | 1 -
+ 3 files changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/shared/desktop/package.desktop.tsx b/shared/desktop/package.desktop.tsx
+index b10bb10295..f4b5fc3e6a 100644
+--- a/shared/desktop/package.desktop.tsx
++++ b/shared/desktop/package.desktop.tsx
+@@ -133,7 +133,7 @@ function main() {
+ // use the same version as the currently-installed electron
+ console.log('Finding electron version')
+ try {
+- packagerOpts.electronVersion = require('../package.json').devDependencies.electron
++ packagerOpts.electronVersion = 'unused string'
+ console.log('Found electron version:', packagerOpts.electronVersion)
+ } catch (err) {
+ console.log("Couldn't parse yarn list to find electron:", err)
+@@ -181,7 +181,7 @@ function startPack() {
+ .catch(postPackError)
+ })
+ })
+- } else {
++ } else if (false) {
+ pack(platform, arch)
+ .then(postPack(platform, arch))
+ .catch(postPackError)
+diff --git a/shared/desktop/yarn-helper/index.tsx b/shared/desktop/yarn-helper/index.tsx
+index b80018f9f9..30f26606b4 100644
+--- a/shared/desktop/yarn-helper/index.tsx
++++ b/shared/desktop/yarn-helper/index.tsx
+@@ -1,6 +1,5 @@
+ // Helper for cross platform yarn run script commands
+ import buildCommands from './build'
+-import electronComands from './electron'
+ import fontCommands from './font'
+ import prettierCommands from './prettier'
+ import {execSync} from 'child_process'
+@@ -14,7 +13,6 @@ const [, , command, ...rest] = process.argv
+ const commands = {
+ ...buildCommands,
+ ...fontCommands,
+- ...electronComands,
+ ...prettierCommands,
+ help: {
+ code: () => {
+diff --git a/shared/package.json b/shared/package.json
+index 373f43440e..14deb7fd99 100644
+--- a/shared/package.json
++++ b/shared/package.json
+@@ -201,7 +201,6 @@
+ "cross-env": "5.2.0",
+ "css-loader": "3.2.0",
+ "del": "3.0.0",
+- "electron": "8.0.2",
+ "electron-packager": "14.0.6",
+ "eslint": "6.4.0",
+ "eslint-plugin-filenames": "1.3.2",
+--
+2.25.1
+
Copied: keybase/repos/community-staging-x86_64/PKGBUILD (from rev 722013, keybase/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-10-08 21:20:56 UTC (rev 722016)
@@ -0,0 +1,135 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+# Contributor: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Michael Hansen <zrax0111 gmail com>
+
+pkgbase=keybase
+pkgname=('keybase' 'kbfs' 'keybase-gui')
+pkgdesc='CLI tool for GPG with keybase.io'
+pkgver=5.5.1
+pkgrel=2
+arch=('x86_64')
+url='https://keybase.io/'
+license=('BSD')
+# git is needed for yarn...
+makedepends=('git' 'go' 'yarn')
+source=("https://github.com/keybase/client/releases/download/v${pkgver}/${pkgbase}-v${pkgver}.tar.xz"{,.sig}
+ "keybase-gui"
+ "0001-Don-t-use-electron-to-build.patch")
+sha512sums=('c203788c672168f506290ed02cee09e825103de047c02ce35515e7f509b2ca3a1e1bb1d2c895c8bfe484b9d0f175136cb4949a03f9d472181be8c33b388e7260'
+ 'SKIP'
+ '2cd6d153a39300a3a03de7aa62be832a1410de335df9e832794a483a76ec5f7856e9633b33137280679fb3624cf2b41bc9552261708e4aff6eaf4085f92bbc90'
+ '1485e41432218b88aff71bbe68d265baad18c8b91b3d51cacdb4ac9b09abfb6cde91b9b87cb861cffeff92830159552307a89462c8697bb066416bd897e7b68b')
+b2sums=('b98738e47c300ba34de9b32ea97551607d6a311969d2b33dc5917dc11013b5e8666260bdbd90d969d92f1883f576dcf1bcb6d9b2a5c5e2983728040a3cda2f3a'
+ 'SKIP'
+ '3a2e97e83555d63ec29c5e72fff3adf36ced7502ce1bf650833927f2810eb0eec240b881bcc25791ff571bb3c92030d9cdef229631c9866b53465b25abd38190'
+ '164dd6f37fe38d3c840b2b92d41553e0be67985d7c8471833a9ff381c05b0c35f295bfc630aa3ce6e31afb70b805d071e8c0a438a504064d24f99720c1571b9a')
+validpgpkeys=('222B85B0F90BE2D24CFEB93F47484E50656D16C7') # Keybase.io Code Signing (v1) <code at keybase.io>
+
+prepare() {
+ cd client-v${pkgver}
+
+ export GOPATH="${srcdir}/.gopath"
+ mkdir -p "${GOPATH}"/src/github.com/keybase
+ ln -sf "${PWD}" "${GOPATH}"/src/github.com/keybase/client
+
+ # Fix paths to run electron /path/to/app (or our minimal wrapper script).
+ # Also wire up "hideWindow" when running as a service or via XDG autostart.
+ sed -i 's@/opt/keybase/Keybase@/usr/bin/electron9 /usr/share/keybase-app@' \
+ packaging/linux/systemd/keybase.gui.service
+ sed -i 's/run_keybase/keybase-gui/g' \
+ packaging/linux/keybase.desktop go/install/install_unix.go
+
+ patch -p1 -i ../0001-Don-t-use-electron-to-build.patch
+}
+
+build() {
+ cd client-v${pkgver}/go/keybase
+
+ # None of this should be necessary, but we duplicate the work of
+ # makepkg.conf here since golang CGO can't be bothered to respect
+ # standardized CFLAGS and we don't have native packaging integration for
+ # either this or the go-specific flags. Must be done here to make sure
+ # we're using debug or !buildflags.
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+
+ export GOPATH="${srcdir}/.gopath"
+ go build -a -tags production -o ../bin/keybase github.com/keybase/client/go/keybase
+ go build -a -tags production -o ../bin/kbnm github.com/keybase/client/go/kbnm
+ go build -a -tags production -o ../bin/kbfsfuse github.com/keybase/client/go/kbfs/kbfsfuse
+ go build -a -tags production -o ../bin/git-remote-keybase github.com/keybase/client/go/kbfs/kbfsgit/git-remote-keybase
+
+ cd ../../shared
+ yarn install
+ yarn run package --appVersion $pkgver
+}
+
+package_keybase() {
+ depends=('gnupg')
+ optdepends=('kbfs: for the fuse-based fileystem and the encryption subcommand')
+
+ cd client-v${pkgver}
+
+ install -Dm755 -t "${pkgdir}"/usr/bin/ go/bin/{keybase,kbnm}
+
+ # native messaging whitelists
+ KBNM_INSTALL_ROOT=1 KBNM_INSTALL_OVERLAY="${pkgdir}" "${pkgdir}/usr/bin/kbnm" install
+ # systemd activation
+ install -Dm644 packaging/linux/systemd/keybase.service "${pkgdir}"/usr/lib/systemd/user/keybase.service
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_kbfs() {
+ pkgdesc="The Keybase filesystem"
+ url="https://keybase.io/docs/kbfs"
+ depends=('fuse' 'keybase')
+ install=kbfs.install
+
+ cd client-v${pkgver}
+
+ install -Dm755 -t "${pkgdir}"/usr/bin/ go/bin/{kbfsfuse,git-remote-keybase}
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ # more systemd activation
+ install -Dm644 packaging/linux/systemd/kbfs.service "$pkgdir"/usr/lib/systemd/user/kbfs.service
+}
+
+package_keybase-gui() {
+ pkgdesc="GUI frontend for GPG with keybase.io"
+ depends=('electron9' 'keybase' 'kbfs')
+
+ cd client-v${pkgver}/
+
+ install -Dm644 packaging/linux/x-saltpack.xml \
+ "${pkgdir}"/usr/share/mime/packages/x-saltpack.xml
+ install -Dm644 packaging/linux/keybase.desktop \
+ "${pkgdir}"/usr/share/applications/keybase.desktop
+ # more systemd activation
+ install -Dm644 packaging/linux/systemd/keybase.gui.service \
+ "${pkgdir}"/usr/lib/systemd/user/keybase.gui.service
+ # wrapper for electron
+ install -Dm755 "${srcdir}"/keybase-gui "${pkgdir}"/usr/bin/keybase-gui
+
+ install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+ for i in 16 32 128 256 512 ; do
+ install -Dm644 media/icons/Keybase.iconset/icon_${i}x${i}.png \
+ "${pkgdir}"/usr/share/icons/hicolor/${i}x${i}/apps/keybase.png
+ install -Dm644 media/icons/Saltpack.iconset/icon_${i}x${i}.png \
+ "${pkgdir}"/usr/share/icons/hicolor/${i}x${i}/mimetypes/application-x-saltpack.png
+ done
+ # ???
+ install -Dm644 media/icons/Keybase.iconset/icon_32x32 at 2x.png \
+ "${pkgdir}"/usr/share/icons/hicolor/64x64/apps/keybase.png
+ install -Dm644 media/icons/Keybase.iconset/icon_512x512 at 2x.png \
+ "${pkgdir}"/usr/share/icons/hicolor/1024x1024/apps/keybase.png
+
+ # the app itself
+ cd shared/desktop/build
+ rm -rf desktop/sourcemaps/
+ mkdir -p "${pkgdir}"/usr/share/keybase-app
+ cp -r * "${pkgdir}"/usr/share/keybase-app/
+}
Copied: keybase/repos/community-staging-x86_64/kbfs.install (from rev 722013, keybase/trunk/kbfs.install)
===================================================================
--- community-staging-x86_64/kbfs.install (rev 0)
+++ community-staging-x86_64/kbfs.install 2020-10-08 21:20:56 UTC (rev 722016)
@@ -0,0 +1,15 @@
+post_install() {
+ cat << '__EOF__'
+warning: the keybase-redirector is not included, so you will need to define
+your `keybase config` mountdir to something you like (or install the
+redirector on your own).
+
+See: https://github.com/keybase/client/issues/19840#issuecomment-533842074
+__EOF__
+}
+
+post_upgrade() {
+ if (( $(vercmp 4.7.1-1 $2) > 0 )); then
+ post_install
+ fi
+}
Copied: keybase/repos/community-staging-x86_64/keybase-gui (from rev 722013, keybase/trunk/keybase-gui)
===================================================================
--- community-staging-x86_64/keybase-gui (rev 0)
+++ community-staging-x86_64/keybase-gui 2020-10-08 21:20:56 UTC (rev 722016)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+keybase ctl init
+
+if ! keybase version --assert-matching >/dev/null 2>&1; then
+ echo "restarting outdated services..."
+ systemctl --user daemon-reload
+ systemctl --user restart keybase kbfs
+else
+ systemctl --user start keybase kbfs
+fi
+
+if [ $# -gt 0 ] || systemctl --user is-active --quiet keybase.gui; then
+ exec electron9 /usr/share/keybase-app "$@"
+else
+ systemctl --user import-environment KEYBASE_AUTOSTART
+ exec systemctl start --user --wait keybase.gui
+fi
More information about the arch-commits
mailing list