diff --git a/Dockerfile b/Dockerfile index e404320ef8..9e85457301 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # When rebasing to new Fedora, also update openshift/release: # https://github.com/openshift/release/tree/master/ci-operator/config/coreos/coreos-assembler/coreos-coreos-assembler-main.yaml -FROM quay.io/fedora/fedora:39 +FROM quay.io/fedora/fedora:40 WORKDIR /root/containerbuild # Keep this Dockerfile idempotent for local development rebuild use cases. diff --git a/build.sh b/build.sh index ffe9ee79d7..6f13a326ab 100755 --- a/build.sh +++ b/build.sh @@ -45,7 +45,7 @@ install_rpms() { frozendeps="" # We freeze the version for now since we're carrying patches. - frozendeps+=" $(echo osbuild{,-ostree,-selinux,-tools}-114-1.fc39.noarch)" + frozendeps+=" $(echo osbuild{,-ostree,-selinux,-tools}-114-1.fc40.noarch)" # First, a general update; this is best practice. We also hit an issue recently # where qemu implicitly depended on an updated libusbx but didn't have a versioned diff --git a/src/cmdlib.sh b/src/cmdlib.sh index 48a678baca..37041a27b4 100755 --- a/src/cmdlib.sh +++ b/src/cmdlib.sh @@ -733,6 +733,9 @@ runvm() { # and include all GPG keys find /etc/pki/rpm-gpg/ -type f >> "${vmpreparedir}/hostfiles" + local cmdoutput + cmdoutput=${tmp_builddir}/cmd-output.txt + # the reason we do a heredoc here is so that the var substition takes # place immediately instead of having to proxy them through to the VM cat > "${vmpreparedir}/init" <> "${tmp_builddir}"/cmd.sh done - touch "${runvm_console}" + touch "${runvm_console}" "${cmdoutput}" + setpriv --pdeathsig SIGTERM -- tail -qF "${cmdoutput}" --pid $$ & + local tail_pid=$! # There seems to be some false positives in shellcheck # https://github.com/koalaman/shellcheck/issues/2217 @@ -821,9 +826,7 @@ EOF if [ -z "${RUNVM_SHELL:-}" ]; then if ! "${kola_args[@]}" -- "${base_qemu_args[@]}" \ - -device virtserialport,chardev=virtioserial0,name=cosa-cmdout \ - -chardev stdio,id=virtioserial0 \ - "${qemu_args[@]}" <&-; then # the <&- here closes stdin otherwise qemu waits forever + "${qemu_args[@]}"; then cat "${runvm_console}" fatal "Failed to run 'kola qemuexec'" fi @@ -842,6 +845,9 @@ EOF fi rc="$(cat "${rc_file}")" + # cleanup tail before nuking dir containing file it's following + kill "$tail_pid" + if [ -n "${cleanup_tmpdir:-}" ]; then rm -rf "${tmp_builddir}" unset tmp_builddir diff --git a/tests/containers/tang/Containerfile b/tests/containers/tang/Containerfile index a0d91a2243..f36fe9132c 100644 --- a/tests/containers/tang/Containerfile +++ b/tests/containers/tang/Containerfile @@ -1,8 +1,8 @@ -FROM registry.fedoraproject.org/fedora-minimal:39 +FROM registry.fedoraproject.org/fedora-minimal:40 RUN microdnf -y install tang && microdnf clean all && rm -rf /var/cache/yum EXPOSE 80 RUN systemctl enable tangd.socket -CMD ["/sbin/init"] \ No newline at end of file +CMD ["/sbin/init"]