D9294: packaging: enable rust extensions on centos

Mathiasdm (Mathias De Maré) phabricator at mercurial-scm.org
Wed Nov 11 21:03:35 UTC 2020


Mathiasdm created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Test on CentOS 7, repository with ~170000 tracked files,
  
    no untracked files:
  
  10 runs with this enabled:
  
  - Run #0 time: 0.6519973278045654
  - Run #1 time: 0.6933724880218506
  - Run #2 time: 0.7512078285217285
  - Run #3 time: 0.7517638206481934
  - Run #4 time: 0.5966529846191406
  - Run #5 time: 0.5960886478424072
  - Run #6 time: 0.5940573215484619
  - Run #7 time: 0.5963726043701172
  - Run #8 time: 0.6048009395599365
  - Run #9 time: 0.603604793548584
  
  10 runs without this enabled:
  
  - Run #0 time: 2.127584457397461
  - Run #1 time: 2.066192865371704
  - Run #2 time: 2.0831892490386963
  - Run #3 time: 2.077716588973999
  - Run #4 time: 2.07608962059021
  - Run #5 time: 2.072899341583252
  - Run #6 time: 2.094369888305664
  - Run #7 time: 2.067504644393921
  - Run #8 time: 2.069610834121704
  - Run #9 time: 2.0567898750305176

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9294

AFFECTED FILES
  contrib/packaging/docker/centos7
  contrib/packaging/docker/centos8
  contrib/packaging/mercurial.spec

CHANGE DETAILS

diff --git a/contrib/packaging/mercurial.spec b/contrib/packaging/mercurial.spec
--- a/contrib/packaging/mercurial.spec
+++ b/contrib/packaging/mercurial.spec
@@ -110,14 +110,14 @@
 LD_LIBRARY_PATH=$PYPATH $PYPATH/python setup.py install --root="$RPM_BUILD_ROOT"
 cd -
 
-PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir}
+PATH=$PYPATH:$PATH LD_LIBRARY_PATH=$PYPATH make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{hgpyprefix} MANDIR=%{_mandir} PURE="--rust"
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/hg . )
 ( cd $RPM_BUILD_ROOT%{_bindir}/ && ln -s ../..%{hgpyprefix}/bin/python2.? %{pythonhg} )
 
 %else
 
-make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir}
+make install PYTHON=%{pythonexe} DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} MANDIR=%{_mandir} PURE="--rust"
 
 %endif
 
diff --git a/contrib/packaging/docker/centos8 b/contrib/packaging/docker/centos8
--- a/contrib/packaging/docker/centos8
+++ b/contrib/packaging/docker/centos8
@@ -13,3 +13,6 @@
 
 # For creating repo meta data
 RUN yum install -y createrepo
+
+# For rust extensions
+RUN yum install -y cargo
diff --git a/contrib/packaging/docker/centos7 b/contrib/packaging/docker/centos7
--- a/contrib/packaging/docker/centos7
+++ b/contrib/packaging/docker/centos7
@@ -15,3 +15,6 @@
 
 # For creating repo meta data
 RUN yum install -y createrepo
+
+# For rust extensions
+RUN yum install -y cargo



To: Mathiasdm, #hg-reviewers
Cc: mercurial-patches, mercurial-devel


More information about the Mercurial-devel mailing list