Skip to content

x/vgo: use tar instead of zip for package archives #24057

@stapelberg

Description

@stapelberg

This is easily visible in repositories such as https://github.com/prometheus/procfs, which contains executable files (e.g. ttar) and symbolic links (e.g. fixtures/self):

% mkdir -p /tmp/repro
% cd /tmp/repro
% echo > go.mod
% cat >> hello.go <<'EOT'
package main // import "github.com/stapelberg/repro"

import _ "github.com/prometheus/procfs"

func main() {
}
EOT
% vgo build
% vgo test all
--- FAIL: TestNewNamespaces (0.00s)
	proc_ns_test.go:15: readlink fixtures/26231/ns/net: invalid argument
--- FAIL: TestSelf (0.00s)
	proc_test.go:18: readlink fixtures/self: invalid argument
--- FAIL: TestExecutable (0.00s)
	proc_test.go:97: readlink fixtures/26231/exe: invalid argument
--- FAIL: TestFileDescriptorTargets (0.00s)
	proc_test.go:138: want fds [../../symlinktargets/abc ../../symlinktargets/def ../../symlinktargets/ghi ../../symlinktargets/uvw ../../symlinktargets/xyz], have [    ]
FAIL
FAIL	github.com/prometheus/procfs	0.002s
?   	github.com/prometheus/procfs/internal/util	[no test files]
ok  	github.com/prometheus/procfs/nfs	0.001s
ok  	github.com/prometheus/procfs/xfs	0.001s
?   	github.com/stapelberg/repro	[no test files]

While permissions apparently can be stuffed into extended attributes (see https://stackoverflow.com/a/13633772/712014), it seems that GitHub and/or vgo don’t support that. Symlink support was added to zip years ago as per https://serverfault.com/a/265678/100772, but doesn’t seem to be used by GitHub and/or vgo either.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions