From 0c8287c279e003745cccc57066e3b691445f8710 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Sun, 23 Feb 2020 10:13:18 -0500 Subject: [PATCH] Fix sed substitutions for unittest2 and assertItemsEqual --- cloud-init.spec | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cloud-init.spec b/cloud-init.spec index 07047bf..2c41dcf 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 19.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Cloud instance init scripts License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -86,9 +86,10 @@ ssh keys and to let the user run various scripts. sed -i -e 's|#!/usr/bin/env python|#!/usr/bin/env python3|' \ -e 's|#!/usr/bin/python|#!/usr/bin/python3|' tools/* cloudinit/ssh_util.py -# Use unittest from the standard library -sed -i s/unittest2/unittest/ cloudinit/tests/*.py -sed -i s/assertItemsEqual/assertCountEqual/ tests/unittests/test_handler/*.py +# Use unittest from the standard library. unittest2 is old and being +# retired in Fedora. See https://bugzilla.redhat.com/show_bug.cgi?id=1794222 +find cloudinit/tests/ tests/ -type f | xargs sed -i s/unittest2/unittest/ +find cloudinit/tests/ tests/ -type f | xargs sed -i s/assertItemsEqual/assertCountEqual/ %build %py3_build @@ -157,6 +158,9 @@ nosetests-%{python3_version} tests/unittests/ %changelog +* Sun Feb 23 2020 Dusty Mabe - 19.4-2 +- Fix sed substitutions for unittest2 and assertItemsEqual + * Fri Feb 14 2020 Eduardo Otubo - 19.4-1 - Updated to 19.4 - Rebasing the Fedora specific patches but removing patches that don't apply anymore