import mercurial-6.2-1.module+el8.7.0+16197+6fb5eee8

This commit is contained in:
CentOS Sources 2022-11-08 01:49:43 -05:00 committed by Stepan Oksanichenko
commit b238a6b162
7 changed files with 259 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
SOURCES/mercurial-6.2.tar.gz

1
.mercurial.metadata Normal file
View File

@ -0,0 +1 @@
e8ccf5c17b4e6a81ae233f9d7d06e6daa0499732 SOURCES/mercurial-6.2.tar.gz

1
SOURCES/blacklist Normal file
View File

@ -0,0 +1 @@
test-stdio.py

View File

@ -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)

View File

@ -0,0 +1,28 @@
# HG changeset patch
# User Ondrej Pohorelsky <opohorel@redhat.com>
# 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)

View File

@ -0,0 +1,28 @@
# HG changeset patch
# User Mathias De Mare <mathias.de_mare@nokia.com>
# 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']

193
SPECS/mercurial.spec Normal file
View File

@ -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 <<EOF
[extensions]
# enable hgk extension ('hg help' shows 'view' as a command)
hgk=
[hgk]
path=%{_libexecdir}/mercurial/hgk
EOF
install -m 644 hgk.rc %{buildroot}%{_sysconfdir}/mercurial/hgrc.d
cat > certs.rc <<EOF
# see: https://www.mercurial-scm.org/wiki/CACertificates
[web]
cacerts = /etc/pki/tls/certs/ca-bundle.crt
EOF
install -m 644 certs.rc %{buildroot}%{_sysconfdir}/mercurial/hgrc.d
mv %{buildroot}%{python3_sitearch}/mercurial/locale %{buildroot}%{_datadir}/locale
rm -rf %{buildroot}%{python3_sitearch}/mercurial/locale
%find_lang hg
pathfix.py -pni "%{python3}" %{buildroot}%{_bindir}/hg-ssh
%files -f %{name}-base.files -f hg.lang
%doc CONTRIBUTORS COPYING doc/README doc/hg*.html hgweb.cgi contrib/hgweb.fcgi contrib/hgweb.wsgi
%doc %attr(644,root,root) %{_mandir}/man?/hg*.gz
%doc %attr(644,root,root) contrib/*.svg
%dir %{_datadir}/zsh/
%dir %{_datadir}/zsh/site-functions/
%dir %{_sysconfdir}/mercurial
%dir %{_sysconfdir}/mercurial/hgrc.d
%{_datadir}/bash-completion/
%{_datadir}/zsh/site-functions/_mercurial
%{python3_sitearch}/mercurial/
%{python3_sitearch}/hgext/
%{python3_sitearch}/hgext3rd/
%{python3_sitearch}/hgdemandimport/
%{_emacs_sitelispdir}/mercurial
%{_emacs_sitestartdir}/*.el
%{_bindir}/hg
%{_bindir}/hg-ssh
%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/certs.rc
%files hgk -f %{name}-hgk.files
%{_libexecdir}/mercurial/
%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/hgk.rc
%files chg
%{_bindir}/chg
%doc %attr(644,root,root) %{_mandir}/man?/chg.*.gz
%check
cd tests && HGPYTHON3=1 %{python3} run-tests.py --blacklist %{SOURCE2}
%changelog
* Mon Aug 01 2022 Ondřej Pohořelský <opohorel@redhat.com> - 6.2-2
- Add forgotten mercurial-site-start.el
- Related: rhbz#2089849
* Fri Jul 29 2022 Ondřej Pohořelský <opohorel@redhat.com> - 6.2-1
- New release Mercurial 6.2
- Resolves: rhbz#2089849