From a9e52405a2335a9a9fcb105f7ff092df8a58f2e5 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 2 Mar 2021 15:29:09 -0800 Subject: [PATCH 1/5] Add CGO build instructions to contributing.md --- docs/CONTRIBUTING.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 38810c48..344f694d 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -16,18 +16,28 @@ to manage issues, etc. ## Building From Source +Clone this repository to get a bleeding-edge build, +or download the source archive for [the latest stable release](https://github.com/smallstep/certificates/releases/latest). + +### Building step-ca + The only prerequisites are [`go`](https://golang.org/) and make. To build from source: make bootstrap && make +### Building CGO step-ca (with PKCS#11 and YubiKey PIV support) + +To build the CGO version of `step-ca` you will need [`go`](https://golang.org/), make, gcc, pkg-config, and the [`libpcsclite-dev`](https://pcsclite.apdu.fr/) package. On Ubuntu: + + sudo apt update + sudo apt install -y make gcc libpcsclite-dev pkg-config + make bootstrap && make build GOFLAGS="" ## Asking Support Questions -Users and developers can ask questions over email (info@smallstep.com) or -[twitter](https://twitter.com/smallsteplabs). Please don't use the GitHub -issue tracker to ask questions. +Feel free to post a question on our [GitHub Discussions](https://github.com/smallstep/certificates/discussions) page, or find us on [Gitter](https://gitter.im/smallstep/community). ## Reporting Issues From 9248cfcc956d98c8e6da36a0b914ffcf1512f485 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 2 Mar 2021 15:30:30 -0800 Subject: [PATCH 2/5] Update README with build from source link --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index fbe0a244..2d79bdfe 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ ACME is the protocol used by Let's Encrypt to automate the issuance of HTTPS cer These instructions will install an OS specific version of the `step-ca` binary on your local machine. +Want to build from source? See [our contributor's guide](docs/contributing.md) + ### Mac OS Install `step` and `step-ca` together, via [Homebrew](https://brew.sh/): From b4d2368dfeed08fce414d69c015bc9bc2ef349a0 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 2 Mar 2021 15:31:16 -0800 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2d79bdfe..b28422cd 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ ACME is the protocol used by Let's Encrypt to automate the issuance of HTTPS cer These instructions will install an OS specific version of the `step-ca` binary on your local machine. -Want to build from source? See [our contributor's guide](docs/contributing.md) +Want to build from source? See [our contributor's guide](./docs/CONTRIBUTING.md) ### Mac OS From c67531134ada65a8df0b04c3259ee19f3ad0b696 Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Tue, 2 Mar 2021 15:33:35 -0800 Subject: [PATCH 4/5] Update CONTRIBUTING.md --- docs/CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 344f694d..9a119f7b 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -19,7 +19,7 @@ to manage issues, etc. Clone this repository to get a bleeding-edge build, or download the source archive for [the latest stable release](https://github.com/smallstep/certificates/releases/latest). -### Building step-ca +### Build a standard `step-ca` The only prerequisites are [`go`](https://golang.org/) and make. @@ -27,7 +27,9 @@ To build from source: make bootstrap && make -### Building CGO step-ca (with PKCS#11 and YubiKey PIV support) +Find your binaries in `bin/`. + +### Alternative: Build a CGO `step-ca` (with PKCS#11 and YubiKey PIV support) To build the CGO version of `step-ca` you will need [`go`](https://golang.org/), make, gcc, pkg-config, and the [`libpcsclite-dev`](https://pcsclite.apdu.fr/) package. On Ubuntu: @@ -35,6 +37,8 @@ To build the CGO version of `step-ca` you will need [`go`](https://golang.org/), sudo apt install -y make gcc libpcsclite-dev pkg-config make bootstrap && make build GOFLAGS="" +Find your binaries in `bin/`. + ## Asking Support Questions Feel free to post a question on our [GitHub Discussions](https://github.com/smallstep/certificates/discussions) page, or find us on [Gitter](https://gitter.im/smallstep/community). From 35be06f4aae400ab629e81e80f6a3754591772fe Mon Sep 17 00:00:00 2001 From: Carl Tashian Date: Mon, 8 Mar 2021 13:54:55 -0800 Subject: [PATCH 5/5] Amendments to CONTRIBUTING doc --- docs/CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 9a119f7b..93749026 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -29,15 +29,47 @@ To build from source: Find your binaries in `bin/`. -### Alternative: Build a CGO `step-ca` (with PKCS#11 and YubiKey PIV support) +### Build `step-ca` using CGO -To build the CGO version of `step-ca` you will need [`go`](https://golang.org/), make, gcc, pkg-config, and the [`libpcsclite-dev`](https://pcsclite.apdu.fr/) package. On Ubuntu: +#### The CGO build enables PKCS #11 and YubiKey PIV support - sudo apt update - sudo apt install -y make gcc libpcsclite-dev pkg-config - make bootstrap && make build GOFLAGS="" +To build the CGO version of `step-ca`, you will need [`go`](https://golang.org/), make, and a C compiler. -Find your binaries in `bin/`. +You'll also need PCSC support on your operating system, as required by the `go-piv` module. +On Linux, the [`libpcsclite-dev`](https://pcsclite.apdu.fr/) package provides PCSC support. +On macOS and Windows, PCSC support is built into the OS. + +#### 1. Install PCSC support + +On Debian-based distributions, run: + +```shell +sudo apt-get install libpcsclite-dev +``` + +On Fedora: + +```shell +sudo yum install pcsc-lite-devel +``` + +On CentOS: + +``` +sudo yum install 'dnf-command(config-manager)' +sudo yum config-manager --set-enabled PowerTools +sudo yum install pcsc-lite-devel +``` + +#### 2. Build `step-ca` + +To build `step-ca`, clone this repository and run the following: + +```shell +make bootstrap && make build GOFLAGS="" +``` + +When the build is complete, you will find binaries in `bin/`. ## Asking Support Questions