diff --git a/monotone-1.1-py2.patch b/monotone-1.1-py2.patch deleted file mode 100644 index 15bf216..0000000 --- a/monotone-1.1-py2.patch +++ /dev/null @@ -1,9 +0,0 @@ -diff -up monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig monotone-1.1/extra/mtn-hooks/monotone-ciabot.py ---- monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig 2019-02-07 10:12:48.142739265 +0100 -+++ monotone-1.1/extra/mtn-hooks/monotone-ciabot.py 2019-02-07 10:14:58.508206736 +0100 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python2 - # - # Copyright (C) Nathaniel Smith - # Timothy Brownawell diff --git a/monotone-1.1-py3.patch b/monotone-1.1-py3.patch new file mode 100644 index 0000000..b8eb22e --- /dev/null +++ b/monotone-1.1-py3.patch @@ -0,0 +1,23 @@ +diff -up monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig monotone-1.1/extra/mtn-hooks/monotone-ciabot.py +--- monotone-1.1/extra/mtn-hooks/monotone-ciabot.py.orig 2019-08-10 09:00:03.203454091 +0200 ++++ monotone-1.1/extra/mtn-hooks/monotone-ciabot.py 2019-08-10 09:07:13.873700583 +0200 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # + # Copyright (C) Nathaniel Smith + # Timothy Brownawell +@@ -192,10 +192,10 @@ def escape_for_xml(text, is_attrib=0): + + def send_message(message, c): + if c.delivery == "debug": +- print message ++ print(message) + elif c.delivery == "xmlrpc": +- import xmlrpclib +- xmlrpclib.ServerProxy(c.xmlrpc_server).hub.deliver(message) ++ import xmlrpc.client ++ xmlrpc.client.ServerProxy(c.xmlrpc_server).hub.deliver(message) + elif c.delivery == "email": + import smtplib + smtp = smtplib.SMTP(c.smtp_server) diff --git a/monotone.spec b/monotone.spec index 1db3dac..aafa78e 100644 --- a/monotone.spec +++ b/monotone.spec @@ -1,6 +1,6 @@ Name: monotone Version: 1.1 -Release: 32%{?dist} +Release: 33%{?dist} Summary: A free, distributed version control system License: GPLv2+ URL: http://monotone.ca/ @@ -17,7 +17,7 @@ Patch0: monotone-1.0-stacktrace-on-crash.patch Patch1: monotone-1.1-iostream.patch Patch2: monotone-1.1-lua-integer.patch Patch3: monotone-1.1-pcre.patch -Patch4: monotone-1.1-py2.patch +Patch4: monotone-1.1-py3.patch BuildRequires: gcc-c++ BuildRequires: make BuildRequires: perl-generators @@ -197,6 +197,9 @@ exit 0 %changelog +* Sat Aug 10 2019 Thomas Moschny - 1.1-33 +- Patch extra/mtn-hooks/monotone-ciabot.py to use Python3 (bz#1738073). + * Thu Jul 25 2019 Fedora Release Engineering - 1.1-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild