From 439dd5f40342a6e6fc859631b8181c153d111cd4 Mon Sep 17 00:00:00 2001 From: Miltiadis Kallianis Date: Thu, 15 Feb 2024 09:28:30 +0100 Subject: [PATCH 1/3] docs: make sure that CGO_ENABLED='1' Signed-off-by: Miltiadis Kallianis Signed-off-by: Miltiadis Kallianis --- install.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.md b/install.md index 3b308f0d..5080d29b 100644 --- a/install.md +++ b/install.md @@ -122,6 +122,14 @@ Skopeo has not yet been packaged for Windows. There is an [open feature request](https://github.com/containers/skopeo/issues/715) and contributions are always welcome. +## GO ENV settings + +In order for the system libraries to get compiled during the build process make sure that ```CGO_ENABLED='1'```. + +```bash +go env -w CGO_ENABLED='1' +``` + ## Container Images From 55abe69da7630b2fc022e98b5458614aba3daf41 Mon Sep 17 00:00:00 2001 From: Miltiadis Kallianis Date: Mon, 19 Feb 2024 12:26:30 +0100 Subject: [PATCH 2/3] update docs based on review Move docs under "Building without a container". Check instead of setting env variable. Provide alternative approach. Signed-off-by: Miltiadis Kallianis --- install.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/install.md b/install.md index 5080d29b..cbc0555f 100644 --- a/install.md +++ b/install.md @@ -122,15 +122,6 @@ Skopeo has not yet been packaged for Windows. There is an [open feature request](https://github.com/containers/skopeo/issues/715) and contributions are always welcome. -## GO ENV settings - -In order for the system libraries to get compiled during the build process make sure that ```CGO_ENABLED='1'```. - -```bash -go env -w CGO_ENABLED='1' -``` - - ## Container Images Skopeo container images are available at `quay.io/skopeo/stable:latest`. @@ -203,6 +194,12 @@ document generation can be skipped by passing `DISABLE_DOCS=1`: DISABLE_DOCS=1 make ``` +#### Additional prerequisites + +In order to dynamically link against system libraries and avoid compilation erros the ```CGO_ENABLED='1'``` flag must be enabled. You can easily check by ```go env | grep CGO_ENABLED```. + +An alternative would be to set the `BUILDTAGS=containers_image_openpgp` (this removes the dependency on `libgpgme` and its companion libraries). + ### Cross-compilation For cross-building skopeo, use the command `make bin/skopeo.OS.ARCH`, where OS represents From dbf465d6ea36dc3d306344539e0dea120c0d51fa Mon Sep 17 00:00:00 2001 From: Miltiadis Kallianis Date: Mon, 19 Feb 2024 12:31:07 +0100 Subject: [PATCH 3/3] fix typo Signed-off-by: Miltiadis Kallianis --- install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.md b/install.md index cbc0555f..813cebfc 100644 --- a/install.md +++ b/install.md @@ -196,7 +196,7 @@ DISABLE_DOCS=1 make #### Additional prerequisites -In order to dynamically link against system libraries and avoid compilation erros the ```CGO_ENABLED='1'``` flag must be enabled. You can easily check by ```go env | grep CGO_ENABLED```. +In order to dynamically link against system libraries and avoid compilation errors the ```CGO_ENABLED='1'``` flag must be enabled. You can easily check by ```go env | grep CGO_ENABLED```. An alternative would be to set the `BUILDTAGS=containers_image_openpgp` (this removes the dependency on `libgpgme` and its companion libraries).