diff --git a/rpm/buildah.spec b/rpm/buildah.spec index 72aefb8a5..1d3350ffa 100644 --- a/rpm/buildah.spec +++ b/rpm/buildah.spec @@ -138,6 +138,7 @@ export BUILDTAGS+=" libtrust_openssl" %gobuild -o bin/tutorial ./tests/tutorial %gobuild -o bin/inet ./tests/inet %gobuild -o bin/dumpspec ./tests/dumpspec +%gobuild -o bin/passwd ./tests/passwd %{__make} docs %install @@ -150,6 +151,7 @@ cp bin/copy %{buildroot}/%{_bindir}/%{name}-copy cp bin/tutorial %{buildroot}/%{_bindir}/%{name}-tutorial cp bin/inet %{buildroot}/%{_bindir}/%{name}-inet cp bin/dumpspec %{buildroot}/%{_bindir}/%{name}-dumpspec +cp bin/passwd %{buildroot}/%{_bindir}/%{name}-passwd rm %{buildroot}%{_datadir}/%{name}/test/system/tools/build/* @@ -175,6 +177,7 @@ rm %{buildroot}%{_datadir}/%{name}/test/system/tools/build/* %{_bindir}/%{name}-tutorial %{_bindir}/%{name}-inet %{_bindir}/%{name}-dumpspec +%{_bindir}/%{name}-passwd %{_datadir}/%{name}/test %changelog diff --git a/tests/helpers.bash b/tests/helpers.bash index d38e8c65f..0e80d5262 100644 --- a/tests/helpers.bash +++ b/tests/helpers.bash @@ -9,6 +9,7 @@ COPY_BINARY=${COPY_BINARY:-$TEST_SOURCES/../bin/copy} TUTORIAL_BINARY=${TUTORIAL_BINARY:-$TEST_SOURCES/../bin/tutorial} INET_BINARY=${INET_BINARY:-$TEST_SOURCES/../bin/inet} DUMPSPEC_BINARY=${DUMPSPEC_BINARY:-$TEST_SOURCES/../bin/dumpspec} +PASSWD_BINARY=${PASSWD_BINARY:-$TEST_SOURCES/../bin/passwd} STORAGE_DRIVER=${STORAGE_DRIVER:-vfs} PATH=$(dirname ${BASH_SOURCE})/../bin:${PATH} OCI=${BUILDAH_RUNTIME:-$(${BUILDAH_BINARY} info --format '{{.host.OCIRuntime}}' || command -v runc || command -v crun)} @@ -833,7 +834,7 @@ auth: ' # roughly equivalent to "htpasswd -nbB testuser testpassword", the registry uses # the same package this does for verifying passwords against hashes in htpasswd files - htpasswd=${testuser}:$(passwd ${testpassword}) + htpasswd=${testuser}:$(${PASSWD_BINARY} ${testpassword}) # generate the htpasswd and config.yml files for the registry mkdir -p "${TEST_SCRATCH_DIR}"/registry/root "${TEST_SCRATCH_DIR}"/registry/run "${TEST_SCRATCH_DIR}"/registry/certs "${TEST_SCRATCH_DIR}"/registry/config diff --git a/tests/tmt/system.fmf b/tests/tmt/system.fmf index 11b49d9cb..eb6b766f0 100644 --- a/tests/tmt/system.fmf +++ b/tests/tmt/system.fmf @@ -10,6 +10,7 @@ environment: COPY_BINARY: /usr/bin/buildah-copy TUTORIAL_BINARY: /usr/bin/buildah-tutorial DUMPSPEC_BINARY: /usr/bin/buildah-dumpspec + PASSWD_BINARY: /usr/bin/buildah-passwd TMPDIR: /var/tmp adjust: