diff --git a/syncevolution-1.5.3-python3-b.patch b/syncevolution-1.5.3-python3-b.patch new file mode 100644 index 0000000..0372fd3 --- /dev/null +++ b/syncevolution-1.5.3-python3-b.patch @@ -0,0 +1,66 @@ +diff -up syncevolution-1.5.3/test/syncevo-http-server.py.python3-2 syncevolution-1.5.3/test/syncevo-http-server.py +--- syncevolution-1.5.3/test/syncevo-http-server.py.python3-2 2020-05-11 12:10:50.479969706 +0200 ++++ syncevolution-1.5.3/test/syncevo-http-server.py 2020-05-11 12:12:43.627963000 +0200 +@@ -131,7 +131,7 @@ class SyncMLSession: + then remove the session''' + logger.debug("destructing connection %s with code %s message %s", self.conpath, code, message) + if self.request: +- self.request.setResponseCode(code, message) ++ self.request.setResponseCode(code, message.encode()) + self.request.finish() + self.request = None + if self.connection: +@@ -179,7 +179,7 @@ class SyncMLSession: + OldRequest.type = type + if request: + request.setHeader('Content-Type', type) +- request.setHeader('Content-Length', len(data)) ++ request.setHeader('Content-Length', str(len(data))) + request.setResponseCode(http.OK) + request.write(data) + request.finish() +@@ -243,7 +243,6 @@ class SyncMLSession: + 'org.syncevolution', + self.conpath, + path_keyword='conpath', +- utf8_strings=True, + byte_arrays=True) + self.reply_match = \ + Context.bus.add_signal_receiver(self.reply, +@@ -252,7 +251,6 @@ class SyncMLSession: + 'org.syncevolution', + self.conpath, + path_keyword='conpath', +- utf8_strings=True, + byte_arrays=True) + + # feed new data into SyncEvolution and wait for reply +@@ -319,16 +317,16 @@ class SyncMLPost(resource.Resource): + config = "" + type = request.getHeader('content-type') + len = request.getHeader('content-length') +- sessionid = request.args.get('sessionid') ++ sessionid = request.args.get(b'sessionid') + if sessionid: +- sessionid = sessionid[0] ++ sessionid = sessionid[0].decode() + logger.debug("POST from %s config %s type %s session %s args %s length %s", + request.getClientIP(), config, type, sessionid, request.args, len) + if not sessionid: + logger.info("new SyncML session for %s", request.getClientIP()) + session = SyncMLSession() + session.start(request, config, +- urllib.parse.urljoin(self.url.geturl(), request.path)) ++ urllib.parse.urljoin(self.url.geturl(), request.path.decode())) + return server.NOT_DONE_YET + else: + data = request.content.read() +@@ -587,7 +585,7 @@ syncevo-http-server itself is installed" + + url = urllib.parse.urlparse(args[0]) + root = resource.Resource() +- root.putChild(url.path[1:], SyncMLPost(url)) ++ root.putChild(url.path[1:].encode(), SyncMLPost(url)) + site = server.Site(root) + if url.scheme == "https": + if not options.cert: diff --git a/syncevolution.spec b/syncevolution.spec index a005a31..6f8759b 100644 --- a/syncevolution.spec +++ b/syncevolution.spec @@ -2,7 +2,7 @@ Summary: SyncML client for evolution Name: syncevolution Epoch: 1 Version: 1.5.3 -Release: 11%{?dist} +Release: 12%{?dist} License: LGPLv2+ URL: http://syncevolution.org/ Source: http://downloads.syncevolution.org/%{name}/sources/%{name}-%{version}.tar.gz @@ -12,6 +12,7 @@ Patch1: syncevolution-1.5.1-libical2.patch Patch2: syncevolution-1.5.3-eds-libecal-2.0.patch Patch3: syncevolution-1.5.3-python3.patch Patch4: syncevolution-1.5.3-eds-libecal-2.0-b.patch +Patch5: syncevolution-1.5.3-python3-b.patch BuildRequires: pkgconfig(dbus-glib-1) @@ -99,6 +100,7 @@ Akonadi backend for %{name}. %patch2 -p1 -b .eds-libecal-2.0 %patch3 -p1 -b .python3 %patch4 -p1 -b .eds-libecal-2.0-b +%patch5 -p1 -b .python3-b # use the ac macros in Makefile.am sed -i '/^ACLOCAL_AMFLAGS/{ /m4-repo/!s/$/ -I m4-repo/ }' Makefile*.am @@ -199,6 +201,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/sync.desktop %{_datadir}/syncevolution/xml/*.pl %changelog +* Mon May 11 2020 Milan Crha - 1:1.5.3-12 +- Add patch by David Hampton to correct python3 conversion (RH bug #1833578) + * Fri Jan 31 2020 Fedora Release Engineering - 1:1.5.3-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild