From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yM/bJzTnYmGoWQAAgWs5BA (envelope-from ) for ; Sun, 10 Oct 2021 15:14:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uPmtIjTnYmH4LwAAB5/wlQ (envelope-from ) for ; Sun, 10 Oct 2021 13:14:28 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 45277240E3 for ; Sun, 10 Oct 2021 15:14:28 +0200 (CEST) Received: from localhost ([::1]:48470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZYep-0006Rh-Bl for larch@yhetil.org; Sun, 10 Oct 2021 09:14:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46882) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZYdS-0005N9-CQ for guix-patches@gnu.org; Sun, 10 Oct 2021 09:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZYdS-0000HI-2G for guix-patches@gnu.org; Sun, 10 Oct 2021 09:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZYdR-0003eg-QL for guix-patches@gnu.org; Sun, 10 Oct 2021 09:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50874] [PATCH] lint: Check if HTTPS version of HTTP URL exists. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Oct 2021 13:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50874 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: 50874@debbugs.gnu.org Received: via spool by 50874-submit@debbugs.gnu.org id=B50874.163387157414036 (code B ref 50874); Sun, 10 Oct 2021 13:13:01 +0000 Received: (at 50874) by debbugs.gnu.org; 10 Oct 2021 13:12:54 +0000 Received: from localhost ([127.0.0.1]:54589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZYdK-0003eK-37 for submit@debbugs.gnu.org; Sun, 10 Oct 2021 09:12:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZYdI-0003e8-66 for 50874@debbugs.gnu.org; Sun, 10 Oct 2021 09:12:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53108) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZYdC-0007Ws-Ef; Sun, 10 Oct 2021 09:12:46 -0400 Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59240 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZYdC-0000Ml-5F; Sun, 10 Oct 2021 09:12:46 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <877devwj95.fsf@gnu.org> <87v926ldvv.fsf@yoctocell.xyz> Date: Sun, 10 Oct 2021 15:12:43 +0200 In-Reply-To: <87v926ldvv.fsf@yoctocell.xyz> (Xinglu Chen's message of "Sat, 09 Oct 2021 11:57:08 +0200") Message-ID: <87y271vx9w.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633871668; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=K1TxGWFkcDmjj8RURw+feSsr9eWWR9W6zd2lTQsXAHk=; b=P/Itrn5S0G7uD2zUPESKlJKN/4ZFjEsmKWjPevKytGwxGDnb4pdDitJlRUysg6qBeUlzt5 jsyQ4IT5YUPjUbXHYyREB9w94FygsALsuTeDtTQQEJOeGpzNklHuRzPdpbL6LnTYCrP3WD mj/A17iDStr4PruejbNk7mhfqCLHiCz5nEWzq6QCt2pd1s2IwNVHixH6hm+tfgHqIhggAb jeGPFKiKipN1sU8FWd0tJk+buiKzw723QGYePGFPZ919PplZAYT6dcpoiiMcsQIwyobVTG dE/olICoXUOuJUzjRbUmlJVCg/8PGEL1zgwBoUhRxEV5WkiiCfvsguA9wEX1pQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633871668; a=rsa-sha256; cv=none; b=A+JV2n/WCWThCkv+r48e2Wnet2cxm0jE8n3lFZGAcHwIubUspbYaFly9Wotpf4dqMg+THx kWdi7mUPqt8mV/g0OztwhwWlpnBXYiqBnh6xgLl+nK8RUliTV+gd7LDs55pA3sNmC6TWGI /3VJcuT2UTHudVpP+zaTzTEGYM3NG/LyBKh77aRCCaj2VmJZLw4hsGDv43zlmHfe8Ufxv/ eZf7E+sDqvv4QZpzT6TKkzznt6OYPCOVAcndKWY/0S1VUyDnX8/ii1l4agQOXaygza+vjK XIL7zNMQ4h0C/73b0QUzyBPhqZ9QSYM6uiv+KsGxeOrs6AJiNPEMCbmOzytzVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 45277240E3 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9+ypX2/8QQup Hi! Xinglu Chen skribis: > On Sat, Oct 02 2021, Ludovic Court=C3=A8s wrote: > >> Hi, >> >> Xinglu Chen skribis: >> >>> * guix/lint.scm (check-if-https-uri-exists?): New procedure. >>> (check-home-page, check-source): Use it. >> >> Applied, thanks! > > Was it? I don=E2=80=99t see it in the log. Actually no. :-) I initially applied it, started replying, noticed there was a problem, and then sent that inconsistent reply. >>> I don=E2=80=99t really know how to test this while making it future-pro= of, any >>> suggestions? >> >> I don=E2=80=99t know either, since we don=E2=80=99t have an easy way to = spin up an HTTPS >> server. I think it=E2=80=99s okay to leave it as is, for lack of a bett= er idea. >> >> However, this version of the patch leads to test failures in >> tests/lint.scm (=E2=80=9CConnection refused=E2=80=9D). > > Thanks for catching this; I will look into it. Good that you didn=E2=80= =99t > apply it then. :-) Here=E2=80=99s what I see (among others): --8<---------------cut here---------------start------------->8--- test-name: home-page: 200 location: /home/ludo/src/guix/tests/lint.scm:650 source: + (test-equal + "home-page: 200" + '() + (with-http-server + `((200 ,%long-string)) + (let ((pkg (package + (inherit (dummy-package "x")) + (home-page (%local-url))))) + (check-home-page pkg)))) expected-value: () actual-value: #f actual-error: + (system-error + connect* + "~A" + ("Connection refused") + (111)) result: FAIL [=E2=80=A6] test-name: source: 200 location: /home/ludo/src/guix/tests/lint.scm:917 source: + (test-equal + "source: 200" + '() + (with-http-server + `((200 ,%long-string)) + (let ((pkg (package + (inherit (dummy-package "x")) + (source + (origin + (method url-fetch) + (uri (%local-url)) + (sha256 %null-sha256)))))) + (check-source pkg)))) expected-value: () actual-value: #f actual-error: + (system-error + connect* + "~A" + ("Connection refused") + (111)) result: FAIL --8<---------------cut here---------------end--------------->8--- I believe that=E2=80=99s because, in addition to (%local-url), =E2=80=98che= ck-home-page=E2=80=99 & co. now try to connect on port 443 of the same host, and there=E2=80=99s nothing listening to that port on my machine. Ludo=E2=80=99.