From patchwork Fri Jun 18 12:00:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arun Isaac X-Patchwork-Id: 30363 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BC5F427BC81; Fri, 18 Jun 2021 13:01:43 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6D01B27BC78 for ; Fri, 18 Jun 2021 13:01:36 +0100 (BST) Received: from localhost ([::1]:36996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luDBn-0007BQ-Ca for patchwork@mira.cbaines.net; Fri, 18 Jun 2021 08:01:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luDBJ-00079N-NT for guix-patches@gnu.org; Fri, 18 Jun 2021 08:01:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luDBF-0005B8-NN for guix-patches@gnu.org; Fri, 18 Jun 2021 08:01:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luDBF-0002Ch-MQ for guix-patches@gnu.org; Fri, 18 Jun 2021 08:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49086] [PATCH] gnu: linkchecker: Update to 10.0.1. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Jun 2021 12:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49086 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49086@debbugs.gnu.org Cc: Arun Isaac X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16240176598454 (code B ref -1); Fri, 18 Jun 2021 12:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jun 2021 12:00:59 +0000 Received: from localhost ([127.0.0.1]:55960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luDB1-0002C2-Cv for submit@debbugs.gnu.org; Fri, 18 Jun 2021 08:00:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:52580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luDAz-0002Bu-Fa for submit@debbugs.gnu.org; Fri, 18 Jun 2021 08:00:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luDAv-0006yP-U8 for guix-patches@gnu.org; Fri, 18 Jun 2021 08:00:43 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:33346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luDAr-00050l-E8 for guix-patches@gnu.org; Fri, 18 Jun 2021 08:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=rwVRgWo1Y/eSgfP+psTzukdcybNkCHy9BPu0K9A6HcQ=; b=J1dc5CQDy62j5QrQvACYPl9dSk JKcJXgOcXHnmen6K++Y7zm6PEh5lcj+2nNTnBZyoTeXLgxcCRuhN4708bxI1FMTEea+p9gIi8/oiA j/7PQcBHSkalAq5TD0MIDS7yM2dHJbBE9gkQ4xcLag1Nyen9HTei1jNYE3RKsF8gxvvzDCCXgVSXD XUmQGQBQzZrKGbLePR9gp+vZdXxtSwYTidBFoJfgmrqiHU0+bSBCajzsJGL/Uv1WDh52/7i7GPyc3 ++Ro+sB8ifmVi4P7R0gFcU6KB4+pJTblwE9LG9bBJtM2j4BLxfDmi/7tXbEyMiFW3T6AmWp1nRZLP D59HcKmg==; Received: from [192.168.2.1] (helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1luDAj-0005Bz-CK; Fri, 18 Jun 2021 17:30:29 +0530 From: Arun Isaac Date: Fri, 18 Jun 2021 17:30:22 +0530 Message-Id: <20210618120023.14607-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Received-SPF: pass client-ip=139.59.75.54; envelope-from=arunisaac@systemreboot.net; helo=mugam.systemreboot.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/web.scm (linkchecker): Update to 10.0.1. [source]: Remove patches. [inputs]: Add python-beautifulsoup4. Replace python2-dnspython-1.16, python2-pyxdg and python2-requests with python-dnspython, python-pyxdg and python-requests respectively. [native-inputs]: Replace python2-pytest, python2-miniboa and python2-parameterized with python-pytest, python-miniboa and python-parameterized respectively. [arguments]: Use python 3. Replace check phase instead of deleting the standard phase and adding a custom one. Use add-installed-pythonpath instead of setting PYTHONPATH directly. [home-page]: Update URI. * gnu/packages/patches/linkchecker-tests-require-network.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Unregister it. --- gnu/local.mk | 1 - .../linkchecker-tests-require-network.patch | 182 ------------------ gnu/packages/web.scm | 47 ++--- 3 files changed, 16 insertions(+), 214 deletions(-) delete mode 100644 gnu/packages/patches/linkchecker-tests-require-network.patch diff --git a/gnu/local.mk b/gnu/local.mk index 918c8515ac..b2b36d860a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1383,7 +1383,6 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-remove-arch-warning.patch \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linbox-fix-pkgconfig.patch \ - %D%/packages/patches/linkchecker-tests-require-network.patch \ %D%/packages/patches/linphone-desktop-without-sdk.patch \ %D%/packages/patches/linux-libre-support-for-Pinebook-Pro.patch \ %D%/packages/patches/linux-libre-arm64-generic-pinebook-lcd.patch \ diff --git a/gnu/packages/patches/linkchecker-tests-require-network.patch b/gnu/packages/patches/linkchecker-tests-require-network.patch deleted file mode 100644 index f3e488cec2..0000000000 --- a/gnu/packages/patches/linkchecker-tests-require-network.patch +++ /dev/null @@ -1,182 +0,0 @@ -From f24c88a0732024028fffe0372039a847e91722ea Mon Sep 17 00:00:00 2001 -From: Christopher Baines -Date: Tue, 1 Jan 2019 22:36:29 +0000 -Subject: [PATCH] Mark more tests that require the network - -I believe all these tests require the network, at least they seem to -fail if it's I run them without connecting my computer to the web. - -I'm looking at this as part of packaging linkchecker for GNU Guix, -where the package is build and the tests are run in a isolated -environment, intentionally without network access, to avoid issues -with non-reproducible package builds. ---- - tests/checker/test_http.py | 2 ++ - tests/checker/test_http_misc.py | 2 ++ - tests/checker/test_http_redirect.py | 2 ++ - tests/checker/test_httpbin.py | 5 +++++ - tests/checker/test_misc.py | 4 ++++ - tests/checker/test_whitespace.py | 3 +++ - 6 files changed, 18 insertions(+) - -diff --git a/tests/checker/test_http.py b/tests/checker/test_http.py -index e4c1e097..8a8af567 100644 ---- a/tests/checker/test_http.py -+++ b/tests/checker/test_http.py -@@ -20,6 +20,7 @@ - - import pytest - -+from tests import need_network - from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler - - class TestHttp (HttpServerTest): -@@ -29,6 +30,7 @@ def __init__(self, methodName='runTest'): - super(TestHttp, self).__init__(methodName=methodName) - self.handler = CookieRedirectHttpRequestHandler - -+ @need_network - def test_html (self): - confargs = dict(recursionlevel=1) - self.file_test("http.html", confargs=confargs) -diff --git a/tests/checker/test_http_misc.py b/tests/checker/test_http_misc.py -index 9922d85f..c6b6afdb 100644 ---- a/tests/checker/test_http_misc.py -+++ b/tests/checker/test_http_misc.py -@@ -20,11 +20,13 @@ - import os - import sys - from .httpserver import HttpServerTest -+from tests import need_network - from linkcheck.network import iputil - - class TestHttpMisc (HttpServerTest): - """Test http:// misc link checking.""" - -+ @need_network - def test_html (self): - self.swf_test() - self.obfuscate_test() -diff --git a/tests/checker/test_http_redirect.py b/tests/checker/test_http_redirect.py -index f212d98e..2253a70d 100644 ---- a/tests/checker/test_http_redirect.py -+++ b/tests/checker/test_http_redirect.py -@@ -17,6 +17,7 @@ - """ - Test http checking. - """ -+from tests import need_network - from .httpserver import HttpServerTest, CookieRedirectHttpRequestHandler - - class TestHttpRedirect (HttpServerTest): -@@ -26,6 +27,7 @@ def __init__(self, methodName='runTest'): - super(TestHttpRedirect, self).__init__(methodName=methodName) - self.handler = CookieRedirectHttpRequestHandler - -+ @need_network - def test_redirect (self): - self.redirect1() - self.redirect2() -diff --git a/tests/checker/test_httpbin.py b/tests/checker/test_httpbin.py -index 0319c2f6..4c8fa846 100644 ---- a/tests/checker/test_httpbin.py -+++ b/tests/checker/test_httpbin.py -@@ -18,6 +18,7 @@ - Test http stuff with httpbin.org. - """ - import re -+from tests import need_network - from . import LinkCheckTest - - -@@ -30,6 +31,7 @@ def get_httpbin_url(path): - class TestHttpbin(LinkCheckTest): - """Test http:// link redirection checking.""" - -+ @need_network - def test_http_link(self): - linkurl = u"http://www.example.com" - nlinkurl = self.norm(linkurl) -@@ -48,6 +50,7 @@ def test_http_link(self): - ] - self.direct(url, resultlines, recursionlevel=1) - -+ @need_network - def test_basic_auth(self): - user = u"testuser" - password = u"testpassword" -@@ -67,6 +70,7 @@ def test_basic_auth(self): - ] - self.direct(url, resultlines, confargs=confargs) - -+ @need_network - def test_http_refresh_header(self): - linkurl = u"http://www.example.com" - nlinkurl = self.norm(linkurl) -@@ -85,6 +89,7 @@ def test_http_refresh_header(self): - ] - self.direct(url, resultlines, recursionlevel=1) - -+ @need_network - def test_http_content_location_header(self): - linkurl = u"http://www.example.com" - nlinkurl = self.norm(linkurl) -diff --git a/tests/checker/test_misc.py b/tests/checker/test_misc.py -index 2e4cfd07..f9591f9d 100644 ---- a/tests/checker/test_misc.py -+++ b/tests/checker/test_misc.py -@@ -17,6 +17,7 @@ - """ - Test miscellaneous html tag parsing and URL types - """ -+from tests import need_network - from . import LinkCheckTest - - -@@ -25,15 +26,18 @@ class TestMisc (LinkCheckTest): - Test misc link types. - """ - -+ @need_network - def test_misc (self): - self.file_test("misc.html") - - def test_html5 (self): - self.file_test("html5.html") - -+ @need_network - def test_archive (self): - self.file_test("archive.html") - -+ @need_network - def test_itms_services(self): - url = u"itms-services:?action=download-manifest&url=http://www.example.com/" - resultlines = [ -diff --git a/tests/checker/test_whitespace.py b/tests/checker/test_whitespace.py -index 609c108a..fc2727d6 100644 ---- a/tests/checker/test_whitespace.py -+++ b/tests/checker/test_whitespace.py -@@ -17,6 +17,7 @@ - """ - Test whitespace handling. - """ -+from tests import need_network - from . import LinkCheckTest - - -@@ -25,6 +26,7 @@ class TestWhitespace (LinkCheckTest): - Test whitespace in URLs. - """ - -+ @need_network - def test_leading_whitespace (self): - # Leading whitespace - url = u" http://www.example.org/" -@@ -50,6 +52,7 @@ def test_leading_whitespace (self): - ] - self.direct(url, resultlines) - -+ @need_network - def test_trailing_whitespace (self): - # Trailing whitespace - url = u"http://www.example.org/ " diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index d1f1d0f755..0fc2d7e441 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Clément Lassieur ;;; Copyright © 2016, 2017 Nikita -;;; Copyright © 2016, 2017, 2018, 2019 Arun Isaac +;;; Copyright © 2016, 2017, 2018, 2019, 2021 Arun Isaac ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2016 Bake Timmons ;;; Copyright © 2017 Thomas Danckaert @@ -6578,51 +6578,36 @@ Instagram and YouTube.") (define-public linkchecker (package (name "linkchecker") - (version "9.4.0") + (version "10.0.1") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/linkchecker/linkchecker") (commit (string-append "v" version)))) - (patches - (search-patches "linkchecker-tests-require-network.patch")) (file-name (git-file-name name version)) (sha256 (base32 - "03ihjmc4bqxxqv71bb43r2f23sx0xnbq1k2fsg9fw05qa5s9x187")))) + "1j97dc9a4yhpscwadhv5dxp7036pnrxiaky18l8ddr3pvxdjvkxs")))) (build-system python-build-system) (inputs - `(("python2-dnspython" ,python2-dnspython-1.16) - ("python2-pyxdg" ,python2-pyxdg) - ("python2-requests" ,python2-requests))) + `(("python-beautifulsoup4" ,python-beautifulsoup4) + ("python-dnspython" ,python-dnspython) + ("python-pyxdg" ,python-pyxdg) + ("python-requests" ,python-requests))) (native-inputs `(("gettext" ,gettext-minimal) - ("python2-pytest" ,python2-pytest) - ("python2-miniboa" ,python2-miniboa) - ("python2-parameterized" ,python2-parameterized))) + ("python-pytest" ,python-pytest) + ("python-miniboa" ,python-miniboa) + ("python-parameterized" ,python-parameterized))) (arguments - `(#:python ,python-2 - #:phases + `(#:phases (modify-phases %standard-phases - ;; Move the 'check phase to after 'install, so that the installed - ;; library can be used - (delete 'check) - (add-after 'install 'check - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; Set PYTHONPATH so that the installed linkchecker is used - (setenv "PYTHONPATH" - (string-append out "/lib/python2.7/site-packages" - ":" - (getenv "PYTHONPATH"))) - ;; Remove this directory to avoid it being used when running - ;; the tests - (delete-file-recursively "linkcheck") - - (invoke "py.test" "tests")) - #t))))) - (home-page "https://linkcheck.github.io/linkchecker") + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "py.test" "tests")))))) + (home-page "https://linkchecker.github.io/linkchecker/") (synopsis "Check websites for broken links") (description "LinkChecker is a website validator. It checks for broken links in websites. It is recursive and multithreaded providing output in