diff options
Diffstat (limited to 'contrib')
34 files changed, 427 insertions, 101 deletions
diff --git a/contrib/build_rpm.sh b/contrib/build_rpm.sh index a9db029df..a4f1817b9 100755 --- a/contrib/build_rpm.sh +++ b/contrib/build_rpm.sh @@ -76,7 +76,7 @@ sudo $pkg_manager install -y ${PKGS[*]} sudo rm -f podman-*.src.rpm make -f .copr/Makefile -# workaround for https://github.com/containers/libpod/issues/4627 +# workaround for https://github.com/containers/podman/issues/4627 if [ -d ~/rpmbuild/BUILD ]; then chmod -R +w ~/rpmbuild/BUILD fi diff --git a/contrib/cirrus/README.md b/contrib/cirrus/README.md index c8ec766e7..977762293 100644 --- a/contrib/cirrus/README.md +++ b/contrib/cirrus/README.md @@ -19,7 +19,7 @@ task (pass or fail) is set based on the exit status of the last script to execut 1. Launch a purpose-built container in Cirrus's community cluster. For container image details, please see - [the contributors guide](https://github.com/containers/libpod/blob/master/CONTRIBUTING.md#go-format-and-lint). + [the contributors guide](https://github.com/containers/podman/blob/master/CONTRIBUTING.md#go-format-and-lint). 3. ``validate``: Perform standard `make validate` source verification, Should run for less than a minute or two. diff --git a/contrib/cirrus/apiv2_test.sh b/contrib/cirrus/apiv2_test.sh index cbc481d6b..33e9fbc6b 120000..100755 --- a/contrib/cirrus/apiv2_test.sh +++ b/contrib/cirrus/apiv2_test.sh @@ -1 +1,65 @@ -integration_test.sh
\ No newline at end of file +#!/bin/bash + +set -e + +source $(dirname $0)/lib.sh + +req_env_var GOSRC SCRIPT_BASE OS_RELEASE_ID OS_RELEASE_VER CONTAINER_RUNTIME VARLINK_LOG + +LOCAL_OR_REMOTE=local +if [[ "$TEST_REMOTE_CLIENT" = "true" ]]; then + LOCAL_OR_REMOTE=remote +fi + +# Our name must be of the form xxxx_test or xxxx_test.sh, where xxxx is +# the test suite to run; currently (2019-05) the only option is 'integration' +# but pr2947 intends to add 'system'. +TESTSUITE=$(expr $(basename $0) : '\(.*\)_test') +if [[ -z $TESTSUITE ]]; then + die 1 "Script name is not of the form xxxx_test.sh" +fi + +cd "$GOSRC" + +case "$SPECIALMODE" in + in_podman) + ${CONTAINER_RUNTIME} run --rm --privileged --net=host --cgroupns=host \ + -v $GOSRC:$GOSRC:Z \ + --workdir $GOSRC \ + -e "CGROUP_MANAGER=cgroupfs" \ + -e "STORAGE_OPTIONS=--storage-driver=vfs" \ + -e "CRIO_ROOT=$GOSRC" \ + -e "PODMAN_BINARY=/usr/bin/podman" \ + -e "CONMON_BINARY=/usr/libexec/podman/conmon" \ + -e "DIST=$OS_RELEASE_ID" \ + -e "CONTAINER_RUNTIME=$CONTAINER_RUNTIME" \ + $IN_PODMAN_IMAGE bash $GOSRC/$SCRIPT_BASE/container_test.sh -b -i -t + ;; + rootless) + req_env_var ROOTLESS_USER + ssh $ROOTLESS_USER@localhost \ + -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ + -o CheckHostIP=no $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE} ${LOCAL_OR_REMOTE} + ;; + endpoint) + make + make install PREFIX=/usr ETCDIR=/etc + make test-binaries + make endpoint + ;; + bindings) + make + make install PREFIX=/usr ETCDIR=/etc + export PATH=$PATH:`pwd`/hack + cd pkg/bindings/test && ginkgo -trace -noColor -debug -r + ;; + none) + make + make install PREFIX=/usr ETCDIR=/etc + make test-binaries + make .install.bats + make ${LOCAL_OR_REMOTE}${TESTSUITE} PODMAN_SERVER_LOG=$PODMAN_SERVER_LOG + ;; + *) + die 110 "Unsupported \$SPECIALMODE: $SPECIALMODE" +esac diff --git a/contrib/cirrus/check_image.sh b/contrib/cirrus/check_image.sh index 0d33e55bf..39c2be3f8 100755 --- a/contrib/cirrus/check_image.sh +++ b/contrib/cirrus/check_image.sh @@ -25,9 +25,6 @@ item_test 'Minimum available memory' $MEM_FREE -ge $MIN_MEM_MB || let "NFAILS+=1 remove_packaged_podman_files item_test "remove_packaged_podman_files() does it's job" -z "$(type -P podman)" || let "NFAILS+=1" -# Integration Tests require varlink in Fedora -item_test "The varlink executable is present" -x "$(type -P varlink)" || let "NFAILS+=1" - MIN_ZIP_VER='3.0' VER_RE='.+([[:digit:]]+\.[[:digit:]]+).+' ACTUAL_VER=$(zip --version 2>&1 | egrep -m 1 "Zip$VER_RE" | sed -r -e "s/$VER_RE/\\1/") diff --git a/contrib/cirrus/container_test.sh b/contrib/cirrus/container_test.sh index bf0a0d3f1..8a4ed9492 100644 --- a/contrib/cirrus/container_test.sh +++ b/contrib/cirrus/container_test.sh @@ -3,7 +3,7 @@ set -xeo pipefail export GOPATH=/var/tmp/go export PATH=$HOME/gopath/bin:$PATH:$GOPATH/bin -export GOSRC=$GOPATH/src/github.com/containers/libpod +export GOSRC=$GOPATH/src/github.com/containers/podman DIST=${DIST:=""} CONTAINER_RUNTIME=${DIST:=""} @@ -18,6 +18,8 @@ if [ "${ID}" != "fedora" ] || [ "${CONTAINER_RUNTIME}" != "" ]; then INTEGRATION_TEST_ENVS="SKIP_USERNS=1" fi +echo "$(date --rfc-3339=seconds) $(basename $0) started with '$*' and TEST_REMOTE_CLIENT='${TEST_REMOTE_CLIENT}'" + pwd # -i install diff --git a/contrib/cirrus/integration_test.sh b/contrib/cirrus/integration_test.sh index 33e9fbc6b..692d5a236 100755 --- a/contrib/cirrus/integration_test.sh +++ b/contrib/cirrus/integration_test.sh @@ -16,7 +16,7 @@ fi # but pr2947 intends to add 'system'. TESTSUITE=$(expr $(basename $0) : '\(.*\)_test') if [[ -z $TESTSUITE ]]; then - die 1 "Script name is not of the form xxxx_test.sh" + die 1 "Script name ($basename $0) is not of the form xxxx_test.sh" fi cd "$GOSRC" diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 2375d512e..d2af4d883 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -29,7 +29,7 @@ then # Ensure compiled tooling is reachable export PATH="$PATH:$GOPATH/bin" fi -CIRRUS_WORKING_DIR="${CIRRUS_WORKING_DIR:-$GOPATH/src/github.com/containers/libpod}" +CIRRUS_WORKING_DIR="${CIRRUS_WORKING_DIR:-$GOPATH/src/github.com/containers/podman}" export GOSRC="${GOSRC:-$CIRRUS_WORKING_DIR}" export PATH="$HOME/bin:$GOPATH/bin:/usr/local/bin:$PATH" export LD_LIBRARY_PATH="/usr/local/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" @@ -299,13 +299,13 @@ is_release() { } setup_rootless() { - req_env_var ROOTLESS_USER GOSRC SECRET_ENV_RE ROOTLESS_ENV_RE + req_env_var ROOTLESS_USER GOPATH GOSRC SECRET_ENV_RE ROOTLESS_ENV_RE # Only do this once if passwd --status $ROOTLESS_USER then echo "Updating $ROOTLESS_USER user permissions on possibly changed libpod code" - chown -R $ROOTLESS_USER:$ROOTLESS_USER "$GOSRC" + chown -R $ROOTLESS_USER:$ROOTLESS_USER "$GOPATH" "$GOSRC" return 0 fi @@ -316,7 +316,7 @@ setup_rootless() { echo "creating $ROOTLESS_UID:$ROOTLESS_GID $ROOTLESS_USER user" groupadd -g $ROOTLESS_GID $ROOTLESS_USER useradd -g $ROOTLESS_GID -u $ROOTLESS_UID --no-user-group --create-home $ROOTLESS_USER - chown -R $ROOTLESS_USER:$ROOTLESS_USER "$GOSRC" + chown -R $ROOTLESS_USER:$ROOTLESS_USER "$GOPATH" "$GOSRC" echo "creating ssh keypair for $USER" [[ -r "$HOME/.ssh/id_rsa" ]] || \ diff --git a/contrib/cirrus/logformatter b/contrib/cirrus/logformatter index 60c1e5985..f97638b6f 100755 --- a/contrib/cirrus/logformatter +++ b/contrib/cirrus/logformatter @@ -208,13 +208,13 @@ END_HTML } # Try to identify the git commit we're working with... - if ($line =~ m!libpod/define.gitCommit=([0-9a-f]+)!) { + if ($line =~ m!/define.gitCommit=([0-9a-f]+)!) { $git_commit = $1; } # ...so we can link to specific lines in source files if ($git_commit) { - # 1 12 3 34 4 5 526 6 - $line =~ s{^(.*)(\/(containers\/libpod)(\/\S+):(\d+))(.*)$} + # 1 12 3 34 4 5 526 6 + $line =~ s{^(.*)(\/(containers\/[^/]+)(\/\S+):(\d+))(.*)$} {$1<a class="codelink" href='https://github.com/$3/blob/$git_commit$4#L$5'>$2</a>$6}; } @@ -303,14 +303,15 @@ END_HTML # (bindings test sometimes emits 'Running' with leading bullet char) elsif ($line =~ /^•?Running:/) { # Highlight the important (non-boilerplate) podman command. + $line =~ s/\s+--remote\s+/ /g; # --remote takes no args # Strip out the global podman options, but show them on hover - $line =~ s{(\S+\/podman)((\s+--(root|runroot|runtime|tmpdir|storage-opt|conmon|cgroup-manager|cni-config-dir|storage-driver|events-backend) \S+)*)(.*)}{ - my ($full_path, $options, $args) = ($1, $2, $5); + $line =~ s{(\S+\/podman(-remote)?)((\s+--(root|runroot|runtime|tmpdir|storage-opt|conmon|cgroup-manager|cni-config-dir|storage-driver|events-backend|url) \S+)*)(.*)}{ + my ($full_path, $remote, $options, $args) = ($1, $2||'', $3, $6); $options =~ s/^\s+//; # Separate each '--foo bar' with newlines for readability $options =~ s/ --/\n--/g; - qq{<span title="$full_path"><b>podman</b></span> <span class=\"boring\" title=\"$options\">[options]</span><b>$args</b>}; + qq{<span title="$full_path"><b>podman$remote</b></span> <span class=\"boring\" title=\"$options\">[options]</span><b>$args</b>}; }e; $current_output = ''; } @@ -418,10 +419,27 @@ END_HTML } } - # FIXME: if Cirrus magic envariables are available, write a link to results + # If Cirrus magic envariables are available, write a link to results. + # FIXME: it'd be so nice to make this a clickable live link. + # + # STATIC_MAGIC_BLOB is the name of a google-storage bucket. It is + # unlikely to change often, but if it does you will suddenly start + # seeing errors when trying to view formatted logs: + # + # AccessDeniedAccess denied.Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. + # + # This happened in July 2020 when github.com/containers/libpod was + # renamed to podman. If something like that ever happens again, you + # will need to get the new magic blob value from: + # + # https://console.cloud.google.com/storage/browser?project=libpod-218412 + # + # You will also probably need to set the bucket Public by clicking on + # the bucket name, then the Permissions tab. This is safe, since this + # project is fully open-source. if ($have_formatted_log && $ENV{CIRRUS_TASK_ID}) { my $URL_BASE = "https://storage.googleapis.com"; - my $STATIC_MAGIC_BLOB = "cirrus-ci-5385732420009984-fcae48"; + my $STATIC_MAGIC_BLOB = "cirrus-ci-6707778565701632-fcae48"; my $ARTIFACT_NAME = "html"; my $URL = "${URL_BASE}/${STATIC_MAGIC_BLOB}/artifacts/$ENV{CIRRUS_REPO_FULL_NAME}/$ENV{CIRRUS_TASK_ID}/${ARTIFACT_NAME}/${outfile}"; diff --git a/contrib/cirrus/logformatter.t b/contrib/cirrus/logformatter.t index d2193cc6c..2075bff96 100755 --- a/contrib/cirrus/logformatter.t +++ b/contrib/cirrus/logformatter.t @@ -112,45 +112,47 @@ ok 4 blah <<< $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} [08:26:19] START - All [+xxxx] lines that follow are relative to right now. -[+0002s] GO111MODULE=on go build -mod=vendor -gcflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/libpod' -asmflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/libpod' -ldflags '-X github.com/containers/libpod/libpod/define.gitCommit=40f5d8b1becd381c4e8283ed3940d09193e4fe06 -X github.com/containers/libpod/libpod/define.buildInfo=1582809981 -X github.com/containers/libpod/libpod/config._installPrefix=/usr/local -X github.com/containers/libpod/libpod/config._etcDir=/etc -extldflags ""' -tags " selinux systemd exclude_graphdriver_devicemapper seccomp varlink" -o bin/podman github.com/containers/libpod/cmd/podman +[+0002s] GO111MODULE=on go build -mod=vendor -gcflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/podman' -asmflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/podman' -ldflags '-X github.com/containers/podman/libpod/define.gitCommit=40f5d8b1becd381c4e8283ed3940d09193e4fe06 -X github.com/containers/podman/libpod/define.buildInfo=1582809981 -X github.com/containers/podman/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/libpod/config._etcDir=/etc -extldflags ""' -tags " selinux systemd exclude_graphdriver_devicemapper seccomp varlink" -o bin/podman github.com/containers/podman/cmd/podman [+0103s] • [+0103s] ------------------------------ [+0103s] Podman pod restart [+0103s] podman pod restart single empty pod -[+0103s] /var/tmp/go/src/github.com/containers/libpod/test/e2e/pod_restart_test.go:41 +[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:41 [+0103s] [BeforeEach] Podman pod restart -[+0103s] /var/tmp/go/src/github.com/containers/libpod/test/e2e/pod_restart_test.go:18 +[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:18 [+0103s] [It] podman pod restart single empty pod -[+0103s] /var/tmp/go/src/github.com/containers/libpod/test/e2e/pod_restart_test.go:41 -[+0103s] Running: /var/tmp/go/src/github.com/containers/libpod/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod create --infra=false --share +[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:41 +[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod create --infra=false --share [+0103s] 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 [+0103s] output: 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 -[+0103s] Running: /var/tmp/go/src/github.com/containers/libpod/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod restart 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 +[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod restart 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 [+0103s] Error: no containers in pod 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 have no dependencies, cannot start pod: no such container [+0103s] output: [+0103s] [AfterEach] Podman pod restart -[+0103s] /var/tmp/go/src/github.com/containers/libpod/test/e2e/pod_restart_test.go:28 -[+0103s] Running: /var/tmp/go/src/github.com/containers/libpod/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod rm -fa +[+0103s] /var/tmp/go/src/github.com/containers/podman/test/e2e/pod_restart_test.go:28 +[+0103s] Running: /var/tmp/go/src/github.com/containers/podman/bin/podman --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs pod rm -fa [+0103s] 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 +[+0104s] Running: /var/tmp/go/src/github.com/containers/libpod/bin/podman-remote --storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc --conmon /usr/bin/conmon --cni-config-dir /etc/cni/net.d --cgroup-manager systemd --tmpdir /tmp/podman_test553496330 --events-backend file --storage-driver vfs --remote --url unix:/run/user/12345/podman-xyz.sock pod rm -fa +[+0104s] 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 again [+0107s] • [+0107s] ------------------------------ [+0107s] podman system reset >>> $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} [08:26:19] START - All [+xxxx] lines that follow are relative to right now. -<span class="timestamp">[+0002s] </span>GO111MODULE=on go build -mod=vendor -gcflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/libpod' -asmflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/libpod' -ldflags '-X github.com/containers/libpod/libpod/define.gitCommit=40f5d8b1becd381c4e8283ed3940d09193e4fe06 -X github.com/containers/libpod/libpod/define.buildInfo=1582809981 -X github.com/containers/libpod/libpod/config._installPrefix=/usr/local -X github.com/containers/libpod/libpod/config._etcDir=/etc -extldflags ""' -tags " selinux systemd exclude_graphdriver_devicemapper seccomp varlink" -o bin/podman github.com/containers/libpod/cmd/podman +<span class="timestamp">[+0002s] </span>GO111MODULE=on go build -mod=vendor -gcflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/podman' -asmflags 'all=-trimpath=/var/tmp/go/src/github.com/containers/podman' -ldflags '-X github.com/containers/podman/libpod/define.gitCommit=40f5d8b1becd381c4e8283ed3940d09193e4fe06 -X github.com/containers/podman/libpod/define.buildInfo=1582809981 -X github.com/containers/podman/libpod/config._installPrefix=/usr/local -X github.com/containers/podman/libpod/config._etcDir=/etc -extldflags ""' -tags " selinux systemd exclude_graphdriver_devicemapper seccomp varlink" -o bin/podman github.com/containers/podman/cmd/podman <span class="timestamp">[+0103s] </span>• </pre> <hr /> <pre> <span class="timestamp">[+0103s] </span>Podman pod restart <span class="timestamp"> </span><a name='t--podman-pod-restart-single-empty-pod--1'><h2> podman pod restart single empty pod</h2></a> -<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/libpod/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L41'>/containers/libpod/test/e2e/pod_restart_test.go:41</a> +<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L41'>/containers/libpod/test/e2e/pod_restart_test.go:41</a> <span class="timestamp"> </span>[BeforeEach] Podman pod restart -<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/libpod/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L18'>/containers/libpod/test/e2e/pod_restart_test.go:18</a> +<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L18'>/containers/libpod/test/e2e/pod_restart_test.go:18</a> <span class="timestamp"> </span>[It] podman pod restart single empty pod -<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/libpod/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L41'>/containers/libpod/test/e2e/pod_restart_test.go:41</a> -<span class="timestamp"> </span>Running: <span title="/var/tmp/go/src/github.com/containers/libpod/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir +<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L41'>/containers/libpod/test/e2e/pod_restart_test.go:41</a> +<span class="timestamp"> </span>Running: <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc @@ -161,7 +163,7 @@ $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} --events-backend file --storage-driver vfs">[options]</span><b> pod create --infra=false --share</b> <span class="timestamp"> </span>4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 -<span class="timestamp"> </span>Running: <span title="/var/tmp/go/src/github.com/containers/libpod/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir +<span class="timestamp"> </span>Running: <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc @@ -174,8 +176,8 @@ $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} <span class="timestamp"> </span><span class='log-warn'>Error: no containers in pod 4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 have no dependencies, cannot start pod: no such container</span> <span class="timestamp"> </span>output: <span class="timestamp"> </span>[AfterEach] Podman pod restart -<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/libpod/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L28'>/containers/libpod/test/e2e/pod_restart_test.go:28</a> -<span class="timestamp"> </span>Running: <span title="/var/tmp/go/src/github.com/containers/libpod/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir +<span class="timestamp"> </span> /var/tmp/go/src/github.com<a class="codelink" href='https://github.com/containers/podman/blob/40f5d8b1becd381c4e8283ed3940d09193e4fe06/test/e2e/pod_restart_test.go#L28'>/containers/libpod/test/e2e/pod_restart_test.go:28</a> +<span class="timestamp"> </span>Running: <span title="/var/tmp/go/src/github.com/containers/podman/bin/podman"><b>podman</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir --root /tmp/podman_test553496330/crio --runroot /tmp/podman_test553496330/crio-run --runtime /usr/bin/runc @@ -186,6 +188,21 @@ $SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP} --events-backend file --storage-driver vfs">[options]</span><b> pod rm -fa</b> <span class="timestamp"> </span>4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 + +<span class="timestamp">[+0104s] </span>Running: <span title="/var/tmp/go/src/github.com/containers/libpod/bin/podman-remote"><b>podman-remote</b></span> <span class="boring" title="--storage-opt vfs.imagestore=/tmp/podman/imagecachedir +--root /tmp/podman_test553496330/crio +--runroot /tmp/podman_test553496330/crio-run +--runtime /usr/bin/runc +--conmon /usr/bin/conmon +--cni-config-dir /etc/cni/net.d +--cgroup-manager systemd +--tmpdir /tmp/podman_test553496330 +--events-backend file +--storage-driver vfs +--url unix:/run/user/12345/podman-xyz.sock">[options]</span><b> pod rm -fa</b> +<span class="timestamp"> </span>4810be0cfbd42241e349dbe7d50fbc54405cd320a6637c65fd5323f34d64af89 again + + <span class="timestamp">[+0107s] </span>• </pre> <hr /> diff --git a/contrib/cirrus/networking.sh b/contrib/cirrus/networking.sh index aeaf74035..2546fab71 100755 --- a/contrib/cirrus/networking.sh +++ b/contrib/cirrus/networking.sh @@ -10,7 +10,7 @@ while read host port do if [[ "$port" -eq "443" ]] then - item_test "SSL/TLS to $host:$port" "$(echo -n '' | openssl s_client -quiet -no_ign_eof -connect $host:$port &> /dev/null; echo $?)" -eq "0" + item_test "SSL/TLS to $host:$port" "$(echo -n '' | timeout 60 openssl s_client -quiet -no_ign_eof -connect $host:$port &> /dev/null; echo $?)" -eq "0" else item_test "Connect to $host:$port" "$(nc -zv -w 13 $host $port &> /dev/null; echo $?)" -eq 0 fi diff --git a/contrib/cirrus/packer/Makefile b/contrib/cirrus/packer/Makefile index a911cafdb..c5a8e4cac 100644 --- a/contrib/cirrus/packer/Makefile +++ b/contrib/cirrus/packer/Makefile @@ -5,7 +5,8 @@ PACKER_DIST_FILENAME := packer_${PACKER_VER}_linux_${GOARCH}.zip # Only needed for libpod_base_images target TIMESTAMP := $(shell date +%s) -GOSRC ?= $(shell realpath "./../../../") +GOPATH ?= /var/tmp/go +GOSRC ?= $(GOPATH)/src/github.com/containers/libpod PACKER_BASE ?= contrib/cirrus/packer SCRIPT_BASE ?= contrib/cirrus POST_MERGE_BUCKET_SUFFIX ?= @@ -54,6 +55,7 @@ libpod_images: guard-PACKER_BUILDS libpod_images.json packer ./packer build \ -force \ $(shell test -z "${PACKER_BUILDS}" || echo "-only=${PACKER_BUILDS}") \ + -var GOPATH=$(GOPATH) \ -var GOSRC=$(GOSRC) \ -var PACKER_BASE=$(PACKER_BASE) \ -var SCRIPT_BASE=$(SCRIPT_BASE) \ diff --git a/contrib/cirrus/packer/README.how-to-update-cirrus-vms b/contrib/cirrus/packer/README.how-to-update-cirrus-vms new file mode 100644 index 000000000..ac2902ffb --- /dev/null +++ b/contrib/cirrus/packer/README.how-to-update-cirrus-vms @@ -0,0 +1,89 @@ +This document briefly describes how to update VMs on Cirrus. + +Examples of when you need to do this: + + - to update crun, conmon, or some other package(s) + - to add and/or remove an OS (eg drop f31, add f33) + - to change system config (eg containers.conf or other /etc files) + - to change kernel command-line (boot time) options + +This is a TWO-STEP process: you need to submit a PR with a magic [CI:IMG] +description string, wait for it to finish, grab a magic string from the +results, then resubmit without [CI:IMG]. + +Procedure, Part One of Two: + + 1) Create a working branch: + + $ git co -b my_branch_name + + 2) Make your changes. Typically, zero or more of the following files: + + .cirrus.yml + contrib/cirrus/packer/*_packaging.sh + + I said zero because sometimes you just want to update VMs + with the latest in dnf or ubuntu repos. That doesn't require + changing anything here, simply running new dnf/apt installs. + + 3) Commit your changes. Be sure to include the magic [CI:IMG] string: + + $ git commit -asm'[CI:IMG] this is my commit message' + + 4) Submit your PR: + + $ gh pr create --fill --web + + + -------------------------- INTERMISSION -------------------------- + ...in which we wait for CI to turn green. In particular, although + we only really need 'test_build_cache_images' (45 minutes or so) + to get the required magic number strings, please be a decent + human being and wait for 'verify_test_built_images' (another hour) + so we can all have confidence in our process. Thank you. + -------------------------- INTERMISSION -------------------------- + + +Procedure, Part Two of Two: + + 1) When 'test_build_cache_images' completes, click it, then click + 'View more details on Cirrus CI', then expand the 'Run build_vm_image' + accordion. This gives you a garishly colorful display of lines. + Each color is a different VM. + + 2) Verify that each VM has the packages you require. (The garish log + doesn't actually list this for all packages, so you may need to + look in the 'verify_test_built_images' log for each individual + VM. Click the 'package_versions' accordion.) + + 3) At the bottom of this log you will see a block like: + + Builds finished. The artifacts of successful builds are: + ubuntu-19: A disk image was created: ubuntu-19-podman-6439450735542272 + fedora-31: A disk image was created: fedora-31-podman-6439450735542272 + ..... + + The long numbers at the end should (MUST!) be all identical. + + 4) Edit .cirrus.yml locally. Find '_BUILT_IMAGE_SUFFIX' near the + top. Copy that long number ("6439450735542272", above) and paste + it here, replacing the previous long number. + + 5) Wait for CI to turn green. I know you might have skipped that, + because 'test_build_cache_images' finishes long before 'verify', + and maybe you're in a hurry, but come on. Be responsible. + + 6) Edit the PR description in github: remove '[CI:IMG]' from the + title. Again, *in github*, in the web UI, use the 'Edit' button + at top right next to the PR title. Remove the '[CI:IMG]' string + from the PR title, press Save. If you forget to do this, the + VM-building steps will run again (taking a long time) but it + will be a waste of time. + + 7) Update your PR: + + $ git add .cirrus.yml (to get the new magic IMAGE_SUFFIX string) + $ git commit --amend (remove [CI:IMG] for consistency with 6) + $ git push --force + +You can probably take it from here. diff --git a/contrib/cirrus/packer/cloud-init/ubuntu/cloud.cfg.d/40_enable_root.cfg b/contrib/cirrus/packer/cloud-init/ubuntu/cloud.cfg.d/40_enable_root.cfg index 98a0e3918..672d1907b 120000..100644 --- a/contrib/cirrus/packer/cloud-init/ubuntu/cloud.cfg.d/40_enable_root.cfg +++ b/contrib/cirrus/packer/cloud-init/ubuntu/cloud.cfg.d/40_enable_root.cfg @@ -1 +1 @@ -../../fedora/cloud.cfg.d/40_enable_root.cfg
\ No newline at end of file +disable_root: 0 diff --git a/contrib/cirrus/packer/fedora_packaging.sh b/contrib/cirrus/packer/fedora_packaging.sh index aecaaef93..f19932a9f 100644 --- a/contrib/cirrus/packer/fedora_packaging.sh +++ b/contrib/cirrus/packer/fedora_packaging.sh @@ -74,6 +74,7 @@ INSTALL_PACKAGES=(\ gpgme-devel grubby hostname + httpd-tools iproute iptables jq @@ -152,6 +153,15 @@ DOWNLOAD_PACKAGES=(\ echo "Installing general build/test dependencies for Fedora '$OS_RELEASE_VER'" $BIGTO ooe.sh $SUDO dnf install -y ${INSTALL_PACKAGES[@]} +# AD-HOC CODE FOR SPECIAL-CASE SITUATIONS! +# On 2020-07-23 we needed this code to upgrade crun on f31, a build +# that is not yet in stable. Since CI:IMG PRs are a two-step process, +# the key part is that we UN-COMMENT-THIS-OUT during the first step, +# then re-comment it on the second (once we have the built images). +# That way this will be dead code in future CI:IMG PRs but will +# serve as an example for anyone in a similar future situation. +# $BIGTO ooe.sh $SUDO dnf --enablerepo=updates-testing -y upgrade crun + [[ ${#REMOVE_PACKAGES[@]} -eq 0 ]] || \ $LILTO ooe.sh $SUDO dnf erase -y ${REMOVE_PACKAGES[@]} @@ -168,5 +178,9 @@ fi echo "Installing runtime tooling" # Save some runtime by having these already available cd $GOSRC +# Required since initially go was not installed +source $GOSRC/$SCRIPT_BASE/lib.sh +echo "Go environment has been setup:" +go env $SUDO make install.tools $SUDO $GOSRC/hack/install_catatonit.sh diff --git a/contrib/cirrus/packer/libpod_images.yml b/contrib/cirrus/packer/libpod_images.yml index 754626a2e..38f5a8250 100644 --- a/contrib/cirrus/packer/libpod_images.yml +++ b/contrib/cirrus/packer/libpod_images.yml @@ -3,6 +3,7 @@ # All of these are required variables: BUILT_IMAGE_SUFFIX: '{{env `BUILT_IMAGE_SUFFIX`}}' + GOPATH: '{{env `GOPATH`}}' GOSRC: '{{env `GOSRC`}}' PACKER_BASE: '{{env `PACKER_BASE`}}' SCRIPT_BASE: '{{env `SCRIPT_BASE`}}' @@ -62,15 +63,22 @@ builders: # The brains of the operation, making actual modifications to the base-image. provisioners: + - type: 'shell' + inline: + - 'set -ex' + # The 'file' provisioner item (below) will create the final component + - 'mkdir -vp $(dirname {{user `GOSRC`}})' + - type: 'file' source: '{{user `GOSRC`}}' - destination: '/tmp/libpod' + destination: '{{user `GOSRC`}}' - type: 'shell' script: '{{user `GOSRC`}}/{{user `PACKER_BASE`}}/{{split build_name "-" 0}}_setup.sh' environment_vars: - 'PACKER_BUILDER_NAME={{build_name}}' - - 'GOSRC=/tmp/libpod' + - 'GOPATH={{user `GOPATH`}}' + - 'GOSRC={{user `GOSRC`}}' - 'PACKER_BASE={{user `PACKER_BASE`}}' - 'SCRIPT_BASE={{user `SCRIPT_BASE`}}' diff --git a/contrib/cirrus/packer/prior-fedora_base-setup.sh b/contrib/cirrus/packer/prior-fedora_base-setup.sh index 998a5d9fd..f271abee0 120000..100644 --- a/contrib/cirrus/packer/prior-fedora_base-setup.sh +++ b/contrib/cirrus/packer/prior-fedora_base-setup.sh @@ -1 +1,44 @@ -fedora_base-setup.sh
\ No newline at end of file +#!/bin/bash + +# N/B: This script is not intended to be run by humans. It is used to configure the +# fedora base image for importing, so that it will boot in GCE + +set -e + +# Load in library (copied by packer, before this script was run) +source $GOSRC/$SCRIPT_BASE/lib.sh + +echo "Updating packages" +dnf -y update + +echo "Installing necessary packages and google services" +dnf -y install rng-tools google-compute-engine-tools google-compute-engine-oslogin ethtool + +echo "Enabling services" +systemctl enable rngd + +# There is a race that can happen on boot between the GCE services configuring +# the VM, and cloud-init trying to do similar activities. Use a customized +# unit file to make sure cloud-init starts after the google-compute-* services. +echo "Setting cloud-init service to start after google-network-daemon.service" +cp -v $GOSRC/$PACKER_BASE/cloud-init/fedora/cloud-init.service /etc/systemd/system/ + +# ref: https://cloud.google.com/compute/docs/startupscript +# The mechanism used by Cirrus-CI to execute tasks on the system is through an +# "agent" process launched as a GCP startup-script (from the metadata service). +# This agent is responsible for cloning the repository and executing all task +# scripts and other operations. Therefor, on SELinux-enforcing systems, the +# service must be labeled properly to ensure it's child processes can +# run with the proper contexts. +METADATA_SERVICE_CTX=unconfined_u:unconfined_r:unconfined_t:s0 +METADATA_SERVICE_PATH=systemd/system/google-startup-scripts.service +sed -r -e \ + "s/Type=oneshot/Type=oneshot\nSELinuxContext=$METADATA_SERVICE_CTX/" \ + /lib/$METADATA_SERVICE_PATH > /etc/$METADATA_SERVICE_PATH + +# Ensure there are no disruptive periodic services enabled by default in image +systemd_banish + +rh_finalize + +echo "SUCCESS!" diff --git a/contrib/cirrus/packer/ubuntu_packaging.sh b/contrib/cirrus/packer/ubuntu_packaging.sh index 09f9aab9f..d11c612c5 100644 --- a/contrib/cirrus/packer/ubuntu_packaging.sh +++ b/contrib/cirrus/packer/ubuntu_packaging.sh @@ -36,6 +36,7 @@ ooe.sh curl -L -o /tmp/Release.key "https://download.opensuse.org/repositories/d ooe.sh $SUDO apt-key add - < /tmp/Release.key INSTALL_PACKAGES=(\ + apache2-utils apparmor aufs-tools autoconf @@ -153,7 +154,12 @@ if [[ ${#DOWNLOAD_PACKAGES[@]} -gt 0 ]]; then fi echo "Installing runtime tooling" +# Save some runtime by having these already available cd $GOSRC +# Required since initially go was not installed +source $GOSRC/$SCRIPT_BASE/lib.sh +echo "Go environment has been setup:" +go env $SUDO hack/install_catatonit.sh $SUDO make install.libseccomp.sudo $SUDO make install.tools diff --git a/contrib/cirrus/packer/xfedora_setup.sh b/contrib/cirrus/packer/xfedora_setup.sh index 5e9f1ec77..25b568e8a 120000..100644 --- a/contrib/cirrus/packer/xfedora_setup.sh +++ b/contrib/cirrus/packer/xfedora_setup.sh @@ -1 +1,34 @@ -fedora_setup.sh
\ No newline at end of file +#!/bin/bash + +# This script is called by packer on the subject fedora VM, to setup the podman +# build/test environment. It's not intended to be used outside of this context. + +set -e + +# Load in library (copied by packer, before this script was run) +source $GOSRC/$SCRIPT_BASE/lib.sh + +req_env_var SCRIPT_BASE PACKER_BASE INSTALL_AUTOMATION_VERSION PACKER_BUILDER_NAME GOSRC FEDORA_BASE_IMAGE OS_RELEASE_ID OS_RELEASE_VER + +workaround_bfq_bug + +# Do not enable updates-testing on the previous Fedora release +if [[ "$PRIOR_FEDORA_BASE_IMAGE" =~ "${OS_RELEASE_ID}-cloud-base-${OS_RELEASE_VER}" ]]; then + DISABLE_UPDATES_TESTING=1 +else + DISABLE_UPDATES_TESTING=0 +fi + +bash $PACKER_BASE/fedora_packaging.sh +# Load installed environment right now (happens automatically in a new process) +source /usr/share/automation/environment + +echo "Enabling cgroup management from containers" +ooe.sh sudo setsebool container_manage_cgroup true + +# Ensure there are no disruptive periodic services enabled by default in image +systemd_banish + +rh_finalize + +echo "SUCCESS!" diff --git a/contrib/cirrus/rootless_test.sh b/contrib/cirrus/rootless_test.sh index 9e1b1d911..63cbec69b 100755 --- a/contrib/cirrus/rootless_test.sh +++ b/contrib/cirrus/rootless_test.sh @@ -2,11 +2,13 @@ set -e +echo "$(date --rfc-3339=seconds) $(basename $0) started with '$*'" + source $(dirname $0)/lib.sh if [[ "$UID" == "0" ]] then - echo "Error: Expected to be running as a regular user" + echo "$(basename $0): Error: Expected to be running as a regular user" exit 1 fi diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index ea2c7d8e0..437a83c4b 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -41,7 +41,6 @@ case "${OS_RELEASE_ID}" in ubuntu) apt-get update apt-get install -y containers-common - sed -ie 's/^\(# \)\?apparmor_profile =.*/apparmor_profile = ""/' /etc/containers/containers.conf if [[ "$OS_RELEASE_VER" == "19" ]]; then apt-get purge -y --auto-remove golang* apt-get install -y golang-1.13 @@ -58,9 +57,6 @@ case "${OS_RELEASE_ID}" in workaround_bfq_bug - # HACK: Need Conmon 2.0.17, currently in updates-testing on F31. - dnf update -y --enablerepo=updates-testing conmon - if [[ "$ADD_SECOND_PARTITION" == "true" ]]; then bash "$SCRIPT_BASE/add_second_partition.sh" fi diff --git a/contrib/cirrus/system_test.sh b/contrib/cirrus/system_test.sh index cbc481d6b..33e9fbc6b 120000..100755 --- a/contrib/cirrus/system_test.sh +++ b/contrib/cirrus/system_test.sh @@ -1 +1,65 @@ -integration_test.sh
\ No newline at end of file +#!/bin/bash + +set -e + +source $(dirname $0)/lib.sh + +req_env_var GOSRC SCRIPT_BASE OS_RELEASE_ID OS_RELEASE_VER CONTAINER_RUNTIME VARLINK_LOG + +LOCAL_OR_REMOTE=local +if [[ "$TEST_REMOTE_CLIENT" = "true" ]]; then + LOCAL_OR_REMOTE=remote +fi + +# Our name must be of the form xxxx_test or xxxx_test.sh, where xxxx is +# the test suite to run; currently (2019-05) the only option is 'integration' +# but pr2947 intends to add 'system'. +TESTSUITE=$(expr $(basename $0) : '\(.*\)_test') +if [[ -z $TESTSUITE ]]; then + die 1 "Script name is not of the form xxxx_test.sh" +fi + +cd "$GOSRC" + +case "$SPECIALMODE" in + in_podman) + ${CONTAINER_RUNTIME} run --rm --privileged --net=host --cgroupns=host \ + -v $GOSRC:$GOSRC:Z \ + --workdir $GOSRC \ + -e "CGROUP_MANAGER=cgroupfs" \ + -e "STORAGE_OPTIONS=--storage-driver=vfs" \ + -e "CRIO_ROOT=$GOSRC" \ + -e "PODMAN_BINARY=/usr/bin/podman" \ + -e "CONMON_BINARY=/usr/libexec/podman/conmon" \ + -e "DIST=$OS_RELEASE_ID" \ + -e "CONTAINER_RUNTIME=$CONTAINER_RUNTIME" \ + $IN_PODMAN_IMAGE bash $GOSRC/$SCRIPT_BASE/container_test.sh -b -i -t + ;; + rootless) + req_env_var ROOTLESS_USER + ssh $ROOTLESS_USER@localhost \ + -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \ + -o CheckHostIP=no $GOSRC/$SCRIPT_BASE/rootless_test.sh ${TESTSUITE} ${LOCAL_OR_REMOTE} + ;; + endpoint) + make + make install PREFIX=/usr ETCDIR=/etc + make test-binaries + make endpoint + ;; + bindings) + make + make install PREFIX=/usr ETCDIR=/etc + export PATH=$PATH:`pwd`/hack + cd pkg/bindings/test && ginkgo -trace -noColor -debug -r + ;; + none) + make + make install PREFIX=/usr ETCDIR=/etc + make test-binaries + make .install.bats + make ${LOCAL_OR_REMOTE}${TESTSUITE} PODMAN_SERVER_LOG=$PODMAN_SERVER_LOG + ;; + *) + die 110 "Unsupported \$SPECIALMODE: $SPECIALMODE" +esac diff --git a/contrib/cirrus/timestamp.awk b/contrib/cirrus/timestamp.awk index 95b312e51..b3663b303 100644 --- a/contrib/cirrus/timestamp.awk +++ b/contrib/cirrus/timestamp.awk @@ -7,7 +7,7 @@ BEGIN { STARTTIME=systime() printf "[%s] START", strftime("%T") - printf " - All [+xxxx] lines that follow are relative to right now.\n" + printf " - All [+xxxx] lines that follow are relative to %s.\n", strftime("%FT%T") } { @@ -16,5 +16,5 @@ BEGIN { END { printf "[%s] END", strftime("%T") - printf " - [%+05ds] total duration since START\n", systime()-STARTTIME + printf " - [%+05ds] total duration since %s\n", systime()-STARTTIME, strftime("%FT%T") } diff --git a/contrib/gate/Dockerfile b/contrib/gate/Dockerfile index 9568038bb..0a4d57416 100644 --- a/contrib/gate/Dockerfile +++ b/contrib/gate/Dockerfile @@ -4,7 +4,7 @@ ENV GOPATH="/var/tmp/go" \ GOBIN="/var/tmp/go/bin" \ PATH="/var/tmp/go/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" \ SRCPATH="/usr/src/libpod" \ - GOSRC="/var/tmp/go/src/github.com/containers/libpod" + GOSRC="/var/tmp/go/src/github.com/containers/podman" # Only needed for installing build-time dependencies, then will be removed COPY . $GOSRC diff --git a/contrib/gate/README.md b/contrib/gate/README.md index b2bc56023..6c33e1d74 100644 --- a/contrib/gate/README.md +++ b/contrib/gate/README.md @@ -2,5 +2,5 @@ The "gate" image is a standard container image for lint-checking and validating changes to the libpod repository. It must be built from the repository root as -[described in the contibutors guide](https://github.com/containers/libpod/blob/master/CONTRIBUTING.md#go-format-and-lint). +[described in the contibutors guide](https://github.com/containers/podman/blob/master/CONTRIBUTING.md#go-format-and-lint). The image is also used in [CI/CD automation](../../.cirrus.yml). diff --git a/contrib/podmanimage/upstream/Dockerfile b/contrib/podmanimage/upstream/Dockerfile index 6787cfcc3..52b3e1d4d 100644 --- a/contrib/podmanimage/upstream/Dockerfile +++ b/contrib/podmanimage/upstream/Dockerfile @@ -2,7 +2,7 @@ # # Build a Podman container image from the latest # upstream version of Podman on GitHub. -# https://github.com/containers/libpod +# https://github.com/containers/podman # This image can be used to create a secured container # that runs safely with privileges within the container. # The containers created by this image also come with a @@ -42,8 +42,8 @@ RUN useradd podman; yum -y update; yum -y reinstall shadow-utils; yum -y install fuse3 \ containers-common; \ mkdir /root/podman; \ - git clone https://github.com/containers/libpod /root/podman/src/github.com/containers/libpod; \ - cd /root/podman/src/github.com/containers/libpod; \ + git clone https://github.com/containers/podman /root/podman/src/github.com/containers/podman; \ + cd /root/podman/src/github.com/containers/podman; \ make BUILDTAGS="selinux seccomp"; \ make install PREFIX=/usr; \ cd /root/podman; \ diff --git a/contrib/snapcraft/snap/snapcraft.yaml b/contrib/snapcraft/snap/snapcraft.yaml index 7ff0df03b..e3948e01b 100644 --- a/contrib/snapcraft/snap/snapcraft.yaml +++ b/contrib/snapcraft/snap/snapcraft.yaml @@ -14,10 +14,10 @@ base: core18 parts: podman: plugin: go - source: https://github.com/containers/libpod/archive/v0.11.1.1.tar.gz - go-importpath: github.com/containers/libpod + source: https://github.com/containers/podman/archive/v0.11.1.1.tar.gz + go-importpath: github.com/containers/podman build-packages: - # https://github.com/containers/libpod/blob/master/install.md#build-and-run-dependencies + # https://github.com/containers/podman/blob/master/install.md#build-and-run-dependencies - btrfs-tools - git - golang-go diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in index 9e61b9561..1795674e3 100644 --- a/contrib/spec/podman.spec.in +++ b/contrib/spec/podman.spec.in @@ -16,14 +16,14 @@ %define gobuild(o:) go build -tags="$BUILDTAGS" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; #% endif -# libpod hack directory +# podman hack directory %define hackdir %{_builddir}/%{repo}-%{shortcommit0} %global provider github %global provider_tld com %global project containers -%global repo libpod -# https://github.com/containers/libpod +%global repo podman +# https://github.com/containers/podman %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo} @@ -384,7 +384,7 @@ mkdir -p src/%{provider}.%{provider_tld}/%{project} ln -s ../../../../ src/%{import_path} popd ln -s vendor src -export GO111MODULE=off +export GO111MODULE=on export GOPATH=$(pwd)/_build:$(pwd):$(pwd):%{gopath} export BUILDTAGS="selinux seccomp systemd $(%{hackdir}/hack/btrfs_installed_tag.sh) $(%{hackdir}/hack/btrfs_tag.sh) $(%{hackdir}/hack/libdm_tag.sh) exclude_graphdriver_devicemapper" diff --git a/contrib/spec/python-podman.spec.in b/contrib/spec/python-podman.spec.in index b921f2645..e21fb141e 100644 --- a/contrib/spec/python-podman.spec.in +++ b/contrib/spec/python-podman.spec.in @@ -18,7 +18,7 @@ %global provider_tld com %global project containers %global repo libpod -# https://github.com/containers/libpod +# https://github.com/containers/podman %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global commit #COMMIT# diff --git a/contrib/systemd/README.md b/contrib/systemd/README.md index 9f1d37792..480596915 100644 --- a/contrib/systemd/README.md +++ b/contrib/systemd/README.md @@ -11,9 +11,9 @@ Assuming the status messages show no errors, the libpod service is ready to respond to the APIv2 on the unix domain socket `/run/podman/podman.sock` ### podman.service -You can refer to [this example](https://github.com/containers/libpod/blob/master/contrib/systemd/system/podman.service) for a sample podman.service file. +You can refer to [this example](https://github.com/containers/podman/blob/master/contrib/systemd/system/podman.service) for a sample podman.service file. ### podman.socket -You can refer to [this example](https://github.com/containers/libpod/blob/master/contrib/systemd/system/podman.socket) for a sample podman.socket file. +You can refer to [this example](https://github.com/containers/podman/blob/master/contrib/systemd/system/podman.socket) for a sample podman.socket file. ## user (podman service run as given user aka "rootless") @@ -26,7 +26,7 @@ You can refer to [this example](https://github.com/containers/libpod/blob/master Assuming the status messages show no errors, the libpod service is ready to respond to the APIv2 on the unix domain socket `/run/user/$(id -u)/podman/podman.sock` ### podman.service -You can refer to [this example](https://github.com/containers/libpod/blob/master/contrib/systemd/user/podman.service) for a rootless podman.service file. +You can refer to [this example](https://github.com/containers/podman/blob/master/contrib/systemd/user/podman.service) for a rootless podman.service file. ### podman.socket -You can refer to [this example](https://github.com/containers/libpod/blob/master/contrib/systemd/user/podman.socket) for a rootless podman.socket file. +You can refer to [this example](https://github.com/containers/podman/blob/master/contrib/systemd/user/podman.socket) for a rootless podman.socket file. diff --git a/contrib/systemd/system/podman.service b/contrib/systemd/system/podman.service index eaa2ec437..4a63735a3 100644 --- a/contrib/systemd/system/podman.service +++ b/contrib/systemd/system/podman.service @@ -2,15 +2,12 @@ Description=Podman API Service Requires=podman.socket After=podman.socket -Documentation=man:podman-api(1) +Documentation=man:podman-system-service(1) StartLimitIntervalSec=0 [Service] -Type=oneshot -Environment=REGISTRIES_CONFIG_PATH=/etc/containers/registries.conf +Type=simple ExecStart=/usr/bin/podman system service -TimeoutStopSec=30 -KillMode=process [Install] WantedBy=multi-user.target diff --git a/contrib/systemd/system/podman.socket b/contrib/systemd/system/podman.socket index 8b22e31e4..397058ee4 100644 --- a/contrib/systemd/system/podman.socket +++ b/contrib/systemd/system/podman.socket @@ -1,6 +1,6 @@ [Unit] Description=Podman API Socket -Documentation=man:podman-api(1) +Documentation=man:podman-system-service(1) [Socket] ListenStream=%t/podman/podman.sock diff --git a/contrib/systemd/user b/contrib/systemd/user new file mode 120000 index 000000000..3f3d9896b --- /dev/null +++ b/contrib/systemd/user @@ -0,0 +1 @@ +./system/
\ No newline at end of file diff --git a/contrib/systemd/user/podman.service b/contrib/systemd/user/podman.service deleted file mode 100644 index eaa2ec437..000000000 --- a/contrib/systemd/user/podman.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Podman API Service -Requires=podman.socket -After=podman.socket -Documentation=man:podman-api(1) -StartLimitIntervalSec=0 - -[Service] -Type=oneshot -Environment=REGISTRIES_CONFIG_PATH=/etc/containers/registries.conf -ExecStart=/usr/bin/podman system service -TimeoutStopSec=30 -KillMode=process - -[Install] -WantedBy=multi-user.target -Also=podman.socket diff --git a/contrib/systemd/user/podman.socket b/contrib/systemd/user/podman.socket deleted file mode 100644 index 8b22e31e4..000000000 --- a/contrib/systemd/user/podman.socket +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Podman API Socket -Documentation=man:podman-api(1) - -[Socket] -ListenStream=%t/podman/podman.sock -SocketMode=0660 - -[Install] -WantedBy=sockets.target |