Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add F41 tests #145

Merged
merged 19 commits into from
Oct 30, 2024
Merged
22 changes: 6 additions & 16 deletions .github/workflows/build_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,14 @@ on:
{
"version": [
"39",
"40",
],
"40",
"41"
],
"flatpaks": [
"false",
"flatpak_dir",
"flatpak_refs_dir",
"flatpak_refs"
],
"exclude": [
{
"version": "40",
"flatpaks": "flatpak_dir"
},
{
"version": "40",
"flatpaks": "flatpak_refs"
}
],
"include": [
{
"version": "39",
Expand All @@ -39,10 +30,9 @@ on:
"image_name": "fedora-bootc"
},
{
"version": "38",
"version": "41",
"image_repo": "quay.io/fedora",
"image_name": "fedora-bootc",
"image_src": "docker://quay.io/fedora-ostree-desktops/base:39"
"image_name": "fedora-bootc"
}
]
}'
Expand Down
1 change: 1 addition & 0 deletions flatpaks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ repo: script.sh

script.sh:
cat << EOF > script.sh
which flatpak &> /dev/null || dnf install -y flatpak
mkdir -p /flatpak/flatpak /flatpak/triggers
mkdir /var/tmp || true
chmod -R 1777 /var/tmp
Expand Down
2 changes: 1 addition & 1 deletion lorax_templates/flatpak_set_repo.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%page args="flatpak_remote_name, _flatpak_repo_url, version"/>
% if int(version) >= 41:
append etc/anaconda/conf.d/anaconda.conf "[Payload]"
append etc/anaconda/conf.d/anaconda.conf "flatpak_remote = ${flatpak_remote_name} ${_flatpak_repo_url}"
% else:
replace "flatpak_manager\.add_remote\(\".*\", \".*\"\)" "flatpak_manager.add_remote(\"${flatpak_remote_name}\", \"${_flatpak_repo_url}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
replace "flatpak_manager\.replace_installed_refs_remote\(\".*\"\)" "flatpak_manager.replace_installed_refs_remote(\"${flatpak_remote_name}\")" /usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py
% endif

14 changes: 14 additions & 0 deletions test/iso/flatpak_repo_updated.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
#!/bin/bash

if [[ ${VERSION} -ge 41 ]]
then
result=0
grep "^[Payload]" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing [Payload] header"
result=1
}
grep "^flatpak_remote = ${FLATPAK_REMOTE_NAME} ${_FLATPAK_REPO_URL}" mnt/install/etc/anaconda/conf.d/anaconda.conf > /dev/null || {
echo "Missing flatpak_remote option"
result=1
}
exit ${result}
fi

add_line=$(grep flatpak_manager.add_remote mnt/install/usr/lib64/python*/site-packages/pyanaconda/modules/payloads/payload/rpm_ostree/flatpak_installation.py)

add_line_repo=$(echo "${add_line}" | grep "${FLATPAK_REMOTE_NAME}")
Expand Down
4 changes: 3 additions & 1 deletion test/vm/flatpak_fedora_repo_disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
register: services_state

- name: Check that flatpak-add-fedora-repos is disabled
when: services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service'] is defined
ansible.builtin.assert:
that:
- services_state['ansible_facts']['services']['flatpak-add-fedora-repos.service']['status'] == 'disabled'
fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
fail_msg: 'flatpak-add-fedora-repos.service is not disabled'
success_msg: 'flatpak-add-fedora-repos.service is correctly disabled'
JasonN3 marked this conversation as resolved.
Show resolved Hide resolved