Commit graph

465 commits

Author SHA1 Message Date
Valentin Rothberg 1c95e66b20 contrib/gate/Dockerfile: bump to F31
Use fedora:31 as a base image and rebuild to fetch the latest tools.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-15 08:28:56 +01:00
Daniel J Walsh f822410a15
revert accidental change from codespell pr.
This should use `od` not `of`

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-13 15:54:07 -05:00
OpenShift Merge Robot 796ae87b1a
Merge pull request #4850 from vrothberg/fix-linting
Fix linting
2020-01-13 21:03:21 +01:00
OpenShift Merge Robot e83a1b87da
Merge pull request #4817 from rhatdan/codespell
Add codespell to validate spelling mistakes in code.
2020-01-13 17:59:58 +01:00
Valentin Rothberg 6041f707ca rm contrib/perftest
Perftest was intended to be used for testing CPU intensive tasks of
Podman.  However, it does not compile for a long while and is not
integrated in the CI which clearly indicates that it has not been
used for a considerable amount of time.

Remove contrib/perftest entirely.  If the desire arises to revive it,
all code is still reachable in the git history.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-01-13 14:26:57 +01:00
Daniel J Walsh 4093b2c011
Add codespell to validate spelling mistakes in code.
Fix all errors found by codespell

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-01-11 06:32:19 -05:00
Chris Evich 49be255fee
Cirrus: Fix libpod base images going stale
VM Base images are used as a starting point for runtime VM images.
The in-use VM base images should never be pruned, which is an
operation that potentially occurs periodically from automation
running on the master branch of the libpod repo.

However the only place which updates timestamps (blocking pruning)
of base images, occurs during runtime VM image building.  Therefor,
if images are not regularly rebuilt, it's possible their base images
go stale and are pruned.

Changes:

* Add freshly-produced base images (old ones got pruned)
* Wrap the timestamp update script to include base image names
in the update list.

Notes:

* Regularly updating base image timestamps only needs to happen
on the libpod repo's meta task, since all base images live there.
* Using a wrapper is needed to maintain compatibility with multiple
versions of the imgts container image used by other repos / branchs.

Signed-off-by: Chris Evich <cevich@redhat.com>
2020-01-10 13:13:27 -05:00
TomSweeneyRedHat 77994c4957 Update podmanimage build process
(Stealing from: @rhatdan 's https://github.com/containers/buildah/pull/2038 )

1 We need to update all packages in the podman image to make sure they are
up2date.
2 reinstall shadow-utils. For some reason the fedora base image does not
include the file capabilities assigned to /usr/bin/newuidmap and
/usr/bin/newgidmap. Reinstalling shadow-utils, brings them back.
3 Add a default user build to the system. This will create the
/etc/subuid and /etc/subgid maps get created correctly.

Once we have this we should be able to build a container starting with a non
privileged user

podman run -ti --user build --device=/dev/fuse -v ./Dockerfile:/Dockerfile:z quay.io/podman/stable podman buildd /

Addresses: #4741

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
2020-01-08 14:21:21 -05:00
Sorin Sbarnea da0319fecd packaging: validate installed rpms
Previously we builded RPMs that contained an outdated conmon which was
not compatible. From now on `make-install` will also call
`podman version` and `podman info` in order to perform a minimal
sanity check of the installation.

Fixes: #4665
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
2020-01-07 20:06:27 +00:00
Matthew Heon 08849db4b0 Bump to v1.7.1-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-01-06 15:16:38 -05:00
Neville Cain 16b793a45a Generate binaries only if they are changes in src code.
Changes I am making:

1. The target `.gopathok` was listed in `.PHONY` which
looks wrong as it regenerates `.gopathok` every time we
 re-run it, which was a part of the issue. I removed it
 to avoid that. If `.gopathok` is present', makefile
should not need to rerun it.

2. Ensure the binaries are created only if they don't
exist by adding `bin/podman`
and `bin/podman-remote`.

3. Add a `SOURCES = $(shell find . -name "*.go")` and put
it as a dependency of the podman binaries target. It allows us
to re-generate the binaries only when there is a change in the
source files. The downside is it increases the running time of
the command that generates them (20 seconds on my virtual machine
running Centos 7). If this is a problem, we could introduce a
hidden file that would list all the files to track, that
would need to be updated only when a dev is introducing new files.

4. Fixed the make package-install as it does not work with yum.
I updated the build_rpm.sh to ensure it works on centos 7
and centos 8 with no pre-required installation.

Closes #4367

Signed-off-by: Neville Cain <neville.cain@qonto.eu>
2020-01-04 23:54:57 +01:00
Chandan Kumar (raukadah) b54c350a07 Use systemd/sd-daemon.h headers for systemd presence
Finding systemd devel packages using libsystemd does not work as
in RHEL based distro the package name is systemd-devel and for
deb/ubunutu it is libsystemd. It is also giving false result when
podman rpm is built with systemd but hack/systemd_tag.sh does not
return anything.

Install systemd-devel package in build_rpm.sh script

Moving to systemd/sd-daemon.h header files which comes from devel
packages fixes the issue.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-12-16 20:37:15 +05:30
Chandan Kumar (raukadah) 5f6eea8a54 Fixed the path of hack scripts in spec file
While building the spec file on fedora, in rpmbuild log,
.sh: No such file or directory error is shown as full path of
hack directory is not resolved leading to file not found error.

Appending the builddir and libpod path with hack will fix the issue.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-12-13 12:20:37 +05:30
Matthew Heon 17c369c255 Bump to v1.7.0-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-11 12:49:31 -05:00
Matthew Heon 7bbef419fb Bump to v1.7.0-rc1
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-12-11 12:49:25 -05:00
Sorin Sbarnea 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
Sorin Sbarnea 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
Chandan Kumar (raukadah) 1414a063f5 Updates on making doc building and debug optional
It changes the podman spec from using with_doc to bcond_without
for building docs so that anyone can pass --without doc as well
as other rpmbuild args to the build_rpm.sh script to skip
building docs.

Since go-md2man is not available in CentOS8 repo. without the
help fo extra_args, it makes it conditional.

It also moves the manpages to a seperate package.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-12-03 07:57:50 +05:30
OpenShift Merge Robot 1c0356ee91
Merge pull request #4587 from raukadah/btrfs
Disable btrfs for RHEL in podman spec
2019-11-29 12:02:37 +01:00
OpenShift Merge Robot 17646e9c7d
Merge pull request #4590 from raukadah/docs
Make doc building in spec optional
2019-11-29 11:32:52 +01:00
Chandan Kumar (raukadah) 17e4641d45 Make doc building in spec optional
since go-man2md is not available in CentOS 8, making it
optional allows them to build the rpm.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-11-28 18:40:15 +05:30
Chandan Kumar (raukadah) eb3cbdd628 Donot install btrfs in RHEL/CentOS-8
Since btrfs-progs-devel is not available in RHEL/CentOS 8 and
the spec fails to build it while running build_rpm.sh,
making it optional fixes the issue.

It also modifies the spec file to install btrfs-progs-devel for
fedora only.

Since golang-github-cpuguy83-go-md2man was added twice, it also
removes the repetition.

Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
2019-11-28 18:38:22 +05:30
Sorin Sbarnea 7605387a70 Improved build_rpm.sh
- assure we use bash strict mode to avoid missing errors
- added untracked artifacts to gitignore

Signed-off-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
2019-11-27 17:59:06 +00:00
Dmitry Smirnov 8d928d525f codespell: spelling corrections
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
2019-11-13 08:15:00 +11:00
Daniel J Walsh 5f3a61ed42
Add support for make vendor-in-container
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2019-11-08 06:27:17 -05:00
Matthew Heon 830808cba7 Bump development version to 1.6.4-dev
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2019-11-04 17:50:14 -05:00
OpenShift Merge Robot 45e0bd3891
Merge pull request #4379 from cevich/fix_upload_release_archive
Cirrus: Fix upload_release_archive on branch or tag
2019-10-30 21:31:32 +01:00
Chris Evich 326ef19d94
Cirrus: Fix upload_release_archive on branch or tag
Cirrus-CI only sets `$CIRRUS_BASE_SHA` when testing PRs since the
destination and it's state is easy to discover.  However, when
post-merge and/or tag-push testing, the previous state is not
easily discoverable (changes have already merged).  The
`upload_release_archive` script incorrectly assumed this
variable was always set, causing a constant stream of post-merge
testing failures.

Tweak the `is_release()` function to properly handle an empty
`$CIRRUS_BASE_SHA` whether or not `$CIRRUS_TAG` is also set.  Also
update the unit-tests to check for this.  Also account for a
corner case where hack/get_ci_vm.sh is running on a VM w/o git.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-30 14:31:38 -04:00
OpenShift Merge Robot 9ba8dae0bf
Merge pull request #4365 from cevich/safe_load
Cirrus: Fix minor python deprecation warning
2019-10-30 18:10:16 +01:00
Giuseppe Scrivano 2046be6ae0
build: drop support for ostree
it is going to be removed from containers/image as well, so no longer
depend on it.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2019-10-30 11:28:10 +01:00
OpenShift Merge Robot e7540d0406
Merge pull request #4310 from nalind/manifest-lists
Move to containers/image v5, support manifest lists
2019-10-29 20:58:51 +01:00
Nalin Dahyabhai a4a70b4506 bump containers/image to v5.0.0, buildah to v1.11.4
Move to containers/image v5 and containers/buildah to v1.11.4.

Replace an equality check with a type assertion when checking for a
docker.ErrUnauthorizedForCredentials in `podman login`.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2019-10-29 13:35:18 -04:00
Chris Evich d4c80b755e
Cirrus: Fix minor python deprecation warning
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-29 10:45:08 -04:00
Chris Evich 8303eb3037
Cirrus: Only upload tagged releases
Prior to this commit, every push to master had it's builds packaged and
uploaded to google storage.  This is a waste, since potential users
are only ever concerned about tagged releases.

Unfortunately because the release process involves humans with
potentially multiple human and automation steps happening in parallel,
it's easy for automation to not detect a tagged release, or trigger on
development|pre-release tags.

Fix this in `upload_release_archive.sh` using a new unit-tested
function `is_release()`.  This acts as the definitive authority
on whether or not a specific commit rage or `$CIRRUS_TAG` value
constitutes something worthy of upload.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-29 10:34:58 -04:00
Matthew Heon 21f9c93073 Bump to v1.6.3-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-10-17 15:09:46 -04:00
OpenShift Merge Robot 2bf184aa01
Merge pull request #4222 from cevich/collect_varlink_log
Cirrus: Produce and collect varlink output
2019-10-09 14:33:14 -07:00
OpenShift Merge Robot c3c40f970e
Merge pull request #4218 from jlebon/pr/drop-also
io.podman.socket: drop Also=multi-user.target
2019-10-09 05:03:15 -07:00
Chris Evich ffe726ed64
Cirrus: Produce and collect varlink output
When executing 'make remotesystem' testing, a varlink process is started
up but it's stdio is dumped due to the production of excessive data.
However, this also means if the process has a problem, any errors will
not be accessible.

Instead, grab only the last 100 lines and direct them into a file.  Also
update automation's log collection to retrieve this file when the
`$REMOTE_CLIENT` env. var. is `true`.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-08 16:47:37 -04:00
Jonathan Lebon 59353b4dce io.podman.socket: drop Also=multi-user.target
Using `Also=` means that the target unit will also be
installed/uninstalled together with our unit. Doing
`Also=multi-user.target` essentially says: disable `multi-user.target`
if `io.podman.socket` is disabled, which sounds... not at all like
what we want.

In practice, systemd thankfully ignores this (likely because it's the
default target). I think having `Also=io.podman.socket` in the
`io.podman.service` already does what we want here: it gets installed
under `sockets.target` whenever the service is. (And the fact that
systemd ignored this means that it wasn't actually playing a role in
resolving #3998.)

This was causing `systemctl preset-all` to dump core in Fedora CoreOS:
https://github.com/coreos/fedora-coreos-tracker/issues/290

(Likely there's a systemd bug around here too.)

Signed-off-by: Jonathan Lebon <jonathan@jlebon.com>
2019-10-08 12:12:16 -04:00
Chris Evich 09b6cd06c8
Cirrus: Install conmon in Fedora VMs
This is needed because older versions of podman (1.5.1) do not
automatically install the new conmon package.

Also, include removal of `/usr/libexec/podman/conmon` when preparing to
install and test podman built from source.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-07 11:27:45 -04:00
Miloslav Trmač d3f59bedb3 Update c/image to v4.0.1 and buildah to 1.11.3
This requires updating all import paths throughout, and a matching
buildah update to interoperate.

I can't figure out the reason for go.mod tracking
	github.com/containers/image v3.0.2+incompatible // indirect
((go mod graph) lists it as a direct dependency of libpod, but
(go list -json -m all) lists it as an indirect dependency),
but at least looking at the vendor subdirectory, it doesn't seem
to be actually used in the built binaries.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2019-10-04 20:18:23 +02:00
OpenShift Merge Robot bd08fc0e9b
Merge pull request #4180 from cevich/update_download_links
Docs: Update links, add links to latest
2019-10-04 08:55:50 -07:00
Chris Evich 5756fd8ff9
Cirrus: Simplify package NVR logging
Also include runc/crun version for Fedora

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 15:53:07 -04:00
Chris Evich f8deaf9f9d
Cirrus: Fix log URIs & add optional $ALSO_FILENAME
Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-03 15:18:26 -04:00
Matthew Heon 9e5646ec23 Bump to v1.6.2-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-10-02 17:39:05 -04:00
OpenShift Merge Robot 7e47abe1f7
Merge pull request #4154 from cevich/show_packages
Cirrus: Show names/versions of critical packages
2019-10-01 08:42:04 -07:00
OpenShift Merge Robot 049aafa4c0
Merge pull request #4090 from vrothberg/build-catatonit
Build catatonit
2019-10-01 06:05:22 -07:00
Chris Evich 0b5100ff79
Cirrus: Show names/versions of critical packages
Adds an output to all testing tasks which lists the names/versions of
critical/essential packages present on the VM.

Signed-off-by: Chris Evich <cevich@redhat.com>
2019-10-01 08:54:50 -04:00
Matthew Heon d52868f81c Bump to v1.6.1-dev
Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-09-30 19:02:29 -04:00
OpenShift Merge Robot 01b7af8ee9
Merge pull request #4100 from cevich/cache_image_docs
Cirrus: VM Image accounting doc update
2019-09-29 07:11:31 -07:00