Commit graph

13 commits

Author SHA1 Message Date
Trent Clarke a72d1c7285
Adds CI hooks for GLibc compatibility check (#15547)
Adds the GCB build yaml for controlling the build, and updates the test script
to work in both the GCB environment and on a local dev machine.

Also changes the centos buildbox to leave the default user as root. When
GCB mounts the workspace into the container, the source code is owned
by root, and there is no way to change this. This means that the build will
fail when the non-root user specified in the build image attempt to write files
into the workspace. Setting the root user fixes this.

See-Also: #15186
2022-08-23 10:02:35 +10:00
Edoardo Spadolini 0985151b02
Build-time cbindgen (#14177) 2022-07-19 20:10:27 +00:00
Trent Clarke e3ced072b7
Trims the buildbox (#14036)
- Enables the docker BuildKit in an attempt to speed up builds
 - Trims slightly under 2GB off image size
 - Break more dependencies out into separate build stages
 - Adds some simple supply-chain protections for dependencies sourced
   via git. The Docker build now checks that the commit SHAs are what
   we expect, and not just assume that the tags haven't changed.
 - Moves the `cbindgen` build to a stage to avoid pulling in extra
   dependencies not needed for the Teleport build
 - Combines the `gcloud` and firestore emulator install into one step to
   reduce the layer count.
 - Ports some of the above the Centos7 Dockerfile.
2022-07-07 12:28:35 +10:00
Jakub Nyckowski d03f8db0ca
Use CentOS 7 for building release binaries (#14062)
Switch to CenOS 7 as a base for Teleport releases.

Co-authored-by: Roman Tkachenko <roman@goteleport.com>
2022-07-02 02:11:37 +00:00
Zac Bergquist 61463166c1
Remove tctl roletester (#13863)
This code was unmaintained, created issues with our build system,
and didn't actually match the behavior of Teleport's RBAC engine.

We will revisit this functionality in the future when we investigate
"acess policies as code."
2022-06-25 04:01:21 +00:00
Jakub Nyckowski 8470e473fa
Remove Clang from CentOS 7 Docker buildbox (#13614) 2022-06-17 22:14:34 +00:00
Zac Bergquist 8c7eb94c4b
Fix CentOS 7 builds after upgrading prost (#13579)
Recent Rust dependency upgrades include a newer version of prost.
This new version no longer ships embedded protoc binaries, and
instead tries to build protoc from source. This would require us
to install cmake on our buildboxes. We want to avoid this and
instead leverage the version of protoc already installed.

This change was made to the standard buildbox, but the CentOS 7
buildbox was missed.

Additionally, I noticed that Rust was installed in
Dockerfile-centos7-fips, but not in Dockerfile-fips, which means
the FIPS binaries have different functionality depending on which
version you use. To correct this, I removed Rust from the CentOS 7
FIPS builds (since the Rust features are not FIPS compliant anyway).
2022-06-17 15:05:39 +00:00
Jakub Nyckowski c9277ab8f0
Add libbpf and Clang to Centos 7 image (#13261)
Enable BPF for CentOS 7 builds.

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2022-06-15 18:54:02 +00:00
Alan Parra 7567c5502d
Build tsh with static libfido2 for macOS (#13001)
Add a script to build libfido2 (and its dependencies) on macOS and enable FIDO2
static builds.

I decided to build all dependencies instead of pulling from Homebrew for a few
reasons:

1. There is no libcbor.a in a brew package
2. This captures library versions within the Teleport source code, allowing us
   to build binaries against different versions of libfido2 (and its
   dependencies).

I've also bumped libfido2 to 1.11.0. I've been running it locally and we are
still pre-release, so it seems like a good time to do it.
(See https://developers.yubico.com/libfido2/Release_Notes.html.)

#9160

* Build libfido2 and dependencies for macOS
* Build tsh with static fido2 on Drone
* Bump libfido2 versions in all builds
* Attempt to appease linters
* Use temp dirs inside LIB_CACHE
* Move LIB_CACHE outside of HOME

HOME is reassigned in macOS builders, but we want a "stable" cache
directory. /tmp is used by build-package.sh and build-pkg-tsh.sh.

* Rename script to build-fido2-macos.sh
* Regenerate Drone files
2022-05-31 14:50:56 +00:00
Alan Parra af3488211c
Reinstate FIDO2 builds for amd64/Centos7 and use pkg-config (#12093)
Reinstates Linux/amd64 and Centos7/amd64 builds using libfido2, now hidden
behind an explicit FIDO2 flag (similarly to FIPS).

This PR pulls in gravitational/go-libfido2#4 and adds the required pkg-config
setup so we can perform both dynamic (mostly testing) and static (tsh) builds.
Additionally, pkg-config is now the gateway for whether we run libfido2-related
tests (which should always happen in CI).

#9160

* Re-enable libfido2 builds for amd64 and Centos7
* Use pkg-config to build tsh with libfido2
* Install Centos7 libudev-zero to /usr/local/lib64
* Update gravitational/go-libfido2
* Remove /usr/local/lib from Centos PKG_CONFIG_PATH
2022-04-28 16:32:02 +00:00
Alan Parra 9c89c00806
Build tsh with static libfido2 in buildbox and Centos7 (#11849)
Build `tsh` with static `libfido2`, `libcbor`,`libcrypto` and `libudev-zero`.

Dockerfiles for buildbox and Centos7 changed. FIPS and macOS to be addressed at
a later date.

Add the `tsh fido2 diag` hidden command for ease of testing.

#9160

* Update go-libfido2 and tidy modules
* Add a fido2 diagnostic command to tsh
* Add a few build artifacts to .gitignore
* Build tsh with static libfido2 in buildbox
* Build tsh with static libfido2 in centos7
* Add a few relevant cmake flags
* Use illiliti/libudev-zero
* Do multi-stage build on centos7, image tweaks
* Add `make enter/centos7`
* s/OFf/OFF/g
2022-04-18 14:07:10 +00:00
Trent Clarke 3beb29832f
Upgrade buildbox to go 1.17.7 & tag as teleport10 (#10611)
Prior to this patch the teleport buildbox version has been tagged with the Go version for the current release. This bit us during the Teleport 9 development cycle, as both Teleport 8 and 9 use the same version of Go but require different versions of Rust, and we were unable to distinguish between the 2 buildbox versions.

At the time, Teleport 8 was individually patched to create a new `teleport8` buildbox tag, decoupling the buildbox version from the Go version. This was never ported into master and now we find the teleport 9 branch sharing the same buildbox tag as master.

This patch forward-ports all the changes made to `branch/v8` and updates them for master, creating a new `teleport10` buildbox tag. The idea is that we will create a new tag for teleport11 at the same time the release branch for Teleport 10 is mad at some point in the future.

Once this is merged, Drone will create and push new buildbox images, which will become available for CI. A subsequent patch will update the CI scripts to use the new `teleport10` buildbox images.
2022-03-01 15:31:46 +11:00
Zac Bergquist 6808d6acb4 Create separate builds for CentOS7 (+fips)
Add new buildboxes for centos7 and centos7-fips.

For now, we will continue to support both CentOS 6 and 7.
Eventually we will drop support for CentOS 6, and the only
supported CentOS builds will be these new CentOS 7 builds.

Fixes #9028
2021-12-02 10:30:03 -07:00