From 68214a33da2edbdc2d95dc7ffcfe10f5320dc544 Mon Sep 17 00:00:00 2001 From: Rolf Fokkens Date: Jun 20 2015 07:30:00 +0000 Subject: Now explicitly uses python3 not python on Fedora 23 and up --- diff --git a/bcache-status-python3.patch b/bcache-status-python3.patch new file mode 100644 index 0000000..0cb08cc --- /dev/null +++ b/bcache-status-python3.patch @@ -0,0 +1,8 @@ +--- bcache-tools-1.0.8/bcache-status.orig 2015-06-20 08:56:22.343589706 +0200 ++++ bcache-tools-1.0.8/bcache-status 2015-06-20 08:56:39.971692433 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Dumb script to dump (some) of bcache status + # Copyright 2014 Darrick J. Wong. All rights reserved. diff --git a/bcache-tools.spec b/bcache-tools.spec index 4b1ecbd..fca7791 100644 --- a/bcache-tools.spec +++ b/bcache-tools.spec @@ -1,9 +1,15 @@ #global gitdate 20131018 +%if 0%{?fedora} >= 23 +%global need_python3 1 +%else +%global need_python3 0 +%endif + Summary: Tools for Linux kernel block layer cache Name: bcache-tools Version: 1.0.8 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2 Group: System Environment/Base URL: http://bcache.evilpiepirate.org/ @@ -31,8 +37,14 @@ Patch3: %{name}-1.0.8-noprobe.patch # the following fix is pending upstream # gcc 5.1.1 apparently is more picky than Fedora 21 gcc Patch4: bcache-tools-1.0.8-crc64.patch +# Fedora 23 uses python3 by default +Patch5: bcache-status-python3.patch +%if %{need_python3} +Requires: python3 +%else Requires: python +%endif # This is a kind of soft dependency: because we don't include probe-bcache # we have to make sure that libblkid is able to identify bcache. So this # is why it requires recent libblkid. @@ -58,6 +70,10 @@ chmod +x configure %patch3 -p1 -b .noprobe %patch4 -p1 -b .crc64 +%if %{need_python3} +%patch5 -p1 -b .python3 +%endif + %build %configure make %{?_smp_mflags} @@ -96,6 +112,9 @@ install -p -m 755 bcache-status %{buildroot}%{_sbindir}/bcache-status %{dracutlibdir}/modules.d/90bcache %changelog +* Sat Jun 20 2015 Rolf Fokkens - 1.0.8-4 +- bcache-status now explicitly uses python3 not python on Fedora 23 and up + * Wed Jun 17 2015 Fedora Release Engineering - 1.0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild