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

WIP: RN 76 #28126

Open
wants to merge 43 commits into
base: nojima/HOTPOT-HOTPOT-expo-51-mergedown1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
01e8d2b
WIP
chrisnojima Oct 24, 2024
9485f88
WIP
chrisnojima Oct 24, 2024
1e9befe
WIP
chrisnojima Nov 15, 2024
1705234
WIP
chrisnojima Nov 15, 2024
9391775
WIP
chrisnojima Nov 15, 2024
5eae8d6
WIP
chrisnojima Nov 15, 2024
a91dfa0
WIP
chrisnojima Nov 20, 2024
cd7d6fd
WIP
chrisnojima Nov 21, 2024
452cbc0
WIP
chrisnojima Nov 21, 2024
6feb006
WIP
chrisnojima Nov 22, 2024
bf7e329
WIP
chrisnojima Nov 26, 2024
8f787b7
WIP
chrisnojima Nov 26, 2024
a8a00ef
WIP
chrisnojima Nov 27, 2024
36c6625
WIP
chrisnojima Nov 27, 2024
9da5f3b
WIP
chrisnojima Nov 27, 2024
dd9dac6
WIP
chrisnojima Nov 27, 2024
396979b
react scan try (#28254)
chrisnojima Dec 2, 2024
1d94b66
WIP
chrisnojima Dec 2, 2024
ace9cf1
WIP
chrisnojima Dec 2, 2024
ca25859
WIP
chrisnojima Dec 3, 2024
d7cf930
WIP
chrisnojima Dec 4, 2024
2c5c600
WIP
chrisnojima Dec 4, 2024
0c1fa4c
WIP
chrisnojima Dec 5, 2024
9c6b00c
WIP
chrisnojima Dec 5, 2024
0594f86
WIP
chrisnojima Dec 5, 2024
33dc789
WIP
chrisnojima Dec 5, 2024
49d1cda
WIP
chrisnojima Dec 6, 2024
b403106
WIP
chrisnojima Dec 17, 2024
7d3df82
WIP
chrisnojima Dec 18, 2024
34cb6d9
linux client build on arm64 host (#28278)
mmaxim Dec 18, 2024
9076189
WIP
chrisnojima Dec 19, 2024
bbf449c
WIP
chrisnojima Dec 20, 2024
08ff760
WIP
chrisnojima Dec 20, 2024
bbaa2bc
WIP
chrisnojima Dec 20, 2024
0065d42
WIP
chrisnojima Dec 20, 2024
8490502
WIP
chrisnojima Jan 3, 2025
e2b2f5e
WIP
chrisnojima Jan 3, 2025
d808f54
WIP
chrisnojima Jan 6, 2025
b45a041
WIP
chrisnojima Jan 7, 2025
d2d4a37
WIP
chrisnojima Jan 8, 2025
75a915b
bump ver (#28291)
chrisnojima Jan 10, 2025
99430f9
Merge remote-tracking branch 'origin/master' into nojima/HOTPOT-76-again
chrisnojima Jan 10, 2025
674e10c
WIP
chrisnojima Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/libkb/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
package libkb

// Version is the current version (should be MAJOR.MINOR.PATCH)
const Version = "6.5.0"
const Version = "6.5.1"
2 changes: 1 addition & 1 deletion packaging/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ LABEL maintainer="Keybase <[email protected]>"
# - unzip because electron6 packager requires it
RUN apt-get update
RUN apt-get install -y fakeroot reprepro rpm createrepo-c git wget \
build-essential curl s3cmd gnupg2 unzip rsync
build-essential curl s3cmd gnupg2 unzip rsync gcc-x86-64-linux-gnu

# Install nodejs and yarn. (Note that this depends on curl above.)
RUN mkdir -p /etc/apt/keyrings
Expand Down
33 changes: 27 additions & 6 deletions packaging/linux/build_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -euox pipefail

# check host arch
is_arm64_host() {
[[ $(uname -m) == "arm64" ]] || [[ $(uname -m) == "aarch64" ]]
}

here="$(dirname "${BASH_SOURCE[0]}")"
this_repo="$(git -C "$here" rev-parse --show-toplevel ||
echo -n "$GOPATH/src/github.com/keybase/client")"
Expand Down Expand Up @@ -128,11 +133,21 @@ build_one_architecture() {
(cd "$client_dir" && go build -tags "$go_tags" -ldflags "$ldflags_kbnm" -buildmode="$buildmode" -o \
"$layout_dir/usr/bin/kbnm" github.com/keybase/client/go/kbnm)

# Write allowlists into the overlay. Note that we have to explicitly set USER
# here, because docker doesn't do it by default, and so otherwise the
# CGO-disabled i386 cross platform build will fail because it's unable to
# find the current user.
USER="$(whoami)" KBNM_INSTALL_ROOT=1 KBNM_INSTALL_OVERLAY="$layout_dir" "$layout_dir/usr/bin/kbnm" install

if is_arm64_host ; then
echo "is_arm64_host, building native kbnm for install"

(cd "$client_dir" && GOARCH=arm64 CC=gcc CXX=g++ go build -tags "$go_tags" -ldflags "$ldflags_kbnm" -buildmode="$buildmode" -o \
"$layout_dir/usr/bin/kbnm_arm64" github.com/keybase/client/go/kbnm)
USER="$(whoami)" KBNM_INSTALL_ROOT=1 KBNM_INSTALL_OVERLAY="$layout_dir" "$layout_dir/usr/bin/kbnm_arm64" install
rm "$layout_dir/usr/bin/kbnm_arm64"
else
# Write allowlists into the overlay. Note that we have to explicitly set USER
# here, because docker doesn't do it by default, and so otherwise the
# CGO-disabled i386 cross platform build will fail because it's unable to
# find the current user.
USER="$(whoami)" KBNM_INSTALL_ROOT=1 KBNM_INSTALL_OVERLAY="$layout_dir" "$layout_dir/usr/bin/kbnm" install
fi

# Build Electron.
echo "Building Electron client for $electron_arch..."
Expand Down Expand Up @@ -195,7 +210,13 @@ if [ -n "${KEYBASE_BUILD_ARM_ONLY:-}" ] ; then
fi

if [ -z "${KEYBASE_SKIP_64_BIT:-}" ] ; then
echo "Keybase: Building for x86-64"
if is_arm64_host ; then
echo "Keybase: Building for x86-64 (arm64 host cross compile)"
export CC=x86_64-linux-gnu-gcc
export CXX=x86_64-linux-gnu-g++
else
echo "Keybase: Building for x86-64"
fi
export GOARCH=amd64
export debian_arch=amd64
export electron_arch=x64
Expand Down
29 changes: 0 additions & 29 deletions packaging/linux/tuxbot/Vagrantfile

This file was deleted.

1 change: 1 addition & 0 deletions packaging/linux/tuxbot/Vagrantfile
29 changes: 29 additions & 0 deletions packaging/linux/tuxbot/Vagrantfile.amd64
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Vagrant.configure("2") do |config|
config.vm.box = "debian/bullseye64"
config.vm.disk :disk, size: "100GB", primary: true
config.vm.provider "virtualbox" do |vb|
vb.memory = "24576"
end
config.vm.provision "shell", path: "provision_tuxbot_disk", privileged: true
config.vm.provision "shell", path: "provision_tuxbot_root", privileged: true
config.vm.provision "shell", path: "provision_tuxbot_user", privileged: false
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/cleanup",
destination: "~/cleanup", run: "always"
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/restartdocker",
destination: "~/restartdocker", run: "always"
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/ssh_config",
destination: "~/.ssh/config", run: "always"
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/ssh_known_hosts",
destination: "~/.ssh/known_hosts", run: "always"
config.vm.provision "file",
source: "~/tuxbot_vagrant_env",
destination: "~/tuxbot.env",
run: "always"
config.vm.synced_folder ".", "/vagrant"
config.vm.provision "shell", path: "provision_tuxbot_env", privileged: true, run: "always"
config.vm.provision "docker"
end
28 changes: 28 additions & 0 deletions packaging/linux/tuxbot/Vagrantfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Vagrant.configure("2") do |config|
config.vm.box = "bento/debian-11"
config.vm.provider "vmware_desktop" do |v|
v.gui = true
end
config.vm.provision "shell", path: "provision_tuxbot_disk.arm64", privileged: true
config.vm.provision "shell", path: "provision_tuxbot_root.arm64", privileged: true
config.vm.provision "shell", path: "provision_tuxbot_user.arm64", privileged: false
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/cleanup",
destination: "~/cleanup", run: "always"
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/restartdocker",
destination: "~/restartdocker", run: "always"
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/ssh_config",
destination: "~/.ssh/config", run: "always"
config.vm.provision "file",
source: "#{ENV['GOPATH']}/src/github.com/keybase/client/packaging/linux/tuxbot/ssh_known_hosts",
destination: "~/.ssh/known_hosts", run: "always"
config.vm.provision "file",
source: "~/tuxbot_vagrant_env",
destination: "~/tuxbot.env",
run: "always"
config.vm.synced_folder ".", "/vagrant"
config.vm.provision "shell", path: "provision_tuxbot_env", privileged: true, run: "always"
config.vm.provision "docker"
end
5 changes: 5 additions & 0 deletions packaging/linux/tuxbot/provision_tuxbot_disk.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -euox pipefail

export DEBIAN_FRONTEND=noninteractive
apt-get --allow-releaseinfo-change update
22 changes: 22 additions & 0 deletions packaging/linux/tuxbot/provision_tuxbot_root.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
set -euox pipefail

export DEBIAN_FRONTEND=noninteractive

apt-get --allow-releaseinfo-change update
apt-get install -yq git curl vim python3-pip jq

GOLANG_VERSION=1.21.6
GOLANG_DOWNLOAD_URL=https://dl.google.com/go/go$GOLANG_VERSION.linux-arm64.tar.gz
GOLANG_DOWNLOAD_SHA256=e2e8aa88e1b5170a0d495d7d9c766af2b2b6c6925a8f8956d834ad6b4cacbd9a
wget "$GOLANG_DOWNLOAD_URL" -O /root/go.tar.gz
echo "$GOLANG_DOWNLOAD_SHA256 /root/go.tar.gz" | sha256sum --check --status --strict -
tar -C /usr/local -xzf /root/go.tar.gz
ln -sf /usr/local/go/bin/go /usr/bin/go
rm /root/go.tar.gz

pip3 install s3cmd
apt-get -yq install libssl-dev libffi-dev
pip3 install triplesec

usermod -aG systemd-journal vagrant
37 changes: 37 additions & 0 deletions packaging/linux/tuxbot/provision_tuxbot_user.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euox pipefail

KBCLID="$HOME/go/src/github.com/keybase/client"
TUXBOTD="$KBCLID/packaging/linux/tuxbot"

# clone in gopath for bot
mkdir -p "$HOME/go/src/github.com/keybase"
git clone https://github.com/keybase/client.git "$HOME/go/src/github.com/keybase/client"
cd "$KBCLID/go"
go install -tags "prerelease production" ./keybase
sudo cp $HOME/go/bin/keybase /usr/bin
go install -tags "prerelease production" ./kbfs/kbfsfuse
sudo cp $HOME/go/bin/kbfsfuse /usr/bin
(
# install deps
cd "$TUXBOTD/bot"
git checkout master
go mod tidy
)
systemctl --user link "$KBCLID/packaging/linux/systemd/keybase.service"
systemctl --user link "$KBCLID/packaging/linux/systemd/kbfs.service"
systemctl --user link "$TUXBOTD/tuxbot.service"
systemctl --user link "$TUXBOTD/nightly.service"
systemctl --user link "$TUXBOTD/nightly.timer"
systemctl --user link "$TUXBOTD/docker-cleanup.service"
systemctl --user link "$TUXBOTD/docker-cleanup.timer"
systemctl --user daemon-reload
systemctl --user enable "$TUXBOTD/nightly.timer"
systemctl --user enable "$TUXBOTD/docker-cleanup.timer"

keybase config set -b enable_bot_lite_mode true
keybase config set kbfs.mode constrained
systemctl --user enable --now keybase.service kbfs.service

# clone for the build
git clone https://github.com/keybase/client.git "$HOME/client"
Loading