Commit graph

367 commits

Author SHA1 Message Date
Matthew Heon 2cff111d71 Update README for v1.0.0
Also bump gitvalidation epoch - we usually do this every release,
but v1.0.0 is on a branch so we need a separate commit for master

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-16 12:05:44 -05:00
baude b30a56c156 Run integrations test with remote-client
Add the ability to run the integration (ginkgo) suite using
the remote client.

Only the images_test.go file is run right now; all the rest are
isolated with a // +build !remotelinux.  As more content is
developed for the remote client, we can unblock the files and
just block single tests as needed.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-14 14:51:32 -06:00
baude 43c6da22b9 Add darwin support for remote-client
Add the ability to cross-compile podman remote for OSX.

Also, add image exists and tag to remote-client.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-11 11:30:28 -06:00
Valentin Rothberg 545f244212 vendor make target
Add a `make vendor` target calls `vndr` with a specified whitelist to
avoid deleting important files (currently the varlink/go project).

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-11 13:12:14 +01:00
Matthew Heon 07f3b147f1 Remove easyjson in preparation for switch to jsoniter
The jsoniter library does not require code generation, which is a
massive advantage over easyjson (it's also about the same in
performance). Begin moving over to it by removing the existing
easyjson code.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-10 15:48:09 -05:00
Jhon Honce 45fb935fe4 Move python code from contrib to it's own repo python-podman
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2019-01-10 11:27:50 -07:00
Daniel J Walsh db19bed6e8
Add Validate completions
In podman 0.12.0 we have invalid completions.  These should have been
caught during testing. This check will throw an error if the completions
do not successfully execute.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-01-08 12:55:21 -05:00
OpenShift Merge Robot 8c8d895d66
Merge pull request #2098 from baude/remote
Add ability to build golang remote client
2019-01-07 11:54:55 -08:00
baude 41fb81d074 Add ability to build golang remote client
Add the ability to build a remote client in golang that uses all
the same front-end cli code and output code. The initial limitations
here are that it can only be a local client while the bridge and
resolver code is being written for the golang varlink client.

Tests and docs will be added in subsequent PRs.

Signed-off-by: baude <bbaude@redhat.com>
2019-01-07 12:43:57 -06:00
Matthew Heon 57d2a56920 Readd Python testing
We accidentally merged a PR with a commit temporarily disabling
the Python tests. Reenable them here.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-04 16:16:52 -05:00
Matthew Heon 01858c0eba DO NOT MERGE temporarily remove python tests
It's impossible to get good debug out of the python tests, so
nuke them for now so I can figure out what's wrong.

DO NOT MERGE THIS COMMIT

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-01-04 09:51:09 -05:00
Valentin Rothberg 75578aad61 add container-init support
Add support for executing an init binary as PID 1 in a container to
forward signals and reap processes.  When the `--init` flag is set for
podman-create or podman-run, the init binary is bind-mounted to
`/dev/init` in the container and "/dev/init --" is prepended to the
container's command.

The default base path of the container-init binary is `/usr/libexec/podman`
while the default binary is catatonit [1].  This default can be changed
permanently via the `init_path` field in the `libpod.conf` configuration
file (which is recommended for packaging) or temporarily via the
`--init-path` flag of podman-create and podman-run.

[1] https://github.com/openSUSE/catatonit

Fixes: #1670
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-01-04 11:42:03 +01:00
OpenShift Merge Robot 65c5883f5c
Merge pull request #1757 from kunalkushwaha/contrib-perftest
perf test a stress test to profile CPU load of podman
2018-12-20 06:51:01 -08:00
Giuseppe Scrivano 98c5d9d962
Makefile: validate that each commit can at least build
it is very useful when using git bisect that at least the commit can
build.

got inspiration from: https://twitter.com/pid_eins/status/1072797993760423941

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-12-19 16:53:22 +01:00
Kunal Kushwaha 658f772c16 perf test a stress test to profile CPU load of podman
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
2018-12-19 16:05:21 +09:00
Matthew Heon fbf7422bc5 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-13 13:55:32 -05:00
Matthew Heon 4c68f3d0ab Makefile tweaks to fix make shell
Also, bump the Dockerfile to use the latest Golang image, as most
of our testing is now done on 1.11

Fixes: #1999

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-12 14:41:49 -05:00
Vincent Demeester 0b0096382c
No need to use -i in go build (with go 1.10 and above)
> The go build command now maintains a cache of recently built
  packages, separate from the installed packages in $GOROOT/pkg or
  $GOPATH/pkg. The effect of the cache should be to speed builds that
  do not explicitly install packages or when switching between
  different copies of source code (for example, when changing back and
  forth between different branches in a version control system). The
  old advice to add the -i flag for speed, as in go build -i or go
  test -i, is no longer necessary: builds run just as fast without -i.

This should also fix podman builds for NixOS, snap-installed go, …

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
2018-12-11 15:26:01 +01:00
Matthew Heon d16f791851 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-07 14:14:51 -05:00
OpenShift Merge Robot d4af59d57c
Merge pull request #1788 from cevich/cirrus_base_images
Codify and document base-image production + Enable testing with Fedora
2018-12-07 07:46:46 -08:00
Matthew Heon 758b7a5a63 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-12-06 17:33:10 -05:00
Chris Evich 8d7fdc7d79
Cirrus: Use Makefile for image-building
The packer tool takes JSON as input for the details of producing VM
images to be used for PR CI-testing.  JSON is not a very human-friendly
format, without support for comments and frequently containing lots of
duplicate data.

Fix this by using a Makefile + simple python one-liner to convert
from a human-friendly YAML format into packer-native JSON.  This allows
use of anchors/aliases to reduce duplication, and allows inline comments
for easier maintainability.  This also allows separating the 'test'
action from the 'build' action, for earlier and better syntax problem
detection.

Lastly, there are some minor ``lib.sh`` and ``integration_test.sh``
updates to support future work, and slightly improve the build and
test environments.

Signed-off-by: Chris Evich <cevich@redhat.com>
2018-12-06 15:39:18 -05:00
OpenShift Merge Robot cd5742ff47
Merge pull request #1385 from ypu/systemtest
Add system test with ginkgo
2018-11-16 08:51:42 -08:00
OpenShift Merge Robot 39ef6d43d0
Merge pull request #1756 from isimluk/update-dependent-metalinter
Update metalinter dependency
2018-11-16 05:02:03 -08:00
Yiqiao Pu c1bc0a7192 Add a rule to compile system test in Makefile
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 11:19:37 +08:00
Yiqiao Pu a7122d68de The system test write with ginkgo
The tests can be filter by --focus and --skip to fit different test
target. Also be able to set global options and cmd options by export
it to ENV to fit different test matrix.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:12 +08:00
Yiqiao Pu 74bcfc2f96 Separate common used test functions and structs to test/utils
Put common used test functions and structs to a separated package.
So we can use them for more testsuites.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
2018-11-16 10:49:00 +08:00
Matthew Heon 02bd5d4443 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-15 15:40:56 -05:00
Šimon Lukašík 868e280421 Lint: Update metalinter dependency
We fixated on old metalinter dependency in past based on experience of
metalinter being oftentimes broke and hence broking our build. See
762f508d9ca97cdbaee6053b663e98aee9cae081 in cri-o for more details.

Now, dated metalinter is messing up with my environment (like it is
panicing on containters/storage) so let's see if we can move to more
current version of metalinter.

Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-10 10:52:24 +01:00
Matthew Heon a26ec2a0d3 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-11-08 14:09:03 -05:00
Šimon Lukašík c04e090380 Do never override podman with docker
Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
2018-11-03 08:58:22 +01:00
Anders F Björklund b2fef1a8ba Fix setting of version information
It was setting the wrong variable (CamelCase)
in the wrong module ("main", not "libpod")...

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2018-10-31 00:27:08 +01:00
Daniel J Walsh 9250747092
Eat our own dogfood
Switch all tests to use podman installed on the system, or Docker if podman
does not exist.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-10-23 17:36:37 -04:00
Matthew Heon 683d8b579b Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-17 18:51:37 -04:00
Matthew Heon 6a32daad08 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-17 11:34:13 -04:00
Matthew Heon f98c4a9c73 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-16 13:52:16 -04:00
Matthew Heon 99d9012650 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-10-11 16:51:28 -04:00
Valentin Rothberg 08cab4ad3a remove hack/dind
The docker-in-docker was script was needed to run AppArmor tests in
Travis, which is not required anymore since Travis isn't being used
for a while.  Removing the script will also cure some hiccups on
some atomic testing nodes.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-10-10 18:05:50 +02:00
Matthew Heon 9bcf7ce83a
Merge pull request #818 from wking/python-2-clean
Makefile: Call contrib/python's clean regardless of HAS_PYTHON3
2018-09-27 09:42:43 -04:00
baude 4073541981 rework CI tests to test on VMs
This PR makes several key changes to our CI testing.  Firstly, we now test
podman on fedora 28, fedora 29, and centos VMS (rather than containers). Any
of these that having failing tests are not marked as required yet. We
still preserve the podman in podman and podman in docker tests as well and
they are marked as required.

The lint and validate work is now done on a openshift container.  We also
removed the rpm verification on papr and perform this test under the "images"
test on the openshift ci.

This PR exposes integration test fails on some of our OSs.  My expectation is we
will fix those in additional PRs and as they are fixed, we should be flipping
the boolean bit to required.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1492
Approved by: mheon
2018-09-26 15:47:29 +00:00
Matthew Heon 8a8c44915f Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-25 16:20:49 -04:00
Matthew Heon b1799d0839 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-21 18:24:28 -04:00
Jhon Honce 1fb8d7f248 Replace all usages of "install -D" with "install -d"
Fixes #1481

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1496
Approved by: rhatdan
2018-09-18 12:36:15 +00:00
Matthew Heon e2f44f1045 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-17 12:03:01 -04:00
Matthew Heon 9cae1696f6 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 18:13:33 -04:00
Matthew Heon 0405555345
Merge pull request #1434 from rhatdan/wait
Add --interval flag to podman wait
2018-09-14 16:52:13 -04:00
Matthew Heon 2d6bfe5f50 Update gitvalidation epoch to avoid a bad commit
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-14 10:59:48 -04:00
W. Trevor King af6d86dcdf Makefile: Drop PYTHON
This line landed in 8493dba2 (Initial varlink implementation,
2018-03-26, #627), but this Makefile has never consumed that variable.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-09-13 22:15:22 -07:00
W. Trevor King da42c60307 Makefile: Call contrib/python's clean regardless of HAS_PYTHON3
The only Python dependency in contrib/python's clean is:

  $(PYTHON) setup.py clean --all

and our setup.pys work on both major Python versions:

  $ make -C contrib/python/podman PYTHON=python2 clean
  make: Entering directory `/.../libpod/contrib/python/podman'
  python2 setup.py clean --all
  /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)
  running clean
  'build/lib' does not exist -- can't clean it
  'build/bdist.linux-x86_64' does not exist -- can't clean it
  'build/scripts-2.7' does not exist -- can't clean it
  rm -rf podman.egg-info dist
  find . -depth -name __pycache__ -exec rm -rf {} \;
  find . -depth -name \*.pyc -exec rm -f {} \;
  make: Leaving directory `/.../libpod/contrib/python/podman'
  $ echo $?
  0
  $ make -C contrib/python/pypodman PYTHON=python2 clean
  make: Entering directory `/.../libpod/contrib/python/pypodman'
  python2 setup.py clean --all
  /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
    warnings.warn(msg)
  running clean
  removing 'build/lib' (and everything under it)
  removing 'build/bdist.linux-x86_64' (and everything under it)
  'build/scripts-2.7' does not exist -- can't clean it
  removing 'build'
  rm -rf pypodman.egg-info dist
  find . -depth -name __pycache__ -exec rm -rf {} \;
  find . -depth -name \*.pyc -exec rm -f {} \;
  make: Leaving directory `/.../libpod/contrib/python/pypodman'
  $ echo $?
  0

This rolls back part of 390bd16d (tidy up the copr spec, 2018-05-20, #813).

I've also shifted the submake cleans to the end of the main clean
recipe.  That way, if one of the submake cleans dies (e.g. because the
system lacks Python entirely), the temp-file removal will still
happen.  The way I have it setup now, the podman clean dying will keep
any of the pypodman clean from happening.  You could probably work
around that with something like:

  $(MAKE) -C contrib/python/podman clean & \
    $(MAKE) -C contrib/python/pypodman clean & \
    wait

but that seems too fancy for such a corner case.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-09-13 22:10:58 -07:00
Daniel J Walsh 9ec82caa31
Add --interval flag to podman wait
Waiting uses a lot of CPU, so drop back to checking once/second
and allow user to pass in the interval.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-09-13 10:11:00 -04:00
baude 13ae41fbc2 dont make python when running make
Signed-off-by: baude <bbaude@redhat.com>

Closes: #1443
Approved by: mheon
2018-09-12 19:24:44 +00:00
Matthew Heon ca3ede2693 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-10 16:20:23 -04:00
Matthew Heon 947a46e32d Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-09-07 14:55:16 -04:00
Matthew Heon 73a1e81924 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-31 16:43:59 -04:00
Matthew Heon 34ed359595 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-24 17:16:36 -04:00
Matthew Heon 714dbbda9e Swap from FFJSON to easyjson
FFJSON has serialization differences versus stock Go - namely, it
does not respect the MarshalText() and UnmarshalText() methods,
particularly on []byte, which causes incompatability with
pre-FFJSON containers which contained DNS servers.

EasyJSON does not have these issues, and might even be slightly
faster.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1322
Approved by: mheon
2018-08-24 19:19:43 +00:00
Matthew Heon bd080b4530 Make 'make clean' remove FFJSON generated code
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1322
Approved by: mheon
2018-08-24 19:19:43 +00:00
Kunal Kushwaha 803dbf2041 make dbuild fixed on ubuntu/debian
Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>

Closes: #1309
Approved by: mheon
2018-08-21 12:52:27 +00:00
Matthew Heon 0443127c62 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-17 15:47:19 -04:00
Daniel J Walsh d20f3a5146 switch projectatomic to containers
Need to get some small changes into libpod to pull back into buildah
to complete buildah transition.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1270
Approved by: mheon
2018-08-16 17:12:36 +00:00
Matthew Heon 44987a5e71 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-11 15:14:53 -04:00
Matthew Heon 7d116f5f73
Merge pull request #1254 from mheon/systemd_cgroups_default
Switch default CGroup manager to systemd
2018-08-11 15:07:29 -04:00
Daniel J Walsh 029d5aad56 Bump gitvalidation epoch
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1256
Approved by: rhatdan
2018-08-10 22:27:35 +00:00
Matthew Heon 4b4fba0b44 Only use cgroupfs for containerized tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-10 13:57:54 -04:00
Matthew Heon 589a5d2d3e Don't require .gopathok for individual FFJSON targets
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1240
Approved by: rhatdan
2018-08-09 15:54:34 +00:00
Matthew Heon 7df49bc677 Add FFJSON generation to makefile
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #1240
Approved by: rhatdan
2018-08-09 15:54:34 +00:00
Daniel J Walsh 7d43e7c451 Pass DESTDIR down to python Makefile
In order to get a cleaner build out of the rpms we should
pass down the DESTDIR to the python Makefiles.  Then we
can use them instead of hard coding other inteligence into
the spec files.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1214
Approved by: baude
2018-08-07 14:52:30 +00:00
baude bd9d3a8fa5 Rename varlink socket and interface
io.projectatomic.podman -> io.podman

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1204
Approved by: mheon
2018-08-06 14:49:11 +00:00
Matthew Heon 650a199b1f Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-08-03 14:46:15 -04:00
Matthew Heon a83f54e9c7 Update gitvalidation epoch
Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #1210
Approved by: rhatdan
2018-08-03 14:31:55 +00:00
Matthew Heon 8a10bf5f42 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-27 12:05:42 -04:00
Daniel J Walsh 50fea69fbc Fix up docker compatibility messages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #1170
Approved by: mheon
2018-07-27 13:40:56 +00:00
Jhon Honce 9a18681ba6 [WIP] Refactor and simplify python builds
* pypodman namespaced in site-packages
* version numbers pulled from requirements.txt
* add python-podman spec file to install eggs

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #1106
Approved by: rhatdan
2018-07-23 18:53:44 +00:00
Matthew Heon 64f594279c Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-20 14:06:46 -04:00
Matthew Heon dc25b2172f Update gitvalidation epoch
Homu merged a commit without a signoff, update our Gitvalidation
epoch to after said commit to prevent problems.

Signed-off-by: Matthew Heon <mheon@redhat.com>

Closes: #1105
Approved by: vrothberg
2018-07-17 08:20:56 +00:00
Matthew Heon fa88d376ba Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-13 16:36:27 -04:00
Jhon Honce 74ccd9ce5f Update python directories to better support setup.py
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2018-07-13 12:50:12 -07:00
Valentin Rothberg 06ab343bd7 podman/libpod: add default AppArmor profile
Make users of libpod more secure by adding the libpod/apparmor package
to load a pre-defined AppArmor profile.  Large chunks of libpod/apparmor
come from github.com/moby/moby.

Also check if a specified AppArmor profile is actually loaded and throw
an error if necessary.

The default profile is loaded only on Linux builds with the `apparmor`
buildtag enabled.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #1063
Approved by: rhatdan
2018-07-11 16:36:24 +00:00
Matthew Heon 0b4c3da479 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-07-06 14:32:51 -04:00
W. Trevor King 4b54a471a4 Makefile: Use a pattern rule for cross-compilation
Pattern-rule documentation is in [1].  This commit follows the basic
approach from [2], with the portable build tags from [3].

Using --keep-going allows folks to see errors for multiple target
platforms.  For example, if the Darwin target dies, we'll still
attempt to build the Linux target before erroring out.

I've added an ALLOWED_TO_FAIL environment variable to mark script
blocks for the the allow_failures block.  Currently we're requiring
builds from Linux for Linux and OS X to succeed, but allowing builds
from OS X to both targets to fail.

[1]: https://www.gnu.org/software/make/manual/html_node/Pattern-Intro.html#Pattern-Intro
[2]: e5031fcf9a
[3]: https://github.com/kubernetes-incubator/cri-o/pull/1653

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #1034
Approved by: baude
2018-07-06 00:48:39 +00:00
baude cc6f0e85f9 more changes to compile darwin
this should represent the last major changes to get darwin to **compile**.  again,
the purpose here is to get darwin to compile so that we can eventually implement a
ci task that would protect against regressions for darwin compilation.

i have left the manual darwin compilation largely static still and in fact now only
interject (manually) two build tags to assist with the build.  trevor king has great
ideas on how to make this better and i will defer final implementation of those
to him.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1047
Approved by: rhatdan
2018-07-05 16:05:12 +00:00
W. Trevor King 7a5c376e63 Makefile: Use 'git diff' to show gofmt changes
This makes fixing errors easier.  Before this commit, errors looked
like [1]:

  $ make gofmt
  libpod/container_linux.go:1:⚠️ file is not gofmted with -s (gofmt)
  make: *** [gofmt] Error 1

But that's not very helpful when your local gofmt thinks the file is
fine.  With this commit, errors will look like:

  $ make gofmt
  find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
  git diff --exit-code
  diff --git a/libpod/container_internal.go b/libpod/container_internal.go
  index df4de3fe..22b39870 100644
  --- a/libpod/container_internal.go
  +++ b/libpod/container_internal.go
  @@ -1,7 +1,7 @@
   package libpod

   import (
  -"bytes"
  +       "bytes"
          "context"
          "encoding/json"
          "fmt"
  make: *** [Makefile:87: gofmt] Error 1

(or whatever, I just stuffed in a formatting error for demonstration
purposes).

Also remove the helper script in favor of direct Makefile calls,
because with Git handling difference reporting and exit status, this
becomes a simpler check.  find's -exec, !, and -path arguments are
specified in POSIX [2].

[1]: https://travis-ci.org/kubernetes-incubator/cri-o/jobs/331949394#L1075
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #1038
Approved by: rhatdan
2018-07-03 10:39:54 +00:00
baude b96be3af1b changes to allow for darwin compilation
Signed-off-by: baude <bbaude@redhat.com>

Closes: #1015
Approved by: baude
2018-06-29 20:44:09 +00:00
Matthew Heon 7a2298db6b Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-29 15:59:22 -04:00
Daniel J Walsh 208b9a6b6b Add podman-image and podman-container man page links
podman image and podman container have alternate CLI
to standard CLI for a lot of commands.  The man pages
can be shared between both.  This patch adds links so that
of some executes

`podman image load`, they will actually see the `podman load` man page.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #993
Approved by: mheon
2018-06-25 21:38:46 +00:00
baude e89bbd6068 make varlink optional for podman
some platforms and operating systems do not have varlink.  in those cases,
we need to be able to turn off enablement of varlink in podman. this can now
be done with BUILDTAGS passed to the build though perhaps in the future
will be better.

the default is to build with varlink

Signed-off-by: baude <bbaude@redhat.com>

squash! make varlink optional for podman

The API.md and cmd/podman/varlink/ioprojectatomicpodman.go targets
will continue to work regardless of the presence (or not) of 'varlink'
is in BUILDTAGS.  However, cmd/podman/varlink/ioprojectatomicpodman.go
is now only required by the podman target when BUILDTAGS contains
'varlink'.

API.md had also been an podman dependency since 5b2627dd (Makefile:
Drop find-godeps.sh for podman target, 2018-05-15, #776) when I
expanded varlink_api_generate.  It had been an indirect podman
dependency (via varlink_api_generate) since 25263558 (Generate varlink
API documentation automatically, 2018-05-07, #734).  But the podman
executable obviously doesn't depend on the Markdown file, so I'm
removing that dependency here.

Signed-off-by: baude <bbaude@redhat.com>

squash! make varlink optional for podman

The command-pointer approach will scale well if/when we add additional
optional commands behind their own build tags, because those tags
won't all be competing for the same getOptionalCommands namespace.

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #987
Approved by: rhatdan
2018-06-24 10:54:40 +00:00
Matthew Heon b8eeb4d128 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-22 15:55:06 -04:00
Matthew Heon fc81dd71fe Update gitvalidation epoch
A commit snuck through without a DCO, update to a commit after
the broken one.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #957
Approved by: mheon
2018-06-18 13:56:47 +00:00
Matthew Heon 7fe1f66826 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-15 11:15:14 -04:00
Daniel J Walsh b112164a82
Bump gitvalidation epoch
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-06-08 12:23:18 -04:00
Daniel J Walsh 7d6e717dd9 Update epoch to fix validation problems
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #922
Approved by: TomSweeneyRedHat
2018-06-07 17:13:34 +00:00
Matthew Heon 0521670432 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-06-01 18:20:13 -04:00
W. Trevor King e6b088fc6e Makefile: Add stderr redirect to HAS_PYTHON3 definition
For two reasons:

* When a system is missing python3, we don't need to spam them with
  "Command not found" in their stderr.

* Without the redirect, GNU Make (at least version 4.2.1) is overly
  clever and tries to invoke the command itself, not realizing that
  it's a shell builtin [1].

    $ make --version
    GNU Make 4.2.1
    Built for aarch64-unknown-linux-gnu
    Copyright (C) 1988-2016 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    $ cat Makefile
    PYTHON3_A := $(shell command -v python3)
    PYTHON3_B := $(shell command -v python3 2>/dev/null)

    test:
            @echo "SHELL: '$(SHELL)'"
            @echo "PYTHON3_A: '$(PYTHON3_A)'"
            @echo "PYTHON3_B: '$(PYTHON3_B)'"
    $ make
    make: command: Command not found
    SHELL: '/bin/sh'
    PYTHON3_A: ''
    PYTHON3_B: '/usr/bin/python3'

  By adding the redirect we actually hit the shell and can
  successfully invoke command.

[1]: https://stackoverflow.com/a/17550243

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #856
Approved by: rhatdan
2018-05-31 12:57:34 +00:00
Daniel J Walsh 71487466fb Cleanup man pages
Format md files to work properly when converted to man pages.
Add sed command to cleanup table in podman man page.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #842
Approved by: mheon
2018-05-30 13:49:45 +00:00
baude 8b3f8076c7 Remove varlink's generated Go file
Signed-off-by: baude <bbaude@redhat.com>

Closes: #840
Approved by: baude
2018-05-29 20:25:10 +00:00
Matthew Heon a9f200065c Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-25 13:49:19 -04:00
Lokesh Mandvekar 687b165a73 use $GO env-var instead of hard-coded go binary
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>

Closes: #817
Approved by: TomSweeneyRedHat
2018-05-21 17:53:07 +00:00
baude 390bd16d37 tidy up the copr spec
on os's (like centos) where python3 might not be installed, do not attempt to build
the python3 varlink client.  varlink python is only supported on python3.

also, change the conditions for f28 to match the fedora official specs.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #813
Approved by: baude
2018-05-21 17:19:14 +00:00
Daniel J Walsh 9d7c50aa03 Tighten the security on the podman varlink socket
We only want root to be allowed to access this socket.
Also move socket to /run/podman directory.  This requires
us to drop a podman.conf tmpfiles.d file.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #806
Approved by: mheon
2018-05-19 07:47:03 +00:00
Matthew Heon 133df588a6 Update gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-18 12:42:09 -04:00
W. Trevor King ea4156108d hooks/docs: Add oci-hooks.5 and per-package man page building
This allows us to reference the hooks docs from podman(1) in a way
that will survive system installation.  The downside is that the
GitHub rendered pages become less usable, now that we can no longer
embed links as freely as we could before.

I've followed the "Sections within a manual page" suggestions from
[1].

locale(7) is [2], which is Linux-specific.  Even section numbering is
platform-dependent [3], so it's unlikely that these external man
references are particularly portable.  Platform packagers can adjust
our local references to match their target system, but that leaves the
GitHub rendering in an awkward place.  For now, I think a
Linux-centric GitHub rendering without clickable links may be the best
we can do without moving away from go-md2man.

As far as I can tell, there's not a nice way to get go-md2man to wrap
the links in SEE ALSO without sometimes hyphenating a URL (which makes
it harder for man-page readers to copy/paste those links into their
browser).

I've also fixed some "extention" -> "extension" typos.

[1]: http://man7.org/linux/man-pages/man7/man-pages.7.html
[2]: http://man7.org/linux/man-pages/man7/locale.7.html
[3]: https://en.wikipedia.org/wiki/Man_page#Manual_sections

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #772
Approved by: mheon
2018-05-17 18:22:10 +00:00
W. Trevor King 624660c1b3 Makefile: Use ?= for shell variables (ISODATE, etc.)
Previously, Make would execute these shell commands even if we didn't
need the resulting variable.  With ?='s recursive expansion [1], we
only expand the variable when it's consumed.  For example, the ISODATE
variable is only needed in the recipe for the changelog target, so
most Make invocations won't need the value, and the computation is
just making whatever Make actually is doing slower.

I've shifted the GIT_COMMIT and BUILD_INFO values over to
LDFLAGS_PODMAN, because the test/*/* targets don't care about those.
I've also moved the Go-specific -ldflags from the variables into the
recipes themselves, because callers probably expect C semantics for
LDFLAGS and not Go's wrapper.  That means that there's no longer a
need for the LDFLAGS/BASE_LDFLAGS separation, so I'm just using
LDFLAGS (and LDFLAGS_PODMAN) now.  That reduces the declared variables
to just LDFLAGS_PODMAN, so I've shifted that declaration up to get it
closer to its GIT_COMMIT and BUILD_INFO precursors.

[1]: https://www.gnu.org/software/make/manual/html_node/Setting.html

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #777
Approved by: rhatdan
2018-05-17 00:18:43 +00:00
W. Trevor King db388b1949 Makefile: Respect GOBIN
And use 'go env GOBIN' to detect the user's existing preference.  From
[1]:

> The bin directory holds compiled commands.  Each command is named
> for its source directory, but only the final element, not the entire
> path.  That is, the command with source in DIR/src/foo/quux is
> installed into DIR/bin/quux, not DIR/bin/foo/quux.  The "foo/"
> prefix is stripped so that you can add DIR/bin to your PATH to get
> at the installed commands.  If the GOBIN environment variable is
> set, commands are installed to the directory it names instead of
> DIR/bin.  GOBIN must be an absolute path.
> ...
> Go searches each directory listed in GOPATH to find source code, but
> new packages are always downloaded into the first directory in the
> list.

So if GOBIN is set, it will be non-empty, and we can use $(GOBIN)/...

If GOBIN is unset, 'go env GOBIN' will return an empty string (as it
does on Travis [2]).  In that case, I'm assuming that the package in
question is in the first directory in GOPATH and using the new
FIRST_GOPATH (firstword and subst are documented in [3]).  That's
probably fairly safe, since our previous GOPATH handling assumed it
only contained a single path, and nobody was complaining about that.

Using ?= allows us to skip the 'dirname' call if we end up not needing
GOPKGBASEDIR [4] (e.g. for the 'help' target).  The recursive
expansion could cause an issue if the result of the shell expansions
included a '$', but those seem unlikely in GOPKGBASEDIR, GOMD2MAN, or
the manpage paths.  I haven't used ?= for GOBIN, because we'll always
need the expanded value for the if check.

Using GOMD2MAN allows us to collapse old ||-based recipe into a less
confusing invocation.  And using a static pattern rule [5] for
$(MANPAGES) lets us write a single rule to handle both section 1 and
section 5.

While I was updating the GOPATH handling, I moved .gopathok from the
possibly-shared $(GOPATH)/.gopathok to the
definitely-specific-to-this-project .gopathok.  That may cause some
issues if you rebuild after changing your GOPATH without calling
'clean', but I don't expect folks to change their GOPATH frequently.
And the old approach would fail if different consumers were also using
the same flag path to mean something else (as CRI-O does [6]).

As part of cleaning up .gopathok, I've also collapsed clean's rm calls
into a single invocation.  That will give us the same results with
less process setup/teardown penalties.

[1]: https://golang.org/cmd/go/#hdr-GOPATH_environment_variable
[2]: https://travis-ci.org/projectatomic/libpod/jobs/379345071#L459
[3]: https://www.gnu.org/software/make/manual/html_node/Text-Functions.html
[4]: https://www.gnu.org/software/make/manual/html_node/Setting.html
[5]: https://www.gnu.org/software/make/manual/html_node/Static-Usage.html
[6]: https://github.com/kubernetes-incubator/cri-o/blob/v1.10.1/Makefile#L62

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #774
Approved by: mheon
2018-05-16 17:31:55 +00:00
W. Trevor King 5b2627dd77 Makefile: Drop find-godeps.sh for podman target
We inherited this from a031b83a (Initial checkin from CRI-O repo,
2017-11-01), but:

* The output is actually going into bin/podman, so Make will rebuild
  this target every time.  You'll never be able to save compilation
  because the target is newer than all the prerequisites.

* Make expands prerequisites immediately when loading a Makefile [1],
  and on my wimpy Chromebook SD Card, this is *slow*:

    $ time hack/find-godeps.sh ~/.local/lib/go/src/github.com/projectatomic/libpod cmd/podman github.com/projectatomic/libpod
    ...
    real    0m56.225s
    user    0m44.918s
    sys     0m21.918s

* Go is pretty good at this on its own, so having make call 'go build'
  every time will almost certainly be faster than us trying to mimic
  this in a shell script.  And by punting to Go in the recipe, Make
  invocations that do not need the podman target (e.g. 'make help')
  can skip the dependency lookup entirely.

[1]: https://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html#Rule-Definition

Signed-off-by: W. Trevor King <wking@tremily.us>

Closes: #776
Approved by: rhatdan
2018-05-16 15:42:34 +00:00
Jhon Honce 1aaf8df5be Refactor libpod python varlink bindings
- More pythonic
- Leverage context managers to help with socket leaks
- Add system unittest's
- Add image unittest's
- Add container unittest's
- Add models for system, containers and images, and their collections
- Add helper functions for datetime parsing/formatting
- GetInfo() implemented
- Add support for setuptools
- Update documentation
- Support for Python 3.4-3.6

Signed-off-by: Jhon Honce <jhonce@redhat.com>

Closes: #748
Approved by: baude
2018-05-16 14:01:10 +00:00
Matthew Heon 266fe390c2 Update gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-11 13:22:18 -04:00
baude 25263558f1 Generate varlink API documentation automatically
Using varlink's idl parser, we generate API documentation for the podman
API relying on the .varlink file as the source.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #734
Approved by: baude
2018-05-08 21:01:28 +00:00
Matthew Heon d04ebf8419 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-05-04 11:36:36 -04:00
TomSweeneyRedHat 9fc85522fb Add directory for systemd socket and service if not present
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #717
Approved by: baude
2018-05-03 19:39:41 +00:00
baude c8c39779a7 correct varlink command in service file
The struct of the varlink command changed to accept a URI
as input.  This was never updated in the service file

Signed-off-by: baude <bbaude@redhat.com>

Closes: #691
Approved by: mheon
2018-04-30 20:45:33 +00:00
Matthew Heon d9cced240b Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-27 17:25:27 -04:00
baude a824186ac9 Use buildah commit and bud in podman
Vendor in buildah and use as much of commit and bug as possible for podman
build and commit.

Resolves #586
Signed-off-by: baude <bbaude@redhat.com>

Closes: #681
Approved by: mheon
2018-04-27 20:51:07 +00:00
baude 39a7a773a6 varlink images
implement varlink image functions for working with libpod with the exception of a
couple due to incompletions on the libpod side of things (build).

also, created a first pass at a libpodpy package which will stand as a client to
working with libpod's varlink methods using python.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #669
Approved by: baude
2018-04-26 19:14:44 +00:00
baude 58cb8f742b updated epoch for bad dco
Signed-off-by: baude <bbaude@redhat.com>

Closes: #673
Approved by: mheon
2018-04-25 21:44:27 +00:00
Harald Hoyer 57359619e8 Only generate the varlink glue code if needed and from the vendor dir
Closes: #671
Approved by: baude
2018-04-25 19:49:42 +00:00
Giuseppe Scrivano 9c518eb8b4 Makefile; make podman depend on varlink_generate
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #663
Approved by: baude
2018-04-24 15:51:07 +00:00
Daniel J Walsh c78ce0e8fd
Merge pull request #641 from nathwill/man-libpod
add libpod.conf man page (closes #537)
2018-04-23 20:49:30 -04:00
baude 8493dba23c Initial varlink implementation
Signed-off-by: baude <bbaude@redhat.com>

Closes: #627
Approved by: mheon
2018-04-23 14:29:45 +00:00
Nathan Williams 79f08c4699 add libpod.conf man page
Signed-off-by: Nathan Williams <nath.e.will@gmail.com>
2018-04-21 22:37:21 -07:00
Matthew Heon 97ce49681a Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-20 11:41:29 -04:00
baude 7580b1c204 Add make .git target
Runs gomfmt and gitvalidation

Signed-off-by: baude <bbaude@redhat.com>

Closes: #589
Approved by: mheon
2018-04-20 14:30:37 +00:00
Matthew Heon df9ebb024d Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-13 14:51:23 -04:00
Matthew Heon 782cf60ebb Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-04-05 13:10:29 -04:00
Marcos Paulo de Souza f41dc0b258 Makefile: Fix typo podmon -> podman
This typo was introduced in 3aa63b2b

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>

Closes: #578
Approved by: rhatdan
2018-04-02 20:16:06 +00:00
Matthew Heon 567902542e Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-29 13:33:09 -04:00
Matthew Heon 6a0282a609 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-23 14:00:15 -04:00
Valentin Rothberg 9416e2d784 Makefile: add changelog target
Maintaining a changelog for each new version or release of Podman helps
users to quickly skim for new changes.  Add a `make changelog` target to
facilitate creating a new log.

There are two env variables to control the base and target commit for
the new log.  The output gets prepended to the changelog.txt file, which
is a textfile in following format:
- Changelog for $(CHANGELOG_TARGET) (ISO-8601 DATE):
  * Commit subject
  * Commit subject...

Notice that the list of commit subjects excludes merge commits, and can
be manually modified after generation if needed.

`CHANGELOG_BASE=v0.3.2 CHANGELOG_TARGET=v0.3.3 make changelog` would
generate the following shortened output to the changelog.txt file:

Changelog for v0.3.3 (2018-03-17):
  * Bump to v0.3.3
  * Fix build after c/image changes
  * Update containers/image
  * Fix E2E tests
  * Address review comments
  * Fix E2E tests
  * Add restart to main podman manpage
  * Add podman restart to podman bash completions and commands

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>
2018-03-21 13:44:35 +01:00
Matthew Heon bd687aaac1 Bump gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-16 11:06:08 -04:00
Valentin Rothberg 3fe87b011d make shell: build, test and run in a container
Some of the paths in the e2e tests are hard-coded, which complicates
testing a bit on systems with different paths for runc, conmon, etc.
Add a make shell target to the Makefile, which will build and run the
libpod containers, giving a shell to the user in which podman can be
built, run, tested etc.

Signed-off-by: Valentin Rothberg <vrothberg@suse.com>

Closes: #481
Approved by: rhatdan
2018-03-13 17:18:23 +00:00
Matthew Heon 80723e4b9b Update gitvalidation epoch
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-09 10:08:32 -05:00
Matthew Heon 04d56c9fe3 Update test-related makefile targets
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #460
Approved by: rhatdan
2018-03-08 08:54:32 +00:00
baude f57b7bbf43 Do not strip binaries
We should not strip binaries in Make. That should be left to packages.  Also,
we can not debug stripped binaries so this allows us to debug better as well.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #459
Approved by: rhatdan
2018-03-07 20:57:19 +00:00
Matthew Heon 32be712cd3 Change standard config path and add override config
The standard config has moved to /usr/share/containers/ per
discussion. An override configuration file is allowed at the
previous /etc/containers/ location. This override will be used in
place of the normal config if both are present, and exists to
override distro packaged configs without modifying the standard
config.

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
Matthew Heon d589c9fc38 Add support to load runtime configuration from config file
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #430
Approved by: rhatdan
2018-03-06 01:21:09 +00:00
baude 4f4a78abb4 networking.go tweak iptables functions
Took duplicated code and merged it into the helper function so only a single
exec was executed.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #446
Approved by: mheon
2018-03-03 19:45:24 +00:00
Matthew Heon bd7de5d5dd Bump to v0.3.2-dev
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2018-03-02 15:38:34 -05:00
baude 45478b7843 Re-enable copr builds
New structure for copr builds which hopefully is more stable

Signed-off-by: baude <bbaude@redhat.com>
2018-02-28 13:08:35 -06:00
baude 586bb86a2a Run podman inside a podman container
We should be able to run nested podman containers in particular
for our testing environment. i.e. eat our own dog food.

Some privileges had to be corrected in order for this to work
correctly.

Added a third papr target that runs podman tests inside podman.  I
marked the test as not required right now as we get more confident
in the results

Signed-off-by: baude <bbaude@redhat.com>

Closes: #340
Approved by: rhatdan
2018-02-16 18:35:54 +00:00
Matthew Heon bc1d25bb19 Remove last traces of old version scheme
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #345
Approved by: rhatdan
2018-02-16 18:14:33 +00:00
baude 773aa61f66 Revert to md2man master
Upstream md2man is working again.  We can revert to using it instead
of a specific commit id.

Also, add make integration.CentOS for testing

Signed-off-by: baude <bbaude@redhat.com>

Closes: #320
Approved by: rhatdan
2018-02-10 11:24:16 +00:00
baude 4ea26aace4 libpod/finished_amd64.go -> libpod/finished64.go
Rename finished_amd64 to finished64.go to more accurately reflect
that it covers all 64bit arches.

Also, bumped the EPOCH for gitvalidation to speed up validations.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #318
Approved by: mheon
2018-02-09 17:00:04 +00:00
baude c089cb9c92 Final ginkgo migration
Completion of the migration from bats to ginkgo.  This includes:

* load
* mount
* pause
* port
* run_networking
* search

Note: build will be done within a different PR

Signed-off-by: baude <bbaude@redhat.com>
2018-02-08 12:37:07 -06:00
baude 3609b82fe6 Migrate diff, exec, export, and history to ginkgo
Migrate the diff, exec, export, and history bats tests to
the ginkgo test suite.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #287
Approved by: baude
2018-02-05 20:17:37 +00:00
baude dd133a1ad2 Initial gingko work
This implements the ginkgo integration test framework for
podman.  As tests are migrated from bats to ginkgo, we will
still run both integration suites.  When a test is migrated,
we remove the tests from bats at that time.  All new tests
should be just for the ginkgo framework.

One exception is that we only run the ginkgo suit in the
travis/ubuntu environment.  The CentOS and Fedora PAPR nodes
will more than cover those.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #261
Approved by: baude
2018-01-29 19:12:20 +00:00
Daniel J Walsh 3aa63b2b94 Remove conmon, get package from CRI-O
conmon should not be built in two different places.
conmon is now a separate package in Fedora so we can just
add requires, for use on Ubuntu we can just require cri-o to
be installed.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #151
Approved by: mheon
2018-01-27 06:48:20 +00:00
baude 946b4ced54 Enable port bindings
Set up nbetworking ports for the following use cases:

* bind the same port between host and container
* bind a specific host port to a different container port
* bind a random host port to a specific container port

Signed-off-by: baude <bbaude@redhat.com>

Closes: #214
Approved by: baude
2018-01-20 18:51:21 +00:00
TomSweeneyRedHat 8657d70e72 Touchup README.md and fix whitespace issues
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Closes: #243
Approved by: mheon
2018-01-19 01:12:40 +00:00
Daniel J Walsh 858116f648
Merge pull request #216 from rhatdan/docker
Add support for mimicing docker CLI
2018-01-18 14:51:46 -05:00
Daniel J Walsh 0207e629ee Add support for mimicing docker CLI
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2018-01-18 07:01:48 -05:00
Daniel J Walsh 0befd8dafd ETCDIR should be relative to DESTDIR
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #237
Approved by: rhatdan
2018-01-17 21:40:20 +00:00
baude 3eca5cd4ca update gitvalidation epoch
updating the gitvalidation epoch to speed up
git validations.

Signed-off-by: baude <bbaude@redhat.com>
2018-01-12 08:45:50 -06:00
Dan Williams 69a415f033 cni: 98-podman-loopback.conf is not needed
ocicni internally handles the loopback so this file is not required.

Signed-off-by: Dan Williams <dcbw@redhat.com>

Closes: #193
Approved by: mheon
2018-01-08 14:10:51 +00:00
baude 7f531263e6 Add default CNI configuration
podman needs a pair of configuration files to set up its default
network configuration: a bridge and loopback file.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #161
Approved by: baude
2017-12-22 19:23:36 +00:00
Daniel J Walsh 5770dc2640 Rename all references to kpod to podman
The decision is in, kpod is going to be named podman.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>

Closes: #145
Approved by: umohnani8
2017-12-18 16:46:05 +00:00
baude 90d984ef9a Use incremental go build
Speed up kpod builds by not recompiling eveything but only
what has changed.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #139
Approved by: rhatdan
2017-12-14 23:00:23 +00:00
baude 61f606e192 Add fix_gofmt target
fix_gofmt will run gofmt -s -w on files that need to be
formatted.  Useful for developers prior to checking code
in.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #125
Approved by: baude
2017-12-13 20:52:51 +00:00
Matthew Heon 6ba6b186a4 Update gitvalidation epoch to ignore older errors after update
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #85
Approved by: rhatdan
2017-11-29 17:57:32 +00:00
baude d2eda1a864 Enhancements to papr tests
The PR contains several enhancements to our CI testing.

- enable lint testing on Fedora
- add Centos Atomic as test platform
- integration tests on run on the OS natively (uncontainerized)
- builds are done in containers
- inclusion of Vagrant file for local testing

Signed-off-by: baude <bbaude@redhat.com>

Closes: #18
Approved by: mheon
2017-11-17 02:07:18 +00:00
baude acd9c66864 Fix terminal attach
Re-order the startup of a new container via run from
initialize > start > attach to initialize > attach > start.

This fixes output when running:

kpod run -i -t IMAGE command

and

kpod run IMAGE command

Signed-off-by: baude <bbaude@redhat.com>
2017-11-15 16:27:57 -06:00
baude 5b6fb0411a Makefile: Add repo EPOCH
The git ID for the repo's EPOCH was incorrect in the Makefile
so .gitvalidation would not run correctly.

Signed-off-by: baude <bbaude@redhat.com>
2017-11-03 10:12:44 -05:00
Daniel J Walsh f590429592 Add .papr support
Don't run lint for now, since we seem to be running out of memory.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-02 18:10:50 -04:00
Daniel J Walsh 10006e787e No man5 or man8 man pages
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-11-02 15:30:10 -04:00
Matthew Heon eab0737f11 Fix makefile issue
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 14:20:05 -04:00
Matthew Heon 7fa1efd0d7 Fix paths for tests
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 13:39:16 -04:00
Matthew Heon c13f61798a Prune Server package. Convert to new github location.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 13:22:04 -04:00
Matthew Heon 637de4d0d3 Remove CRI-O binaries and makefile targets
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 11:51:10 -04:00
Matthew Heon a031b83a09 Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
2017-11-01 11:24:59 -04:00