diff --git a/hack/provision-derived.sh b/hack/provision-derived.sh index 7009456b0..dddcc8237 100755 --- a/hack/provision-derived.sh +++ b/hack/provision-derived.sh @@ -22,8 +22,10 @@ case "$variant" in # tmt wants rsync dnf -y install cloud-init rsync ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants - # And tmt wants to write to /usr/local/bin - rm /usr/local -rf && ln -sr /var/usrlocal /usr/local && mkdir -p /var/usrlocal/bin + + # tmt puts scrips in /var/lib/tmt/scripts, add them to $PATH + touch /etc/environment + echo "export PATH=$PATH:/var/lib/tmt/scripts" >> /etc/environment # tmt needs a webserver to verify the VM is running TESTCLOUD_GUEST="python3 -m http.server 10022 || python -m http.server 10022 || /usr/libexec/platform-python -m http.server 10022 || python2 -m SimpleHTTPServer 10022 || python -m SimpleHTTPServer 10022" diff --git a/tests/plugins/bootc-install.py b/tests/plugins/bootc-install.py index 6a8fbddee..78058de3d 100644 --- a/tests/plugins/bootc-install.py +++ b/tests/plugins/bootc-install.py @@ -186,7 +186,8 @@ def _build_derived_image(self, base_image: str) -> str: RUN dnf -y install cloud-init rsync && \ ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants && \ - rm /usr/local -rf && ln -sr /var/usrlocal /usr/local && mkdir -p /var/usrlocal/bin && \ + touch /etc/environment && \ + echo "export PATH=$PATH:/var/lib/tmt/scripts" >> /etc/environment && \ dnf clean all && \ echo "{{ testcloud_guest }}" >> /opt/testcloud-guest.sh && \ chmod +x /opt/testcloud-guest.sh && \