From 3265159ea86b73e682d0e05fd6fdf427a457f416 Mon Sep 17 00:00:00 2001 From: Jiri Konecny Date: Wed, 14 Aug 2024 14:30:44 +0200 Subject: [PATCH] FIXME: Add Lorax patch for testing This shouldn't be merged. It's only for testing purpose. The fix should go to Lorax project directly --- dockerfile/anaconda-iso-creator/Dockerfile | 2 +- ...adjust-templates-for-Xorg-to-Wayland.patch | 67 +++++++++++++++++++ dockerfile/anaconda-iso-creator/lorax-build | 5 ++ .../anaconda-iso-creator/lorax-build.j2 | 5 ++ 4 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 dockerfile/anaconda-iso-creator/adjust-templates-for-Xorg-to-Wayland.patch diff --git a/dockerfile/anaconda-iso-creator/Dockerfile b/dockerfile/anaconda-iso-creator/Dockerfile index 98e32b9b7a02..2ca2852dea0d 100644 --- a/dockerfile/anaconda-iso-creator/Dockerfile +++ b/dockerfile/anaconda-iso-creator/Dockerfile @@ -42,7 +42,7 @@ RUN set -ex; \ COPY ["lorax-build", "/"] COPY ["lorax-build-webui", "/"] -COPY ["adjust-templates-for-webui.patch", "/"] +COPY ["adjust-templates-for-webui.patch", "adjust-templates-for-Xorg-to-Wayland.patch", "/"] RUN mkdir /lorax /anaconda-rpms /images diff --git a/dockerfile/anaconda-iso-creator/adjust-templates-for-Xorg-to-Wayland.patch b/dockerfile/anaconda-iso-creator/adjust-templates-for-Xorg-to-Wayland.patch new file mode 100644 index 000000000000..f8638812f689 --- /dev/null +++ b/dockerfile/anaconda-iso-creator/adjust-templates-for-Xorg-to-Wayland.patch @@ -0,0 +1,67 @@ +From dc89a1c712be0eab9b73deb6f3aa1a9908af5527 Mon Sep 17 00:00:00 2001 +From: Jiri Konecny +Date: Tue, 13 Aug 2024 16:10:00 +0200 +Subject: [PATCH] Adjust Lorax templates for Xorg to Wayland switch + +Make sure packages and files needed for Wayland to work +are not purged during boot.iso generation time. + +Resolves: RHEL-38740 +--- + share/templates.d/99-generic/runtime-cleanup.tmpl | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/share/templates.d/99-generic/runtime-cleanup.tmpl b/share/templates.d/99-generic/runtime-cleanup.tmpl +index 801514f1..12c45189 100644 +--- a/share/templates.d/99-generic/runtime-cleanup.tmpl ++++ b/share/templates.d/99-generic/runtime-cleanup.tmpl +@@ -9,8 +9,6 @@ remove usr/share/i18n + ## perl needed for powerpc-utils + ## perl is needed by /usr/bin/rxe_cfg from libibverbs + +-## no sound support, thanks +-removepkg flac-libs libsndfile pipewire pulseaudio* rtkit sound-theme-freedesktop wireplumber* + ## we don't create new initramfs/bootloader conf inside anaconda + ## (that happens inside the target system after we install dracut/grubby) + removepkg dracut-network grubby anaconda-dracut +@@ -52,7 +50,6 @@ removepkg mtools glibc-gconv-extra + + ## various other things we remove to save space + removepkg diffutils file +-removepkg libasyncns + removepkg lvm2-libs + removepkg mobile-broadband-provider-info + removepkg rmt rpcbind squashfs-tools +@@ -200,7 +197,6 @@ removefrom libidn2 /usr/share/locale/* + removefrom libnotify /usr/bin/* + removefrom libsemanage /etc/selinux/* + removefrom libstdc++ /usr/share/* +-removefrom libvorbis /usr/${libdir}/libvorbisenc.* + removefrom libxml2 /usr/bin/* + removefrom linux-firmware /usr/lib/firmware/dvb* + removefrom linux-firmware /usr/lib/firmware/*_12mhz* +@@ -293,7 +289,7 @@ removefrom openssh /usr/libexec/* + removefrom openssh-clients /etc/ssh/* /usr/bin/ssh-* + removefrom openssh-clients /usr/libexec/* + removefrom openssh-server /etc/ssh/* /usr/libexec/openssh/sftp-server +-removefrom pam /usr/*bin/* /usr/share/locale/* ++removefrom pam /usr/share/locale/* + removefrom policycoreutils /etc/* /usr/bin/* /usr/share/locale/* + removefrom polkit /usr/bin/* + removefrom popt /usr/share/locale/* +@@ -370,11 +366,7 @@ removefrom gstreamer1-plugins-base --allbut \ + removepkg geoclue2 + + ## And remove the packages that those extra libraries pulled in +-removepkg cdparanoia-libs opus libtheora libvisual flac-libs gsm avahi-glib avahi-libs \ +- ModemManager-glib +- +-## metacity requires libvorbis and libvorbisfile, but enc/dec are no longer needed +-removefrom libvorbis --allbut /usr/${libdir}/libvorbisfile.* /usr/${libdir}/libvorbis.* ++removepkg cdparanoia-libs libvisual avahi-glib avahi-libs ModemManager-glib + + ## Remove build-id links, they are used with debuginfo + remove /usr/lib/.build-id +-- +2.46.0 + diff --git a/dockerfile/anaconda-iso-creator/lorax-build b/dockerfile/anaconda-iso-creator/lorax-build index 8deb0affb86b..73f0538a0eff 100755 --- a/dockerfile/anaconda-iso-creator/lorax-build +++ b/dockerfile/anaconda-iso-creator/lorax-build @@ -36,6 +36,11 @@ mkdir -p $REPO_DIR cp -a $INPUT_RPMS/* $REPO_DIR || echo "RPM files can't be copied!" # We could just do the build with official repositories only createrepo_c $REPO_DIR +# TODO: Remove this when Lorax is changed +pushd /usr/share/lorax +patch -p2 -i /adjust-templates-for-Xorg-to-Wayland.patch +popd + # build boot.iso with our rpms . /etc/os-release # The download.fedoraproject.org automatic redirector often selects download-ib01.f.o. for GitHub's cloud, which is too unreliable; use a mirror diff --git a/dockerfile/anaconda-iso-creator/lorax-build.j2 b/dockerfile/anaconda-iso-creator/lorax-build.j2 index c545def946b6..a561329740a8 100755 --- a/dockerfile/anaconda-iso-creator/lorax-build.j2 +++ b/dockerfile/anaconda-iso-creator/lorax-build.j2 @@ -29,6 +29,11 @@ mkdir -p $REPO_DIR cp -a $INPUT_RPMS/* $REPO_DIR || echo "RPM files can't be copied!" # We could just do the build with official repositories only createrepo_c $REPO_DIR +# TODO: Remove this when Lorax is changed +pushd /usr/share/lorax +patch -p2 -i /adjust-templates-for-Xorg-to-Wayland.patch +popd + # build boot.iso with our rpms . /etc/os-release # The download.fedoraproject.org automatic redirector often selects download-ib01.f.o. for GitHub's cloud, which is too unreliable; use a mirror