Commit Graph

242 Commits

Author SHA1 Message Date
renovate[bot] 50bf352931
chore(deps): update dependency golangci/golangci-lint to v2.2.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-14 16:02:17 +00:00
renovate[bot] b12a52fd72
chore(deps): update dependency golangci/golangci-lint to v2.2.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-29 22:39:25 +00:00
renovate[bot] 8f9965d400
chore(deps): update dependency golangci/golangci-lint to v2.1.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-04 17:33:24 +00:00
renovate[bot] ea76ad2640
chore(deps): update dependency golangci/golangci-lint to v2.1.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-29 13:19:59 +00:00
renovate[bot] af3ccbc192
chore(deps): update dependency golangci/golangci-lint to v2.1.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-15 21:43:56 +00:00
Kir Kolyshkin d44d9d4779 ci: switch to golangci-lint v2
The new configuration file was initially generated by golangci-lint
migrate, when tweaked to minimize and simplify.

golangci-lint v2 switches to a new version of staticcheck which shows
much more warnings. Some of them were fixed by a few previous commits,
and the rest of them are disabled.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-26 18:47:22 -07:00
renovate[bot] ab7dc5e90e
chore(deps): update dependency golangci/golangci-lint to v1.64.8
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-18 18:47:21 +00:00
renovate[bot] c3038c227e
chore(deps): update dependency golangci/golangci-lint to v1.64.7
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-17 17:05:45 +00:00
renovate[bot] 0410b81274
chore(deps): update dependency golangci/golangci-lint to v1.64.6
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-05 22:59:16 +00:00
renovate[bot] afc1ab38f9
chore(deps): update dependency golangci/golangci-lint to v1.64.5
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-14 09:30:39 +00:00
renovate[bot] cc1ff53d38
chore(deps): update dependency golangci/golangci-lint to v1.63.4
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 22:11:37 +00:00
renovate[bot] 0e5ae768f9
chore(deps): update dependency golangci/golangci-lint to v1.63.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-02 20:12:24 +00:00
renovate[bot] d5d0b0df58
chore(deps): update dependency golangci/golangci-lint to v1.62.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 21:06:06 +00:00
renovate[bot] 1bcdc4b045
chore(deps): update dependency golangci/golangci-lint to v1.62.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-10 19:50:56 +00:00
Kir Kolyshkin cfe8024bff ci: add codespell
1. Move codespell config out of Makefile, simplify (remove unused
   stuff).

2. Fix found issues (using codespell -w).

3. Add a codespell CI job.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-10-15 17:39:07 -07:00
renovate[bot] 28e75bb561
chore(deps): update dependency golangci/golangci-lint to v1.61.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-09 18:30:48 +00:00
renovate[bot] d8da7b377a
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-25 15:14:38 +00:00
renovate[bot] bff1751e59
[CI:DOCS] Update dependency golangci/golangci-lint to v1.60.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-20 21:54:50 +00:00
Jan Rodák 52828e9aec
Prepare a golangci-lint installation for automatic update using renovate
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2024-08-19 11:14:21 +02:00
Miloslav Trmač bdd350ae58 Test that we can build all subpackages on all platforms
... even those not used by the command.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-06-07 15:36:44 +02:00
Kir Kolyshkin 137ba2cc35 Remove devicemapper storage driver
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-04-15 14:44:29 -07:00
Daniel J Walsh 63836a17e5
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2024-01-28 07:16:34 -05:00
Michal Biesek 3115caf009
Extend `local-cross` with `riscv64` arch
Signed-off-by: Michal Biesek <michalbiesek@gmail.com>
2023-08-12 12:01:48 +02:00
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
Kir Kolyshkin afb3da6540 Makefiles: simplify for modern go
Remove some old time artifacts, such as:
 - GO111MODULES, GO_PROXY, and MOD_VENDOR (no longer needed since go 1.14);
 - GIT_BRANCH (not needed since 2016, commit d855327b5e);
 - EPOCH_TEST_COMMIT (not needed since 2017, commit 230b9ab91a);

except that -mod=vendor is needed for go build in tests/tools.

Also remove:
 - PROJECT_ROOT (and use of "go list" for tests);
 - sources (go build is efficient so we can use it every time without
   using make to compare sources timestamps).

This makes makefiles less cluttered, and should also fix the following
golangci-lint error observed in CI:

> running gomoddirectives failed: failed to get module file: command
> go list: exit status 1: go: list -m cannot be used with GO111MODULE=off:
> if you are not using go modules it is suggested to disable this linter"

As a result, golangci-lint was effectively disabled.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-05-23 18:50:06 -07:00
Kir Kolyshkin b7bf95ebfb Makefile: fix phony targets
Quite a few were missing, one (lint) was out of (alphabetic) order.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-05-23 17:52:51 -07:00
Kir Kolyshkin 47913957f8 Makefile: rm ffjson
Fixes: 4e3bb7e95f
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-05-23 17:24:05 -07:00
Nalin Dahyabhai d10c03bc3d Extend driver.ListLayers()
Implement ListLayers() for the aufs, btrfs, and devicemapper drivers,
along with a unit test for them.
Stop filtering out directories with names that aren't 64-hex chars in
vfs and overlay ListLayers() implementations, which is more a convention
than a hard rule.
Have layerStore.Wipe() try to remove remaining listed layers after it
removes the layers that the layerStore knew of.
Close() a dangling ReadCloser in NaiveCreateFromTemplate.
Switch from using plain defer to using t.Cleanup() to handle deleting
layers that tests create, have the addManyLayers() test function do so
as well.
Remove vfs.CopyDir, which near as I can tell isn't referenced anywhere.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-04-12 16:05:09 -04:00
Daniel J Walsh a3204cf7e8
Move to golang 1.18 and later
Github.com is reporting security issues on older versions of
golang.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-04-03 15:26:54 -04:00
Nalin Dahyabhai 0f2bccfa56 Complete "pulling up" of images in updateNames()
When updateNames() copies an image's record from a read-only store into
the read-write store, copy the accompanying data as well.

Add fields for setting data items at creation-time to LayerOptions,
ImageOptions, and ContainerOptions to make this easier for us and our
consumers.

Replace the store-specific Create() (and the one CreateWithFlags() and
Put()) with private create() and put() methods, since they're not
intended for consumption outside of this package, and add Flags to the
options structures we pass into those methods.  In create() methods,
make copies of those passed-in options structures before modifying any
of their contents.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-03-31 10:36:30 -04:00
Daniel J Walsh 0ee26255cd
Run codespell on codebase
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-02-09 12:27:59 -05:00
Nalin Dahyabhai 380a915637 Makefile: remove vestiges of VMs, update $(sources)
Remove targets that reference Vagrant-specific setups that were removed
well over a year ago (!), and update $(sources) to include files in new
packages.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2023-01-27 14:43:18 -05:00
Daniel J Walsh d5aa4b662e
Merge pull request #1431 from containers/dependabot/go_modules/github.com/containerd/stargz-snapshotter/estargz-0.13.0
build(deps): bump github.com/containerd/stargz-snapshotter/estargz from 0.12.1 to 0.13.0
2022-11-15 09:27:29 -05:00
Doug Rabson 141a92a421 Add s390 and mips targets to the cross build to match podman
Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-11-15 11:10:54 +00:00
dependabot[bot] 4e294a2105
build(deps): bump github.com/containerd/stargz-snapshotter/estargz
Bumps [github.com/containerd/stargz-snapshotter/estargz](https://github.com/containerd/stargz-snapshotter) from 0.12.1 to 0.13.0.
- [Release notes](https://github.com/containerd/stargz-snapshotter/releases)
- [Commits](https://github.com/containerd/stargz-snapshotter/compare/v0.12.1...v0.13.0)

---
updated-dependencies:
- dependency-name: github.com/containerd/stargz-snapshotter/estargz
  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>
2022-11-14 10:23:43 -05:00
Paul Holzinger c90fdc85f8
CI: run make local-validate
Make sure all PRs are formated with `go fmt` correctly.
I added it to the existing lint job as this seems to make the most
sense to me.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-11-02 20:51:36 +01:00
dependabot[bot] c80d439d8d
build(deps): bump github.com/containerd/stargz-snapshotter/estargz
Bumps [github.com/containerd/stargz-snapshotter/estargz](https://github.com/containerd/stargz-snapshotter) from 0.12.0 to 0.12.1.
- [Release notes](https://github.com/containerd/stargz-snapshotter/releases)
- [Commits](https://github.com/containerd/stargz-snapshotter/compare/v0.12.0...v0.12.1)

---
updated-dependencies:
- dependency-name: github.com/containerd/stargz-snapshotter/estargz
  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>
2022-10-15 05:54:38 -04:00
Doug Rabson 9b5fa246a4 Add freebsd to the local-cross build target
Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-05-08 10:49:05 +01:00
Doug Rabson 33cfc0150b
Use $(MAKE) to run sub-make processes
This makefile requires GNU make and on n FreeBSD and probably other BSD
variants, this is installed as /usr/local/bin/gmake.

Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-04-20 16:02:31 +01:00
Daniel J Walsh aaf7457b1d
Add flate back in, codespell was too agressive
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-26 10:28:01 -05:00
Daniel J Walsh 86dd22e482
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 07:42:51 -05: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
Giuseppe Scrivano f844d9968e
Makefile: use buildtags for golangci-lint
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2021-08-04 10:14:21 +02:00
Nalin Dahyabhai 4e3bb7e95f Remove dependencies on ffjson
Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-05-06 12:04:23 -04:00
Nalin Dahyabhai fab6e83ea1 Makefile local-test-unit: use -race if it's available
If the current platform passes unit tests in the stringutils package,
assume we're on a platform where unit tests can use the -race flag, and
use it with our unit tests.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2021-02-23 10:37:50 -05:00
Daniel J Walsh 716f30c3cf
Cleanup make vendor code to actualy tidy up repo
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-04-08 10:35:16 -04:00
Sascha Grunert d0597a31b6
Fix ffjson compilation
The ffjson generated sources were broken since quite some time, which is
now fixed again.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-31 10:15:20 +01:00
Sascha Grunert 640c1f8257
Use -mod=vendor for running unit tests
The unit tests should not download dependencies ad-hoc but use the local
vendored sources for sake of reproducibility.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-12-12 14:50:46 +01:00
Daniel J Walsh ad54e947c0
Add make vendor-in-container
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>
2019-10-25 11:09:29 -04: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