Subject: bug#70366: closed (Re: [bug#70366] Update Mercurial to 6.7.2 and python-hg-evolve to 11.1.3)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 10 Mar 2025 17:13:02 +0000

Your bug report

#70366: Update Mercurial to 6.7.2 and python-hg-evolve to 11.1.3

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
70366: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=70366
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#70366] Update Mercurial to 6.7.2 and python-hg-evolve to 11.1.3
From: Greg Hogan <[email-masked]>
To: "Dr. Arne Babenhauserheide" <[email-masked]>
Cc: [email-masked]
Date: Mon, 10 Mar 2025 13:12:17 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On Sat, Apr 13, 2024 at 9:11 AM Dr. Arne Babenhauserheide via
Guix-patches via <[email-masked]> wrote:
>
> Hi,
>
> the attached patch updates both Mercurial and python-hg-evolve to their
> respective newest version.
>
> Both need to be in compatible versions, so I’m sending both together.
>
> Best wishes,
> Arne

Thank you for the contribution. I split the patch into a separate
commit for each package and added a commit to remove the
no-longer-needed mercurial snippet.

Pushed as 78f8266056c305e115b310fa6f06f72d42967eb0.

Greg

Subject: Update Mercurial to 6.7.2 and python-hg-evolve to 11.1.3
From: "Dr. Arne Babenhauserheide" <[email-masked]>
To: [email-masked]
Date: Sat, 13 Apr 2024 15:10:15 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

the attached patch updates both Mercurial and python-hg-evolve to their
respective newest version.

Both need to be in compatible versions, so I’m sending both together.

Best wishes,
Arne

From 9a5aea3eaad92caf8800f0dff7240e8ca77e9416 Mon Sep 17 00:00:00 2001
Message-ID: <[email-masked]>
From: Arne Babenhauserheide <[email-masked]>
Date: Sat, 13 Apr 2024 14:58:08 +0200
Subject: [PATCH] gnu: mercurial and python-hg-evolve: Update to 6.7.2 and
 11.1.3

    * gnu/packages/version-control.scm (mercurial): Update to 6.7.2.
    * gnu/packages/version-control.scm (python-hg-evolve): Update to 11.1.3.
    * gnu/packages/patches/mercurial-hg-extension-path.patch: adapt for mercurial 6.7.2
    * gnu/packages/patches/mercurial-openssl-compat.patch: delete file
    * gnu/local.mk (dist_patch_DATA): remove mercurial-openssl-compat.patch

Change-Id: I1e22d7f38e264576bfa3adef7004fef582a1137e
---
 gnu/local.mk                                  |  1 -
 .../patches/mercurial-hg-extension-path.patch | 14 +--
 .../patches/mercurial-openssl-compat.patch    | 89 -------------------
 gnu/packages/version-control.scm              | 11 ++-
 4 files changed, 8 insertions(+), 107 deletions(-)
 delete mode 100644 gnu/packages/patches/mercurial-openssl-compat.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index e08b0d1c75..a9f388d06d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1700,7 +1700,6 @@ dist_patch_DATA =						\
   %D%/packages/patches/mecab-variable-param.patch		\
   %D%/packages/patches/memtest86+-build-reproducibly.patch	\
   %D%/packages/patches/mercurial-hg-extension-path.patch	\
-  %D%/packages/patches/mercurial-openssl-compat.patch		\
   %D%/packages/patches/mhash-keygen-test-segfault.patch		\
   %D%/packages/patches/mia-fix-boost-headers.patch		\
   %D%/packages/patches/mia-vtk9.patch				\
diff --git a/gnu/packages/patches/mercurial-hg-extension-path.patch b/gnu/packages/patches/mercurial-hg-extension-path.patch
index d1073dd01c..8b9d185a89 100644
--- a/gnu/packages/patches/mercurial-hg-extension-path.patch
+++ b/gnu/packages/patches/mercurial-hg-extension-path.patch
@@ -7,15 +7,7 @@ will get this into Mercurial proper.
 diff --git a/mercurial/extensions.py b/mercurial/extensions.py
 --- a/mercurial/extensions.py
 +++ b/mercurial/extensions.py
-@@ -13,6 +13,7 @@
- import imp
- import inspect
- import os
-+import sys
- 
- from .i18n import (
-     _,
-@@ -108,6 +109,11 @@
+@@ -103,6 +103,11 @@
  
  def _importh(name):
      """import and return the <name> module"""
@@ -24,6 +16,6 @@ diff --git a/mercurial/extensions.py b/mercurial/extensions.py
 +    if extension_path is not None:
 +        for path in extension_path:
 +            sys.path.append(path)
-     mod = __import__(pycompat.sysstr(name))
-     components = name.split(b'.')
+     mod = __import__(name)
+     components = name.split('.')
      for comp in components[1:]:
diff --git a/gnu/packages/patches/mercurial-openssl-compat.patch b/gnu/packages/patches/mercurial-openssl-compat.patch
deleted file mode 100644
index 139356f285..0000000000
--- a/gnu/packages/patches/mercurial-openssl-compat.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Tweak cipher selection to make TLS < 1.2 work with OpenSSL 3.
-
-Taken from Debian:
-
-  https://salsa.debian.org/python-team/packages/mercurial/-/blob/debian/master/debian/patches/openssl_3_cipher_tlsv1.patch
-
---- a/mercurial/sslutil.py
-+++ b/mercurial/sslutil.py
-@@ -117,17 +117,17 @@ def _hostsettings(ui, hostname):
-     ciphers = ui.config(b'hostsecurity', b'%s:ciphers' % bhostname, ciphers)
- 
-     # If --insecure is used, we allow the use of TLS 1.0 despite config options.
-     # We always print a "connection security to %s is disabled..." message when
-     # --insecure is used. So no need to print anything more here.
-     if ui.insecureconnections:
-         minimumprotocol = b'tls1.0'
-         if not ciphers:
--            ciphers = b'DEFAULT'
-+            ciphers = b'DEFAULT:@SECLEVEL=0'
- 
-     s[b'minimumprotocol'] = minimumprotocol
-     s[b'ciphers'] = ciphers
- 
-     # Look for fingerprints in [hostsecurity] section. Value is a list
-     # of <alg>:<fingerprint> strings.
-     fingerprints = ui.configlist(
-         b'hostsecurity', b'%s:fingerprints' % bhostname
-@@ -621,17 +621,17 @@ def wrapserversocket(
- 
-     # Improve forward secrecy.
-     sslcontext.options |= getattr(ssl, 'OP_SINGLE_DH_USE', 0)
-     sslcontext.options |= getattr(ssl, 'OP_SINGLE_ECDH_USE', 0)
- 
-     # In tests, allow insecure ciphers
-     # Otherwise, use the list of more secure ciphers if found in the ssl module.
-     if exactprotocol:
--        sslcontext.set_ciphers('DEFAULT')
-+        sslcontext.set_ciphers('DEFAULT:@SECLEVEL=0')
-     elif util.safehasattr(ssl, b'_RESTRICTED_SERVER_CIPHERS'):
-         sslcontext.options |= getattr(ssl, 'OP_CIPHER_SERVER_PREFERENCE', 0)
-         # pytype: disable=module-attr
-         sslcontext.set_ciphers(ssl._RESTRICTED_SERVER_CIPHERS)
-         # pytype: enable=module-attr
- 
-     if requireclientcert:
-         sslcontext.verify_mode = ssl.CERT_REQUIRED
---- a/tests/test-https.t
-+++ b/tests/test-https.t
-@@ -356,19 +356,19 @@ Start servers running supported TLS vers
-   $ cat ../hg1.pid >> $DAEMON_PIDS
-   $ hg serve -p $HGPORT2 -d --pid-file=../hg2.pid --certificate=$PRIV \
-   > --config devel.serverexactprotocol=tls1.2
-   $ cat ../hg2.pid >> $DAEMON_PIDS
-   $ cd ..
- 
- Clients talking same TLS versions work
- 
--  $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.0 --config hostsecurity.ciphers=DEFAULT id https://localhost:$HGPORT/
-+  $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.0 --config hostsecurity.ciphers=DEFAULT:@SECLEVEL=0 id https://localhost:$HGPORT/
-   5fed3813f7f5
--  $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.1 --config hostsecurity.ciphers=DEFAULT id https://localhost:$HGPORT1/
-+  $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.1 --config hostsecurity.ciphers=DEFAULT:@SECLEVEL=0 id https://localhost:$HGPORT1/
-   5fed3813f7f5
-   $ P="$CERTSDIR" hg --config hostsecurity.minimumprotocol=tls1.2 id https://localhost:$HGPORT2/
-   5fed3813f7f5
- 
- Clients requiring newer TLS version than what server supports fail
- 
-   $ P="$CERTSDIR" hg id https://localhost:$HGPORT/
-   (could not negotiate a common security protocol (tls1.1+) with localhost; the likely cause is Mercurial is configured to be more secure than the server can support)
-@@ -400,17 +400,17 @@ Clients requiring newer TLS version than
- 
-   $ hg --config hostsecurity.minimumprotocol=tls1.2 id --insecure https://localhost:$HGPORT1/
-   warning: connection security to localhost is disabled per current settings; communication is susceptible to eavesdropping and tampering
-   5fed3813f7f5
- 
- The per-host config option overrides the default
- 
-   $ P="$CERTSDIR" hg id https://localhost:$HGPORT/ \
--  > --config hostsecurity.ciphers=DEFAULT \
-+  > --config hostsecurity.ciphers=DEFAULT:@SECLEVEL=0 \
-   > --config hostsecurity.minimumprotocol=tls1.2 \
-   > --config hostsecurity.localhost:minimumprotocol=tls1.0
-   5fed3813f7f5
- 
- The per-host config option by itself works
- 
-   $ P="$CERTSDIR" hg id https://localhost:$HGPORT/ \
-   > --config hostsecurity.localhost:minimumprotocol=tls1.2
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 19f128d45f..d6fdb3fcec 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2084,16 +2084,15 @@ (define-public python-pre-commit
 (define-public mercurial
   (package
     (name "mercurial")
-    (version "6.2.2")
+    (version "6.7.2")
     (source (origin
              (method url-fetch)
              (uri (string-append "https://www.mercurial-scm.org/"
                                  "release/mercurial-" version ".tar.gz"))
-             (patches (search-patches "mercurial-hg-extension-path.patch"
-                                      "mercurial-openssl-compat.patch"))
+             (patches (search-patches "mercurial-hg-extension-path.patch"))
              (sha256
               (base32
-               "1pr00hdk3l9095fhq6302fgj0wmbqhqs93y4r457ba4pyjjrvyly"))
+               "01nqvp3cvidlz9z5vm05vpq81r6x10jwwfcaz0gw9anz0l60f8hw"))
              (modules '((guix build utils)))
              (snippet
               '(substitute* (find-files "tests" "\\.(t|sh)$")
@@ -2195,7 +2194,7 @@ (define-public mercurial
 (define-public python-hg-evolve
   (package
     (name "python-hg-evolve")
-    (version "10.3.2")
+    (version "11.1.3")
     (source
       (origin
         (method hg-fetch)
@@ -2205,7 +2204,7 @@ (define-public python-hg-evolve
         (file-name (hg-file-name name version))
         (sha256
           (base32
-            "0qgk39s5pwxbshfa6x1f1ccxahja3fs265dddxy6q99spy3b3x5h"))))
+            "09rq3hgbb6qjws0kymnh8lbglsc5yjby3b2bc0savs2agf88j83z"))))
     (build-system python-build-system)
     (arguments
      ;; Tests need mercurial source code.

base-commit: 15a523ea213065c275e4852673cbb27c72c0ad87
prerequisite-patch-id: 088a72da8c11e5d1c7087b4a5e8bb9c4a3b9b2af
prerequisite-patch-id: a092dba2c994aba4c74f1484621cebe53f548492
prerequisite-patch-id: 09ee3fdfcc708aeec9e6a7a54e2993e857e19aca
prerequisite-patch-id: 7957383d6685c848a7cbfa78e930adeaf528a2e1
-- 
2.41.0