From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7RCz-0008MD-9f for guix-patches@gnu.org; Sun, 07 May 2017 14:47:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7RCw-0005MY-5f for guix-patches@gnu.org; Sun, 07 May 2017 14:47:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34240) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7RCw-0005MN-1a for guix-patches@gnu.org; Sun, 07 May 2017 14:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7RCv-0004pL-Rh for guix-patches@gnu.org; Sun, 07 May 2017 14:47:01 -0400 Subject: bug#26818: Certbot with Python 3 Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7RCB-0008DL-Mm for guix-patches@gnu.org; Sun, 07 May 2017 14:46:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7RC8-0004wY-Ft for guix-patches@gnu.org; Sun, 07 May 2017 14:46:15 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:34173) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d7RC8-0004wI-9t for guix-patches@gnu.org; Sun, 07 May 2017 14:46:12 -0400 Received: from localhost (c-73-165-108-70.hsd1.pa.comcast.net [73.165.108.70]) by mail.messagingengine.com (Postfix) with ESMTPA id 74115248B2 for ; Sun, 7 May 2017 14:46:11 -0400 (EDT) Date: Sun, 7 May 2017 14:46:10 -0400 From: Leo Famulari Message-ID: <20170507184610.GA27850@jasmine> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CdrF4e02JqNVZeln" Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26818@debbugs.gnu.org --CdrF4e02JqNVZeln Content-Type: multipart/mixed; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The latest release of Certbot and the acme library can use Python 3 [0]. These patches create a new python-mock@2 variable, and then upgrade certbot and python-acme to use Python 3 by default. I did some light testing by renewing some certificates. [0] https://github.com/certbot/certbot/pull/4568/commits/48b47274e7e6b11b7748b72a8e87add3f218e8b7 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Add-python-mock-2.patch" Content-Transfer-Encoding: quoted-printable =46rom 89835ec0ed5d9e1b89e70ab73af4bc27be8daf94 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Sun, 7 May 2017 14:31:44 -0400 Subject: [PATCH 1/2] gnu: Add python-mock-2. * gnu/packages/python.scm (python-mock-2): New variable. --- gnu/packages/python.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4c7aee20c..3f2a5b842 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -920,6 +920,24 @@ have been used.") (define-public python2-mock (package-with-python2 python-mock)) =20 +;;; Some packages (notably, certbot and python-acme) rely on this newer ve= rsion +;;; of python-mock. However, a large number of packages fail to build with +;;; mock@2, so we add a new variable for now. Also, there may be a depende= ncy +;;; cycle between mock and six, so we avoid creating python2-mock@2 for no= w. +(define-public python-mock-2 + (package + (inherit python-mock) + (version "2.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mock" version)) + (sha256 + (base32 + "1flbpksir5sqrvq2z0dp8sl4bzbadg21sj4d42w3klpdfvgvcn5i")))) + (propagated-inputs + `(("python-pbr" ,python-pbr-minimal) + ,@(package-propagated-inputs python-mock))))) =20 (define-public python-setuptools (package --=20 2.12.2 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0002-gnu-certbot-Build-with-Python-3.patch" Content-Transfer-Encoding: quoted-printable =46rom 8eb108f21146ec9c02c5e276d8b7ad6a990c8cd1 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Sat, 6 May 2017 15:58:16 -0400 Subject: [PATCH 2/2] gnu: certbot: Build with Python 3. * gnu/packages/tls.scm (certbot): Use python-3 to build. [native-inputs, propagated-inputs]: Use Python 3 variants of dependencies. = Use python-mock-2. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 1516fb852..6790e1797 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -482,7 +482,6 @@ security, and applying best practice development proces= ses.") (base32 "0hrmh28rrc0fsiw6nqfwbkwb1s4nkl54x50c0g0xlnp86752nzff")))) (build-system python-build-system) - (arguments `(#:phases (modify-phases %standard-phases @@ -507,7 +506,7 @@ security, and applying best practice development proces= ses.") #t)))))) ;; TODO: Add optional inputs for testing. (native-inputs - `(("python-mock" ,python-mock) + `(("python-mock" ,python-mock-2) ;; For documentation ("python-sphinx" ,python-sphinx) ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-program= output) @@ -543,8 +542,7 @@ security, and applying best practice development proces= ses.") "0hbp3njss01a0d3brvcfzja0w0j9plwrv6l70jsfvnhy3rrd7bcq")))) (build-system python-build-system) (arguments - `(#:python ,python-2 - ,@(substitute-keyword-arguments (package-arguments python-acme) + `(,@(substitute-keyword-arguments (package-arguments python-acme) ((#:phases phases) `(modify-phases ,phases (replace 'install-documentation @@ -559,27 +557,27 @@ security, and applying best practice development proc= esses.") #t)))))))) ;; TODO: Add optional inputs for testing. (native-inputs - `(("python2-nose" ,python2-nose) - ("python2-mock" ,python2-mock) + `(("python-nose" ,python-nose) + ("python-mock" ,python-mock-2) ;; For documentation - ("python2-sphinx" ,python2-sphinx) - ("python2-sphinx-rtd-theme" ,python2-sphinx-rtd-theme) - ("python2-sphinx-repoze-autointerface" ,python2-sphinx-repoze-autoi= nterface) - ("python2-sphinxcontrib-programoutput" ,python2-sphinxcontrib-progr= amoutput) + ("python-sphinx" ,python-sphinx) + ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) + ("python-sphinx-repoze-autointerface" ,python-sphinx-repoze-autoint= erface) + ("python-sphinxcontrib-programoutput" ,python-sphinxcontrib-program= output) ("texinfo" ,texinfo))) (propagated-inputs - `(("python2-acme" ,python2-acme) - ("python2-zope-interface" ,python2-zope-interface) - ("python2-pyrfc3339" ,python2-pyrfc3339) - ("python2-pyopenssl" ,python2-pyopenssl) - ("python2-configobj" ,python2-configobj) - ("python2-configargparse" ,python2-configargparse) - ("python2-zope-component" ,python2-zope-component) - ("python2-parsedatetime" ,python2-parsedatetime) - ("python2-six" ,python2-six) - ("python2-psutil" ,python2-psutil) - ("python2-requests" ,python2-requests) - ("python2-pytz" ,python2-pytz))) + `(("python-acme" ,python-acme) + ("python-zope-interface" ,python-zope-interface) + ("python-pyrfc3339" ,python-pyrfc3339) + ("python-pyopenssl" ,python-pyopenssl) + ("python-configobj" ,python-configobj) + ("python-configargparse" ,python-configargparse) + ("python-zope-component" ,python-zope-component) + ("python-parsedatetime" ,python-parsedatetime) + ("python-six" ,python-six) + ("python-psutil" ,python-psutil) + ("python-requests" ,python-requests) + ("python-pytz" ,python-pytz))) (synopsis "Let's Encrypt client by the Electronic Frontier Foundation") (description "Certbot automatically receives and installs X.509 certif= icates to enable Transport Layer Security (TLS) on servers. It interoperates wit= h the --=20 2.12.2 --M9NhX3UHpAaciwkO-- --CdrF4e02JqNVZeln Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlkPa3IACgkQJkb6MLrK fwhGew//R1Sk21fZ37nPD31NlbgzmXTnKhRj2QXlFgXDzQvjolULky1DyngWE/kX ZO6Xii3IlW2RHe46ygl1GrvkX31FsEWG35q98TIVV8QYOaGfSDgC43Euw8fCTGS0 LNcfANN9/CYvcD3dNICLrW2+gOFSZmo7zQB4xSPbgBGhX49j7PnafqCSK7octfTQ KGd5lf02rLsTVsZJz/QFvI2S9lWSxz/qptXcRdxSmq7DXRHCg9VUfTwQtZUsi1Um +zlXGbvIPzVnZ8aGDfEA0s9Z0yH+0i+fJXEYT8ekbwWahR752uNzVyqRcZdoNIrn S7zkVLzbanLJIy87pfCi10pUl1b+DoT6ZhhqxVpr8uAt3qVZwbhzNO/QJ8sLCdIF hocvwcbZnSH+mIXgWwEl4Z7fMu+4eNlBJJT55mTXaoU3QD+HDWT7iHx3TJvv4exz H2RQX05wFSQL9LfX2umVqG+s5rNvJiO6mxI/6x2zrj0nhcxdG31n52/MW4uhvx5Z AMiu8zJ+Xelm7JeQECRgybpO8wc1lmpQOiTbwPt7rym5ceOadFbORxDBb2eLmkzq /9avV8ols8YW5OuUxXj5DEpG6HACe0v2yhZd2HDhHhl5ivlyVW2VbKSU7EU57ord 8kD4xsN1+VJEagy/eB/7RohA2rsVUk6qkNYEaExdq6wN6GD+Yvk= =WHXI -----END PGP SIGNATURE----- --CdrF4e02JqNVZeln--