Commit Graph

1724 Commits

Author SHA1 Message Date
Kir Kolyshkin 126bfe3b89 ci: use gofumpt, rm hack/gofmt.sh
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>
2023-05-26 16:19:32 -07:00
Paul Holzinger 1c4761c67e
fix hack/git-validation.sh script
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>
2022-11-02 20:51:36 +01:00
Giuseppe Scrivano 7be77d4b59
build: fix libsubid test
libsubid changes its ABI in version 4.  Account for the different name
in the configure script.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-12-20 10:13:38 +01:00
Sascha Grunert a67ddc5e70
Invert libsubid tag
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>
2021-08-09 15:32:59 +02:00
Giuseppe Scrivano 77043295fb
idtools: add support for libsubid
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>
2021-08-04 10:14:22 +02:00
Chris Evich 8ef57ee3d7
Update to F34 and U2104
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>
2021-05-11 14:25:24 -04:00
Daniel J Walsh e0baaad357
Fix problems found by codespell
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-09-11 10:49:59 -04:00
Sascha Grunert c71eadb2b9
Use `bash` binary from env instead of /bin/bash for scripts
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>
2020-08-17 11:23:44 +02:00
Daniel J Walsh 3fb27a360c
new interface for MountImage added
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>
2020-07-07 13:45:51 -04:00
Daniel J Walsh aa26d1860a
Update git validation EPOCH
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-06-03 05:14:12 -04:00
Chris Evich 68f0cbfa6a
Fix Ubuntu testing and get_ci_vm.sh
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>
2020-05-06 15:48:48 -04:00
Chris Evich dbaae6dde5
Kill travis testing
Signed-off-by: Chris Evich <cevich@redhat.com>
2020-02-27 12:32:32 -05:00
Chris Evich 7c898fa7af
Cirrus: Use libpod cache-images
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>
2019-11-08 11:20:43 -05:00
Giuseppe Scrivano 7a0d58dab5
storage: drop ostree deduplication
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>
2019-10-05 20:27:45 +02:00
Nalin Dahyabhai ba598e19f2 Disable cgo-requiring bits when cgo is not enabled
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>
2019-08-05 13:42:50 -04:00
Sascha Grunert 66c879f02a
Switch to golangci-lint
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>
2019-07-17 11:13:06 +02:00
Sascha Grunert 5ce139d37d
Switch to go modules
Remove the old vendor approach in replacement of go module support.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-07-09 08:32:22 +02:00
Nalin Dahyabhai 1c37e93be0 Start v1.12.12-dev
Move master's version to v1.12.12-dev.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-06-20 14:45:25 -04:00
Daniel J Walsh 1580116d57
Move to v1.12.11-dev
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-06-08 05:04:36 -04:00
Chris Evich 6dc5b349df
Cirrus: Script to manually prov. CI-like VMs
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-05-16 16:40:57 -04:00
Nalin Dahyabhai 28be1e46f0 Bump GITVALIDATE_EPOCH
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-02-26 14:19:15 -05:00
Nalin Dahyabhai 591d84511a Check for the OS when setting btrfs/libdm/ostree tags
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>
2019-01-16 14:02:54 -05:00
Nalin Dahyabhai e3130ca3e5 hack/run_ci_tests.sh: run "docker info" before pull
Log info about the test environment's copy of docker before we start
interacting with it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-12-06 13:50:38 -05:00
Giuseppe Scrivano bda9803fd2
ci: run apt-get update
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-11-09 13:14:58 +01:00
Giuseppe Scrivano c7fdad430f
ci: install ostree
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-29 18:47:10 +02:00
Giuseppe Scrivano 0c7cb6041a
overlay: new option to support ostree deduplication
usage example:

skopeo copy docker-daemon:busybox:latest containers-storage:\[overlay2@/var/lib/containers/storage+/var/run/containers/storage:overlay2.ostree_repo=/var/lib/containers/storage/overlay2/ostree/.repo,overlay2.override_kernel_check=1\]\busybox

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-06-29 18:47:10 +02:00
Chris Evich 6afa3a250c
Enable Stable + build/test on Fedora and CentOS
* 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>
2018-03-26 14:44:19 -04:00
Chris Evich 5159ca2d57
Minor: Comment updates
Signed-off-by: Chris Evich <cevich@redhat.com>
2018-03-26 08:56:14 -04:00
Chris Evich 02a59b0398
Update CI scripts
* 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>
2018-03-09 10:40:50 -05:00
Nalin Dahyabhai 230b9ab91a Replace the build system
Replace the bundle-targeted build system with simpler Makefile targets
and fewer helper scripts.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-05-25 15:50:33 -04:00
Nalin Dahyabhai dbcaa736c4 Merge pull request #11 from nalind/vendorsys
Revendor golang.org/x/sys
2017-04-19 14:55:38 -04:00
Nalin Dahyabhai e65bca53cb Re-enable the "gccgo" build target
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>
2017-03-06 17:57:44 -05:00
Nalin Dahyabhai 149133a73a Handle differences in Stat_t on darwin
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>
2017-03-06 14:05:40 -05:00
Erik Hollensbe 9a2b6c119d Resolve a number of GOPATH-related issues previously missed
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-02-27 12:56:17 -08:00
Erik Hollensbe d557952f5d Remove old vendor tooling
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-02-16 15:28:44 -08:00
Erik Hollensbe b921859b2a Retab shell script; use official golang package everywhere, adjust paths.
Signed-off-by: Erik Hollensbe <github@hollensbe.org>
2017-01-30 08:47:26 -08:00
Nalin Dahyabhai fe2a6c4e13 Add initial Travis configuration
Add an initial Travis configuration file, and whatever fixups
and tweaks we need to build in it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 17:06:07 -05:00
Nalin Dahyabhai bcab39c5b7 Replace build tag "autogen" with a unique one
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>
2017-01-03 10:35:39 -05:00
Nalin Dahyabhai 7438725e26 Updated vendored dependencies
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>
2016-08-17 11:41:26 -04:00
Nalin Dahyabhai 569ab71064 Disable "cover" bundle for now
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>
2016-07-28 15:56:40 -04:00
Nalin Dahyabhai 1528f73325 Fixup determining the unit test directories
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>
2016-07-28 14:01:54 -04:00
Nalin Dahyabhai 052bd37abe Exclude the devmapper graphdriver to cross-compile
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>
2016-07-28 14:01:54 -04:00
Nalin Dahyabhai 1ef0334d24 Don't run test-integration-cli by default for now
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>
2016-07-28 14:01:54 -04:00
Nalin Dahyabhai d1d0e63a45 Rework some of the build machinery
- Run tests in VMs with sufficiently-new gccgo
- Assume that all binary builds build dynamic binaries

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-28 14:01:54 -04:00
Nalin Dahyabhai 0b0e3d0d61 Re-vendor go-connections to fix experimental builds
We pruned out go-connections, but it's needed for experimental builds,
so add it back.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-19 14:32:49 -04:00
Nalin Dahyabhai d855327b5e Clean up the build machinery
Most of the build machinery was still present, but no longer
functioning.  Tear most of it down.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai 60ff079996 Rename: cow/cowman -> storage/oci-storage
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>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai c28495d8f2 Rename from cow/cowman to storage/oci-storage
Rename the cow module and cowman tool to storage and oci-storage,
respectively.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai ba24f4fa4c Remove more code
Based on a patch by Grant Seltzer <grantseltzer@gmail.com>

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:49 -04:00
Nalin Dahyabhai c41093053e Remove some code we no longer depend on
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:41 -04:00