Commit Graph

91 Commits

Author SHA1 Message Date
Miloslav Trmač
9e79da5e33 Fix running tests on macOS
It doesn't support the 's' suffix in (sleep 5s). Seconds
is the default on Linux as well.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-10 21:19:51 +02:00
Doug Rabson
804f7c249d Avoid hard-coding the location of bash
On FreeBSD, bash lives in /usr/local/bin/bash. These scripts don't
really depend on bash so could be changed to /bin/sh.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-05-10 11:24:45 +01:00
Chris Evich
916a395d82
Cirrus: Update to F36 w/ netavark+aardvark-dns
Also includes some updates relating to improvements in the common
automation library.

Signed-off-by: Chris Evich <cevich@redhat.com>
2022-04-28 13:39:25 -04:00
Daniel J Walsh
8dce403b95
Add codespell fixes
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-11 16:47:48 -04:00
dependabot[bot]
a23b9f532d
Bump github.com/containers/storage from 1.33.2 to 1.34.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.33.2 to 1.34.0.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.33.2...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/containers/storage
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-10 13:16:43 -04:00
dependabot[bot]
be821b4f59
Bump github.com/containers/storage from 1.33.1 to 1.33.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.33.1 to 1.33.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/main/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.33.1...v1.33.2)

---
updated-dependencies:
- dependency-name: github.com/containers/storage
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-08-06 11:15:28 -04:00
Chris Evich
ab87b15fea
Cirrus: Run checks directly on the host
In order to meet achievable deadlines converting from Travis to Cirrus
CI, one significant artifact was carried forward (instead of fixing):

Depending on a `--privileged` container to execute all/most automated
checks/tests.

Prior attempts to remove this aspect resulted in several test failures.
Fixing the problems was viewed as more time-consuming than simply
preserving this runtime environment.

Time has passed, and the code has since moved on.  This commit removes
the legacy need to execute CI operations in a `--privileged`
container, instead running them directly on the host.  At the same time,
the necessary test binaries are obtained from the same container used
for development/local testing purposes.  This ensures the two
experiences are virtually always identical.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-08-04 15:37:57 -04:00
Ed Santiago
ae0595c56a
Man page validation: part 2 of 2
This is the script that runs 'skopeo COMMAND --help' and
cross-checks that all the option flags are documented
in man pages, and vice-versa (all options listed in man
pages appear in COMMAND's --help message).

Copied from podman, with changes for skopeo-land (removing
the rst checks, and conforming to skopeo conventions).

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-21 14:51:47 -04:00
Miloslav Trmač
09282bcf88 Fix some comments in man-page-checker
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-06-30 20:57:08 +02:00
Miloslav Trmač
a37251289a Support **non-replaceable strings** in synopsis
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-06-29 23:59:34 +02:00
Ed Santiago
e716b2fa66 man page checker - part 1 of 2
Add new script, hack/man-page-checker, copied from podman. Run it
in 'make validate-local' target.

This is NOT the checker requested in #1332 (verify that flags
listed in 'skopeo foo --help' are documented in man pages and
vice-versa). This is a much simpler script that merely looks
for very basic typos or discrepancies between skopeo.1.md
and skopeo-foo.1.md.

The next part (cross-checking flags) is in progress but will
require a huge number of changes to the man pages. I'm submitting
this now because it's easy to review.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-06-29 13:07:42 -06:00
Chris Evich
93b819a766
Fix automation re: master->main rename
Bump up the global timeout due to some (possibly) temporary failures in
the 'cross' task.  Also fix build-failure in Dockerfile related to use
of pre-module golang packages.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-06-23 13:31:08 -04:00
Chris Evich
a81cd74734
Travis -> Cirrus: MacOS Cross test
Also cleanup `Makefile` WRT `${DESTDIR}` definition and use to make it's
purpose more clear.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-21 10:47:24 -04:00
Chris Evich
88979a6a88
Cirrus: Improve test synchronization with c/image
The `test_skopeo_task` must be substantially duplicated between this
repository and containers/image.  Make this easier to maintain by
implementing a runner script to contain any/all differences.  This
allows the `test_skopeo_task` definition to remain 100%
identical across the two repositories.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-21 09:55:11 -04:00
Chris Evich
146af8cd59
Travis -> Cirrus: validate, vendor, and test
Also add some basic setup commands to hack/get_ci_vm.sh

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-21 09:55:11 -04:00
Chris Evich
0196219924
Cirrus: Add hack/get_ci_vm.sh support
This won't be useful unless/until there are `.cirrus.yml` tasks which
actually utilize VMs.  Once there are, or to support their development,
this script may be helpful.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-04-13 15:12:02 -04:00
Chris Evich
f5a028e4d9 Fix skipping tests in test container
Without this env. var. being set from hack/make.sh, many/most
integration tests will `SKIP`.  Fix this by notifying the user
and setting the magic `SKOPEO_CONTAINER_TESTS` variable.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-03-10 17:41:29 +01:00
Chris Evich
3d1d2978d7 Add local integration and system test targets
These tests need to operate as part of the c/image repository CI to
verify downstream-usage.  That environment is already inside the
container built from the Dockerfile (here).  Support this use-case by
adding 'local' targets which bypass the container build.  Also,
simplify the "in-container" check to more specifically verify the exact
container image it's operating under.

Signed-off-by: Chris Evich <cevich@redhat.com>
2021-03-09 15:16:47 +01:00
Daniel J Walsh
18e6c6f17b
Fix Makefile to handle PREFIX correctly
PREFIX should default to /usr/local according to GNU coding standards.

DESTDIR should just be used for install

This will allow us to specify

make PREFIX=/usr DESTDIR=/tmp/build/ install

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2021-01-21 13:54:53 -05:00
Wong Hoi Sing Edison
0f458eec76
Add nix derivation for static builds
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-06-18 20:57:55 +08:00
Miloslav Trmač
81caa0fa5d Increase test timeout to 15 minutes
Apparently we run into the 10-minute timeout now in Travis.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +01:00
Miloslav Trmač
db877dca36 Don't unnecessarily filter out vendor from (go list ./...) output
(go list) removes the vendor subdirectory automatically since
Go 1.9.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:33 +01:00
Miloslav Trmač
8eba94f271 Use -mod=vendor in (go {list,test,vet})
This allows using the vendored dependencies instead of
searching for them in $GOPATH and elsewhere.

This does not necessarily matter for skopeo itself, but
the test-skopeo Makefile target in containers/image uses
(go mod edit -replace) to replace the vendored c/image with
a locally-edited copy; skopeo's (make check) then runs tests in
a container which does not have access to this locally-edited
copy, and since Go 1.13 this causes (go {list,test,vet})
to fail if -mod=vendor is not used.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:10 +01:00
Giuseppe Scrivano
140b47e8e9
skopeo: drop support for ostree
drop support for the ostree backend.  The only known user for the
backend is the atomic CLI tool that is not maintained anymore
upstream.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1766404

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-11-01 12:42:06 +01:00
Marco Vedovati
0f1ded2ac8 ostree: use both image and & storage buildtags
The PR #700 replaced ostree buildtag with containers_image_ostree.
However specifying the ostree buildtag is needed by containers/storage
vfs driver.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-08 14:08:31 +02:00
Marco Vedovati
af54437b44 ostree: use the correct build tags
Starting from 9b902d0, the ostree transport is disabled by default,
and ostree is enabled with the tag containers_image_ostree.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-06 13:05:24 +02:00
Sascha Grunert
6b45a943a8
Fix lowest possible go version to be 1.9
containers/storage needs math/bits which has been added in go 1.9, so
this is now the lowest possible go version to build skopeo. We can also
remove the GO15VENDOREXPERIMENT variable since this has been enabled in
go 1.6 per default and removed in go 1.7.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-07-09 08:46:16 +02:00
Valentin Rothberg
f367935628 Travis: OS X: turn off GO111MODULE
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-21 13:58:44 +02:00
Ed Santiago
47e7cda4e9 System tests - get working under podman-in-podman
Skopeo CI tests run under podman; hence the registries
run in the tests will be podman-in-podman. This requires
complex muckery to make work:

 - install bats, jq, and podman in the test image
 - add new test-system Make target. It runs podman
   with /var/lib/containers bind-mounted to a tmpdir
   and with other necessary options; and invokes a
   test script that hack-edits /etc/containers/storage.conf
   before running podman for the first time.
 - add --cgroup-manager=cgroupfs option to podman
   invocations in BATS: without this, podman-in-podman
   fails with:
       systemd cgroup flag passed, but systemd support for managing cgroups is not available

Also: gpg --pinentry-mode option is not available on all
our test platforms. Check for it before using.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-05-28 10:53:12 -06:00
Valentin Rothberg
509782e78b add hack/tree_status.sh
This script is meant to be used in CI after a `make vendor` run.  It's
sole purpose is to execute a `git status --porcelain` and fail with the
list of files reported by it.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-21 13:50:00 +01:00
Anders F Björklund
3e0026d907 Allow building without btrfs and ostree
Copy the build tag scripts from Buildah

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2019-01-03 20:32:53 +01:00
Nalin Dahyabhai
879a6d793f Log the version of the go toolchain
Before we use "go get" in CI, run "go version" so that we can be sure of
which version of the toolchain we're using.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2018-10-15 15:45:45 -04:00
Antonio Murdaca
501e1be3cf fix golint
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2018-10-13 15:41:55 +02:00
Miloslav Trmač
be27588418 Update one more reference to projectatomic/skopeo
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2018-08-27 13:10:02 +02:00
Flavio Castelli
2684e51aa5
Complete transition from the projectactomic project to the containers one
Replace the occurrences of `github.com/projectatomic` with
`github.com/containers` to ensure clean clones of the project are
building, travis badges on the README work as expected and other minor
things.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2018-08-14 10:10:06 +02:00
Miloslav Trmač
05e38e127e Add a (make vendor) target, primarily to preserve c/image documentation
The goal is to include the c/image documentation in a skopeo release,
so that RPMs and other distribution mechanisms can ship the c/image
documentation without having to create a separate package for c/image
(which would not otherwise be needed because it is vendored in users).

So, unify the updates of the "vendor" subdirectory as (make vendor),
and document it in README.md.  Also drop hack/vendor.sh, we neither
use nor document it, so updating it as well seems pointless.
2018-05-19 04:21:15 +02:00
Miloslav Trmač
42203b366d Run (go vet) on all subpackages instead only of changed files
Apparently, it was never documented to use (go vet $somefile.go)
(but (go tool vet $somefile.go) was).

go 1.10 seems to do more checks within packages, and $somefile.go
is interpreted as a package with only that file (even if other files
from that package are in the same directory), leading to spurious
"undefined: $symbol" errors.

So, just run (go vet) on ./... (explicitly excluding skopeo/vendor for the
benefit of Go 1.8). We only have three subpackages, so the savings, if any,
from running (go vet) only on the modified subpackages would be small.

More importantly, on a toolchain update, ./... allows us to see the newly
detected issues all at once, instead of randomly waiting for a commit that
changes one of the affected files for the failure to show up.
2018-05-10 21:12:51 +02:00
Miloslav Trmač
d11d173db1 Install golint on macOS
On Linux this is done in the Dockerfile, but macOS tests do not use containers.
2017-08-04 00:13:55 +02:00
Ed Robinson
a934622220
Install go-md2man on travis osx 2017-07-27 09:47:34 +01:00
Ed Robinson
c448bc0a29
Check make install on osx travis build 2017-07-26 20:14:49 +01:00
Ed Robinson
b0b85dc32f
Fix make install on OSX
Fixes #383

Signed-off-by: Ed Robinson <ed.robinson@reevoo.com>
2017-07-26 20:11:03 +01:00
Ed Robinson
bb84c696e2
Stubb out libostree support when building on OSX
Signed-off-by: Ed Robinson <ed.robinson@reevoo.com>
2017-07-26 14:50:11 +01:00
Ed Robinson
4d5e442c25
Adds automated build for OSX re #380
Signed-off-by: Ed Robinson <ed.robinson@reevoo.com>
2017-07-25 15:54:46 +01:00
Miloslav Trmač
d2d41ebc33 Propagate BUILDTAGS through the build process
… so that any command-line overrides are respected.
2017-03-29 20:50:45 +02:00
Antonio Murdaca
fefeeb4c70
switch to vndr
vndr is almost exactly the same as our old good hack/vendor.sh. Except
it's cleaner and it allows to re-vendor just one dependency if needed
(which we do a lot for containers/image).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-09 17:54:17 +01:00
Antonio Murdaca
dcfcfdaa1e
*: switch to opencontaniners/go-digest
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-09 16:20:00 +01:00
Antonio Murdaca
7c530bc55f
update opencontainers/image-spec to v1.0.0-rc3
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-23 11:39:27 +01:00
George Lestaris
78a24cea81 Vendors new containers/image version using pkg/errors
Signed-off-by: George Lestaris <glestaris@pivotal.io>
2016-12-19 16:25:50 +00:00
Nalin Dahyabhai
4960f390e2 Vendor containers/storage, update containers/image
Vendor containers/storage, and its dependencies github.com/pborman/uuid
and github.com/mistifyio/go-zfs, which we didn't already use.

Update the build Dockerfile to install their dependencies.

Add scriptlets that try to detect whether or not we need to use the
"libdm_no_deferred_remove" and/or "btrfs_noversion" build tags.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-12-15 12:29:07 -05:00
Antonio Murdaca
1215f5fe69
cmd: per command tls flags
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-08 17:56:22 +01:00