diff --git a/cdbs.spec b/cdbs.spec index 4efd565..7e9b208 100644 --- a/cdbs.spec +++ b/cdbs.spec @@ -1,6 +1,6 @@ Name: cdbs Version: 0.4.130 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Common build system for Debian packages BuildArch: noarch @@ -8,6 +8,9 @@ License: GPLv2+ URL: http://anonscm.debian.org/gitweb/?p=collab-maint/cdbs.git Source0: http://ftp.de.debian.org/debian/pool/main/c/%{name}/%{name}_%{version}.tar.xz +# waf-unpack python3 fixes +Patch0: cdbs_py3.patch + %description This package contains the Common Debian Build System, an abstract build system based on Makefile inheritance which is completely extensible and overridable. @@ -16,6 +19,9 @@ can build; any or all rules may be overridden as needed. %prep %setup -q -n %{name}-%{version} +%if 0%{?fedora} >= 25 +%patch0 -p1 +%endif %build @@ -41,6 +47,9 @@ make %{?_smp_mflags} %{_mandir}/man1/cdbs-edit-patch.1* %changelog +* Sun Mar 06 2016 Sandro Mani - 0.4.130-4 +- Port waf-unpack to python3, keep compatibility with python2 + * Wed Feb 03 2016 Fedora Release Engineering - 0.4.130-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/cdbs_py3.patch b/cdbs_py3.patch new file mode 100644 index 0000000..3c4f3fa --- /dev/null +++ b/cdbs_py3.patch @@ -0,0 +1,33 @@ +diff -rupN cdbs-0.4.130/scripts/waf-unpack cdbs-0.4.130-new/scripts/waf-unpack +--- cdbs-0.4.130/scripts/waf-unpack 2013-12-28 02:55:55.000000000 +0100 ++++ cdbs-0.4.130-new/scripts/waf-unpack 2016-03-06 11:40:00.545945872 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + # -*- mode: python; coding: utf-8 -*- + # + # Most of this code was stolen from Waf which is: +@@ -18,6 +18,8 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # ++from __future__ import print_function ++ + usage = ''' + + python waf-unpack --waf=WAF_FILE --dest=DEST_FOLDER +@@ -114,11 +116,11 @@ if __name__ == '__main__': + (options, args) = parser.parse_args() + + if not options.waf and not options.dest: +- print '--waf and --dest options are mandatory' ++ print('--waf and --dest options are mandatory') + parser.print_help() + sys.exit(1) + +- print 'Unpacking ' + options.waf + ' to ' + options.dest + ' ...' ++ print('Unpacking ' + options.waf + ' to ' + options.dest + ' ...') + unpack_waf(options.waf, options.dest) +- print 'Done' ++ print('Done') +