[PATCH 3 of 3 RFC] fedora: add dependency on re2

Siddharth Agarwal sid0 at fb.com
Tue Sep 2 16:18:10 CDT 2014

# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1409692139 25200
#      Tue Sep 02 14:08:59 2014 -0700
# Node ID b21f3e34b117f72011f06cfb69d9114388258b50
# Parent  66b1f6588685c43df63c82be83a3dc759977328a
fedora: add dependency on re2

I'm not fully sure this is the right thing to do (though it seems like the
EPELs for RHEL/CentOS 5 and above have re2), but we'd definitely like packagers
to ship with re2 enabled, and we'd like the upcoming official Mercurial binary
builds to use re2.

I tested this with `make fedora`, followed by installing the resulting RPM on a
Fedora machine. I verified that 'from mercurial import re2' worked.

diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec
--- a/contrib/mercurial.spec
+++ b/contrib/mercurial.spec
@@ -11,9 +11,9 @@
 Source0: %{name}-%{version}-%{release}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildRequires: python >= 2.4, python-devel, make, gcc, python-docutils >= 0.5, gettext
+BuildRequires: python >= 2.4, python-devel, make, gcc, gcc-c++, python-docutils >= 0.5, gettext, re2-devel
 Provides: hg = %{version}-%{release}
-Requires: python >= 2.4
+Requires: python >= 2.4, re2
 # The hgk extension uses the wish tcl interpreter, but we don't enforce it
 #Requires: tk

More information about the Mercurial-devel mailing list