From cde053d45ee26e6f2f1964eb6f5588a096cd7855 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 2 Sep 2020 11:15:10 +0200 Subject: [PATCH] Add _ast to hgdemandimport ignore list I'm not sure whether to call this a workaround or a fix; that depends on how the CPython issue is solved. Works around: BZ#1871992 --- hgdemandimport_ast.patch | 11 +++++++++++ mercurial.spec | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 hgdemandimport_ast.patch diff --git a/hgdemandimport_ast.patch b/hgdemandimport_ast.patch new file mode 100644 index 0000000..ba0cb5e --- /dev/null +++ b/hgdemandimport_ast.patch @@ -0,0 +1,11 @@ +diff -U3 -r mercurial-5.4-orig/hgdemandimport/__init__.py mercurial-5.4/hgdemandimport/__init__.py +--- mercurial-5.4-orig/hgdemandimport/__init__.py 2020-05-01 18:17:29.000000000 +0200 ++++ mercurial-5.4/hgdemandimport/__init__.py 2020-09-01 18:04:40.540165952 +0200 +@@ -56,6 +56,7 @@ + '__builtin__', + 'builtins', + 'urwid.command_map', # for pudb ++ '_ast', # https://bugzilla.redhat.com/show_bug.cgi?id=1871992 + } + + _pypy = '__pypy__' in sys.builtin_module_names diff --git a/mercurial.spec b/mercurial.spec index af02323..240baaf 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -1,7 +1,7 @@ Summary: Mercurial -- a distributed SCM Name: mercurial Version: 5.4 -Release: 3%{?dist} +Release: 4%{?dist} # Release: 1.rc1%%{?dist} @@ -14,6 +14,7 @@ URL: http://www.selenic.com/mercurial/ Source0: http://www.selenic.com/mercurial/release/%{name}-%{upstreamversion}.tar.gz Source1: mercurial-site-start.el Patch2: 0001-setup-hg3.patch +Patch3: hgdemandimport_ast.patch BuildRequires: python2-devel python3-devel bash-completion BuildRequires: emacs-nox emacs-el pkgconfig gettext python3-docutils BuildRequires: gcc @@ -133,6 +134,8 @@ Locales for mercurial. # sed -ri 's|python\b|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir}/%{name}-%{version}/doc/Makefile %patch2 -p1 -b .create_hg3 +%patch3 -p1 + %build # copy hg to hg2/hg3 to be able to create /usr/bin/hg(2|3) script cp -a hg hg2 @@ -332,6 +335,10 @@ fi %changelog +* Wed Sep 02 2020 Petr Viktorin - 5.4-4 +- Add _ast to hgdemandimport ignore list + Works around: BZ#1871992 + * Mon Aug 10 2020 Petr Stodulka - 5.4-3 - Fix upgrade from previous mercurial 4.9 causing broken alternatives for mercurial