1
0
mirror of https://github.com/containers/skopeo.git synced 2025-05-15 03:10:49 +00:00
Commit Graph

176 Commits

Author SHA1 Message Date
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
Wong Hoi Sing Edison
d9f4377831
Update nix pin with make nixpkgs
- Bugfix `make nixpkgs` which pin with branch `nixos-20.09`
  - Code lint with `nixpkgs-fmt`
  - Code sync between x86\_64 and aarch64

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2021-04-04 09:14:48 +08: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
Mateusz Kwiatkowski
6c8b8c20f5 Rebase against master and improve comment about gpgme-config 2021-01-29 14:19:34 +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
6b260e1686
Update nix pin with make nixpkgs
This PR introduce 3 changes:

  - Upgrade Nix stable channel from 20.03 to 20.09.

    NixOS 20.09 released at 2020-10-27, see
    <https://nixos.org/manual/nixos/stable/release-notes.html#sec-release-20.09>
    for more information.

  - Replace `git` with `gitMinimal`.

    All 6 projects (i.e. crun/conmon/skopeo/buildah/podman/cri-o) are
    having `git` as dependency for failsafe during bootstrap. BTW
    <https://github.com/NixOS/nixpkgs/pull/104896> replace `asciidoc`
    with `asciidoctor` so trigger the dependency chain to `glib` and so
    failed (see below). Switching to `gitMinimal` skip this dependency
    chain to `glib`, which also speed up overall build process.

  - Adding `-pthread` for `glib`

    `conmon` couldn't skip the error by replacing `git` with
    `gitMinimal` since it do depend on `glib`. Since `glib` trigger
    error message "undefined reference to 'pthread\_create'", therefore
    adding `pthread` to `CFLAGS` could solve the problem.

Also see:

  - <https://github.com/containers/crun/pull/550>
  - <https://github.com/containers/conmon/pull/218>
  - <https://github.com/containers/skopeo/pull/1120>
  - <https://github.com/containers/buildah/pull/2831>
  - <https://github.com/containers/podman/pull/8526>
  - <https://github.com/cri-o/cri-o/pull/4395>

Signed-off-by: Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
2020-12-20 18:40:40 +08:00
Marcel Bargull
e709329b03 Avoid overriding LDFLAGS in Makefile
Signed-off-by: Marcel Bargull <marcel.bargull@udo.edu>
2020-11-06 19:20:12 +01:00
Daniel J Walsh
21aa04e3c3
Make Makefile a little easier to use
By default we should build bin/skopeo locally
and build docs locally.

Show output when doing make docs.

Add description in `make help` to explain default
behaviour.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-10-08 10:19:41 -04:00
Nalin Dahyabhai
4ba7d50174 Makefile: add a local-cross target
Add a make target that cross-compiles for a handful of the possible
targets that `go tool dist list` can tell us about.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2020-09-29 16:20:40 -04:00
Xiaodong Liu
e5f549099b -buildmode=pie is not supported for some arch
Signed-off-by: Xiaodong Liu <liuxiaodong@loongson.cn>
2020-08-14 17:52:48 +08:00
Wong Hoi Sing Edison
915f40d12a
Build static binary with buildGoModule
Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-08-11 14:10:43 +08:00
Daniel J Walsh
e23b780072
Fix make clean to actually remove binaries
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-08-02 07:04:51 -04:00
Wong Hoi Sing Edison
dd2e70e9b7
nix run -f channel:nixos-20.03
Switch from nix `channel:nixpkgs-unstable` to `channel:nixos-20.03` for better stability.

Signed-off-by: Wong Hoi Sing Edison <hswong3i@gmail.com>
2020-06-29 12:07:46 +08: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č
17848a1868 Run (go mod tidy) before (go mod vendor)
This is conceptually consistent: First change the set of
dependencies, then update the vendored copy.

(Due to (go mod verify) afterwards, and CI running this again,
this should not make a difference in practice, so this is just
a clean-up.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-04-08 20:01:51 +02:00
Miloslav Trmač
702165af46 Fix (make vendor)
(export a=b command args) does not run (command args) with a=b,
it sets $a to b, and marks variables $a $command $args as exported,
i.e. (command args) is not run.

So, before https://github.com/containers/skopeo/pull/888 we were not actually
running (go mod tidy), and now we are not running (go mod vendor).

Just use $(GO), which already sets GO111MODULE=on, without the extra export.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2020-04-08 14:25:51 +02:00
Valentin Rothberg
f68b53afcd make vendor: run tidy after vendor
Run `go mod tidy` after `go mod vendor` to properly clean up the
dependencies.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-04-07 15:43:03 +02:00
Valentin Rothberg
7d3c3ce561 Makefile: set GOBIN
If not already set in the environment, set GOBIN.

Fixes: 
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-12-09 10:17:12 +01:00
Valentin Rothberg
88fd117257 make vendor-in-container
Add a vendor-in-container make target to allow for executing make vendor
in a golang:1.13 container.  The CI is currently enforcing golang 1.13
which has a different vendoring behavior than previous versions which
can lead to failing tests as some files might be added or deleted.  The
new make target will help users who are not using 1.13 to vendor their
changes.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-11-26 10:09:54 +01:00
Miloslav Trmač
dd66c1d342 Run the test-system container without --net=host
Experimentally, this seems to help with localhost access inside that
container (but I have no idea what's the reason for that).

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +01:00
Miloslav Trmač
6991ba8563 Mount /run/systemd/journal/socket into test-system containers
The nested podman tries to write to it.  This primarily only
removes noise from logs, it does not seem to significantly change
behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-11-21 21:25:35 +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
Daniel J Walsh
307d9c2252
Merge pull request from giuseppe/drop-ostree
skopeo: drop support for ostree
2019-11-01 11:03:16 -04: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
Daniel J Walsh
ce2db02200
Remove references to atomic
Move signature yaml file to point at /var/lib/containers/sigstore.

Change skopeo-copy.1 to use containers-storage and docker transports
rather then atomic.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-10-31 08:26:15 -04:00
Valentin Rothberg
a1c5a1f4d2 Makefile: use go proxy
Use GOPROXY=https://proxy.golang.org to speed up fetching dependencies.
Setting it makes `make vendor` six times faster in my local env.

For details please refer to https://proxy.golang.org/.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-30 11:54:33 +02:00
Valentin Rothberg
32e1652c9c go build: use -mod=vendor for go >= 1.11.x
Go 1.13.x isn't sensitive to the `GO111MODULE` environment variable
causing `make binary-local` to not use the vendored sources in
`./vendor`.  Force builds of module-supporting go versions to use the
vendored sources by setting `-mod=vendor`.

Verified in a `fedora:rawhide` container.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-08-01 13:39:30 +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
9d230dd132 Makefile: set GO111MODULE=off
Turn of go modules to avoid breaking build environments to accidentally
try pulling the dependencies instead of using the ./vendor directory.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-27 16:33:01 +02:00
Valentin Rothberg
033b290217 migrate to go modules
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-06-21 13:58:19 +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
Alex Jia
0e1cc9203e
Merge branch 'master' into add_help_to_makefile 2019-04-17 09:49:44 +08:00
Alex Jia
9447a55b61 added help to Makefile
Signed-off-by: Alex Jia <chuanchang.jia@gmail.com>
2019-04-16 09:29:10 +08:00
Lokesh Mandvekar
9fdceeb2b2 use GO envvar throughout in Makefile
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2019-04-16 00:04:57 +00:00
Daniel J Walsh
5c73fdbfdc
Make sure we install man pages
Currently we are only installing the skopeo.1 man page.  This
change will generate and install all man pages.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-03-27 05:52:48 -04:00
Valentin Rothberg
fa39b49a5c vendor: don't remove containers/image/registries.conf
Instruct vndr to not remove image/registries.conf to ease packaging on
Ubuntu.

Fixes: 
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-03-11 17:37:14 +01:00
Valentin Rothberg
776b408f76 make vendor: always fetch the latest vndr
Make sure to always use the latest version of vndr by fetching it prior
to execution.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-02-21 13:48:22 +01:00
Daniel J Walsh
f19acc1c90
split up skopeo man pages
Create a different man page for each of the subcommands.
Also replace some krufty references to kpod with podman

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-02-01 11:21:51 -05:00
ERAMOTO Masaya
ec810c91fe Makefile: Build docs in a container
Enables to build docs in a container even when go-md2man is not installed
locally.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2019-01-15 18:57:30 +09: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
Miloslav Trmač
b3a023f9dd Use --security-opt label=disable instead of label:disable
podman only accepts the = syntax.

Fixes .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2018-11-08 03:29:52 +01:00
Šimon Lukašík
89d8bddd9b Actually, enable build in podman 2018-11-03 00:10:44 +01:00
Daniel J Walsh
2a134a0ddd
Add support for using podman in testing skopeo
Also rename commands from Docker to container.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-30 07:54:23 +02:00
Miloslav Trmač
bcd26a4ae4 Fix (make DISABLE_CGO=1)
... which has, apparently, never worked, because the golang image
has neither the GOPATH nor the working directory the Makefile expects.

Rather than move all this configuration into the Makefile to be able
to work with the golang images, just always use the skopeobuildimage
path, and only override the tags, to minimize divergence.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2018-09-17 13:55:46 +02:00
Marco Vedovati
d9b495ca38 Allow passing TESTFLAGS env to hack/make.sh from make
Minor change to allow passing the env TESTFLAGS to make. That's pretty
convenient to filter what tests to run.
E.g. run integration tests containing the substring `Copy`:
make test-integration TESTFLAGS="-check.f Copy"

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-08-27 10:51:40 +02:00
Giuseppe Scrivano
5d3849a510
Makefile: make vendor a .PHONY target
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-08-16 15:06:16 +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
Akihiro Suda
d67d3a4620 Makefile: add binary-minimal and binary-static-minimal
These targets produce a pure-Go binary, without the following features:
* ostree
* devicemapper
* btrfs
* gpgme

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-07-09 18:35:58 +09: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
Aleksa Sarai
b23cac9c05
makefile: use -buildmode=pie
The security benefits of PIC binaries are quite well known (since they
work with ASLR), and there is effectively no downside. In addition,
we've been seeing some weird linker errors on ppc64le that are resolved
by using -buildmode=pie.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-10-22 10:13:20 +11:00
Miloslav Trmač
37e34aaff2 Automatically use the right CFLAGS and LDFLAGS for gpgme
On macOS, (brew install gpgme) installs it within /usr/local, but
/usr/local/include is not in the default search path.

Rather than hard-code this directory, use gpgme-config. Sadly that
must be done at the top-level user instead of locally in the gpgme
subpackage, because cgo supports only pkg-config, not general shell
scripts, and gpgme does not install a pkg-config file.

If gpgme is not installed or gpgme-config can’t be found for other reasons,
the error is silently ignored (and the user will probably find out because
the cgo compilation will fail); this is so that users can use the
containers_image_openpgp build tag without seeing ugly errors
(and without the Makefile having to detect that build tag in even more
shell scripts).
2017-10-02 21:58:23 +02:00
Lokesh Mandvekar
e735faac75 use Makefile var for go compiler
This will allow compilation with a custom go binary,
for example /usr/lib/go-1.8/bin/go instead of /usr/bin/go on Ubuntu
16.04 which is still version 1.6

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
2017-09-25 17:23:00 -04:00
Ed Robinson
b0b85dc32f
Fix make install on OSX
Fixes 

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
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
Akihiro Suda
845ad88cec Makefile: /usr/bin/go-md2man -> go-md2man
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-12 09:57:52 +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
Nalin Dahyabhai
7d58309a4f Makefile: run "go" with $(BUILDTAGS)
Run the "go" command with the $(BUILDTAGS) makefile variable passed in
as build tags.  We don't currently set it, but we'll need to eventually,
and adding it now does no harm.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-12-08 10:49:36 -05:00
Dan Walsh
6dc36483f4 Complete bash completions for skopeo
Current code only handled commands not the options.
2016-11-30 13:22:57 -05:00
Miloslav Trmač
a0af3619d3 Only build one skopeo binary by (make all)
Both (make binary) and (make binary-static) compile the code and create
a skopeo binary, so (make all) should only depend on one of them.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2016-11-23 16:57:37 +01:00
fightingdu
12cc3a9cbf Add static compile target in Makefile.
Add install `go-md2man` in Dockerfile.build

Signed-off-by: Ye Yin <eyniy@qq.com>
2016-11-03 15:31:50 +08:00
Antonio Murdaca
012f89d16b
add sigstore default configuration
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-12 18:58:14 +02:00
Miloslav Trmač
9835ae579b Create /etc/containers/registries.d in (make install) 2016-09-13 18:08:25 +02:00
Aaron Weitekamp
157b9c0f3b disable selinux for binary build 2016-09-06 16:28:07 -04:00
Dan Walsh
88bec961af Fix install command to create directories 2016-08-25 14:37:35 -04:00