Revert golang.org/x/sys to a known-to-work version. Recent breaking
changes in this package introduce build regressions. Thoss have already
been fixed in containers/storage but other (transitive) dependencies of
consumers of c/storage are not, and hence break builds.
See https://github.com/containers/libpod/pull/4598#issuecomment-560304335
as an example.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This API caused build regressions as golang.org/x dependencies
introduced breaking changes. We don't have any callers in our
projects and I consider it a bug that those APIs were there,
which might prevent us from causing a major bump.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
The dependency on docker's filter package prevents us from using newer
versions of docker/moby where the package's API has changed. The filter
package is small enough to justify maintaining a small fork of it. Also,
since the opts package is only used for the `containers-storage` binary
and is not part of the actual storage library, move it to the ./internal
directory to make it clearer that this is an internal API.
Fixes: #450
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
In order to always run vendor with the latest supported version of golang,
add the ability to run the vendor command within a podman container.
After running the command include vendor changes.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
it was an attempt to use OSTree to deduplicate files, at the time we
already had a dependency on OSTree for system containers in
containers/image. Since the feature never really took off, let's just
drop it.
Closes: https://github.com/containers/storage/issues/419
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ffjson requires some packages during intermediate go generation steps
that are not present in the `./vendor` directory since the final files
do not require it. To trick go modules into believing that we need
those dependencies, add a `ffjson_deps.go` file referencing them.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Using `os.Pipe()` has a side effect when writing tar files surfacing in
differing digests (see [1] for reference). Instead use `io.Pipe()` with
a workaround to avoid writes after the reader has been closed - which is
supported by `os.Pipe()` and causes the tar package to error otherwise.
[1] https://github.com/containers/libpod/pull/3705#issuecomment-517954910
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
The DataDog/zstd package added more than 2MB to the binary size.
Reduce that by using the github.com/klauspost/compress directly
from 11MB to 8.7MB.
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
zstd is a compression algorithm that has a very fast decoder, while
providing also good compression ratios. The fast decoder makes it
suitable for container images, as decompressing the tarballs is a very
expensive operation. This is a first step at supporting zstd as we We
don't yet generate zstd layers.
In my testing, copying the Fedora image from a local dir: repository,
the wall clock time passed from ~8s with gzip compression to ~4.5s
with zstd.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
from my tests, I've seen a net improvement of around 30% on the wall
clock time in decompressing layers.
These additional packages will need to be re-vendored:
github.com/klauspost/pgzip v1.2.1
github.com/klauspost/compress v1.4.1
github.com/klauspost/cpuid v1.2.0
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This new version of copy will attempt to use reflinks
if the underlying file system supports reflink, which
should optimize the vfs storage driver for rootless
podman and buildah.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Since this repo is marked deprecated, we should import types from
'github.com/docker/docker/api' instead.
Signed-off-by: Lou Yihua <supermouselyh@hotmail.com>
Had to vendor in a new version of golang.org/x/net to build
Also had to make some changes to drivers to handle
archive.Reader -> io.Reader
archive.Archive -> io.ReadCloser
Also update .gitingore to ignore emacs files, containers-storage.*
and generated man pages.
Also no longer test travis against golang 1.7, cri-o, moby have also
done this.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Also updates github.com/Microsoft/hcsshim
and github.com/docker/go-connections so they work
with the newer version of logrus.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Container Storage is going to be shared by multiple tools. Therefore
we don't want each one of these tools setting up its own container
storage. This storage config can be shared between multiple users.
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
Remove pkg/ioutils's cancelReadCloser type and the vendored copy of
golang.org/x/net/context which it needed, neither of which was used
anywhere else in here. This should let us sidestep any potential
incompatibilities with the standard library's context package, which was
introduced in golang 1.7.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>