5964 Commits

Author SHA1 Message Date
f81f15f422 Merge pull request #4677 from baude/execenvfile
allow exec to read files of environment variables
2019-12-11 21:22:59 +01:00
5941138fdd Merge pull request #4680 from mheon/bump-1.7.0-rc1
Bump to v1.7.0-RC1
2019-12-11 20:00:42 +01:00
70782b271f Bump gitvalidation epoch
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-11 12:49:31 -05:00
17c369c255 Bump to v1.7.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-11 12:49:31 -05:00
7bbef419fb Bump to v1.7.0-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
v1.7.0-rc1
2019-12-11 12:49:25 -05:00
11541aec80 Merge pull request #4667 from mheon/release_notes_1.6.4
Update release notes for 1.7.0
2019-12-11 17:19:18 +01:00
dd64038192 Merge pull request #4664 from baude/movefilters
move image filters under libpod/images
2019-12-11 16:58:54 +01:00
668d77a12c Merge pull request #4668 from containers/dependabot/go_modules/github.com/containers/psgo-1.4.0
build(deps): bump github.com/containers/psgo from 1.3.2 to 1.4.0
2019-12-11 16:32:30 +01:00
a332825ff5 allow exec to read files of environment variables
we want the ability to define environment variables in files for the
exec command.

Fixes: #1782408

Signed-off-by: baude <bbaude@redhat.com>
2019-12-11 09:21:24 -06:00
c4df64a866 Update release notes for 1.7.0
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-11 09:39:38 -05:00
a18de10499 Merge pull request #4674 from mheon/readd_fedora_migration
Re-add Fedora 31 migration code.
2019-12-11 10:55:38 +01:00
a994067e65 docs: update podman-{pod-,}top man pages
c/psgo added a new `stime` descriptor.  Mention that in the man page and
refer to podman-top(1) in podman-pod-top(1) to avoid redundancy.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-12-11 10:50:27 +01:00
5941894757 build(deps): bump github.com/containers/psgo from 1.3.2 to 1.4.0
Bumps [github.com/containers/psgo](https://github.com/containers/psgo) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/containers/psgo/releases)
- [Commits](https://github.com/containers/psgo/compare/v1.3.2...v1.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-12-11 10:47:21 +01:00
282787f1ff Merge pull request #4675 from mheon/update_cstorage_1153
Update containers/storage to v1.15.3
2019-12-11 02:15:55 +01:00
18436ec71b Update containers/storage to v1.15.3
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-10 17:19:27 -05:00
8be7b466d8 move image filters under libpod/images
to make things more effecient for the api work we are doing, we should
process image filters internally (as opposed to in main).  this allows
for better api responses and more closely affiliated functions.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-10 13:05:18 -06:00
0355c28edf Re-add Fedora 31 migration code.
In the process, make everything in the config omitempty in TOML.
We're seeing issues (notably [1]) where, after rewriting
libpod.conf, fields that were not previously populated are
written - and, because they were not previously written, they are
included as empty. This is unfortunately different from not
included at all - it means that we need to assume the user
explicitly unset the value, and we can't use defaults. Setting
omitempty prevents us from writing things that should not be
written as they were not set originally.

[1] https://github.com/containers/libpod/issues/4210

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-10 13:50:17 -05:00
c2dab75f0e Merge pull request #4517 from baude/macvlan
macvlan networks
2019-12-09 07:53:55 -08:00
ef872dcd21 macvlan networks
add the ability to a macvlan network with podman network create.

Signed-off-by: baude <bbaude@redhat.com>
2019-12-09 08:40:40 -06:00
225c7ae6c9 Correctly export the root file-system changes
When doing a checkpoint with --export the root file-system diff was not
working as expected. Instead of getting the changes from the running
container to the highest storage layer it got the changes from the
highest layer to that parent's layer. For a one layer container this
could mean that the complete root file-system is part of the checkpoint.

With this commit this changes to use the same functionality as 'podman
diff'. This actually enables to correctly diff the root file-system
including tracking deleted files.

This also removes the non-working helper functions from libpod/diff.go.

Signed-off-by: Adrian Reber <areber@redhat.com>
2019-12-09 13:29:36 +01:00
7287f69b52 Merge pull request #4657 from jdieter/fix-runtime-path-when-root
Return empty runtime directory if we're not rootless
2019-12-07 14:48:25 -08:00
b3014c1c69 Return empty runtime directory if we're not rootless
Currently, we return a runtime directory of the form
`/run/user/<uid>`, even when running as root.  Depending on configuration,
that directory may be deleted when the user logs out, which is quite
awkward when the container is started as a systemd service and then
someone logs in and out as root.

This patch fixes the problem by returning an empty runtime directory if the
container is being started by root.  The runtime should automatically use
the default runtime directory (`/run/crun` when crun is used), which should
be accessible to root.

Tested in Fedora 31 by running containers under both root and a regular
user.  State for root containers is stored in `/run/crun`, while state for
rootless containers is in `/run/user/<uid>/crun`.

Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
2019-12-07 14:18:55 +00:00
82a83b9ff5 Merge pull request #4440 from edsantiago/bats
test for #3920 (improper caching of tarballs in build)
2019-12-06 08:18:11 -08:00
8924a302a2 Merge pull request #4563 from mheon/fix_change_parsing
Fix parsing for arrays of values in image changes
2019-12-06 04:09:06 -08:00
e9c4820601 Merge pull request #4651 from marcov/detach-config
Use terminal detach keys sequence specified in the config file
2019-12-06 02:48:24 -08:00
5c6eb1a94e Merge pull request #4652 from containers/dependabot/go_modules/github.com/containers/storage-1.15.2
build(deps): bump github.com/containers/storage from 1.15.0 to 1.15.2
2019-12-06 02:31:18 -08:00
625a02a286 build(deps): bump github.com/containers/storage from 1.15.0 to 1.15.2
Bumps [github.com/containers/storage](https://github.com/containers/storage) from 1.15.0 to 1.15.2.
- [Release notes](https://github.com/containers/storage/releases)
- [Changelog](https://github.com/containers/storage/blob/master/docs/containers-storage-changes.md)
- [Commits](https://github.com/containers/storage/compare/v1.15.0...v1.15.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2019-12-06 10:27:06 +01:00
7fa5d9b39d Use terminal detach keys sequence specified in the config file
Fixes: #4556

Signed-off-by: Marco Vedovati <mv@sba.lat>
2019-12-06 09:30:26 +01:00
60bfa305a8 Add ONBUILD support to --change
Return types had to change a bit for this, but since we can wrap
the old v1.ImageConfig, changes are overall not particularly bad.

At present, I believe this only works with commit, not import.
This matches how things were before we changed to the new parsing
so I think this is fine.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-05 15:11:40 -05:00
c4fbd2fc94 Move Commit() to new parsing for --change
It turns out we had two independent parsing impkementations for
Dockerfile instructions out of --change. My previous commit fixed
the one used in --change, but as I discovered to my dismay,
commit used a different implementation. Remove that and use the
new parsing implementation instead.

While we're at it, fix some bugs in the current commit code. The
addition of anonymous named volumes to Libpod recently means we
can now include those in the image config when committing. Some
changes (VOLUME, ENV, EXPOSE, LABEL) previously cleared the
config of the former image when used; Docker does not do this, so
I removed that behavior.

Still needs fixing: the new implementation does not support
ONBUILD, while the old one did.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-05 13:19:47 -05:00
465e142bf2 Merge pull request #4601 from ssbarnea/fix/test-build-rpm-changes
Enable multi-platform rpm building
2019-12-05 09:06:20 -08:00
4fb724c72e Merge pull request #4639 from giuseppe/fix-stats-pod
libpod: fix stats for rootless pods
2019-12-05 07:35:29 -08:00
ae839dad5a Merge pull request #4638 from ssbarnea/fix/detach
Avoid git warnings by using detach on checkout
2019-12-05 07:22:41 -08:00
235d4e457a test for #3920 (improper caching of tarballs in build)
See https://github.com/containers/buildah/pull/1955

I've confirmed that this test fails under podman-1.6.2-2.fc30
and passes under current master.

Signed-off-by: Ed Santiago <santiago@redhat.com>
2019-12-05 07:28:18 -07:00
813b00e439 Merge pull request #4642 from TomSweeneyRedHat/dev/tsweeney/buildah1.11.5
Bump Buildah to v1.11.6
2019-12-05 06:27:15 -08:00
a03c3a9318 Enable multi-platform rpm building
- make: fix python detection for multiple interpreters
- make: create generic `package` and `package-install` targets
- build_rpm.sh: move package installation into package-install
- build_rpm.sh: fix dnf/yum detection
- build_rpm.sh: install md2man rpm only on platfroms where is available
- build_rpm.sh: temporary skip packaging docs and debug on rhel-8
- docs: `make package-install`

This change is validated by new CI jobs run by rdoproject. See link
below for result.

Depends-On: https://review.rdoproject.org/r/#/c/23943/
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-05 10:34:10 +00:00
bc40282aec Merge pull request #4644 from ssbarnea/fix/hack-release
Improve hack/get_release_info.sh
2019-12-05 00:31:45 -08:00
001d06d7f6 Completely rework --change parsing
The way we were trying to parse was very broken. I originally
attempted to use Buildah's Dockerfile parser here, but dealing
with it (and convincing it to accept only a limited subset, and
only one instruction at a time) was challenging, so I rewrote a
subset of Dockerfile parsing. This should handle most common
cases well, though there are definitely unhandled edge cases for
ENV and LABEL.

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-12-04 18:55:30 -05:00
b8ac3f143b Avoid git warnings by using detach on checkout
Git displays a huge and confusing warning when doing a checkout of
a specific commit if the --detach option is not mentioned.

This cleans up our build logs, making it easier to spot real problems.

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-04 21:44:11 +00:00
4dbab37e05 Merge pull request #4640 from ssbarnea/fix/dnf
Improve dnf tests inside build_rpm.sh
2019-12-04 08:50:40 -08:00
9db92d540a Improve hack/get_release_info.sh
- Adopt bash strict mode
- Avoid cd errors as seen on CI vendor jobs:
hack/get_release_info.sh: line 9: cd: /go/src/github.com/containers/libpod: No such file or directory

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-04 16:23:55 +00:00
5851dacc32 Bump Buildah to v1.11.6
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2019-12-04 10:08:14 -05:00
e47b7a61d9 Merge pull request #4637 from giuseppe/check-for-renameat2-runtime
rootless: add fallback for renameat2 at runtime
2019-12-04 05:25:17 -08:00
077ee1a10d rootless: enable stats test on cgroup v2
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-04 13:11:58 +01:00
578a836d7d Improve dnf tests inside build_rpm.sh
- Fix bug failing to detect dnf in various locations
- Add missing sudo to yum/dnf calls
- Fix bug where pkg_manager may endup with a multi-line value

Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-04 10:48:26 +00:00
3f1675d902 libpod: fix stats for rootless pods
honor the systemd parent directory when specified.

Closes: https://github.com/containers/libpod/issues/4634

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-04 11:13:40 +01:00
a94e625868 rootless: add fallback for renameat2 at runtime
the renameat2 syscall might be defined in the C library but lacking
support in the kernel.

In such case, let it fallback to open(O_CREAT)+rename as it does on
systems lacking the definition for renameat2.

Closes: https://github.com/containers/libpod/issues/4570

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-12-04 10:30:40 +01:00
10f733497f Merge pull request #4635 from ssbarnea/fix/go-md2man
Attempt to install go-md2man only if missing
2019-12-03 17:37:54 -08:00
cf5bca1338 Attempt to install go-md2man only if missing
Fixes: #4632
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2019-12-03 19:47:42 +00:00
06e2a20b3d Merge pull request #4630 from TomSweeneyRedHat/dev/tsweeney/rootlesstouchup
Quick grammar touchup in rootless.md
2019-12-03 10:36:10 -08:00