Compare commits

...

10 Commits

Author SHA1 Message Date
Davide Cavalca
e672f281ef Drop the selinux relabel workaround 2024-04-20 16:22:08 +00:00
Neal Gompa
2820e4b2bb tmt: Install the kiwi system deps for disk images
This ensures all the tools needed for building disk images are
present.
2024-04-10 23:21:54 -04:00
Neal Gompa
01b18f3e89 tmt: Add missing runtime dependency on python3-click
It's needed for builder.py.
2024-04-08 23:15:57 -04:00
Neal Gompa
0521c46afa config.sh: Drop unneeded configuration
The various systemd services are enabled through presets already,
so this is redundant.
2024-04-08 22:53:03 -04:00
Neal Gompa
84a2a2a187 components/boot: Force grubby at bootstrap phase
If no preference is expressed, sdubby will be selected instead of
grubby, which breaks image builds. Thus, install grubby early to
avoid this issue.
2024-04-08 22:48:27 -04:00
Neal Gompa
726d50088f Install fedora-release-* at bootstrap phase for various images
This ensures that the correct variant packages are installed.
2024-04-08 22:46:36 -04:00
Leif Liddy
d036ad6d83
correct typo 2024-01-08 01:00:12 +01:00
Neal Gompa
0a91c4077b builder.py: Use TMT_TEST_DATA for storing artifacts for CI
The contents of TMT_PLAN_DATA does not get exposed in the
CI artifacts output UI, whereas TMT_TEST_DATA does.
2023-12-20 22:11:49 -05:00
Neal Gompa
f055b4d18d README: Add note about CI under Contributing section 2023-12-20 08:40:40 -05:00
Neal Gompa
806f23b694 tmt: Simplify test configuration
We are running the same test multiple times, so we can de-duplicate
the logic so that it is written only once and reused for each variant.
2023-12-20 07:16:01 -05:00
13 changed files with 52 additions and 113 deletions

View File

@ -68,6 +68,9 @@ We also provide a script to generate an [Asahi Installer](https://github.com/Asa
Please default to submitting PRs against the `rawhide` branch. Release branches should generally merge from `rawhide` and only deviate where absolutely necessary.
This project is tested using the [Software Factory Zuul CI instance](https://fedora.softwarefactory-project.io/zuul/project/pagure.io/fedora-asahi/kiwi-descriptions)
using the [Test Management Tool](https://tmt.readthedocs.io/).
## Licensing
This is free software: you can redistribute it and/or modify

View File

@ -195,7 +195,7 @@ def tmtCopy(target):
image = f"{base}.raw.zst"
manifest = f"{base}.json"
artifacts = os.getenv("TMT_PLAN_DATA")
artifacts = os.getenv("TMT_TEST_DATA")
if not os.path.exists(artifacts):
os.mkdir(artifacts)

View File

@ -2,13 +2,15 @@
<profiles>
<profile name="BootCore" description="Boot core packages"/>
</profiles>
<packages type="bootstrap" patternType="plusRecommended" profiles="BootCore">
<package name="grubby"/>
</packages>
<packages type="image" patternType="plusRecommended" profiles="BootCore">
<package name="grub2-efi-aa64" arch="aarch64"/>
<package name="grub2-efi-aa64-modules" arch="aarch64"/>
<package name="shim-signed-aa64" arch="aarch64"/>
<package name="grub2-efi-aa64" arch="aarch64"/>
<package name="uboot-images-armv8" arch="aarch64"/>
<package name="grubby"/>
<package name="kernel-16k"/>
<package name="kernel-16k-modules-extra"/>
<package name="systemd-oomd-defaults"/>

View File

@ -28,16 +28,20 @@
<packages type="uninstall" profiles="DesktopCommon">
<package name="xorg-x11-server-Xorg"/>
</packages>
<packages type="bootstrap" patternType="plusRecommended" profiles="GNOME-Desktop">
<package name="fedora-release-workstation"/>
</packages>
<packages type="image" patternType="plusRecommended" profiles="GNOME-Desktop">
<namedCollection name="workstation-product-environment"/>
<package name="fedora-release-workstation"/>
</packages>
<packages type="bootstrap" patternType="plusRecommended" profiles="KDE-Desktop">
<package name="fedora-release-kde"/>
</packages>
<packages type="image" patternType="plusRecommended" profiles="KDE-Desktop">
<namedCollection name="kde-desktop-environment"/>
<namedCollection name="kde-apps"/>
<namedCollection name="kde-media"/>
<package name="fuse"/>
<package name="fedora-release-kde"/>
<package name="kde-l10n"/>
<package name="calamares-firstboot-config"/>
<ignore name="@admin-tools"/>

View File

@ -54,12 +54,6 @@ passwd -l root
# Setup default services
#--------------------------------------
## Enable chrony
systemctl enable sshd.service
## Enable NetworkManager
systemctl enable NetworkManager.service
## Enable chrony
systemctl enable chronyd.service
## Enable persistent journal
mkdir -p /var/log/journal

View File

@ -89,7 +89,7 @@ popd > /dev/null
openh264_rpms=$(rpmdistro-repoquery fedora "$release" gstreamer1-plugin-openh264 mozilla-openh264 openh264 --location)
if [ -e "${openh264_rpms}"]; then
if [ -e "${openh264_rpms}" ]; then
extras="{}"
else
extras="$(printf '%s\n' "${openh264_rpms}" | newlineToJson)"

View File

@ -18,9 +18,11 @@
</oemconfig>
</type>
</preferences>
<packages type="bootstrap" patternType="plusRecommended" profiles="Server">
<package name="fedora-release-server"/>
</packages>
<packages type="image" patternType="plusRecommended" profiles="Server">
<namedCollection name="container-management"/>
<namedCollection name="server-product-environment"/>
<package name="fedora-release-server"/>
</packages>
</image>

View File

@ -3,8 +3,3 @@
# Set ESP mount options to match what Fedora does
# https://github.com/OSInside/kiwi/issues/2201
gawk -i inplace '$2 == "/boot/efi" { $4 = $4",umask=0077,shortname=winnt" } { print $0 }' /etc/fstab
# Run selinux relabel at the right time
# https://github.com/OSInside/kiwi/issues/2192
# https://github.com/OSInside/kiwi/pull/2282#issuecomment-1514399308
setfiles -F -p -c /etc/selinux/targeted/policy/policy.* -e /proc -e /sys -e /dev /etc/selinux/targeted/contexts/files/file_contexts /

View File

@ -1,28 +1,7 @@
summary: Build GNOME image
prepare:
- name: install packages
how: install
package:
- distribution-gpg-keys
- fatcat
- git-core
- kiwi
- libselinux-utils
- p7zip-plugins
- python3-boto3
- rpmdistro-repoquery
- zip
- zstd
discover:
how: shell
tests:
- name: build image
test: |
setenforce 0
$TMT_TREE/builder.py build gnome
$TMT_TREE/builder.py package gnome
$TMT_TREE/builder.py tmt gnome
setenforce 1
how: fmf
environment:
image_variant: gnome
execute:
how: tmt

View File

@ -1,28 +1,7 @@
summary: Build KDE image
prepare:
- name: install packages
how: install
package:
- distribution-gpg-keys
- fatcat
- git-core
- kiwi
- libselinux-utils
- p7zip-plugins
- python3-boto3
- rpmdistro-repoquery
- zip
- zstd
discover:
how: shell
tests:
- name: build image
test: |
setenforce 0
$TMT_TREE/builder.py build kde
$TMT_TREE/builder.py package kde
$TMT_TREE/builder.py tmt kde
setenforce 1
how: fmf
environment:
image_variant: kde
execute:
how: tmt

View File

@ -1,28 +1,7 @@
summary: Build Minimal image
prepare:
- name: install packages
how: install
package:
- distribution-gpg-keys
- fatcat
- git-core
- kiwi
- libselinux-utils
- p7zip-plugins
- python3-boto3
- rpmdistro-repoquery
- zip
- zstd
discover:
how: shell
tests:
- name: build image
test: |
setenforce 0
$TMT_TREE/builder.py build minimal
$TMT_TREE/builder.py package minimal
$TMT_TREE/builder.py tmt minimal
setenforce 1
how: fmf
environment:
image_variant: minimal
execute:
how: tmt

View File

@ -1,28 +1,7 @@
summary: Build Server image
prepare:
- name: install packages
how: install
package:
- distribution-gpg-keys
- fatcat
- git-core
- kiwi
- libselinux-utils
- p7zip-plugins
- python3-boto3
- rpmdistro-repoquery
- zip
- zstd
discover:
how: shell
tests:
- name: build image
test: |
setenforce 0
$TMT_TREE/builder.py build server
$TMT_TREE/builder.py package server
$TMT_TREE/builder.py tmt server
setenforce 1
how: fmf
environment:
image_variant: server
execute:
how: tmt

23
tmt/tests/build-image.fmf Normal file
View File

@ -0,0 +1,23 @@
summary: Build image
require:
- distribution-gpg-keys
- fatcat
- git-core
- kiwi
- kiwi-systemdeps-disk-images
- libselinux-utils
- p7zip-plugins
- python3-boto3
- python3-click
- rpmdistro-repoquery
- zip
- zstd
framework: shell
path: /
test: |
setenforce 0
./builder.py build $image_variant
./builder.py package $image_variant
./builder.py tmt $image_variant
setenforce 1
duration: 60m