From cffbaa9e019b46fe70d4b42fce7ec920b0db96dc Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 13:23:33 +0000 Subject: import mercurial-6.2-1.module+el8.7.0+16197+6fb5eee8 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1afeea0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mercurial-6.2.tar.gz diff --git a/.mercurial.metadata b/.mercurial.metadata new file mode 100644 index 0000000..660cba1 --- /dev/null +++ b/.mercurial.metadata @@ -0,0 +1 @@ +e8ccf5c17b4e6a81ae233f9d7d06e6daa0499732 SOURCES/mercurial-6.2.tar.gz diff --git a/SOURCES/blacklist b/SOURCES/blacklist new file mode 100644 index 0000000..3832492 --- /dev/null +++ b/SOURCES/blacklist @@ -0,0 +1 @@ +test-stdio.py diff --git a/SOURCES/mercurial-site-start.el b/SOURCES/mercurial-site-start.el new file mode 100644 index 0000000..f169f95 --- /dev/null +++ b/SOURCES/mercurial-site-start.el @@ -0,0 +1,7 @@ +(autoload 'hg-mode "mercurial" "HG mode." t) +(autoload 'hg-help-overview "mercurial" "HG help." t) + +(autoload 'mq-mode "mq" + "MQ mode for Mercurial repositories with an MQ patch queue." t) +(autoload 'mq-edit-mode "mq" + "MQ edit mode for editing patch descriptions." t) diff --git a/SOURCES/ssl_another_fix_python36_compat.patch b/SOURCES/ssl_another_fix_python36_compat.patch new file mode 100644 index 0000000..618a4f0 --- /dev/null +++ b/SOURCES/ssl_another_fix_python36_compat.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# User Ondrej Pohorelsky +# Date 1657729660 -7200 +# Wed Jul 13 18:27:40 2022 +0200 +# Node ID 5f95d1ae2fcefd1d6b81cbba9355198fc6bc073f +# Parent 259df3e3152c1fbb4d95c2fab682ca93581cf9ca +# EXP-Topic ssl-another-fix-python36-compat +sslutil: another use proper attribute to select python 3.7+ + +The previous attribute was python 3.6+, but guarded a python 3.7+ block + +Using the correct attribute avoids: ++ File "/tmp/hgtests.bc0_uk2d/install/lib/python/mercurial/sslutil.py", line 577, in wrapserversocket ++ sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1 ++ AttributeError: module 'ssl' has no attribute 'TLSVersion' + +diff -r 259df3e3152c -r 5f95d1ae2fce mercurial/sslutil.py +--- a/mercurial/sslutil.py Mon Jul 11 09:54:40 2022 +0200 ++++ b/mercurial/sslutil.py Wed Jul 13 18:27:40 2022 +0200 +@@ -546,7 +546,7 @@ + _(b'referenced certificate file (%s) does not exist') % f + ) + +- if util.safehasattr(ssl, 'PROTOCOL_TLS_SERVER'): ++ if util.safehasattr(ssl, 'TLSVersion'): + # python 3.7+ + sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + sslcontext.options |= getattr(ssl, 'OP_NO_COMPRESSION', 0) diff --git a/SOURCES/ssl_fix_python36_compat.patch b/SOURCES/ssl_fix_python36_compat.patch new file mode 100644 index 0000000..3956a9a --- /dev/null +++ b/SOURCES/ssl_fix_python36_compat.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# User Mathias De Mare +# Date 1657634393 -7200 +# Tue Jul 12 15:59:53 2022 +0200 +# Node ID eec5e00e782d83228f3f97f88f4bcf3d10b2ea1b +# Parent 259df3e3152c1fbb4d95c2fab682ca93581cf9ca +# EXP-Topic ssl-fix-python36-compat +sslutil: use proper attribute to select python 3.7+ + +The previous attribute was python 3.6+, but guarded a python 3.7+ block. + +Using the correct attribute avoids: + File "/usr/lib64/python3.6/site-packages/mercurial/sslutil.py", line 334, in wrapsocket + sslcontext.minimum_version = ssl.TLSVersion.TLSv1_1 +AttributeError: module 'ssl' has no attribute 'TLSVersion' + +diff --git a/mercurial/sslutil.py b/mercurial/sslutil.py +--- a/mercurial/sslutil.py ++++ b/mercurial/sslutil.py +@@ -312,7 +312,7 @@ + # is loaded and contains that removed CA, you've just undone the user's + # choice. + +- if util.safehasattr(ssl, 'PROTOCOL_TLS_CLIENT'): ++ if util.safehasattr(ssl, 'TLSVersion'): + # python 3.7+ + sslcontext = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) + minimumprotocol = settings[b'minimumprotocol'] diff --git a/SPECS/mercurial.spec b/SPECS/mercurial.spec new file mode 100644 index 0000000..7808397 --- /dev/null +++ b/SPECS/mercurial.spec @@ -0,0 +1,193 @@ +Summary: A fast, lightweight Source Control Management system +Name: mercurial +Version: 6.2 +Release: 1%{?dist} + +# Release: 1.rc1%%{?dist} + +%define upstreamversion %{version} + +License: GPLv2+ +URL: https://mercurial-scm.org/ +Source0: https://www.mercurial-scm.org/release/%{name}-%{upstreamversion}.tar.gz +Source1: mercurial-site-start.el +Source2: blacklist +# Patch to fix errors in the testsuite with Python 3.6 +Patch0: ssl_fix_python36_compat.patch +Patch1: ssl_another_fix_python36_compat.patch +BuildRequires: make +BuildRequires: bash-completion +BuildRequires: emacs-el +BuildRequires: emacs-nox +BuildRequires: gcc +BuildRequires: gettext +BuildRequires: pkgconfig +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-docutils + +Provides: hg = %{version}-%{release} +Requires: python3 <= 3.9 +Requires: emacs-filesystem +Recommends: python3-fb-re2 + +%description +Mercurial is a fast, lightweight source control management system designed +for efficient handling of very large distributed projects. + +Quick start: https://www.mercurial-scm.org/wiki/QuickStart +Tutorial: https://www.mercurial-scm.org/wiki/Tutorial +Extensions: https://www.mercurial-scm.org/wiki/UsingExtensions + + +%package hgk +Summary: Hgk interface for mercurial +Requires: hg = %{version}-%{release} +Requires: tk + +%description hgk +A Mercurial extension for displaying the change history graphically +using Tcl/Tk. Displays branches and merges in an easily +understandable way and shows diffs for each revision. Based on +gitk for the git SCM. + +Adds the "hg view" command. See +https://www.mercurial-scm.org/wiki/HgkExtension for more +documentation. + + +%package chg +Summary: A fast Mercurial command without slow Python startup +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 +%autosetup -p1 -n %{name}-%{upstreamversion} + +# These are shipped as examples in /usr/share/docs and should not be executable +chmod -x hgweb.cgi contrib/hgweb.fcgi + +%build +FORCE_SETUPTOOLS=1 PYTHON=%{python3} make all + +# chg will invoke the 'hg' command - no direct Python dependency +pushd contrib/chg +make +popd + +%install +%{python3} setup.py install -O1 --root %{buildroot} --prefix %{_prefix} --record=%{name}.files +make install-doc DESTDIR=%{buildroot} MANDIR=%{_mandir} + +grep -v -e 'hgk.py*' \ + -e "%{python3_sitearch}/mercurial/" \ + -e "%{python3_sitearch}/hgext/" \ + -e "%{python3_sitearch}/hgext3rd/" \ + -e "%{python3_sitearch}/hgdemandimport/" \ + -e "%{_bindir}" \ + < %{name}.files > %{name}-base.files +grep 'hgk.py*' < %{name}.files > %{name}-hgk.files + +install -D -m 755 contrib/hgk %{buildroot}%{_libexecdir}/mercurial/hgk +install -m 755 contrib/hg-ssh %{buildroot}%{_bindir} + +bash_completion_dir=%{buildroot}$(pkg-config --variable=completionsdir bash-completion) +mkdir -p $bash_completion_dir +install -m 644 contrib/bash_completion $bash_completion_dir/hg + +zsh_completion_dir=%{buildroot}%{_datadir}/zsh/site-functions +mkdir -p $zsh_completion_dir +install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial + +mkdir -p %{buildroot}%{_emacs_sitelispdir}/mercurial + +pushd contrib +for file in mercurial.el mq.el; do + #emacs -batch -l mercurial.el --no-site-file -f batch-byte-compile $file + %{_emacs_bytecompile} $file + install -p -m 644 $file ${file}c %{buildroot}%{_emacs_sitelispdir}/mercurial + rm ${file}c +done +popd + +pushd contrib/chg +make install DESTDIR=%{buildroot} PREFIX=%{_usr} MANDIR=%{_mandir}/man1 +popd + + +mkdir -p %{buildroot}%{_sysconfdir}/mercurial/hgrc.d + +mkdir -p %{buildroot}%{_emacs_sitestartdir} && install -m644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} + +cat >hgk.rc < certs.rc < - 6.2-2 +- Add forgotten mercurial-site-start.el +- Related: rhbz#2089849 + +* Fri Jul 29 2022 Ondřej Pohořelský - 6.2-1 +- New release Mercurial 6.2 +- Resolves: rhbz#2089849