From 4f0f25ececd8b4fc1aae8039ab031e6466e3bd6d Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Sep 30 2024 16:41:15 +0000 Subject: [PATCH 1/3] WIP: Call kiwi with --allow-existing-root for devel --- diff --git a/kiwi-build b/kiwi-build index b65640d..c83c563 100755 --- a/kiwi-build +++ b/kiwi-build @@ -57,7 +57,7 @@ fi 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}" +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 From f7768bf62c2af5ebad19fad521d3ec74061c9846 Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Sep 30 2024 16:41:54 +0000 Subject: [PATCH 2/3] WIP: Call kiwi from poetry for development --- diff --git a/kiwi-build b/kiwi-build index c83c563..b495ff7 100755 --- a/kiwi-build +++ b/kiwi-build @@ -57,7 +57,7 @@ fi 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}" --allow-existing-root +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 From 85478552cf68037a3720f3d917d21378b02acfb8 Mon Sep 17 00:00:00 2001 From: Timothée Ravier Date: Sep 30 2024 16:43:56 +0000 Subject: [PATCH 3/3] WIP: Atomic Desktops --- diff --git a/Fedora.kiwi b/Fedora.kiwi index d19c4a9..ebe1813 100644 --- a/Fedora.kiwi +++ b/Fedora.kiwi @@ -15,6 +15,7 @@ rawhide + @@ -32,6 +33,7 @@ + diff --git a/components/atomic.xml b/components/atomic.xml new file mode 100644 index 0000000..cc4e950 --- /dev/null +++ b/components/atomic.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/config.sh b/config.sh index 0f090d5..40f7a76 100755 --- a/config.sh +++ b/config.sh @@ -13,6 +13,13 @@ test -f /.profile && . /.profile #-------------------------------------- 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 #-------------------------------------- diff --git a/post_bootstrap.sh b/post_bootstrap.sh new file mode 100755 index 0000000..141b072 --- /dev/null +++ b/post_bootstrap.sh @@ -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 \ + --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 diff --git a/teams/atomic-base.xml b/teams/atomic-base.xml new file mode 100644 index 0000000..778c11f --- /dev/null +++ b/teams/atomic-base.xml @@ -0,0 +1,34 @@ + + + + + + + + + + 10 + + + + + + + false + + + + + + + + +