From ca986199d5c2dbd8b8cb7355bc75d6e1eea116f3 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Fri, 26 Jun 2020 14:42:36 -0400 Subject: [PATCH] Cirrus: Fix missing htpasswd in registry img Recently the registry image was updated significantly with breaking changes. Most were caught, this one was not. Instead of relying on the (clearly) unreliable container image, simply install the package providing the htpasswd command locally. Signed-off-by: Chris Evich --- contrib/cirrus/build.sh | 2 +- contrib/cirrus/lib.sh | 6 ++---- contrib/cirrus/setup.sh | 5 ++++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/contrib/cirrus/build.sh b/contrib/cirrus/build.sh index b7655bbc884..e3af8670f9f 100755 --- a/contrib/cirrus/build.sh +++ b/contrib/cirrus/build.sh @@ -23,6 +23,6 @@ else showrun make install PREFIX=/usr showrun ./bin/buildah info else - ln -v ${CROSS_TARGET} bin/buildah + ln -sv ../buildah bin/buildah fi fi diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 5370e35d16a..09f744e8019 100755 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -316,12 +316,10 @@ execute_local_registry() { cp $authdirpath/domain.crt $certdirpath/localhost:5000/domain.crt echo "Creating http credentials file" - podman run --entrypoint htpasswd $REGISTRY_FQIN \ - -Bbn testuser testpassword \ - > $authdirpath/htpasswd + showrun htpasswd -Bbn testuser testpassword > $authdirpath/htpasswd echo "Starting up the local 'registry' container" - podman run -d -p 5000:5000 --name registry \ + showrun podman run -d -p 5000:5000 --name registry \ -v $authdirpath:$authdirpath:Z \ -e "REGISTRY_AUTH=htpasswd" \ -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" \ diff --git a/contrib/cirrus/setup.sh b/contrib/cirrus/setup.sh index 53db819c1e8..1b59352c58a 100755 --- a/contrib/cirrus/setup.sh +++ b/contrib/cirrus/setup.sh @@ -27,6 +27,9 @@ case "$OS_RELEASE_ID" in if [[ -z "$CONTAINER" ]]; then warn "Adding secondary testing partition & growing root filesystem" bash $SCRIPT_BASE/add_second_partition.sh + + warn "TODO: Add httpd-tools (for htpasswd) to VM images (in libpod repo)" + dnf install -y httpd-tools fi warn "Hard-coding podman to use crun" @@ -35,7 +38,7 @@ case "$OS_RELEASE_ID" in # Executing tests in a container requires SELinux boolean set on the host if [[ "$IN_PODMAN" == "true" ]] then - setsebool -P container_manage_cgroup true + showrun setsebool -P container_manage_cgroup true fi ;; ubuntu)