Skip to content

Commit ebb66cd

Browse files
committed
9p: changed 9pfs binary compilation to installation from COPR repo
Removed the container-compilation process and changed it to simple installation from a custom COPR repository that contains the binary.
1 parent ab7c61e commit ebb66cd

File tree

3 files changed

+11
-33
lines changed

3 files changed

+11
-33
lines changed

9pfs/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

createdisk-library.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -426,18 +426,3 @@ function copy_systemd_units() {
426426

427427
${SSH} core@${VM_IP} -- 'rm -rf /home/core/systemd-units /home/core/systemd-scripts'
428428
}
429-
430-
function compile_and_extract_9pfs() {
431-
${SCP} -r 9pfs core@${VM_IP}:/home/core/
432-
${SSH} core@${VM_IP} 'sudo bash -e -x -s' <<EOF
433-
cd 9pfs
434-
podman build -t 9pfs-builder .
435-
podman create --name extract-temp 9pfs-builder
436-
podman cp extract-temp:/src/9pfs/9pfs ./9pfs
437-
podman rm extract-temp
438-
sudo cp 9pfs /usr/local/bin
439-
cd ..
440-
rm -rf 9pfs
441-
podman rmi 9pfs-builder:latest registry.access.redhat.com/ubi9:9.5
442-
EOF
443-
}

createdisk.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,17 @@ EOF
163163
PRE_DOWNLOADED_ADDITIONAL_PACKAGES+=" qemu-user-static-x86"
164164
fi
165165

166-
# Beyond this point, packages added to the ADDITIONAL_PACKAGES variable won’t be installed in the guest
166+
# install 9pfs binary from COPR repo so that it can be used to
167+
# set up 9p file sharing on Windows
168+
if [ "${SNC_GENERATE_WINDOWS_BUNDLE}" != "0" ]; then
169+
${SSH} core@${VM_IP} -- "sudo dnf -y copr enable mskvarla/9pfs"
170+
${SSH} core@${VM_IP} -- "mkdir -p ~/packages && dnf download --downloadonly --downloaddir ~/packages 9pfs --resolve"
171+
${SSH} core@${VM_IP} -- "sudo dnf -y copr disable mskvarla/9pfs"
172+
PRE_DOWNLOADED_ADDITIONAL_PACKAGES+=" 9pfs"
173+
fi
174+
175+
# Beyond this point, packages added to the ADDITIONAL_PACKAGES and PRE_DOWNLOADED_ADDITIONAL_PACKAGES
176+
# variables won’t be installed in the guest
167177
install_additional_packages ${VM_IP}
168178
copy_systemd_units
169179

@@ -203,12 +213,6 @@ ${SSH} core@${VM_IP} -- 'sudo sed -i "s/^preserve_hostname: false$/preserve_host
203213
# Cleanup cloud-init config
204214
${SSH} core@${VM_IP} -- "sudo cloud-init clean --logs"
205215

206-
if [ "${ARCH}" == "x86_64" ] && [ "${SNC_GENERATE_WINDOWS_BUNDLE}" != "0" ]; then
207-
# compile 9pfs binary using UBI image and extract the binary
208-
# so that it can be used to set up a 9p filesystem on Windows
209-
compile_and_extract_9pfs
210-
fi
211-
212216
# Shutdown the VM
213217
shutdown_vm ${VM_NAME}
214218

0 commit comments

Comments
 (0)