Skip to content

Commit a656005

Browse files
committed
update linux packaging readme
1 parent 6391fa3 commit a656005

3 files changed

Lines changed: 34 additions & 22 deletions

File tree

‎CODEOWNERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
shared/* @keybase/react-hackers
2+
packaging/linux/* @keybase/linux-devs

‎packaging/linux/README.md‎

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
1-
## Running a build
1+
# Keybase Linux Packaging
2+
See usage and technical docs at https://keybase.io/docs/linux-user-guide.
3+
GitHub issues, bug reports, and pull requests welcome, especially if something
4+
small can be changed to support your distribution or setup.
25

3-
Clone kbfs adjacent to client (this repo). The exact path doesn't
4-
matter.
6+
If you make changes to a shell file, *please run
7+
[shellcheck](https://www.shellcheck.net/)* and make sure there are no
8+
additional warnings!
59

6-
Get all the credentials. Run test_all_credentials.sh in this directory
7-
to see what you're missing and check that everything's working. Note
8-
that this requires the `s3cmd` tool to talk to S3. The credentials are
9-
in another repository (ask Max about where that is), which has
10-
instructions for installing them.
10+
## External packagers
11+
The main cross-platform build file is `build_binaries.sh`.
1112

12-
Set up docker. The build image will be created automatically, so long as
13-
the basics like `docker ps` are working.
13+
You can set some environment variables to control what gets built.
14+
`KEYBASE_BUILD_ARM_ONLY=1` - builds arm64 only
15+
`KEYBASE_SKIP_64_BIT=1` - builds 32 bit only
16+
`KEYBASE_SKIP_32_BIT=1` - builds 64 bit only
1417

15-
Once that's set up, here's the command to kick off a build.
18+
The default is to build both 32-bit and 64-bit.
1619

17-
./docker_build.sh prerelease origin/master
20+
There are test Dockerfiles and a helpful README at
21+
https://github.com/keybase/client/tree/master/packaging/linux/test that you can
22+
use to make sure your changes work correctly on different systems.
1823

19-
If the code signing GPG key is password protected in your setup (which
20-
it should be, unless you're the automated build machine), the build will
21-
probably prompt you to enter that passphrase twice, once to export it
22-
from your local keyring and again to import it inside the docker
23-
container.
24+
## Internal packagers
25+
`build_and_push_packages.sh` also pushes them to our own apt, rpm, and AUR
26+
repos, but requires credentials that can be tested with `test_all_credentials.sh`
27+
(note: `s3cmd` required).
2428

25-
You can replace `origin/master` with any commit or branch name, to
29+
You can also build with docker: install docker and start the daemon if necessary.
30+
31+
```bash
32+
./docker_build.sh prerelease HEAD
33+
```
34+
35+
You can replace `HEAD` with any commit or branch name, to
2636
choose what gets built. The `prerelease` target is kind of a legacy
2737
name, and it's required.
2838

@@ -32,16 +42,17 @@ be corrupt repo metadata for everyone on Ubuntu/Deb/RPM.
3242

3343
If you need to forcibly skip CI, set NOWAIT=1 in the environment.
3444

35-
If you want to test the build without pushing live, set KEYBASE_DRY_RUN=1 in
45+
If you want to test the build without pushing live, set `KEYBASE_DRY_RUN=1` in
3646
the environment. Be very careful not to typo that variable. You should see
3747
"This build+push is a DRY RUN." after all the git fetches in the build output,
3848
if you did this right. A dry run will push the package to the s3 bucket
3949
jack-testing.keybase.io, but this is not exposed on the internet. You
4050
could copy the repo to somewhere in prerelease.keybase.io to test a `yum
4151
install`, for example.
4252

43-
## Making changes
53+
To make a nightly build, add `KEYBASE_NIGHTLY=1` to the environment.
4454

55+
#### Making changes to the Dockerfile
4556
The most common change is bumping the version of Go we're using. Do that
4657
in the Dockerfile in this directory. Whenenever you make changes that
4758
affect the docker image, you also need to bump its version number in
@@ -52,7 +63,6 @@ docker_build.sh. Look for the line that looks like this:
5263
Increment that number, so that everyone who's running these builds
5364
automatically rebuilds the docker image with your change.
5465

55-
## Setting up the automated slackbot
56-
66+
#### Setting up the automated slackbot
5767
Clone https://github.com/keybase/slackbot and follow the instructions in
5868
systemd/README.md.

‎packaging/linux/run_keybase‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ KEYBASE_NO_KBFS="${KEYBASE_NO_KBFS:-0}"
196196
KEYBASE_AUTOSTART="${KEYBASE_AUTOSTART:-0}"
197197
KEYBASE_KILL="${KEYBASE_KILL:-0}"
198198
# NOTE: Make sure to update the Linux User Guide doc if you change this!
199+
# http://keybase.io/docs/linux-user-guide
199200
while getopts "afghk" flag; do
200201
case $flag in
201202
a) KEYBASE_AUTOSTART=1;;

0 commit comments

Comments
 (0)