#58 Draft: Atomic Desktops
Opened 10 months ago by siosm. Modified 2 months ago
siosm/fedora-kiwi-descriptions rawhide-atomic-desktops  into  rawhide

file modified
+2
@@ -15,6 +15,7 @@ 

  		<release-version>rawhide</release-version>

  	</preferences>

  	<include from="this://./repositories/core.xml"/>

+ 	<include from="this://./components/atomic.xml"/>

  	<include from="this://./components/boot.xml"/>

  	<include from="this://./components/desktops/common.xml"/>

  	<include from="this://./components/desktops/gnome.xml"/>
@@ -32,6 +33,7 @@ 

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

  	<include from="this://./components/liveinstall.xml"/>

  	<include from="this://./components/users.xml"/>

+ 	<include from="this://./teams/atomic-base.xml"/>

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

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

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

@@ -0,0 +1,25 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="AtomicCore" description="Atomic core packages"/>

+ 	</profiles>

+ 	<packages type="bootstrap" patternType="plusRecommended" profiles="AtomicCore">

+ 		<package name="ostree"/>

+ 		<package name="rpm-ostree"/>

+ 	</packages>

+ 	<packages type="image" patternType="plusRecommended" profiles="AtomicCore">

+ 		<package name="grub2-efi-aa64" arch="aarch64"/>

+ 		<package name="grub2-efi-aa64-modules" arch="aarch64"/>

+ 		<package name="grub2-efi-x64" arch="x86_64"/>

+ 		<package name="grub2-efi-x64-modules" arch="x86_64"/>

+ 		<package name="grub2-pc" arch="x86_64"/>

+ 		<package name="grub2-pc-modules" arch="x86_64"/>

+ 		<package name="grub2-ppc64le" arch="ppc64le"/>

+ 		<package name="s390utils-base" arch="s390x"/>

+ 		<package name="shim-signed-aa64" arch="aarch64"/>

+ 		<package name="shim-signed-x64" arch="x86_64"/>

+ 	</packages>

+ 	<packages type="iso" patternType="plusRecommended" profiles="AtomicCore">

+ 		<package name="grub2-efi-aa64-cdboot" arch="aarch64"/>

+ 		<package name="grub2-efi-x64-cdboot" arch="x86_64"/>

+ 	</packages>

+ </image>

file modified
+7
@@ -13,6 +13,13 @@ 

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

  echo "Configure image: [$kiwi_iname]-[$kiwi_profiles]..."

  

+ # Exit early for Atomic profiles

+ if [[ "$kiwi_profiles" == *"Atomic"* ]]; then

+     echo "Not running config.sh for Atomic profiles"

+     exit 0

+ fi

+ 

+ 

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

  # Set SELinux booleans

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

file modified
+1 -1
@@ -57,7 +57,7 @@ 

  

  set +e

  if [ ! ${kiwi_isolated} ]; then

- kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system build --description "${kiwi_description_dir}" --target-dir "${output_dir}"

+ poetry run kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system build --description "${kiwi_description_dir}" --target-dir "${output_dir}" --allow-existing-root

  else

  kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system boxbuild --box universal --sshfs-sharing -- --description "${kiwi_description_dir}" --target-dir "${output_dir}"

  fi

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

+ #!/bin/bash

+ 

+ set -euxo pipefail

+ 

+ #======================================

+ # Functions...

+ #--------------------------------------

+ test -f /.kconfig && . /.kconfig

+ test -f /.profile && . /.profile

+ 

+ #======================================

+ # Greeting...

+ #--------------------------------------

+ echo "Post bootstrap: [$kiwi_iname]-[$kiwi_profiles]..."

+ 

+ # Exit early for non Atomic profiles

+ if [[ "$kiwi_profiles" != *"Atomic"* ]]; then

+     echo "Not running post_bootstrap.sh for non Atomic profiles"

+     exit 0

+ fi

+ 

+ ostree admin init-fs --modern /

+ ostree config --repo=/ostree/repo set sysroot.bootloader none

+ ostree config --repo=/ostree/repo set sysroot.readonly true

+ install -dm0755 /boot/loader.0

+ ln -snf loader.0 /boot/loader

+ ostree admin os-init fedora --sysroot / || true

+ 

+ ostree container image deploy \

I'd really like new things to use bootc install to-filesystem instead.

+     --imgref ostree-unverified-image:registry:quay.io/fedora-ostree-desktops/base:40 \

+     --target-imgref ostree-unverified-image:registry:quay.io/fedora-ostree-desktops/base:40 \

+     --stateroot fedora \

+     --sysroot / \

+     --karg=rw

+ 

+ exit 0

@@ -0,0 +1,34 @@ 

+ <image>

+ 	<profiles>

+ 		<profile name="AtomicBase" description="Atomic Base Image">

+ 			<requires profile="AtomicCore"/>

+ 		</profile>

+ 	</profiles>

+ 	<preferences profiles="AtomicBase" arch="x86_64,aarch64">

+ 		<type image="oem" format="qcow2"

+ 		      firmware="uefi" efipartsize="500"

+ 		      bootpartition="true" bootpartsize="1000" bootfilesystem="ext4"

+ 		      filesystem="btrfs" btrfs_root_is_subvolume="true" btrfs_set_default_volume="false" fsmountoptions="compress=zstd:1"

+ 		      kernelcmdline="console=tty1 console=ttyS0,115200n8"

+ 		      devicepersistency="by-uuid"

+ 		      rootfs_label="fedora"

+ 		      initrd_system="none"

+ 		      >

+ 			<bootloader name="grub2" console="serial" timeout="0"/>

+ 			<size unit="G">10</size>

+ 			<systemdisk>

+ 				<volume name="@root=root"/>

+ 				<volume name="home" parent="/"/>

+ 				<volume name="var" parent="/"/>

+ 			</systemdisk>

+ 			<oemconfig>

+ 				<oem-resize>false</oem-resize>

+ 			</oemconfig>

+ 		</type>

+ 	</preferences>

+ 	<packages type="bootstrap" patternType="plusRecommended" profiles="AtomicBase">

+         <package name="glibc-all-langpacks"/>

+ 	</packages>

+ 	<packages type="image" patternType="plusRecommended" profiles="AtomicBase">

+ 	</packages>

+ </image>

WIP Kiwi descriptions for Fedora Atomic Desktops

4 new commits added

  • WIP: Atomic Desktops
  • WIP: Call kiwi from poetry for development
  • WIP: Call kiwi with --allow-existing-root for devel
  • Add gitignore
10 months ago

rebased onto d04667794c93be1319dae2108266c0ee005015a2

10 months ago

FWIW, stuff like this goes in components rather than teams. Look at #65 for an example of how this is structured. Alternatively, if this is maintained by a particular team, then you may want to structure it similar to cloud.

rebased onto 5fe8b10

6 months ago

I'd really like new things to use bootc install to-filesystem instead.

I'd really like new things to use bootc install to-filesystem instead.

I'd rather have kiwi natively understand orchestrating bootc, but from what I've been told, the technology isn't ready for tools to integrate support for.

I'd rather have kiwi natively understand orchestrating bootc, but from what I've been told, the technology isn't ready for tools to integrate support for.

[citation needed] - without that I think you've been told incorrectly.