#83 Add FEX-RootFS definition
Merged 5 months ago by ngompa. Opened 7 months ago by dcavalca.
dcavalca/fedora-kiwi-descriptions fex  into  rawhide

file modified
+1
@@ -47,6 +47,7 @@ 

  	<include from="this://./teams/sway.xml"/>

  	<include from="this://./teams/budgie.xml"/>

  	<include from="this://./teams/miraclewm.xml"/>

+ 	<include from="this://./teams/asahi.xml"/>

  	<packages type="bootstrap">

  		<package name="basesystem"/>

  		<package name="filesystem"/>

file modified
+1
@@ -14,6 +14,7 @@ 

  |                                |            | `Container-Base-Generic-Minimal` |

  |                                |            | `Container-Base-Generic`         |

  | Toolbox Container              | `oci`      | `Container-Toolbox`              |

+ | RootFS for FEX                 | `erofs`    | `FEX-RootFS`                     |

  | KDE Spin                       | `iso`      | `KDE-Desktop-Live`               |

  |                                | `oem`      | `KDE-Desktop-Disk`               |

  | KDE Mobile Spin                | `iso`      | `KDE-Mobile-Live`                |

file modified
+4 -4
@@ -16,7 +16,7 @@ 

  #======================================

  # Set SELinux booleans

  #--------------------------------------

- if [[ "$kiwi_profiles" != *"Container"* ]]; then

+ if [[ "$kiwi_profiles" != *"Container"* ]] && [[ "$kiwi_profiles" != *"FEX"* ]]; then

  	## Fixes KDE Plasma, see rhbz#2058657

  	setsebool -P selinuxuser_execmod 1

  fi
@@ -33,7 +33,7 @@ 

  #======================================

  # Configure grub correctly

  #--------------------------------------

- if [[ "$kiwi_profiles" != *"Container"* ]]; then

+ if [[ "$kiwi_profiles" != *"Container"* ]] && [[ "$kiwi_profiles" != *"FEX"* ]]; then

  	## Works around issues with grub-bls

  	## See: https://github.com/OSInside/kiwi/issues/2198

  	echo "GRUB_DEFAULT=saved" >> /etc/default/grub
@@ -111,7 +111,7 @@ 

  #======================================

  # Setup default target

  #--------------------------------------

- if [[ "$kiwi_profiles" != *"Container"* ]]; then

+ if [[ "$kiwi_profiles" != *"Container"* ]] && [[ "$kiwi_profiles" != *"FEX"* ]]; then

  	if [[ "$kiwi_profiles" == *"Desktop"* ]]; then

  		systemctl set-default graphical.target

  	else
@@ -192,7 +192,7 @@ 

  chown -R root:root /root/.ssh

  fi

  

- if [[ "$kiwi_profiles" == *"Container"* ]]; then

+ if [[ "$kiwi_profiles" == *"Container"* ]] || [[ "$kiwi_profiles" == *"FEX"* ]]; then

  	# Set install langs macro so that new rpms that get installed will

  	# only install langs that we limit it to.

  	LANG="en_US"

file added
+34
@@ -0,0 +1,34 @@ 

+ exclude:

+ - /dev

+ - /sys

+ - /proc

+ - /etc/hosts

+ - /etc/resolv.conf

+ - /etc/timezone

+ - /etc/localtime

+ - /etc/passwd

+ - /etc/passwd-

+ - /etc/group

+ - /etc/group-

+ - /etc/shadow

+ - /etc/shadow-

+ - /etc/gshadow

+ - /etc/gshadow-

+ - /etc/fstab

+ - /etc/mtab

+ - /etc/subuid

+ - /etc/subgid

+ - /etc/machine-id

+ - /boot

+ - /home

+ - /media

+ - /mnt

+ - /root

+ - /srv

+ - /tmp

+ - /run

+ - /opt

+ - /var/tmp

+ - /var/run

+ - /var/lock

+ - /var/lib/dbus/machine-id

file added
+162
@@ -0,0 +1,162 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="FEX-RootFS" description="FEX RootFS packages"/>

+ 	</profiles>

+ 	<preferences profiles="FEX-RootFS" arch="x86_64">

+ 		<type image="erofs" erofscompression="lz4"/>

+ 		<timezone>Etc/UTC</timezone>

+ 		<locale>en_US</locale>

+ 		<rpm-locale-filtering>true</rpm-locale-filtering>

+ 		<rpm-excludedocs>true</rpm-excludedocs>

+ 	</preferences>

+ 	<packages type="image" profiles="FEX-RootFS">

+ 		<file name="fex-excludes.yaml" target="image/exclude_files.yaml"/>

+ 	</packages>

+ 	<packages type="bootstrap" profiles="FEX-RootFS">

+ 		<package name="dnf5-plugins"/>

+ 		<package name="util-linux-core"/>

+ 		<package name="sudo"/>

+ 		<package name="rsync"/>

+ 		<package name="glibc.x86_64"/>

+ 		<package name="glibc.i686"/>

+ 		<package name="dbus"/>

+ 		<package name="systemd.x86_64"/>

+ 		<package name="systemd.i686"/>

+ 		<package name="systemd-libs.x86_64"/>

+ 		<package name="systemd-libs.i686"/>

+ 		<package name="pulseaudio.x86_64"/>

+ 		<package name="mesa-libGL.x86_64"/>

+ 		<package name="mesa-libGL.i686"/>

+ 		<package name="mesa-libEGL.x86_64"/>

+ 		<package name="mesa-libEGL.i686"/>

+ 		<package name="mesa-libGLU.x86_64"/>

+ 		<package name="mesa-libGLU.i686"/>

+ 		<package name="mesa-dri-drivers.x86_64"/>

+ 		<package name="mesa-dri-drivers.i686"/>

+ 		<package name="mesa-vulkan-drivers.x86_64"/>

+ 		<package name="mesa-vulkan-drivers.i686"/>

+ 		<package name="mesa-va-drivers.x86_64"/>

+ 		<package name="mesa-va-drivers.i686"/>

+ 		<package name="mesa-demos.x86_64"/>

+ 		<package name="libglvnd-opengl.x86_64"/>

+ 		<package name="libglvnd-opengl.i686"/>

+ 		<package name="libglvnd-egl.x86_64"/>

+ 		<package name="libglvnd-egl.i686"/>

+ 		<package name="libglvnd-gles.x86_64"/>

+ 		<package name="libglvnd-gles.i686"/>

+ 		<package name="libatomic.x86_64"/>

+ 		<package name="libatomic.i686"/>

+ 		<package name="libatomic_ops.x86_64"/>

+ 		<package name="libatomic_ops.i686"/>

+ 		<package name="libunwind.x86_64"/>

+ 		<package name="libunwind.i686"/>

+ 		<package name="libnsl.x86_64"/>

+ 		<package name="libnsl.i686"/>

+ 		<package name="flac-libs.x86_64"/>

+ 		<package name="flac-libs.i686"/>

+ 		<package name="SDL2.x86_64"/>

+ 		<package name="SDL2.i686"/>

+ 		<package name="sdl12-compat.x86_64"/>

+ 		<package name="sdl12-compat.i686"/>

+ 		<package name="protobuf-compiler.x86_64"/>

+ 		<package name="protobuf-compiler.i686"/>

+ 		<package name="protobuf-c.x86_64"/>

+ 		<package name="protobuf-c.i686"/>

+ 		<package name="openal-soft.x86_64"/>

+ 		<package name="openal-soft.i686"/>

+ 		<package name="speex.x86_64"/>

+ 		<package name="speex.i686"/>

+ 		<package name="libvorbis.x86_64"/>

+ 		<package name="libvorbis.i686"/>

+ 		<package name="usbutils"/>

+ 		<package name="pciutils"/>

+ 		<package name="libpciaccess.x86_64"/>

+ 		<package name="libpciaccess.x86_64"/>

+ 		<package name="glew-devel.x86_64"/>

+ 		<package name="glew-devel.i686"/>

+ 		<package name="libX11-xcb.x86_64"/>

+ 		<package name="libX11-xcb.i686"/>

+ 		<package name="xcb-util.x86_64"/>

+ 		<package name="xcb-util.i686"/>

+ 		<package name="xcb-util-cursor.x86_64"/>

+ 		<package name="xcb-util-cursor.i686"/>

+ 		<package name="xcb-util-image.x86_64"/>

+ 		<package name="xcb-util-image.i686"/>

+ 		<package name="xcb-util-keysyms.x86_64"/>

+ 		<package name="xcb-util-keysyms.i686"/>

+ 		<package name="xcb-util-xrm.x86_64"/>

+ 		<package name="xcb-util-xrm.i686"/>

+ 		<package name="libxkbcommon.x86_64"/>

+ 		<package name="libxkbcommon.i686"/>

+ 		<package name="libwayland-client.x86_64"/>

+ 		<package name="libwayland-client.i686"/>

+ 		<package name="libwayland-egl.x86_64"/>

+ 		<package name="libwayland-egl.i686"/>

+ 		<package name="libXext.x86_64"/>

+ 		<package name="libXext.i686"/>

+ 		<package name="libXdamage.x86_64"/>

+ 		<package name="libXdamage.i686"/>

+ 		<package name="libxcb.x86_64"/>

+ 		<package name="libxcb.i686"/>

+ 		<package name="libxshmfence.x86_64"/>

+ 		<package name="libxshmfence.i686"/>

+ 		<package name="libXxf86vm.x86_64"/>

+ 		<package name="libXxf86vm.i686"/>

+ 		<package name="libXrandr.x86_64"/>

+ 		<package name="libXrandr.i686"/>

+ 		<package name="llvm-libs.x86_64"/>

+ 		<package name="llvm-libs.i686"/>

+ 		<package name="llvm14-libs.x86_64"/>

+ 		<package name="llvm14-libs.i686"/>

+ 		<package name="llvm15-libs.x86_64"/>

+ 		<package name="llvm15-libs.i686"/>

+ 		<package name="libclc.x86_64"/>

+ 		<package name="libclc.i686"/>

+ 		<package name="spirv-tools-devel.x86_64"/>

+ 		<package name="spirv-tools-devel.i686"/>

+ 		<package name="spirv-llvm-translator.x86_64"/>

+ 		<package name="spirv-llvm-translator.i686"/>

+ 		<package name="harfbuzz.x86_64"/>

+ 		<package name="harfbuzz.i686"/>

+ 		<package name="libva.x86_64"/>

+ 		<package name="libva.i686"/>

+ 		<package name="libvdpau.x86_64"/>

+ 		<package name="libvdpau.i686"/>

+ 		<package name="fuse-libs.x86_64"/>

+ 		<package name="fuse-libs.i686"/>

+ 		<package name="fuse3-libs.x86_64"/>

+ 		<package name="fuse3-libs.i686"/>

+ 		<package name="ibus-libs.x86_64"/>

+ 		<package name="ibus-libs.i686"/>

+ 		<package name="mangohud.x86_64"/>

+ 		<package name="mangohud.i686"/>

+ 		<package name="nss.x86_64"/>

+ 		<package name="nss.i686"/>

+ 		<package name="nspr.x86_64"/>

+ 		<package name="nspr.i686"/>

+ 		<package name="python3.x86_64"/>

+ 		<package name="python3.i686"/>

+ 		<package name="openssl-libs.x86_64"/>

+ 		<package name="openssl-libs.i686"/>

+ 		<package name="curl"/>

+ 		<package name="xterm"/>

+ 		<package name="zenity"/>

+ 		<package name="xz"/>

+ 		<package name="xdg-desktop-portal.x86_64"/>

+ 		<package name="xdg-desktop-portal.i686"/>

+ 		<package name="xdg-desktop-portal-gtk"/>

+ 		<package name="wine.x86_64"/>

+ 		<package name="wine.i686"/>

+ 		<package name="vulkan-tools"/>

+ 		<package name="vulkan-loader.i686"/>

+ 		<package name="vulkan-loader.x86_64"/>

+ 		<package name="pkgconf.x86_64"/>

+ 		<package name="pkgconf.i686"/>

+ 		<package name="clinfo"/>

+ 		<package name="gobject-introspection"/>

+ 		<package name="kbd-misc"/>

+ 		<package name="glibc-langpack-en"/>

+ 		<package name="zlib-ng.x86_64"/>

+ 		<package name="zlib-ng.i686"/>

+ 	</packages>

+ </image>

@@ -0,0 +1,12 @@ 

+ summary: Build FEX RootFS

+ discover:

+     how: fmf

+ adjust:

+     enabled: false

+     when: arch != x86_64

+ environment:

+     image_type: erofs

+     image_profile: FEX-RootFS

+     kiwi_file: Fedora.kiwi

+ execute:

+     how: tmt

Add a new definition for a RootFS to be used by FEX. This is based on the upstream manifest.

Probably sort this below Toolbox container :)

This needs an adjustment to build only on x86_64. Look at the vagrant plans to see what that looks like.

We're in dnf5 now.

Why do we need this?

Probably sort this below Toolbox container :)

Sure, I went for alphabetical.

Why do we need this?

No idea, the package list is copypasta from the upstream one.

rebased onto 2eeafce

7 months ago

rebased onto 2eeafce

7 months ago

rebased onto 2eeafce

7 months ago

rebased onto 2eeafce

7 months ago

Your commit message still says wip? And the commit does not have a lot of detail of what this is for.

Ah lemme fix that, I just updated the PR itself but not the commit.

rebased onto 2eeafce

7 months ago

Note: eventually we'd like this to be EROFS, using squashfs as a stopgap until this is implemented in Kiwi

rebased onto 2eeafce

6 months ago

Do we actually want to limit this solely to English? I'm not sure we do.

I'm not sure we want to do this, since this is (indirectly) highly user-facing.

My thinking was that in most cases this would be hidden away and the user probably wouldn't notice. We can certainly include all locales if we want to, it'll just make it larger.

The reason I thought about it was because the locales influence what applications running through the rootfs can present, IIRC.

rebased onto 44a53fb

6 months ago

rebased onto 067338f

6 months ago

I switched to erofs but looks like there's an outstanding issue in Kiwi around compression: https://github.com/OSInside/kiwi/issues/2647

Discussion question: Should we include wine?

Points against:

  • wine is one of the biggest packages here, due to the piles of dll's it needs.
  • If we want to ship OOTB, we should reign in our binary size footprint, wine is the biggest offender.
  • The goal of shipping OOTB is to make Arm Fedora work just as well as x86 Fedora. x86 Fedora does not include wine ootb and it would be weird if it did!
  • RootFS wine is currently broken with krun+FEX, so it's useless on asahi right now without patches.
  • Steam brings its own wine ("Proton"). I expect most users will run windows games via Steam so the fedora wine is just extra GBs for no reason.

Points for:

  • Steam is proprietary, Wine is not. Theoretically one could use Wine+FEX for a free software x86 wine package so the extra Steam blob would be particularly bad. Although this seems... unlikely.
  • It's tricky to install Wine for FEX if we don't stick it in the rootfs and the user doesn't want to use Proton for whatever reason.
  • Upstream FEX rootfs's include Wine so this would be a deviation from upstream. Short term users can grab upstream rootfs's if they prefer those of course. Long term the FEX project will presumably sunset their non-Kiwi Fedora images after this PR is merged.

Options:

  1. Do nothing, eat the GBs.
  2. Drop wine. Happy path users save disk space (running x86 Linux applications, running Windows stuff via Steam). Users wanting Fedora wine are inconvenienced.
  3. Split into two alternatives rootfs packages, a -minimal and a -full variant. Minimal dropping Wine and being preinstalled. Installing -full being the arm equivalent of installing Fedora wine on a native x86 Fedora.

After a quick synchronous chat, current consensus on the above seems to be "do nothing, eat the GBs for now, and revisit when shipping out-of-the-box is viable"

What's pulling in Perl?

upstream rootfs pulls in lots of stuff as part of the Mesa build. some of these are needed at runtime too :sob:

Minimally we need spirv-tools and libclc for acceleration. but something else is missing too and breaking steam.

#89 has many fixes. Please pull my changes and update this PR then I'll close that one.

rebased onto 067338f

6 months ago

rebased onto 5fe8b10

6 months ago

Artefact of the latest build confirmed working here. (Steam and Control working.) Will keep soak testing but it's a good sign.

This looks good to me, so let's land it now. :fireworks:

Pull-Request has been merged by ngompa

5 months ago