aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/build_rpm.sh1
-rw-r--r--contrib/cirrus/container_test.sh2
-rw-r--r--contrib/cirrus/lib.sh38
-rwxr-xr-xcontrib/cirrus/lib.sh.t37
-rw-r--r--contrib/cirrus/packer/fedora_setup.sh2
-rw-r--r--contrib/cirrus/packer/ubuntu_setup.sh1
-rwxr-xr-xcontrib/cirrus/upload_release_archive.sh15
-rw-r--r--contrib/gate/Dockerfile1
-rw-r--r--contrib/perftest/main.go2
-rw-r--r--contrib/podmanimage/upstream/Dockerfile1
-rw-r--r--contrib/spec/podman.spec.in4
11 files changed, 90 insertions, 14 deletions
diff --git a/contrib/build_rpm.sh b/contrib/build_rpm.sh
index 7075e3c79..1132ef380 100644
--- a/contrib/build_rpm.sh
+++ b/contrib/build_rpm.sh
@@ -28,7 +28,6 @@ declare -a PKGS=(device-mapper-devel \
libseccomp-devel \
libselinux-devel \
make \
- ostree-devel \
golang-github-cpuguy83-go-md2man \
rpm-build \
btrfs-progs-devel \
diff --git a/contrib/cirrus/container_test.sh b/contrib/cirrus/container_test.sh
index 9d3f09f60..4624868f1 100644
--- a/contrib/cirrus/container_test.sh
+++ b/contrib/cirrus/container_test.sh
@@ -89,7 +89,7 @@ if [ "${CONTAINER_RUNTIME}" == "none" ]; then
fi
-export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/ostree_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
+export TAGS="seccomp $($GOSRC/hack/btrfs_tag.sh) $($GOSRC/hack/libdm_tag.sh) $($GOSRC/hack/btrfs_installed_tag.sh) $($GOSRC/hack/selinux_tag.sh)"
# Validate
if [ $validate -eq 1 ]; then
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 8a7d3c1a3..051157702 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -43,7 +43,7 @@ if type -P git &> /dev/null && [[ -d "$GOSRC/.git" ]]
then
CIRRUS_CHANGE_IN_REPO=${CIRRUS_CHANGE_IN_REPO:-$(git show-ref --hash=8 HEAD || date +%s)}
else # pick something unique and obviously not from Cirrus
- CIRRUS_CHANGE_IN_REPO=${CIRRUS_CHANGE_IN_REPO:-no_git_$(date +%s)}
+ CIRRUS_CHANGE_IN_REPO=${CIRRUS_CHANGE_IN_REPO:-unknown_$(date +%s)}
fi
# Defaults when not running under CI
@@ -233,6 +233,42 @@ ircmsg() {
set -e
}
+# This covers all possible human & CI workflow parallel & serial combinations
+# where at least one caller must definitively discover if within a commit range
+# there is at least one release tag not having any '-' characters (return 0)
+# or otherwise (return non-0).
+is_release() {
+ req_env_var CIRRUS_BASE_SHA CIRRUS_CHANGE_IN_REPO
+ local range="${CIRRUS_BASE_SHA}..${CIRRUS_CHANGE_IN_REPO}"
+ # Easy check first, default non-useful values
+ if echo "${range}$CIRRUS_TAG" | grep -iq 'unknown'; then
+ die 11 "is_release() unusable range ${range} or tag $CIRRUS_TAG"
+ fi
+ # Next easy check, is CIRRUS_TAG set
+ unset RELVER
+ if [[ -n "$CIRRUS_TAG" ]]; then
+ RELVER="$CIRRUS_TAG"
+ else # Lastly, look through the range for tags
+ git fetch --all --tags &> /dev/null|| \
+ die 12 "is_release() failed to fetch tags"
+ RELVER=$(git log --pretty='format:%d' $range | \
+ grep '(tag:' | sed -r -e 's/\s+[(]tag:\s+(v[0-9].*)[)]/\1/' | \
+ sort -uV | tail -1)
+ [[ "$?" -eq "0" ]] || \
+ die 13 "is_release() failed to parse tags"
+ fi
+ echo "Found \$RELVER $RELVER"
+ if [[ -n "$RELVER" ]]; then
+ if echo "$RELVER" | grep -q '-'; then
+ return 2
+ else
+ return 0
+ fi
+ else
+ return 1
+ fi
+}
+
setup_rootless() {
req_env_var ROOTLESS_USER GOSRC SECRET_ENV_RE ROOTLESS_ENV_RE
diff --git a/contrib/cirrus/lib.sh.t b/contrib/cirrus/lib.sh.t
index 70246ef41..9915b42a4 100755
--- a/contrib/cirrus/lib.sh.t
+++ b/contrib/cirrus/lib.sh.t
@@ -119,5 +119,42 @@ line2" "=" "line 1
line2"
###############################################################################
+# tests for is_release()
+
+# N/B: Assuming tests run in their own process, so wiping out the local
+# CIRRUS_BASE_SHA CIRRUS_CHANGE_IN_REPO and CIRRUS_TAG will be okay.
+function test_is_release() {
+ CIRRUS_BASE_SHA="$1"
+ CIRRUS_CHANGE_IN_REPO="$2"
+ CIRRUS_TAG="$3"
+ local exp_status=$4
+ local exp_msg=$5
+ local msg
+ msg=$(is_release)
+ local status=$?
+
+ check_result "$msg" "$exp_msg" "is_release(CIRRUS_BASE_SHA='$1' CIRRUS_CHANGE_IN_REPO='$2' CIRRUS_TAG='$3')"
+ check_result "$status" "$exp_status" "is_release(...) returned $status"
+}
+
+# FROM TO TAG RET MSG
+#test_is_release "" "" "" "" ""
+
+test_is_release "" "" "" "9" "FATAL: is_release() requires \$CIRRUS_BASE_SHA to be non-empty"
+test_is_release "x" "" "" "9" "FATAL: is_release() requires \$CIRRUS_CHANGE_IN_REPO to be non-empty"
+
+test_is_release "unknown" "x" "" "11" "is_release() unusable range unknown..x or tag "
+test_is_release "x" "unknown" "" "11" "is_release() unusable range x..unknown or tag "
+test_is_release "x" "x" "unknown" "11" "is_release() unusable range x..x or tag unknown"
+
+# Negative-testing git with this function is very difficult, assume it works
+# test_is_release ... "is_release() failed to fetch tags"
+# test_is_release ... "is_release() failed to parse tags"
+
+BF_V1=$(git rev-parse v1.0.0^)
+AT_V1=$(git rev-parse v1.0.0)
+test_is_release "$BF_V1" "$BF_V1" "v9.8.7-dev" "2" "Found \$RELVER v9.8.7-dev"
+test_is_release "$BF_V1" "$AT_V1" "v9.8.7-dev" "2" "Found \$RELVER v9.8.7-dev"
+test_is_release "$BF_V1" "$AT_V1" "" "0" "Found \$RELVER v1.0.0"
exit $rc
diff --git a/contrib/cirrus/packer/fedora_setup.sh b/contrib/cirrus/packer/fedora_setup.sh
index 38b9e6860..6cfaa05ce 100644
--- a/contrib/cirrus/packer/fedora_setup.sh
+++ b/contrib/cirrus/packer/fedora_setup.sh
@@ -69,8 +69,6 @@ ooe.sh sudo dnf install -y \
make \
msitools \
nmap-ncat \
- ostree \
- ostree-devel \
pandoc \
podman \
procps-ng \
diff --git a/contrib/cirrus/packer/ubuntu_setup.sh b/contrib/cirrus/packer/ubuntu_setup.sh
index 2f54da9ed..118ee062a 100644
--- a/contrib/cirrus/packer/ubuntu_setup.sh
+++ b/contrib/cirrus/packer/ubuntu_setup.sh
@@ -83,7 +83,6 @@ $BIGTO $SUDOAPTGET install \
libnet1 \
libnet1-dev \
libnl-3-dev \
- libostree-dev \
libvarlink \
libprotobuf-c-dev \
libprotobuf-dev \
diff --git a/contrib/cirrus/upload_release_archive.sh b/contrib/cirrus/upload_release_archive.sh
index 25107f0ef..eb7742375 100755
--- a/contrib/cirrus/upload_release_archive.sh
+++ b/contrib/cirrus/upload_release_archive.sh
@@ -17,8 +17,15 @@ then
BUCKET="libpod-pr-releases"
elif [[ -n "$CIRRUS_BRANCH" ]]
then
- PR_OR_BRANCH="$CIRRUS_BRANCH"
- BUCKET="libpod-$CIRRUS_BRANCH-releases"
+ # Only release non-development tagged commit ranges
+ if is_release
+ then
+ PR_OR_BRANCH="$CIRRUS_BRANCH"
+ BUCKET="libpod-$CIRRUS_BRANCH-releases"
+ else
+ warn "" "Skipping release processing: Commit range|CIRRUS_TAG is development tagged."
+ exit 0
+ fi
else
die 1 "Expecting either \$CIRRUS_PR or \$CIRRUS_BRANCH to be non-empty."
fi
@@ -64,6 +71,10 @@ do
echo "Warning: Not processing $filename (invalid extension '$EXT')"
continue
fi
+ if [[ "$EXT" =~ "gz" ]]
+ then
+ EXT="tar.gz"
+ fi
[[ "$OS_RELEASE_ID" == "ubuntu" ]] || \
chcon -t container_file_t "$filename"
diff --git a/contrib/gate/Dockerfile b/contrib/gate/Dockerfile
index c886fc9aa..1939d7ad1 100644
--- a/contrib/gate/Dockerfile
+++ b/contrib/gate/Dockerfile
@@ -19,7 +19,6 @@ RUN dnf -y install \
lsof \
make \
nmap-ncat \
- ostree-devel \
procps-ng \
python \
python3-dateutil \
diff --git a/contrib/perftest/main.go b/contrib/perftest/main.go
index 463c35ec2..0a7e45112 100644
--- a/contrib/perftest/main.go
+++ b/contrib/perftest/main.go
@@ -9,7 +9,7 @@ import (
"text/tabwriter"
"time"
- "github.com/containers/image/v4/types"
+ "github.com/containers/image/v5/types"
"github.com/containers/libpod/libpod"
image2 "github.com/containers/libpod/libpod/image"
cc "github.com/containers/libpod/pkg/spec"
diff --git a/contrib/podmanimage/upstream/Dockerfile b/contrib/podmanimage/upstream/Dockerfile
index 82b88b50b..58e54b5b5 100644
--- a/contrib/podmanimage/upstream/Dockerfile
+++ b/contrib/podmanimage/upstream/Dockerfile
@@ -36,7 +36,6 @@ RUN dnf -y install --exclude container-selinux \
libseccomp-devel \
libselinux-devel \
make \
- ostree-devel \
pkgconfig \
runc \
fuse-overlayfs \
diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in
index d5247f689..8e0cb9950 100644
--- a/contrib/spec/podman.spec.in
+++ b/contrib/spec/podman.spec.in
@@ -63,7 +63,6 @@ BuildRequires: libassuan-devel
BuildRequires: libgpg-error-devel
BuildRequires: libseccomp-devel
BuildRequires: libselinux-devel
-BuildRequires: ostree-devel
BuildRequires: pkgconfig
BuildRequires: make
BuildRequires: systemd-devel
@@ -139,7 +138,6 @@ Provides: bundled(golang(github.com/opencontainers/runtime-spec)) = v1.0.0
Provides: bundled(golang(github.com/opencontainers/runtime-tools)) = 625e2322645b151a7cbb93a8b42920933e72167f
Provides: bundled(golang(github.com/opencontainers/selinux)) = b6fa367ed7f534f9ba25391cc2d467085dbb445a
Provides: bundled(golang(github.com/openshift/imagebuilder)) = master
-Provides: bundled(golang(github.com/ostreedev/ostree-go)) = master
Provides: bundled(golang(github.com/pkg/errors)) = v0.8.0
Provides: bundled(golang(github.com/pmezard/go-difflib)) = 792786c7400a136282c1664665ae0a8db921c6c2
Provides: bundled(golang(github.com/pquerna/ffjson)) = d49c2bc1aa135aad0c6f4fc2056623ec78f5d5ac
@@ -383,7 +381,7 @@ mkdir -p src/%{provider}.%{provider_tld}/{containers,opencontainers}
ln -s $(dirs +1 -l) src/%{import_path_conmon}
popd
-export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) containers_image_ostree_stub"
+export BUILDTAGS="selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)"
BUILDTAGS=$BUILDTAGS make
popd