Commit Graph

2410 Commits

Author SHA1 Message Date
Valentin Rothberg
e534472e7d
Merge pull request #1621 from mtrmac/go1.16
Update to benefit from Go 1.16
2022-04-14 09:14:09 +02:00
Miloslav Trmač
d9d3ceca45 Use filepath.WalkDir instead of filepath.Walk
... to optimize away some lstat(2) calls.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-13 20:14:04 +02:00
Miloslav Trmač
23a4605742 Extract four copies of the same loop into a function
Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-13 20:14:04 +02:00
Miloslav Trmač
4811c07d71 Update users of deprecated io/ioutil
Mostly just name changes that should not change behavior, apart
from ioutil.ReadDir -> os.ReadDir avoiding per-item lstat(2) in
one case.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-04-13 20:13:52 +02:00
Miloslav Trmač
15b38112b1
Merge pull request #1610 from Jamstah/sign-identity
Add option to specify the identity for signing
2022-04-04 13:14:49 +02:00
James Hewitt
4ef35a385a
Add option to specify the identity for signing
This enables pushing to registries where the push and pull uris may be
different, for example where pushed images are mirrored to a read only
replica for distribution.

Closes #1588

Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2022-03-30 22:02:43 +01:00
James Hewitt
38ae81fa03
Bump containers/image to include sign identity option
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
2022-03-30 22:02:40 +01:00
Miloslav Trmač
e4297e3b30
Merge pull request #1611 from masatake/fix-man-page
delete non-existent option in the cmdline example
2022-03-30 19:47:58 +02:00
Masatake YAMATO
9b09b6eb87 delete non-existent option in the cmdline example
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2022-03-31 02:27:42 +09:00
Valentin Rothberg
45ed92ce0c
Merge pull request #1608 from rhatdan/dry-run
Add dry-run mode to skopeo-sync
2022-03-29 08:30:43 +02:00
Daniel J Walsh
c233a6dcb1
Add dry-run mode to skopeo-sync
Taking over #1459 to drive it to completion.

Signed-off-by: Ted Wexler <twexler@bloomberg.net>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-03-28 14:18:10 -04:00
Daniel J Walsh
e0f0869151
Merge pull request #1607 from glensc/patch-2
Update skopeoimage/README.md that tags are v-prefixed
2022-03-28 08:21:47 -04:00
Elan Ruusamäe
e6802c4df4 Update skopeoimage/README.md that tags are v-prefixed
Signed-off-by: Elan Ruusamäe <glen@delfi.ee>
2022-03-28 11:36:34 +03:00
Miloslav Trmač
2b910649b9
Merge pull request #1606 from mtrmac/v1.7.0
v1.7.0
2022-03-24 20:56:58 +01:00
Miloslav Trmač
808717862b Bump to v1.7.1-dev
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-24 20:34:19 +01:00
Miloslav Trmač
f45ae950aa Release 1.7.0
skopeo list-tags docker-archive:... is now available.

- Improve a comment in the 010-inspect.bats test
- do not recommend upgrading all packages
- Bump github.com/containers/image/v5 from 5.19.1 to 5.20.0
- Update github.com/containerd/containerd
- Bump github.com/docker/docker
- Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
- Add support for docker-archive: to skopeo list-tags
- Rename "self" receiver
- Remove assignments to an unused variable
- Add various missing error handling
- Simplify the proxy server a bit
- Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
- Use assert.ErrorContains
- Update to Go 1.14 and revendor
- Use check.C.MkDir() instead of manual ioutil.TempDir() calls
- Formally record that we require Go 1.15
- Update the command to install golint
- Bump github.com/containers/ocicrypt from 1.1.2 to 1.1.3
- Bump github.com/docker/docker
- Bump github.com/containers/storage from 1.38.2 to 1.39.0
- Bump github.com/containers/common from 0.47.4 to 0.47.5
- Bump github.com/prometheus/client_golang to v1.11.1

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-24 20:32:24 +01:00
Lokesh Mandvekar
3bc062423e Bump github.com/prometheus/client_golang to v1.11.1
Resolves: CVE-2022-21698

Skopeo isn't actually impacted by the CVE unless a Prometheus listener
is set up, which is not a part of Skopeo's default behavior.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-03-24 14:57:52 -04:00
Miloslav Trmač
d0d7d97f9c
Merge pull request #1604 from containers/dependabot/go_modules/github.com/containers/common-0.47.5
Bump github.com/containers/common from 0.47.4 to 0.47.5
2022-03-24 19:32:55 +01:00
dependabot[bot]
89cd19519f
Bump github.com/containers/common from 0.47.4 to 0.47.5
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.47.4 to 0.47.5.
- [Release notes](https://github.com/containers/common/releases)
- [Commits](https://github.com/containers/common/compare/v0.47.4...v0.47.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 17:41:02 +00:00
Miloslav Trmač
3e973e1aa2
Merge pull request #1603 from containers/dependabot/go_modules/github.com/containers/storage-1.39.0
Bump github.com/containers/storage from 1.38.2 to 1.39.0
2022-03-24 18:39:51 +01:00
dependabot[bot]
7f6b0e39d0
Bump github.com/containers/storage from 1.38.2 to 1.39.0
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.38.2 to 1.39.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.38.2...v1.39.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>
2022-03-24 17:14:41 +00:00
Miloslav Trmač
cc2445de81
Merge pull request #1602 from containers/dependabot/go_modules/github.com/docker/docker-20.10.14incompatible
Bump github.com/docker/docker from 20.10.13+incompatible to 20.10.14+incompatible
2022-03-24 18:13:38 +01:00
dependabot[bot]
f6bf57460d
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.13+incompatible to 20.10.14+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.13...v20.10.14)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 09:13:14 +00:00
Miloslav Trmač
a9cc9b9133 Improve the (skopeo delete) man page
Actually add a DESCRIPTION heading.

Warn about deleting by digest - it affects an unknown set of tags.

Warn about deleting by tag - it currently works by the resolved digest.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-21 15:49:14 +01:00
Miloslav Trmač
91cd3510eb
Merge pull request #1600 from containers/dependabot/go_modules/github.com/containers/ocicrypt-1.1.3
Bump github.com/containers/ocicrypt from 1.1.2 to 1.1.3
2022-03-21 15:45:57 +01:00
dependabot[bot]
ac7edc7d10
Bump github.com/containers/ocicrypt from 1.1.2 to 1.1.3
Bumps [github.com/containers/ocicrypt](https://github.com/containers/ocicrypt) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/containers/ocicrypt/releases)
- [Commits](https://github.com/containers/ocicrypt/compare/v1.1.2...v1.1.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-21 09:10:52 +00:00
Valentin Rothberg
92b1eec64c
Merge pull request #1593 from mtrmac/go-1.15
Formally require Go 1.15
2022-03-17 08:55:27 +01:00
Miloslav Trmač
c819bc1754 Update the command to install golint
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-16 16:05:08 +01:00
Miloslav Trmač
6a2f38d66c Formally record that we require Go 1.15
We already do in practice:
> vendor/golang.org/x/net/http2/transport.go:417:45: undefined: os.ErrDeadlineExceeded

so make that official.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-16 16:05:08 +01:00
Miloslav Trmač
2019b79c7f Use check.C.MkDir() instead of manual ioutil.TempDir() calls
This saves us at least 2 lines (error check, and cleanup) on every
instance, or in some cases adds cleanup that we forgot.

This is inspired by, but not directly related to, Go 1.15's addition of
Testing.T.TempDir.

NOTE: This might significantly increase the tests' disk space requirements;
AFAICS the temporary directories are only cleaned up when a whole "suite
finishes running.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-16 16:05:08 +01:00
Miloslav Trmač
f79cc8aeda Update to Go 1.14 and revendor
> go mod tidy -go=1.14
> make vendor

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-16 16:05:08 +01:00
Miloslav Trmač
0bfe297fc1
Merge pull request #1595 from mtrmac/ErrorContains
Use assert.ErrorContains
2022-03-16 16:04:38 +01:00
Miloslav Trmač
ac4c291f76 Use assert.ErrorContains
...added in github.com/stretchr/testify 1.7.1.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-16 15:13:31 +01:00
Miloslav Trmač
d2837c9e56
Merge pull request #1594 from containers/dependabot/go_modules/github.com/stretchr/testify-1.7.1
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
2022-03-16 15:09:29 +01:00
dependabot[bot]
5aaf3a9e4c
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 09:19:41 +00:00
Valentin Rothberg
0c4a9cc684
Merge pull request #1592 from mtrmac/lint-1.18
Various lint fixes
2022-03-16 09:08:29 +01:00
Miloslav Trmač
bd524670b1 Simplify the proxy server a bit
Move JSON parsing into the request processing handler
so that we can consolidate the two instances of the response sending code.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-15 21:48:51 +01:00
Miloslav Trmač
693de29e37 Add various missing error handling
... as found by (golangci-lint run).

Note: this does not add (golangci-lint run) to the Makefile
to ensure the coding standard.

(BTW golangci-lint currently fails on structcheck, which doesn't
handle embedded structs, and that's a years-long known unfixed
limitation.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-15 21:48:51 +01:00
Miloslav Trmač
f44ee2f80a Remove assignments to an unused variable
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-15 21:48:51 +01:00
Miloslav Trmač
a71900996f Rename "self" receiver
> receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (ST1006)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-15 21:48:51 +01:00
Valentin Rothberg
a26578178b
Merge pull request #1581 from zhangguanzhang/list-tags
Add support for docker-archive: to skopeo list-tags
2022-03-15 10:11:28 +01:00
zhangguanzhang
7ba56f3f7a Add support for docker-archive: to skopeo list-tags
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
2022-03-15 09:32:05 +08:00
Daniel J Walsh
0f701726bd
Merge pull request #1589 from containers/dependabot/go_modules/github.com/docker/docker-20.10.13incompatible
Bump github.com/docker/docker from 20.10.12+incompatible to 20.10.13+incompatible
2022-03-11 05:01:09 -05:00
Daniel J Walsh
91ad8c39c6
Merge pull request #1590 from containers/dependabot/go_modules/github.com/spf13/cobra-1.4.0
Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
2022-03-11 05:00:41 -05:00
dependabot[bot]
ad3e8f407d
Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 09:11:45 +00:00
dependabot[bot]
0703ec6ce8
Bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.12+incompatible to 20.10.13+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Changelog](https://github.com/moby/moby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/docker/docker/compare/v20.10.12...v20.10.13)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 09:11:37 +00:00
Valentin Rothberg
3e2defd6d3
Merge pull request #1585 from mtrmac/update-containerd
Update github.com/containerd/containerd
2022-03-07 09:47:20 +01:00
Miloslav Trmač
5200272846 Update github.com/containerd/containerd
$ go get -u github.ccom/containerd/containerd
$ make vendor

... to silence warnings about https://github.com/advisories/GHSA-crp2-qrr5-8pq7 ,
in code we don't use.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-03-04 19:26:12 +01:00
Miloslav Trmač
43eab90b36
Merge pull request #1582 from containers/dependabot/go_modules/github.com/containers/image/v5-5.20.0
Bump github.com/containers/image/v5 from 5.19.1 to 5.20.0
2022-03-04 19:15:24 +01:00
dependabot[bot]
0ad25b2d33
Bump github.com/containers/image/v5 from 5.19.1 to 5.20.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.19.1 to 5.20.0.
- [Release notes](https://github.com/containers/image/releases)
- [Commits](https://github.com/containers/image/compare/v5.19.1...v5.20.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-02 09:21:25 +00:00