diff --git a/0001-live-media-Support-release-set-to-None-globally.patch b/0001-live-media-Support-release-set-to-None-globally.patch new file mode 100644 index 00000000..a7902b9e --- /dev/null +++ b/0001-live-media-Support-release-set-to-None-globally.patch @@ -0,0 +1,61 @@ +From 4dd1cca9449f612c35891c58f9293491135074ad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= +Date: Wed, 9 Mar 2016 13:08:22 +0100 +Subject: [PATCH 1/2] [live-media] Support release set to None globally +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Lubomír Sedlář +--- + pungi/phases/livemedia_phase.py | 2 +- + tests/test_livemediaphase.py | 20 ++++++++++++++++++++ + 2 files changed, 21 insertions(+), 1 deletion(-) + +diff --git a/pungi/phases/livemedia_phase.py b/pungi/phases/livemedia_phase.py +index 1060317..c5f3ec2 100644 +--- a/pungi/phases/livemedia_phase.py ++++ b/pungi/phases/livemedia_phase.py +@@ -35,7 +35,7 @@ class LiveMediaPhase(PhaseBase): + }, + { + "name": "live_media_release", +- "expected_types": [str], ++ "expected_types": [str, type(None)], + "optional": True, + } + ) +diff --git a/tests/test_livemediaphase.py b/tests/test_livemediaphase.py +index 20ccdfc..493ffe2 100755 +--- a/tests/test_livemediaphase.py ++++ b/tests/test_livemediaphase.py +@@ -14,6 +14,26 @@ from tests.helpers import DummyCompose, PungiTestCase + + + class TestLiveMediaPhase(PungiTestCase): ++ ++ def test_global_config_validation(self): ++ compose = DummyCompose(self.topdir, { ++ 'live_media_ksurl': 'git://example.com/repo.git#HEAD', ++ 'live_media_target': 'f24', ++ 'live_media_release': 'RRR', ++ 'live_media_version': 'Rawhide', ++ }) ++ ++ phase = LiveMediaPhase(compose) ++ phase.validate() ++ ++ def test_global_config_null_release(self): ++ compose = DummyCompose(self.topdir, { ++ 'live_media_release': None, ++ }) ++ ++ phase = LiveMediaPhase(compose) ++ phase.validate() ++ + @mock.patch('pungi.phases.livemedia_phase.ThreadPool') + def test_live_media_minimal(self, ThreadPool): + compose = DummyCompose(self.topdir, { +-- +2.5.0 + diff --git a/pungi.spec b/pungi.spec index 346683f8..3dd0fb93 100644 --- a/pungi.spec +++ b/pungi.spec @@ -1,12 +1,14 @@ Name: pungi Version: 4.0.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Distribution compose tool Group: Development/Tools License: GPLv2 URL: https://pagure.io/pungi Source0: https://fedorahosted.org/pungi/attachment/wiki/%{version}/%{name}-%{version}.tar.bz2 +Patch0: 0001-live-media-Support-release-set-to-None-globally.patch + BuildRequires: python-nose, python-nose-cov, python-mock BuildRequires: python-devel, python-setuptools, python2-productmd BuildRequires: python-lockfile, kobo, kobo-rpmlib, python-kickstart, createrepo_c @@ -40,6 +42,7 @@ A tool to create anaconda based installation trees/isos of a set of rpms. %prep %setup -q +%patch0 -p1 %build %{__python} setup.py build @@ -65,6 +68,9 @@ nosetests --exe --with-cov --cov-report html --cov-config tox.ini /var/cache/pungi %changelog +* Wed Mar 09 2016 Dennis Gilmore - 4.0.8-2 +- add patch to allow livemedia_release to be None globally + * Tue Mar 08 2016 Dennis Gilmore - 4.0.8-1 - Add README (lsedlar) - [doc] Fix formatting (lsedlar)