Skip to content

Commit

Permalink
Add build-podman.sh
Browse files Browse the repository at this point in the history
Add a script to clone deps and build with podman.
  • Loading branch information
mchack-work authored and dehanj committed Oct 10, 2023
1 parent 1e6ef79 commit 4b687ec
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,22 @@ You have two options, either our OCI image
`ghcr.io/tillitis/tkey-builder` for use with a rootless podman setup,
or native tools.

With podman you should be able to use:

```
$ ./build-podman.sh
```

which requires at least `git` and `make` besides podman. See below for
setting things up.

With native tools you should be able to use our build script:

```
$ ./build.sh
```

which also clones and builds the [TKey device
Both of these also clones and builds the [TKey device
libraries](https://github.com/tillitis/tkey-libs) and the [signer
device app](https://github.com/tillitis/tkey-device-signer) first.

Expand All @@ -88,9 +97,9 @@ We provide an OCI image with all tools you can use to build the
tkey-libs and the apps.

Like above you need to clone `tkey-libs` and the `tkey-device-signer`
first. This repo and those have `podman` targets. So `make podman`
should work in all of them. Be sure to copy the signer to this repo
before building here.
first. All repos have `podman` make targets so `make podman` should
work in all of them. Be sure to copy the signer to this repo before
building here.

This assumes a working rootless Podman. On Ubuntu 22.10, running

Expand Down
24 changes: 24 additions & 0 deletions build-podman.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#! /bin/sh

set -e

if [ -d ../tkey-libs ]
then
(cd ../tkey-libs; git checkout v0.0.1)
else
git clone -b v0.0.1 https://github.com/tillitis/tkey-libs.git ../tkey-libs
fi

if [ -d ../tkey-device-signer ]
then
(cd ../tkey-device-signer; git checkout v0.0.7)
else
git clone -b v0.0.7 https://github.com/tillitis/tkey-device-signer.git ../tkey-device-signer
fi

make -C ../tkey-libs podman
make -C ../tkey-device-signer podman

cp ../tkey-device-signer/signer/app.bin signer.bin

make podman
1 change: 1 addition & 0 deletions tools/spdx-ensure
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ missingok_files=(
.gitignore
.golangci.yml
build.sh
build-podman.sh
LICENSE
Makefile
README.md
Expand Down

0 comments on commit 4b687ec

Please sign in to comment.