nixbot

builds

succeeded skopeo-1.24.1 checks.x86_64-linux.devshell-default · build #1756 · raw

unpackPhase
1unpacking source archive /nix/store/94b2i5k17351kyhbcw1l636hbsrm66wy-source2source root is source
buildPhase
3diff --git a/image/transports/alltransports/alltransports.go b/image/transports/alltransports/alltransports.go4--- a/image/transports/alltransports/alltransports.go5+++ b/image/transports/alltransports/alltransports.go6@@ -18,6 +18,7 @@7 _ "go.podman.io/image/v5/openshift"8 _ "go.podman.io/image/v5/sif"9 _ "go.podman.io/image/v5/tarball"10+ _ "go.podman.io/image/v5/nix"11 // The docker-daemon transport is registeredy by docker_daemon*.go12 // The storage transport is registered by storage*.go13 )14--- /dev/null15+++ b/image/nix/transport.go16@@ -0,0 +1,206 @@17+package nix18+19+import (20+ "context"21+ "encoding/json"22+ "fmt"23+ "go.podman.io/image/v5/docker/reference"24+ "go.podman.io/image/v5/image"25+ "go.podman.io/image/v5/manifest"26+ "go.podman.io/image/v5/transports"27+ "go.podman.io/image/v5/types"28+ "github.com/nlewo/nix2container/nix"29+ nixtypes "github.com/nlewo/nix2container/types"30+ digest "github.com/opencontainers/go-digest"31+ imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1"32+ "github.com/pkg/errors"33+ "io"34+)35+36+func init() {37+ transports.Register(Transport)38+}39+40+// Transport is an ImageTransport for nix2container JSON image specification.41+var Transport = nixTransport{}42+43+type nixTransport struct{}44+45+func (t nixTransport) Name() string {46+ return "nix"47+}48+49+type nixReference struct {50+ path string51+ nixImage nixtypes.Image52+}53+54+// ParseReference converts a string, which should not start with the ImageTransport.Name prefix, into an ImageReference.55+func (t nixTransport) ParseReference(reference string) (types.ImageReference, error) {56+ nixImage, err := nix.NewImageFromFile(reference)57+ if err != nil {58+ return nil, err59+ }60+ imageReference := nixReference{61+ path: reference,62+ nixImage: nixImage,63+ }64+ return imageReference, nil65+}66+67+// ValidatePolicyConfigurationScope checks that scope is a valid name for a signature.PolicyTransportScopes keys68+// (i.e. a valid PolicyConfigurationIdentity() or PolicyConfigurationNamespaces() return value).69+// It is acceptable to allow an invalid value which will never be matched, it can "only" cause user confusion.70+// scope passed to this function will not be "", that value is always allowed.71+func (t nixTransport) ValidatePolicyConfigurationScope(scope string) error {72+ // See the explanation in archiveReference.PolicyConfigurationIdentity.73+ return errors.New(`nix: does not support any scopes except the default "" one`)74+}75+76+// StringWithinTransport returns a string representation of the reference, which MUST be such that77+// reference.Transport().ParseReference(reference.StringWithinTransport()) returns an equivalent reference.78+func (ref nixReference) StringWithinTransport() string {79+ return fmt.Sprintf("%s", ref.path)80+}81+82+func (ref nixReference) Transport() types.ImageTransport {83+ return Transport84+}85+86+// DeleteImage deletes the named image from the registry, if supported.87+func (ref nixReference) DeleteImage(ctx context.Context, sys *types.SystemContext) error {88+ return errors.New("Deleting images not implemented for nix: images")89+}90+91+// DockerReference returns a Docker reference associated with this reference92+// (fully explicit, i.e. !reference.IsNameOnly, but reflecting user intent,93+// not e.g. after redirect or alias processing), or nil if unknown/not applicable.94+func (ref nixReference) DockerReference() reference.Named {95+ return nil96+}97+98+// NewImage returns a types.ImageCloser for this reference, possibly specialized for this ImageTransport.99+// The caller must call .Close() on the returned ImageCloser.100+// NOTE: If any kind of signature verification should happen, build an UnparsedImage from the value returned by NewImageSource,101+// verify that UnparsedImage, and convert it into a real Image via image.FromUnparsedImage.102+// WARNING: This may not do the right thing for a manifest list, see image.FromSource for details.103+func (ref nixReference) NewImage(ctx context.Context, sys *types.SystemContext) (types.ImageCloser, error) {104+ src, err := newImageSource(ctx, sys, ref)105+ if err != nil {106+ return nil, err107+ }108+ return image.FromSource(ctx, sys, src)109+}110+111+// NewImageSource returns a types.ImageSource for this reference.112+// The caller must call .Close() on the returned ImageSource.113+func (ref nixReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error) {114+ return newImageSource(ctx, sys, ref)115+}116+117+// PolicyConfigurationIdentity returns a string representation of the reference, suitable for policy lookup.118+func (ref nixReference) PolicyConfigurationIdentity() string {119+ return ""120+}121+122+// PolicyConfigurationNamespaces returns a list of other policy configuration namespaces to search123+// for if explicit configuration for PolicyConfigurationIdentity() is not set124+func (ref nixReference) PolicyConfigurationNamespaces() []string {125+ return []string{}126+}127+128+// NewImageDestination returns a types.ImageDestination for this reference.129+// The caller must call .Close() on the returned ImageDestination.130+func (ref nixReference) NewImageDestination(ctx context.Context, sys *types.SystemContext) (types.ImageDestination, error) {131+ return nil, errors.New("It is not possible to copy to nix: images")132+}133+134+// newImageSource returns an ImageSource for reading from an existing directory.135+// newImageSource untars the file and saves it in a temp directory136+func newImageSource(ctx context.Context, sys *types.SystemContext, ref nixReference) (types.ImageSource, error) {137+ return &nixImageSource{138+ ref: ref,139+ }, nil140+}141+142+type nixImageSource struct {143+ ref nixReference144+}145+146+// Close removes resources associated with an initialized ImageSource, if any.147+// Close deletes the temporary directory at dst148+func (s *nixImageSource) Close() error {149+ return nil150+}151+152+func (s *nixImageSource) GetBlob(ctx context.Context, info types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {153+ // TODO: returning the blob size here leads to the following error on image copy:154+ // FATA[0000] writing blob: archive/tar: write too long155+ rc, _, err := nix.GetBlob(s.ref.nixImage, info.Digest)156+ return rc, -1, err157+}158+159+// GetManifest returns the image's manifest along with its MIME type (which may be empty when it can't be determined but the manifest is available).160+// It may use a remote (= slow) service.161+// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve (when the primary manifest is a manifest list);162+// this never happens if the primary manifest is not a manifest list (e.g. if the source never returns manifest lists).163+func (s *nixImageSource) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {164+ configDigest, size, err := nix.GetConfigDigest(s.ref.nixImage)165+ if err != nil {166+ return nil, "", err167+ }168+ config := imgspecv1.Descriptor{169+ MediaType: imgspecv1.MediaTypeImageConfig,170+ Size: size,171+ Digest: configDigest,172+ }173+174+ var layers []imgspecv1.Descriptor175+ for _, layer := range s.ref.nixImage.Layers {176+ digest, err := digest.Parse(layer.Digest)177+ if err != nil {178+ return nil, "", err179+ }180+ layers = append(layers, imgspecv1.Descriptor{181+ MediaType: layer.MediaType,182+ Size: layer.Size,183+ Digest: digest,184+ })185+ }186+187+ m := manifest.OCI1FromComponents(188+ config,189+ layers,190+ )191+ manifestBytes, err := json.Marshal(&m)192+ if err != nil {193+ return nil, "", err194+ }195+ return manifestBytes, imgspecv1.MediaTypeImageManifest, nil196+}197+198+func (s *nixImageSource) GetSignatures(ctx context.Context, instanceDigest *digest.Digest) ([][]byte, error) {199+ return [][]byte{}, nil200+}201+202+// HasThreadSafeGetBlob indicates whether GetBlob can be executed concurrently.203+func (s *nixImageSource) HasThreadSafeGetBlob() bool {204+ return true205+}206+207+// LayerInfosForCopy returns either nil (meaning the values in the manifest are fine), or updated values for the layer208+// blobsums that are listed in the image's manifest. If values are returned, they should be used when using GetBlob()209+// to read the image's layers.210+// If instanceDigest is not nil, it contains a digest of the specific manifest instance to retrieve BlobInfos for211+// (when the primary manifest is a manifest list); this never happens if the primary manifest is not a manifest list212+// (e.g. if the source never returns manifest lists).213+// The Digest field is guaranteed to be provided; Size may be -1.214+// WARNING: The list may contain duplicates, and they are semantically relevant.215+func (s *nixImageSource) LayerInfosForCopy(ctx context.Context, instanceDigest *digest.Digest) ([]types.BlobInfo, error) {216+ return nil, nil217+}218+219+// Reference returns the reference used to set up this source.220+func (s *nixImageSource) Reference() types.ImageReference {221+ return s.ref222+}223patching file transports/alltransports/alltransports.go224patching file nix/transport.go225/build/source226patching script interpreter paths in .227./contrib/cirrus/mac_cleanup.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"228./contrib/cirrus/runner.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"229./hack/test-system.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"230./hack/warn-destructive-tests.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"231./hack/tree_status.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"232./hack/sqlite_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"233./hack/validate-vet.sh: interpreter directive changed from "#!/bin/bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"234./hack/validate-git-marks.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"235./hack/libsubid_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"236./hack/btrfs_installed_tag.sh: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"237./hack/man-page-checker: interpreter directive changed from "#!/usr/bin/env bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"238./systemtest/run-tests: interpreter directive changed from "#!/bin/bash" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/bash"239./systemtest/make-noarch-manifest: interpreter directive changed from "#!/bin/sh" to "/nix/store/nnm9gdr70ihc6zc9298mzz8jpcgaciql-bash-5.3p20/bin/sh"240go build "-buildmode=pie" -ldflags '-X go.podman.io/image/v5/signature/internal/sequoia.sequoiaLibraryDir= ' -gcflags "" -tags " " -o bin/skopeo ./cmd/skopeo241sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-copy.1.md | go-md2man -in /dev/stdin -out docs/skopeo-copy.1242sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-delete.1.md | go-md2man -in /dev/stdin -out docs/skopeo-delete.1243sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-generate-sigstore-key.1.md | go-md2man -in /dev/stdin -out docs/skopeo-generate-sigstore-key.1244sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-inspect.1.md | go-md2man -in /dev/stdin -out docs/skopeo-inspect.1245sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-list-tags.1.md | go-md2man -in /dev/stdin -out docs/skopeo-list-tags.1246sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-login.1.md | go-md2man -in /dev/stdin -out docs/skopeo-login.1247sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-logout.1.md | go-md2man -in /dev/stdin -out docs/skopeo-logout.1248sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-manifest-digest.1.md | go-md2man -in /dev/stdin -out docs/skopeo-manifest-digest.1249sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-standalone-sign.1.md | go-md2man -in /dev/stdin -out docs/skopeo-standalone-sign.1250sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-standalone-verify.1.md | go-md2man -in /dev/stdin -out docs/skopeo-standalone-verify.1251sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo-sync.1.md | go-md2man -in /dev/stdin -out docs/skopeo-sync.1252sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' docs/skopeo.1.md | go-md2man -in /dev/stdin -out docs/skopeo.1253go build "-buildmode=pie" -ldflags '-X go.podman.io/image/v5/signature/internal/sequoia.sequoiaLibraryDir= ' -gcflags "" -tags " " -o bin/skopeo ./cmd/skopeo254install -d -m 755 completions/bash completions/zsh completions/fish completions/powershell255./bin/skopeo completion bash >| completions/bash/skopeo256./bin/skopeo completion zsh >| completions/zsh/_skopeo257./bin/skopeo completion fish >| completions/fish/skopeo.fish258./bin/skopeo completion powershell >| completions/powershell/skopeo.ps1259buildPhase completed in 1 minutes 33 seconds
installPhase
260go build "-buildmode=pie" -ldflags '-X go.podman.io/image/v5/signature/internal/sequoia.sequoiaLibraryDir= ' -gcflags "" -tags " " -o bin/skopeo ./cmd/skopeo261install -d -m 755 /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/bin262install -m 755 bin/skopeo /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/bin/skopeo263install -d -m 755 /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/man/man1264install -m 644 docs/*.1 /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/man/man1265go build "-buildmode=pie" -ldflags '-X go.podman.io/image/v5/signature/internal/sequoia.sequoiaLibraryDir= ' -gcflags "" -tags " " -o bin/skopeo ./cmd/skopeo266install -d -m 755 completions/bash completions/zsh completions/fish completions/powershell267./bin/skopeo completion bash >| completions/bash/skopeo268./bin/skopeo completion zsh >| completions/zsh/_skopeo269./bin/skopeo completion fish >| completions/fish/skopeo.fish270./bin/skopeo completion powershell >| completions/powershell/skopeo.ps1271install -d -m 755 /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/bash-completion/completions272install -m 644 completions/bash/skopeo /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/bash-completion/completions273install -d -m 755 /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/zsh/site-functions274install -m 644 completions/zsh/_skopeo /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/zsh/site-functions275install -d -m 755 /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/fish/vendor_completions.d276install -m 644 completions/fish/skopeo.fish /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/fish/vendor_completions.d277# There is no common location for powershell files so do not install them. Users have to source the file from their powershell profile.
fixupPhase
278Moving /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/share/man to /nix/store/6bi3ynbishhqf14w06hihmjmms7nr1l2-skopeo-1.24.1-man/share/man279shrinking RPATHs of ELF executables and libraries in /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1280shrinking /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/bin/.skopeo-wrapped281checking for references to /build/ in /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1...282patching script interpreter paths in /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1283stripping (with command strip and flags -S -p) in /nix/store/ygfznfhyvm2avwlhjcxv6fxa11zqq4lk-skopeo-1.24.1/bin284shrinking RPATHs of ELF executables and libraries in /nix/store/6bi3ynbishhqf14w06hihmjmms7nr1l2-skopeo-1.24.1-man285checking for references to /build/ in /nix/store/6bi3ynbishhqf14w06hihmjmms7nr1l2-skopeo-1.24.1-man...286gzipping man pages under /nix/store/6bi3ynbishhqf14w06hihmjmms7nr1l2-skopeo-1.24.1-man/share/man/287patching script interpreter paths in /nix/store/6bi3ynbishhqf14w06hihmjmms7nr1l2-skopeo-1.24.1-man