diff --git a/mercurial.spec b/mercurial.spec index 5eef5b7..51ca577 100644 --- a/mercurial.spec +++ b/mercurial.spec @@ -52,6 +52,21 @@ Adds the "hg view" command. See http://www.selenic.com/mercurial/wiki/index.cgi/UsingHgk for more documentation. +%package chg +Summary: A fast client for Mercurial command server running on Unix. It saves time of slow Python startup. +Group: Development/Tools +Requires: hg = %{version}-%{release} + +%description chg +chg is a C wrapper for the hg command. Typically, when you type hg, a new +Python process is created, Mercurial is loaded, and your requested command runs +and the process exits. + +With chg, a Mercurial command server background process is created that runs +Mercurial. When you type chg, a C program connects to that background process +and executes Mercurial commands. + + %prep %setup -q -n %{name}-%{upstreamversion} # Patch files to use python2 instead of (since lately) non existent python binary. @@ -60,6 +75,10 @@ sed -i 's|python|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir} %build make all +pushd contrib/chg +make +popd + %install rm -rf $RPM_BUILD_ROOT %{__python2} setup.py install -O1 --root $RPM_BUILD_ROOT --prefix %{_prefix} --record=%{name}.files @@ -90,6 +109,9 @@ for file in mercurial.el mq.el; do done popd +pushd contrib/chg +make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_usr} MANDIR=%{_mandir}/man1 +popd mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d @@ -143,10 +165,18 @@ grep -v locale %{name}-base.files > %{name}-base-filtered.files %{_libexecdir}/mercurial/ %{_sysconfdir}/mercurial/hgrc.d/hgk.rc +%files chg +%{_bindir}/chg +%doc %attr(644,root,root) %{_mandir}/man?/chg.*.gz + + ##%%check ##cd tests && %%{__python} run-tests.py %changelog +* Fri May 11 2018 Tom Prince - 4.5.3-1 +- Package chg extension. + * Sat Aug 11 2018 Petr Stodulka - 4.5.3-1 - Update to 4.5.3 - Resolves: CVE-2018-1000132