diff --git a/0001-Pass-package_types-to-dnf-base-group_install-as-tupl.patch b/0001-Pass-package_types-to-dnf-base-group_install-as-tupl.patch new file mode 100644 index 0000000..25d723a --- /dev/null +++ b/0001-Pass-package_types-to-dnf-base-group_install-as-tupl.patch @@ -0,0 +1,39 @@ +From 8b7b4f65bb443cff1aa263cf7af44c9ec3243fb8 Mon Sep 17 00:00:00 2001 +From: Adam Williamson +Date: Thu, 8 Oct 2020 12:57:10 -0700 +Subject: [PATCH] Pass package_types to dnf base group_install as tuple, not + set + +I believe this is probably the cause of +https://bugzilla.redhat.com/show_bug.cgi?id=1886567 , which broke +Rawhide and F33 composes today. dnf itself seems to always pass +this as a list or a tuple. The dnf API docs say "`pkg_types` is a +sequence of strings determining the kinds of packages to be +installed"; according to Python docs, lists, tuples and range +types are "sequences", but sets are not, so technically we are +out of bounds here. I believe this worked before this dnf commit: +https://github.com/rpm-software-management/dnf/commit/4d991f61 +and upstream *could* probably tweak things to accept sets again, +but it seems reasonable to fix it here. + +Signed-off-by: Adam Williamson +--- + imgcreate/dnfinst.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/imgcreate/dnfinst.py b/imgcreate/dnfinst.py +index 06a5b24..8a74494 100644 +--- a/imgcreate/dnfinst.py ++++ b/imgcreate/dnfinst.py +@@ -129,7 +129,7 @@ class DnfLiveCD(dnf.Base): + elif include == GROUP_ALL: + package_types.add('optional') + try: +- self.group_install(grp.id, package_types, exclude=exclude) ++ self.group_install(grp.id, tuple(package_types), exclude=exclude) + except dnf.exceptions.CompsError as e: + # DNF raises this when it is already selected + pass +-- +2.28.0 + diff --git a/livecd-tools.spec b/livecd-tools.spec index f9886cd..96a84b9 100644 --- a/livecd-tools.spec +++ b/livecd-tools.spec @@ -17,13 +17,17 @@ Summary: Tools for building live CDs Name: livecd-tools Version: 27.1 -Release: 7%{?dist} +Release: 8%{?dist} %if 0%{?fedora} Epoch: 1 %endif License: GPLv2 URL: https://github.com/livecd-tools/livecd-tools Source0: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.gz +# Fix `DnfLiveCD.selectGroup` with DNF 4.4.0+ +# https://github.com/livecd-tools/livecd-tools/pull/168 +# https://bugzilla.redhat.com/show_bug.cgi?id=1886567 +Patch0: 0001-Pass-package_types-to-dnf-base-group_install-as-tupl.patch %if %{with python2} BuildRequires: python2-devel @@ -219,6 +223,9 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-* %endif %changelog +* Thu Oct 08 2020 Adam Williamson - 1:27.1-8 +- Backport PR #168 to fix a compatibility issue with DNF 4.4.0+ + * Tue Jul 28 2020 Fedora Release Engineering - 1:27.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild