1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-15 11:20:12 +00:00
Commit Graph

141 Commits

Author SHA1 Message Date
renovate[bot]
0c2cca9640
[CI:DOCS] Update dependency golangci/golangci-lint to v1.55.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-03 13:49:14 +00:00
renovate[bot]
6b2a26f161
[CI:DOCS] Update dependency golangci/golangci-lint to v1.55.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-01 15:59:37 +00:00
renovate[bot]
a2eb508b10
[CI:DOCS] Update dependency golangci/golangci-lint to v1.55.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-20 12:59:53 +00:00
renovate[bot]
b0d587a91c
chore(deps): update dependency golangci/golangci-lint to v1.54.2
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-21 13:31:40 +00:00
Michal Biesek
449ac9bbfb
DOCS: Add information about the cross-build
Signed-off-by: Michal Biesek <michalbiesek@gmail.com>
2023-08-17 16:23:11 +02:00
renovate[bot]
0e3efc640a
chore(deps): update dependency golangci/golangci-lint to v1.54.1
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-11 21:01:59 +00:00
renovate[bot]
03a1913298
Update dependency golangci/golangci-lint to v1.53.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-22 19:40:57 +00:00
Chris Evich
c04ee48bcb
Help Renovate manage the golangci-lint version
It's a bit cumbersome to manage a tooling version buried deep in a
command, let alone one also buried deep in a `Makefile`.  Add a
variable to hold the version number so renovate can easily manage it.
This happens via a `regex` manager in the shared configuration
include `containers/automation//renovate/defaults.json5`.  Also add a
helpful note/reminder to humans who may want to manually change the
version for some reason.

Depends on: https://github.com/containers/automation/pull/145

Signed-off-by: Chris Evich <cevich@redhat.com>
2023-06-21 15:33:14 -04:00
Miloslav Trmač
7c66b7405a Add (make tools) to install (for now only) golangci-lint, use it in Cirrus
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
d4bd787e5f Use golangci-lint instead of golint
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
c538340e3b Finally, eliminate hack/make.sh
The only thing hack/make.sh is now really doing is the
warning + sleep without SKOPEO_CONTAINER_TESTS .

So, make that a separate script, and eliminate the
hack/make directory.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
4298692dd4 Don't use hack/make.sh for validate-git-marks
hack/make.sh now does not make a difference, so simplify.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
bee51e5eed Don't use hack/make.sh for validate-gofmt
hack/make.sh now does not make a difference, so simplify.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
82268ea8bf Don't use hack/make.sh for validate-lint
hack/make.sh now does not make a difference, so simplify.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
43090b2917 Don't use hack/make.sh for validate-vet
hack/make.sh now does not make a difference, so simplify.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
225f239a69 Remove no-longer-necessary module options
We now require Go 1.18. As of that version:
- GO111MODULE=on is implied by having a go.mod file
- -mod=vendor is implied by having a vendor directory

so just remove both options everywhere

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
98b01af031 Fix Makefile dependencies
validate-docs requires bin/skopeo; test-unit-local ctually doesn't.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-04-06 21:45:51 +02:00
Miloslav Trmač
2ef9cf6902 Replace gopkg.in/check.v1 by github.com/stretchr/testify/suite/
gopkg.in/check.v1 hasn't had any commit since Nov 2020.
That's not a immediate issue for a test-only dependency, but
because it hides access to the standard library *testing.T,
eventually it will become limiting.

Also, using the same framework for unit and integration tests
seems practical.

This is mostly a batch copy&paste job, with a fairly high risk
of unexpected breakage.

Also, I didn't take much time at all to carefully choose between
assert.* and require.*; we can tune that as failures show up.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-02-17 02:35:51 +01:00
Daniel J Walsh
47919520f5
Merge pull request from mtrmac/developer-system-tests
Fix `make test-system` when run as an unprivileged user (containerized)
2023-01-23 11:13:50 -05:00
Miloslav Trmač
9f04dfdec9 Partially fix removal of temporary data in (make test-system)
Use (podman unshare) as already suggested, it is necessary for an unprivileged
user to remove the temporary c/storage state.  OTOH it doesn't work with Docker at all.

Don't use the - prefix, it only works at the _start_ of a rule, not in the middle of
a multi-line shell script.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-01-20 20:07:45 +01:00
Miloslav Trmač
198155027d Fix (test-integration), in a container without CI
Fixes  .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-01-20 17:38:29 +01:00
Miloslav Trmač
787e10873c Revert addition of -compat=1.17 to (go mod tidy)
Typically, the compat with earlier versions causes us to use
newer versions of dependencies, which can only be a good thing.

Over time, the 1.17 version reference is just going to become obsolete.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-09-30 19:46:17 +02:00
Daniel J Walsh
ee84302b60
Update vendor containers/(common,image)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-09-30 06:38:07 -04:00
Miloslav Trmač
f36752a279 Don't include git commit from a parent directory in the --version output
This can happen when building RPMs out of tarballs (which don't contain
the .git repository).

To test:
> make -n /bin/skopeo; mv .git ../.git ; make -n bin/skopeo

Fixes  .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-23 19:28:22 +02:00
Miloslav Trmač
4e2dee4362 Remove unused GIT_BRANCH definition
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-23 19:28:22 +02:00
Miloslav Trmač
04169cac6e Fix looking for commands with GNU make 4.2.1
Before https://git.savannah.gnu.org/cgit/make.git/commit/job.c?h=4.3&id=1af314465e5dfe3e8baa839a32a72e83c04f26ef ,
make was incorrectly trying to avoid running a shell for (command -v).
Use the workaround recommended in https://savannah.gnu.org/bugs/index.php?57625 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-22 14:57:08 -04:00
Miloslav Trmač
a99bd0c9e3 Fix a comment
... to make it explicit which variable it refers to.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-08-22 14:57:08 -04:00
Miloslav Trmač
b000ada3f3 Update for the renames of sigstore to lookaside
I left systemtest unmodified, to have _something_ that
exercises the compatibility path.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-07-12 13:47:35 +02:00
Lokesh Mandvekar
71d450cb35
[CI:DOCS] Makefile: include cautionary note for rpm target
Also add same warning to skopeo.spec.rpkg

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-06-16 15:36:06 -04:00
Lokesh Mandvekar
3738854467 CoPR: Autobuild rpm on rhcontainerbot/podman-next
The new file `skopeo.spec.rpkg` along with a webhook will automatically
build rpms on every PR merge on the main branch.

Run `rpkg local` or `make rpm` to generate the rpm.

Known issue: Doesn't yet build for EL8 environments.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2022-06-16 15:27:39 -04:00
Paul Holzinger
263a5f017f
fix make completions for all POSIX shells
The {a,b} syntax is not POSIX compatible. The Makefile should run with
all POSIX shells so we cannot use shell specific features like this.

Fixes 

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-30 14:38:56 +02:00
Daniel J Walsh
0fa1b5038f
Merge pull request from mtrmac/gpgme-native-pkg-config
Stop calling gpgme-config
2022-05-23 23:32:14 -04:00
Paul Holzinger
9bed0a9e9a
shell completion: add Makefile target
Add target to generate the shell scripts and a target to install them.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-05-23 18:47:46 +02:00
Miloslav Trmač
ebc5573e83 Stop calling gpgme-config
As of the just-updated github.com/proglottis/gpgme 0.1.2,
the gpgme subpackage uses CGo's native #cgo pkg-config support
to find the relevant libraries, and we no longer need to manually set
CGO_CFLAGS and CGO_LDFLAGS. So stop doing that.

Note that the proglottis/gpgme update (implied by vendoring c/image)
means the minimal supported version of GPGME is 1.13.0.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2022-05-19 22:03:26 +02:00
Doug Rabson
e47765ed9e Config files live in /usr/local/etc on FreeBSD
Signed-off-by: Doug Rabson <dfr@rabson.org>
2022-05-10 10:37:29 +01:00
Daniel J Walsh
2858904e4b
Run codespell on code
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2022-01-21 07:49:49 -05:00
Lokesh Mandvekar
aba57a8814
Makefile: drop nix support
nix build is no longer being maintained.

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2021-09-27 14:55:44 -04:00
Jaikiran Pai
6131077770 issue#1411 Introduce DISABLE_DOCS to skip doc generation while building from source 2021-09-14 20:23:11 +05:30
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]
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
Valentin Rothberg
3d9340c836 vendor-in-container: update to golang:1.16
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-08-02 15:30:06 +02: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č
e4d1392085 Use (make validate-local) in the validate target
... to keep the two in sync.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-06-29 23:49:21 +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  (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
Miloslav Trmač
012ed6610e Reintroduce the GNU semantics of DESTDIR
This partially reverts commit a81cd74734
so that most path variables like PREFIX and BINDIR refer to paths on
the installed system, and DESTDIR is used only in (make install), following
the philosophy of the GNU coding standards for path variables. (But not precisely
the variable names, which are lowercase in the standard, nor the principle that
even SYSCONFDIR should be under $PREFIX.

Keep the use of ?= instead of = because it somewhat better expresses the idea
that the values can be overridden.

Use ${DESTDIR}${BINDIR} instead of ${DESTDIR}/${BINDIR} etc, so that a plain
(make install) does not use paths like //usr/bin/... ; strictly speaking they
are IIRC reserved by POSIX, and more importantly it just looks untidy :)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2021-06-24 14:14:07 +02:00
Wong Hoi Sing Edison
10c4c877ba
Update nix pin with make nixpkgs
- Bugfix `make nixpkgs` which pin with branch `nixos-21.05`
  - Code lint with `nixpkgs-fmt`
  - Code sync between x86\_64 and aarch64

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2021-06-03 16:33:04 +08: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
Morten Linderud
c84fc7d243 Makefile: Ensure policy.json uses new variable
In 18e6c6f17b there where changes to
better handle PREFIX and DESTDIR in the Makefile. "CONTAINERSCONFIGDIR"
was renamed to "CONTAINERSCONFDIR" without ensuring it was correct in
the install block. This results in policy.json being isntalled into
"${DESTDIR}/" which is "/policy.json" for Linux distros.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-04-19 09:39:51 -04:00
Wong Hoi Sing Edison
c456cef9bd
Update nix pin with make nixpkgs
Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2021-04-14 10:14:00 +08:00