This commit makes use of golangci-lint to check that the source code is
formatted with gofumpt, and removes hack/gofmt.sh which is no longer
needed.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
It is impossible to have this passing because it did not run in CI and
invalid commit were merged since the fixed commit. The correct way
should be to always use the merge base commit instead, at least this
will only check commit that are actually part of the PR not all which is
wasteful. Also removed unused $PATH overwrite and $GITVALIDATE_FLAGS
var.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
We now switch to a `libsubid` tag to increase the usability of the
library on systems not having the dependency in place.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
when building with cgo, add support for libsubid to read the
additional sub IDs for the user instead of parsing the /etc/sub?id
files.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Also modernize main library to resemble what's used in other
containers-org repositories. Lastly, update hack/get_ci_vm.sh to use
the new shared container image.
Signed-off-by: Chris Evich <cevich@redhat.com>
It's not possible to run any of the scripts on distributions which do
have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env
bash` instead.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Interface added to mount image rootfs without any container.
image can be mounted only in ReadOnly mode.
Signed-off-by: Kunal Kushwaha <kunal.kushwaha@gmail.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
For some unknown reason, running BATS on any version of Ubuntu VM using
the parallel `--jobs`` argument will execute tests properly but only
produce errors like `...stdout: No such file or directory`. When
operating on an Ubuntu VM, override `$JOBS` with `1` as a workaround.
Also, fix `get_ci_vm.sh` to properly parse env. vars. out of
`.cirrus.yml` while properly substituting embedded variable values.
This makes it properly print out image name hints, and properly set
variables during execution.
Signed-off-by: Chris Evich <cevich@redhat.com>
Previously automation on this project used the low-level VM images
mostly as-is from google. However, due to many items fixed by
https://github.com/containers/libpod/pull/3632 it makes more sense
to use the cache-images instead.
Non-deterministic behavior is a severe detriment to testing
reliability. By using the libpod cache-images, this projects inherits
the libpod PR-based image-build workflow, a slew of pre-installed
packages, along with disabled default background services.
This should result in both faster and more reliable testing.
Signed-off-by: Chris Evich <cevich@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>
Adjust build tags in drivers and pkg so that builds with CGO_ENABLED=0
won't fail outright. This ends up disabling btrfs (which uses kernel
headers), ostree (which uses libostree), overlayfs (which uses C headers
to define fs_disk_quota_t), and devicemapper (which uses libdevmapper
and loopback) by default.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit uses internal tools vendoring to switch to golangci-lint. All
working linters have been enabled. The other tools have been vendored as
well into the same tools folder, whereas the corresponding test and
build targets have been adapted as well.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Before checking for btrfs/libdm/ostree availability, check which OS
we're on, and if it isn't Linux, disable them.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
* Added the few small changes needed to support these other distros.
* Enable building GO_VERSION "stable" on all distros, but ignore the
result. The failures are seemingly similar, but beyond my ability to
debug. For now, ignore the result to provide exposure and runtime
without any requirement to pass.
Signed-off-by: Chris Evich <cevich@redhat.com>
* Relocate them with visible names under hack/...
* Add support for adding additional $DISTRO's (later)
* Add tmpfs mount inside SPC
Signed-off-by: Chris Evich <cevich@redhat.com>
Use a workaround from https://github.com/golang/go/issues/15628 for
issues with newer-style vendoring in gcc-go.
Travis's trusty images have gcc-go 4.9, which implements Go 1.2, so it's
missing sync.Pool (introduced in 1.3), so we can't enable the test
there.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Handle Linux and BSD using different names for the mtime part of a
Stat_t. Add darwin/amd64 to the list of cross-build arches we try
to build during 'make cross'.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Replace the "autogen" build tag with one named
"containersstorageautogen", to avoid tripping up anyone who vendors the
library but is using that build tag already.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Add docs and license info for engine-api and uuid, and add net/proxy and
more of vbatts/tar-split. Prune out things which are no longer being
pulled in by our dependencies.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
The coverage bundle really wants the results of integration tests, and
since we don't currently have any, disable it.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Fixup hack/make/test-unit's ability to figure out which directories
might contain unit tests so that it works outside of a container. Most
of the tests still need root privileges to run, and since they exercise
kernel facilities that require root privileges, that's not likely to
change.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
When cross-compiling, disable device mapper, for which we probably don't
have the libraries that we'd need.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
For now, until we have integration tests, don't try to run them, since
the script that tries to run them fails.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
- Run tests in VMs with sufficiently-new gccgo
- Assume that all binary builds build dynamic binaries
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Rename the library module and CLI wrapper.
Rename daemon/graphdriver to drivers.
Catch up vendoring to match modules we've pruned.
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>