Update manifests names for variants and their package lists

- Strip the 'fedora' prefix from variant names
- Name the packages list manifest for each variant accordingly
This commit is contained in:
Timothée Ravier 2024-06-11 12:38:47 +02:00
parent 28bf47caa9
commit 3a9a0760ef
24 changed files with 45 additions and 44 deletions

View file

@ -188,7 +188,7 @@ Make a PR similar to
```
sed -i "s/41/42/g" *.repo comps-sync.py
sed -i "s/releasever: 41/releasever: 42/" common.yaml
sed -i "s/# - fedora-41/# - fedora-42/" fedora-*.yaml
sed -i "s/# - fedora-41/# - fedora-42/" *.yaml
mv fedora-41.repo fedora-42.repo
mv fedora-41-updates.repo fedora-42-updates.repo
sed -i "s/42/42/g" README.md
@ -200,8 +200,8 @@ sed -i "s/41/42/g" README.md
```
rm fedora-rawhide.repo
sed -i "/- fedora-rawhide/d" fedora-*.yaml
sed -i "s/# - fedora-41/- fedora-41/" fedora-*.yaml
sed -i "s/ref: fedora\/rawhide/ref: fedora\/41/" fedora-*.yaml
sed -i "s/# - fedora-41/- fedora-41/" *.yaml
sed -i "s/ref: fedora\/rawhide/ref: fedora\/41/" *.yaml
```
## Historical references

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- cinnamon-desktop-pkgs.yaml
- cinnamon-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/cinnamon
rojig:

View file

@ -118,7 +118,7 @@ def compare_comps_manifest_package_lists(comps_group_pkgs, manifest_packages):
return comps_unknown, pkgs_added
def update_manifests_from_groups(comps, groups, path, desktop, save, comps_exclude_list, comps_exclude_list_all):
def update_manifests_from_groups(comps, groups, path, variant, save, comps_exclude_list, comps_exclude_list_all):
manifest_packages = load_packages_from_manifest(path)
comps_group_pkgs = {}
@ -131,10 +131,10 @@ def update_manifests_from_groups(comps, groups, path, desktop, save, comps_exclu
n_manifest_new = len(comps_unknown)
n_comps_new = len(pkgs_added)
if desktop == "common":
if variant == "common":
print(f'Syncing common packages:\t+{n_comps_new}, -{n_manifest_new}')
else:
print(f'Syncing packages for {desktop}:\t+{n_comps_new}, -{n_manifest_new}')
print(f'Syncing packages for {variant}:\t+{n_comps_new}, -{n_manifest_new}')
if n_manifest_new != 0:
for (pkg, arch) in sorted(comps_unknown, key = lambda x: x[0]):
manifest_packages[arch].remove(pkg)
@ -191,24 +191,24 @@ def main():
ret += update_manifests_from_groups(comps, groups, 'common-packages.yaml', "common", args.save, comps_exclude_list, comps_exclude_list_all)
# List of comps groups used for each desktop
desktops_comps_groups = {
"gnome": ["gnome-desktop", "base-x"],
"kde": ["kde-desktop", "base-graphical"],
"kde-mobile": ["kde-mobile", "kde-mobile-apps", "base-graphical"],
"xfce": ["xfce-desktop", "xfce-apps", "xfce-extra-plugins", "base-x"],
"lxqt": ["lxqt-desktop", "base-graphical"],
"deepin": ["deepin-desktop", "base-x"],
"mate": ["mate-desktop", "base-x"],
"sway": ["swaywm", "swaywm-extended", "base-graphical"],
"cinnamon": ["cinnamon-desktop", "base-x"],
"budgie": ["budgie-desktop", "budgie-desktop-apps", "base-x"]
# List of comps groups used for each variant
variant_comps_groups = {
"budgie-atomic": ["budgie-desktop", "budgie-desktop-apps", "base-x"],
"cinnamon-atomic": ["cinnamon-desktop", "base-x"],
"deepin-atomic": ["deepin-desktop", "base-x"],
"kinoite": ["kde-desktop", "base-graphical"],
"kinoite-mobile": ["kde-mobile", "kde-mobile-apps", "base-graphical"],
"lxqt-atomic": ["lxqt-desktop", "base-graphical"],
"mate-atomic": ["mate-desktop", "base-x"],
"silverblue": ["gnome-desktop", "base-x"],
"sway-atomic": ["swaywm", "swaywm-extended", "base-graphical"],
"xfce-atomic": ["xfce-desktop", "xfce-apps", "xfce-extra-plugins", "base-x"],
}
# Generate treefiles for all desktops
for desktop, groups in desktops_comps_groups.items():
# Generate treefiles for all variants
for variant, groups in variant_comps_groups.items():
print()
ret += update_manifests_from_groups(comps, groups, f'{desktop}-desktop-pkgs.yaml', desktop, args.save, comps_desktop_exclude_list, comps_exclude_list_all)
ret += update_manifests_from_groups(comps, groups, f'{variant}-packages.yaml', variant, args.save, comps_desktop_exclude_list, comps_exclude_list_all)
if not args.save and ret != 0:
sys.exit(1)

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- deepin-desktop-pkgs.yaml
- deepin-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/deepin
rojig:

View file

@ -52,7 +52,7 @@ sync:
fi
default_variant={{default_variant}}
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${default_variant}.yaml | jq -r '."mutate-os-release"')"
version="$(rpm-ostree compose tree --print-only --repo=repo ${default_variant}.yaml | jq -r '."mutate-os-release"')"
./comps-sync.py --save fedora-comps/comps-f${version}.xml.in
# Sync the manifests with the content of the comps groups
@ -70,7 +70,7 @@ comps-sync:
fi
default_variant={{default_variant}}
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${default_variant}.yaml | jq -r '."mutate-os-release"')"
version="$(rpm-ostree compose tree --print-only --repo=repo ${default_variant}.yaml | jq -r '."mutate-os-release"')"
./comps-sync.py --save fedora-comps/comps-f${version}.xml.in
# Check if the manifests are in sync with the content of the comps groups
@ -88,7 +88,7 @@ comps-sync-check:
fi
default_variant={{default_variant}}
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${default_variant}.yaml | jq -r '."mutate-os-release"')"
version="$(rpm-ostree compose tree --print-only --repo=repo ${default_variant}.yaml | jq -r '."mutate-os-release"')"
./comps-sync.py fedora-comps/comps-f${version}.xml.in
# Output the processed manifest for a given variant (defaults to Silverblue)
@ -104,7 +104,7 @@ manifest variant=default_variant:
exit 1
fi
rpm-ostree compose tree --print-only --repo=repo fedora-{{variant}}.yaml
rpm-ostree compose tree --print-only --repo=repo {{variant}}.yaml
# Perform dependency resolution for a given variant (defaults to Silverblue)
compose-dry-run variant=default_variant:
@ -118,7 +118,7 @@ compose-dry-run variant=default_variant:
popd > /dev/null || exit 1
fi
rpm-ostree compose tree --unified-core --repo=repo --dry-run fedora-{{variant}}.yaml
rpm-ostree compose tree --unified-core --repo=repo --dry-run {{variant}}.yaml
# Alias/shortcut for compose-image command
compose variant=default_variant: (compose-image variant)
@ -151,7 +151,7 @@ compose-legacy variant=default_variant:
timestamp="$(date --iso-8601=sec)"
echo "${buildid}" > .buildid
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${variant}.yaml | jq -r '."mutate-os-release"')"
version="$(rpm-ostree compose tree --print-only --repo=repo ${variant}.yaml | jq -r '."mutate-os-release"')"
echo "Composing ${variant_pretty} ${version}.${buildid} ..."
ARGS="--repo=repo --cachedir=cache"
@ -166,7 +166,7 @@ compose-legacy variant=default_variant:
${CMD} compose tree ${ARGS} \
--add-metadata-string="version=${variant_pretty} ${version}.${buildid}" \
"fedora-${variant}.yaml" \
"${variant}.yaml" \
|& tee "logs/${variant}_${version}_${buildid}.${timestamp}.log"
if [[ ${EUID} -ne 0 ]]; then
@ -203,7 +203,7 @@ compose-image variant=default_variant:
timestamp="$(date --iso-8601=sec)"
echo "${buildid}" > .buildid
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${variant}.yaml | jq -r '."mutate-os-release"')"
version="$(rpm-ostree compose tree --print-only --repo=repo ${variant}.yaml | jq -r '."mutate-os-release"')"
echo "Composing ${variant_pretty} ${version}.${buildid} ..."
ARGS="--cachedir=cache --initialize"
@ -218,8 +218,8 @@ compose-image variant=default_variant:
${CMD} compose image ${ARGS} \
--label="quay.expires-after=4w" \
"fedora-${variant}.yaml" \
"fedora-${variant}.ociarchive"
"${variant}.yaml" \
"${variant}.ociarchive"
# Clean up everything
clean-all:
@ -270,7 +270,7 @@ lorax variant=default_variant:
popd > /dev/null || exit 1
fi
version_number="$(rpm-ostree compose tree --print-only --repo=repo fedora-${variant}.yaml | jq -r '."mutate-os-release"')"
version_number="$(rpm-ostree compose tree --print-only --repo=repo ${variant}.yaml | jq -r '."mutate-os-release"')"
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]] || [[ -f "fedora-rawhide.repo" ]]; then
version_pretty="Rawhide"
version="rawhide"
@ -363,7 +363,7 @@ upload-container variant=default_variant:
if [[ "$(git rev-parse --abbrev-ref HEAD)" == "main" ]] || [[ -f "fedora-rawhide.repo" ]]; then
version="rawhide"
else
version="$(rpm-ostree compose tree --print-only --repo=repo fedora-${variant}.yaml | jq -r '."mutate-os-release"')"
version="$(rpm-ostree compose tree --print-only --repo=repo ${variant}.yaml | jq -r '."mutate-os-release"')"
fi
image="quay.io/fedora-ostree-desktops/${variant}"
@ -384,7 +384,8 @@ upload-container variant=default_variant:
skopeo login --username "${CI_REGISTRY_USER}" --password "${CI_REGISTRY_PASSWORD}" quay.io
# Copy fully versioned tag (major version, build date/id, git commit)
skopeo copy --retry-times 3 "oci-archive:fedora-${variant}.ociarchive" "docker://${image}:${version}.${buildid}.${git_commit}"
skopeo copy --retry-times 3 "oci-archive:${variant}.ociarchive" "docker://${image}:${version}.${buildid}.${git_commit}"
# Update "un-versioned" tag (only major version)
skopeo copy --retry-times 3 "docker://${image}:${version}.${buildid}.${git_commit}" "docker://${image}:${version}"
if [[ "${variant}" == "kinoite-nightly" ]]; then

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- kde-mobile-desktop-pkgs.yaml
- kinoite-mobile-packages.yaml
ref: fedora/rawhide/${basearch}/kinoite-mobile
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- kde-desktop-pkgs.yaml
- kinoite-packages.yaml
ref: fedora/rawhide/${basearch}/kinoite
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- lxqt-desktop-pkgs.yaml
- lxqt-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/lazurite
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- mate-desktop-pkgs.yaml
- mate-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/mate
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- budgie-desktop-pkgs.yaml
- budgie-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/onyx
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- sway-desktop-pkgs.yaml
- sway-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/sericea
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- gnome-desktop-pkgs.yaml
- silverblue-packages.yaml
ref: fedora/rawhide/${basearch}/silverblue
rojig:

View file

@ -1,6 +1,6 @@
include:
- common.yaml
- xfce-desktop-pkgs.yaml
- xfce-atomic-packages.yaml
ref: fedora/rawhide/${basearch}/vauxite
rojig: