Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Topics
# Topicstest
Comment thread
dougsland marked this conversation as resolved.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The change from # Topics to # Topicstest appears to be a typo. Please correct this to the intended heading.

Suggested change
# Topicstest
# Topics


- [Topics](#topics)
- [QM is a containerized environment for running functional safety Quality Management software](#qm-is-a-containerized-environment-for-running-functional-safety-quality-management-software)
Expand Down
2 changes: 1 addition & 1 deletion setup
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ EOF
fi
fi

cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} libkrun crun-krun bluechi-agent ${EXTRA_FLAG}"
cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} bluechi-agent ${EXTRA_FLAG}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The libkrun and crun-krun packages have been removed from this dnf install command in the main setup script. If these are core dependencies for QM, they should be installed by the primary setup script. While check_libkrun.sh now installs them, that is a test script, not the main installer. This could lead to missing dependencies for a full QM setup if libkrun is expected to be present by default.

Suggested change
cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} bluechi-agent ${EXTRA_FLAG}"
cmd_dnf_install="dnf -y install --releasever=${VERSION_ID} --setopt=reposdir=${ROOTFS}/etc/yum.repos.d --installroot ${ROOTFS} libkrun crun-krun bluechi-agent ${EXTRA_FLAG}"

${cmd_dnf_install}

dnf -y update --installroot "${ROOTFS}"
Expand Down
14 changes: 13 additions & 1 deletion tests/qm-kvm-test/libkrun/check_libkrun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ enable_repo() {

install_libkrun() {
info_message "install_libkrun(): install libkrun and crun-krun"
exec_cmd "dnf install --setopt=reposdir=/etc/yum.repos.d --installroot=/usr/lib/qm/rootfs -y libkrun crun-krun"
# Adding rawhide as 1.17 fixes Internal(Vm(SetMemoryAttributes(Error(22))))
# See-Also: https://github.com/containers/qm/pull/959
if grep -qi "^ID=fedora" /etc/os-release; then
# Need the remove as soon the land in stable channel
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment # Need the remove as soon the land in stable channel indicates a temporary solution. It would be beneficial to track this as a proper TODO or issue in the project's issue tracker to ensure it's addressed when libkrun 1.17 lands in a stable channel.

exec_cmd "dnf install --installroot=/usr/lib/qm/rootfs -y fedora-repos-rawhide"
fi
exec_cmd "cat /usr/lib/qm/rootfs/etc/yum.repos.d/*"
exec_cmd "dnf repolist --all --setopt=reposdir=/etc/yum.repos.d"
exec_cmd "dnf install --use-host-config --releasever=rawhide --enablerepo=rawhide --setopt=reposdir=/etc/yum.repos.d --installroot=/usr/lib/qm/rootfs -y libkrun crun-krun libkrunfw"
}

check_libkrun() {
Expand All @@ -20,6 +28,10 @@ check_libkrun() {
info_message "PASS: libkrun runs successfully."
}

#if grep -qi "^ID=centos" /etc/os-release; then
# enable_repo
#fi
Comment on lines +31 to +33
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The conditional block for enabling the CentOS-specific libkrun COPR repository was commented out, but the enable_repo function is still called unconditionally at line 35. The enable_repo function specifically targets centos-stream-9-$(arch). This means that if this script is run on a Fedora system, it will attempt to enable a CentOS COPR repo, which is likely incorrect and could lead to errors or unexpected behavior. The enable_repo call should remain conditional based on the OS ID.

Suggested change
#if grep -qi "^ID=centos" /etc/os-release; then
# enable_repo
#fi
if grep -qi "^ID=centos" /etc/os-release; then
enable_repo
fi


enable_repo
install_libkrun
check_libkrun
Expand Down
Loading