I’m trying to crossbuild wezterm-mux-server
for the remote servers of my company that run RHEL 9.2. Since I don’t have full root access I want to crossbuild them on my local machine and then just ship the binaries. Here’s what I did so far:
Downloaded a current release source archive, then extract to some directory:
mkdir -p ~/dev2/wezterm
tar -xf wezterm-20240203-110809-5046fc22-src.tar.gz -C ~/dev2/wezterm
Login to docker registry (create Red Hat account first) and pull image (from https://catalog.redhat.com/software/containers/ubi9/ubi/615bcf606feffc5384e8452e?container-tabs=gti)
docker login registry.redhat.io
Username: {REGISTRY-SERVICE-ACCOUNT-USERNAME}
Password: {REGISTRY-SERVICE-ACCOUNT-PASSWORD}
Login Succeeded!
docker pull registry.redhat.io/ubi9/ubi:9.5-1732804088
Go to folder and run the container with the folder mounted:
cd ~/dev2/wezterm
docker run -v $PWD:/opt -it --entrypoint /bin/bash registry.redhat.io/ubi9/ubi:9.5-1732804088
Then from within the container try to create the build environment:
yum update
curl https://sh.rustup.rs -sSf | sh -s
. "$HOME/.cargo/env"
rustup update
cd /opt
./get-deps # <----- HERE IT FAILS!
cargo clean && cargo build --release --bin wezterm-mux-server --bin wezterm
exit
Notice the marked line! Executing the ./get-deps stage fails. Essentially that stage just installs a bunch of yum packages (prerequisites) according to your distro. The error therefore looks like this:
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:01:14 ago on Thu Dec 12 20:51:05 2024.
No match for argument: flatpak-builder
Package perl-interpreter-4:5.32.1-481.el9.x86_64 is already installed.
Package python3-3.9.21-1.el9_5.x86_64 is already installed.
No match for argument: libxkbcommon-devel
No match for argument: libxkbcommon-x11-devel
No match for argument: wayland-devel
No match for argument: mesa-libEGL-devel
No match for argument: xcb-util-devel
No match for argument: xcb-util-keysyms-devel
No match for argument: xcb-util-image-devel
No match for argument: xcb-util-wm-devel
Error: Unable to find a match: flatpak-builder libxkbcommon-devel libxkbcommon-x11-devel wayland-devel mesa-libEGL-devel xcb-util-devel xcb-util-keysyms-devel xcb-util-image-devel xcb-util-wm-devel
So what I get is that those packages are not known in the upstream registry associated with the universal base image. I then tried:
yum install epel-release
which was promised to provide me with a richer upstream repo selection, but I also get this:
No match for argument: epel-release
Error: Unable to find a match: epel-release
So I feel I’m kinda stuck. How do I proceed? Note I don’t want to pay for a RHEL subscription since all I want is to crossbuild for our production system, I don’t even want to use Redhat locally.
6