mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+github.com/containers/skopeo (#3465)
* +github.com/containers/skopeo Closes #2695 * Speed up test * Use hello-world image in all tests * Clarify build instructions * Disable man pages generation * make and cc now handled by brewkit * Use patch instead of git apply * Pin patch to a commit id * Use /releases/tags * ops, alpine.tar --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
b233de92ed
commit
0991f949d0
1 changed files with 41 additions and 0 deletions
41
projects/github.com/containers/skopeo/package.yml
Normal file
41
projects/github.com/containers/skopeo/package.yml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/containers/skopeo/archive/v{{ version }}.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
|
||||||
|
versions:
|
||||||
|
github: containers/skopeo/releases/tags
|
||||||
|
|
||||||
|
provides:
|
||||||
|
- bin/skopeo
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
curl.se/ca-certs: "*"
|
||||||
|
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
go.dev: "^1.18"
|
||||||
|
curl.se: "*"
|
||||||
|
gnu.org/patch: "*"
|
||||||
|
env:
|
||||||
|
DISABLE_DOCS: 1 # disables the generation of man pages with go-md2man
|
||||||
|
script: |
|
||||||
|
# bundles default-policy.json into the binary to provide a working out-of-the-box experience
|
||||||
|
# https://github.com/containers/skopeo/pull/2014
|
||||||
|
curl -fsSL https://github.com/containers/skopeo/commit/fb180f03ca43ea7a9130a48639f483fa46cffe50.diff |
|
||||||
|
patch -p1
|
||||||
|
|
||||||
|
# https://github.com/containers/skopeo/blob/2d1ae1fdb3d88347eec8a17d4415a964ce86d54f/install.md#building-a-static-binary
|
||||||
|
CGO_ENABLED=0 make BUILDTAGS=containers_image_openpgp GO_DYN_FLAGS=
|
||||||
|
|
||||||
|
mkdir -p '{{prefix}}/bin'
|
||||||
|
mv -f ./bin/skopeo '{{prefix}}/bin'
|
||||||
|
|
||||||
|
test:
|
||||||
|
script: |
|
||||||
|
skopeo --version | tee /dev/stderr | grep -q -w '{{ version }}'
|
||||||
|
|
||||||
|
skopeo --override-os linux inspect docker://hello-world | tee /dev/stderr |
|
||||||
|
grep -q -w 'docker.io/library/hello-world'
|
||||||
|
|
||||||
|
skopeo --override-os linux copy docker://hello-world docker-archive:hello-world.tar
|
||||||
|
test -f hello-world.tar
|
Loading…
Reference in a new issue