From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 19 19:21:11 2019 Received: (at submit) by debbugs.gnu.org; 20 Nov 2019 00:21:11 +0000 Received: from localhost ([127.0.0.1]:48754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXDk7-00069L-Cd for submit@debbugs.gnu.org; Tue, 19 Nov 2019 19:21:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:40940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXDk5-00069C-74 for submit@debbugs.gnu.org; Tue, 19 Nov 2019 19:21:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60621) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iXDk4-0007LD-11 for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2019 19:21:09 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iXDk1-0008IN-2s for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2019 19:21:06 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:50295) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iXDjz-0008Di-AO for bug-gnu-emacs@gnu.org; Tue, 19 Nov 2019 19:21:03 -0500 Received: by mail-wm1-x332.google.com with SMTP id l17so5197202wmh.0 for ; Tue, 19 Nov 2019 16:21:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:user-agent:mime-version; bh=7qL6eQmuM05REfIStsGvRB0xH73s1MTKl/KfOYUmPPA=; b=ta4ZnWlsmQxml3BEXE2A8EMn/82B/4cJCLaTG5ub5/bzGnrvSnscrzuHS/kqN59DAs ebQe6oskpg//yqA1pfwKL+20jz9DFpHm3on1E53JU3ioF79AwcILicrCVnLl4crfnRwI ljDEb+9oG+leGeB4qYJbZxpnD4CnD83su3YWXdlJ6GKWRQM3xKIfNDLV0PEJEY4QwEMy JYk+7ryaO1sJpNO0Dm/rAIFr161ipqhHMTtbhXVZS8njMQ1SjwJdPNqrze9jSFzLKUXU /7F7L5oKGNf7i3JxVRnUJpJsgsgVvdmoPQQfUoVVacGwtXrLj4iqLOs4gMZ3NDU3kdzk CZNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version; bh=7qL6eQmuM05REfIStsGvRB0xH73s1MTKl/KfOYUmPPA=; b=iYDn2R1eTjsWc/HoDeyxvrxYX3LE7Pw6MsozXsTGe7WQvdY72iQJ5Av2ie9X4JVRF4 fmzjbD6QhsWSFAfpr/rdgx8RCsZp28iE6UXceM3JohIJ5UAqBm4pxo0vncSxRSncTr6k aJ4JL0pzNZ7ZspBIeg++oyg1KTiRTus5f9A81ePyrzuGjNtHt0C0bGvgV9LIbfhfT5oe /iOS5LuhCG+hwhvOywBejCtsHr3aNs86R1/cqE+WE3tALabPGFAj6rHF5MAcWMJYan3r rTznCErR9KIyXlF0SGMeUmUxms2CIOOSlUnzLu/E5qyT+SzUDv+T/OLEvo2kd8GRgq3N tBTw== X-Gm-Message-State: APjAAAWab8CHttN7IFmiKE9QcInO4ujj50ukQ8U3/V4nRisBnHTu3WXz DhB/chrmryPQf3k4RwhUHLn8yr5K X-Google-Smtp-Source: APXvYqzTcxsvRk1GWFgy3O6m+U/atkjziD4VQ2COH06h3nt8X3zAQZwtuKl4ot4OIqT5E9JEjyQBLg== X-Received: by 2002:a1c:f317:: with SMTP id q23mr70641wmq.97.1574209259386; Tue, 19 Nov 2019 16:20:59 -0800 (PST) Received: from lolita.yourcompany.com ([89.180.145.231]) by smtp.gmail.com with ESMTPSA id f14sm28613067wrv.17.2019.11.19.16.20.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2019 16:20:58 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: bug-gnu-emacs@gnu.org Subject: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists X-Debbugs-CC: Damien Cassou , Nicolas Petton Date: Wed, 20 Nov 2019 00:20:28 +0000 Message-ID: <87ftijz9df.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hi, When trying to follow along a tutorial on setting up Gnus for GMAIL, I tried to use auth-source-pass.el to access encrypted entries under ~/.password-store instead of the usual ~/.authinfo.gpg. After much wrestling with the system, I couldn't figure out why my entry: gmail:imap.gpg whose contents are NotReallyThePassword host: imap.gmail.com user: joaotavora@gmail.com port: 993 weren't being understood by the new auth-source. Eventually I came to this patch, which seems to do the right thing. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Make-auth-source-pass-search-understand-port-lists.patch >From 4a6c24c23c9f7097807c1ef58688b51db330f503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 20 Nov 2019 00:11:00 +0000 Subject: [PATCH] Make auth-source-pass-search understand port lists For cases such as a typical IMAP Gnus setup, auto-source-pass-search will be passed a list of "port aliases" like (993 "imaps" "imap" "993" "143") in hopes of finding a matching ~/.password-store entry. This modification makes this library understand and unroll the port list so that, i.e. "domain:993", "domain:imaps"", "domain:imap", etc. are computed as potential suffixes. Previously a nonsensical string "domain:(993 imaps imap ...)" was return. * lisp/auth-source-pass.el (auth-source-pass--generate-entry-suffixes): Allow PORT to be a list of ports. --- lisp/auth-source-pass.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/auth-source-pass.el b/lisp/auth-source-pass.el index 524a72792c..cc0a6fe4de 100644 --- a/lisp/auth-source-pass.el +++ b/lisp/auth-source-pass.el @@ -269,10 +269,15 @@ auth-source-pass--generate-entry-suffixes Based on the supported pathname patterns for HOSTNAME, USER, & PORT, return a list of possible suffixes for matching entries in -the password-store." +the password-store. + +PORT may be a list of ports." (let ((domains (auth-source-pass--domains (split-string hostname "\\.")))) - (seq-mapcat (lambda (n) - (auth-source-pass--name-port-user-suffixes n user port)) + (seq-mapcat (lambda (d) + (seq-mapcat + (lambda (p) + (auth-source-pass--name-port-user-suffixes d user p)) + (if (listp port) port (list port)))) domains))) (defun auth-source-pass--domains (name-components) -- 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Please have a look, Jo=C3=A3o --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 08:48:14 2019 Received: (at 38284) by debbugs.gnu.org; 21 Nov 2019 13:48:14 +0000 Received: from localhost ([127.0.0.1]:51617 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXmog-0004Lg-10 for submit@debbugs.gnu.org; Thu, 21 Nov 2019 08:48:14 -0500 Received: from quimby.gnus.org ([95.216.78.240]:59536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXmob-0004LO-MT for 38284@debbugs.gnu.org; Thu, 21 Nov 2019 08:48:10 -0500 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iXmoM-00053Z-Tl; Thu, 21 Nov 2019 14:47:57 +0100 From: Lars Ingebrigtsen To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists References: <87ftijz9df.fsf@gmail.com> Date: Thu, 21 Nov 2019 14:47:54 +0100 In-Reply-To: <87ftijz9df.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Wed, 20 Nov 2019 00:20:28 +0000") Message-ID: <875zjdz6gl.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: João Távora writes: > This modification makes this library understand and unroll the port > list so that, i.e. "domain:993", "domain:imaps"", "domain:imap", > etc. are computed as potential suffixes. Previously a nonsens [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ingebrigtsen.no] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: Damien Cassou , 38284@debbugs.gnu.org, Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > This modification makes this library understand and unroll the port > list so that, i.e. "domain:993", "domain:imaps"", "domain:imap", > etc. are computed as potential suffixes. Previously a nonsensical > string "domain:(993 imaps imap ...)" was return. > > (let ((domains (auth-source-pass--domains (split-string hostname "\\."= )))) > - (seq-mapcat (lambda (n) > - (auth-source-pass--name-port-user-suffixes n user port= )) > + (seq-mapcat (lambda (d) > + (seq-mapcat > + (lambda (p) > + (auth-source-pass--name-port-user-suffixes d user p= )) > + (if (listp port) port (list port)))) > domains))) Looks good to me, but I don't use password-store so I can't really test. If it works for you, please go ahead and apply. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 13:27:41 2019 Received: (at 38284) by debbugs.gnu.org; 21 Nov 2019 18:27:41 +0000 Received: from localhost ([127.0.0.1]:53306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrB7-00079k-8e for submit@debbugs.gnu.org; Thu, 21 Nov 2019 13:27:41 -0500 Received: from mail.choca.pics ([62.210.108.126]:58060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrB5-00079a-5h for 38284@debbugs.gnu.org; Thu, 21 Nov 2019 13:27:39 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 5B3D7F18CFD; Thu, 21 Nov 2019 19:27:37 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id sIc_g1D98INL; Thu, 21 Nov 2019 19:27:36 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id A4A06F18EF5; Thu, 21 Nov 2019 19:27:36 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 7-Y6TqHUTF5y; Thu, 21 Nov 2019 19:27:36 +0100 (CET) Received: from luz4 (254.116.5.93.rev.sfr.net [93.5.116.254]) by mail.choca.pics (Postfix) with ESMTPSA id 48DCAF18CFD; Thu, 21 Nov 2019 19:27:36 +0100 (CET) From: Damien Cassou To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , 38284@debbugs.gnu.org Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists In-Reply-To: <87ftijz9df.fsf@gmail.com> References: <87ftijz9df.fsf@gmail.com> Date: Thu, 21 Nov 2019 19:27:34 +0100 Message-ID: <874kyxt78p.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Jo=C3=A3o, Jo=C3=A3o T=C3=A1vora writes: > [=E2=80=A6] Eventually I came to this patch, which seems to do the right > thing. great job, thank you. Some feedback below. > (let ((domains (auth-source-pass--domains (split-string hostname "\\."= )))) > - (seq-mapcat (lambda (n) > - (auth-source-pass--name-port-user-suffixes n user port= )) > + (seq-mapcat (lambda (d) can you please rename "d" to "domain"? > + (seq-mapcat > + (lambda (p) same for "p". > + (auth-source-pass--name-port-user-suffixes d user p= )) > + (if (listp port) port (list port)))) > domains))) Can you please add a unit test covering this new use-case? --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 21 14:06:58 2019 Received: (at 38284) by debbugs.gnu.org; 21 Nov 2019 19:06:58 +0000 Received: from localhost ([127.0.0.1]:53341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrn7-0008Am-UL for submit@debbugs.gnu.org; Thu, 21 Nov 2019 14:06:58 -0500 Received: from mail-io1-f66.google.com ([209.85.166.66]:39916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iXrn6-0008Aa-B6 for 38284@debbugs.gnu.org; Thu, 21 Nov 2019 14:06:56 -0500 Received: by mail-io1-f66.google.com with SMTP id k1so4754256ioj.6 for <38284@debbugs.gnu.org>; Thu, 21 Nov 2019 11:06:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MBgiy+8weKrG6HPzzoI/9X/s9Z8ELAeFZLHiA6cety0=; b=MVXP4KaDIO4j2ES+ixgbizoHG5iJ7KJ6HwAd7xhuCnjkhUq/7sHIUE64AWZ0nuS2WE 1Cwpl3TP/WC+h03RxiVKwlnZlRU+QpblYHXBjmlk3PsoMKd8WSIGJvZwrDxyK5/od7/G 1XNO0G804XVekH6tK6BNFGN5FxtoRN2kc6X/BTrTOrdxhwxJciDtwpOb+70AE/779dPI nE6CSEhNBosfCRuITpeT3WBJ7kNg07ixVshCr8xkzxPCLghcpHv1u9uGMNGSmiSlrS9m 2+BqYpN5Tp4wz34gkGB+Jh2X5gvo8kX9bpsg5Cm4dMeYjpT2dE2sQF01+YfF5fZhWOxg wGMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MBgiy+8weKrG6HPzzoI/9X/s9Z8ELAeFZLHiA6cety0=; b=DxadjlnuONvQ1I5mGBgsTnNtMWMJtcJWfdN8VNXgu2XGajIjaPTyfgUTrbjWKVYnN3 OBlY9YZaY7NfIe9Xq/LeUjNxRqDzMUxIdzH/DYYF39Tv+LVzFLjFvFmluVCbDgZJr6JR bjLsD29xR0v47lr4H2EoQP9S7f9shfBk8UkmHx7UIMfsQcXydhJZMC+G/aa3MMEnNLKc lotnGFTJifmtMuYmaAjcxA7FKLoHtB9yiu5tgnseeCg1fHDlevvTXfUHDiT82ssHTeg7 c+TFtgQOkVHaoAKZyjsUAK/eGE/ELAbfFLTFMKgiHd83zBqhwHh+LraGU616ETIpYKpc llWA== X-Gm-Message-State: APjAAAUoD+MxIkLocu+GmyFndcblAaRHSsQl/3u82bpOtgnERVsEN6ef UbZ7FVCvIRVbn0vLvHR3/Pw7vcdcQ9x7HkCHMMdOdBW3 X-Google-Smtp-Source: APXvYqxR4dq38+8GbNDmtvZiz/pZPm0HifjQiVJcQN4DUXSe+1sMutkvgPGJl3BNOfXzbNI4j3MWjTNjDNwtVAbXkDQ= X-Received: by 2002:a02:c54b:: with SMTP id g11mr7379004jaj.136.1574363210553; Thu, 21 Nov 2019 11:06:50 -0800 (PST) MIME-Version: 1.0 References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> In-Reply-To: <874kyxt78p.fsf@cassou.me> From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Date: Thu, 21 Nov 2019 19:06:39 +0000 Message-ID: Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists To: Damien Cassou Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: 38284@debbugs.gnu.org, Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Thu, Nov 21, 2019 at 6:27 PM Damien Cassou wrote: > > Hi Jo=C3=A3o, > > Jo=C3=A3o T=C3=A1vora writes: > > [=E2=80=A6] Eventually I came to this patch, which seems to do the righ= t > > thing. > > > great job, thank you. Some feedback below. > > > (let ((domains (auth-source-pass--domains (split-string hostname "\\= .")))) > > - (seq-mapcat (lambda (n) > > - (auth-source-pass--name-port-user-suffixes n user po= rt)) > > + (seq-mapcat (lambda (d) > > > can you please rename "d" to "domain"? ok. I do call your attention that it was already the single letter n there, so I was following what I though was shorthand convention, just adjusting it to the first letter of the concept actually used. > > + (seq-mapcat > > + (lambda (p) > > > same for "p". ok. > > + (auth-source-pass--name-port-user-suffixes d user= p)) > > + (if (listp port) port (list port)))) > > domains))) > > > Can you please add a unit test covering this new use-case? No. This is too much work for such a trivial change that can be reasoned about locally. I don't usually write tests for those. If you permit me to exagerate, it's like testing that (+ 2 2) really equals 4. But some people do write tests at this level, and I of course don't mind if you do. --=20 Jo=C3=A3o T=C3=A1vora From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 03:49:28 2019 Received: (at 38284) by debbugs.gnu.org; 22 Nov 2019 08:49:28 +0000 Received: from localhost ([127.0.0.1]:53732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY4d6-0007zW-HH for submit@debbugs.gnu.org; Fri, 22 Nov 2019 03:49:28 -0500 Received: from mail.choca.pics ([62.210.108.126]:39896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY4d3-0007zM-1n for 38284@debbugs.gnu.org; Fri, 22 Nov 2019 03:49:25 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 8AC34F1C3C2; Fri, 22 Nov 2019 09:49:23 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id qMbSTu4hTtSW; Fri, 22 Nov 2019 09:49:22 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 57591F1C479; Fri, 22 Nov 2019 09:49:22 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id zd3Mqko655QZ; Fri, 22 Nov 2019 09:49:22 +0100 (CET) Received: from luz4 (unknown [86.215.189.124]) by mail.choca.pics (Postfix) with ESMTPSA id 06375F1C3C2; Fri, 22 Nov 2019 09:49:21 +0100 (CET) From: Damien Cassou To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists In-Reply-To: References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> Date: Fri, 22 Nov 2019 09:49:20 +0100 Message-ID: <87lfs8thwv.fsf@cassou.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: 38284@debbugs.gnu.org, Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Jo=C3=A3o, Jo=C3=A3o T=C3=A1vora writes: >> can you please rename "d" to "domain"? > > ok. I do call your attention that it was already the > single letter n there yes I saw. This should never have been merged like that. Thank you for improving the code. >> Can you please add a unit test covering this new use-case? > > No. This is too much work for such a trivial change I care a lot about the automated testing of the code I write. I won't try to convince you though. Can you please merge the attached patch with yours? --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-WIP.patch >From afd2ebb80c80573447ec1dc23bc1625f9b41046a Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 22 Nov 2019 09:36:44 +0100 Subject: [PATCH] WIP --- test/auth-source-pass-tests.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/auth-source-pass-tests.el b/test/auth-source-pass-tests.el index bec42a5..ed1752d 100644 --- a/test/auth-source-pass-tests.el +++ b/test/auth-source-pass-tests.el @@ -353,6 +353,10 @@ (ert-deftest auth-source-pass--matching-entries-find-entries-with-a-port () (auth-source-pass--with-store '(("bar.com:8080")) (should (auth-source-pass-match-entry-p "bar.com:8080" "bar.com" nil "8080")))) +(ert-deftest auth-source-pass--matching-entries-find-entries-with-a-port-when-passed-multiple-ports () + (auth-source-pass--with-store '(("bar.com:8080")) + (should (auth-source-pass-match-entry-p "bar.com:8080" "bar.com" nil '("http" "https" "80" "8080"))))) + (ert-deftest auth-source-pass--matching-entries-find-entries-with-slash () ;; match if entry filename matches user (auth-source-pass--with-store '(("foo.com/user")) -- 2.23.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 04:35:56 2019 Received: (at 38284) by debbugs.gnu.org; 22 Nov 2019 09:35:56 +0000 Received: from localhost ([127.0.0.1]:53751 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY5M4-0000ch-Bb for submit@debbugs.gnu.org; Fri, 22 Nov 2019 04:35:56 -0500 Received: from mail-wr1-f47.google.com ([209.85.221.47]:39575) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iY5M1-0000cS-BB for 38284@debbugs.gnu.org; Fri, 22 Nov 2019 04:35:53 -0500 Received: by mail-wr1-f47.google.com with SMTP id y11so4657352wrt.6 for <38284@debbugs.gnu.org>; Fri, 22 Nov 2019 01:35:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=C7RULRsMH75Zz9g3PaW8FFpZiir+DUOR3lYnYvJ5hxU=; b=gndpad29WZoF7NTyTX5PjZePTfVlyancOnW8p+jM7zzMO3NejHg4nHd7Uo2rHKvusn XdLK498NbAsG+bHxwj3M5QvQr+gYUcjxmMkLhkWWbNb40zoQVojg0pEXKHZ0cPmiYJta cT2jaJR2XOt0DbK0pgn5atmlXyh4LwExeOTIiaUTCEPBwXcLbzX1MiKBF+sSB7skKjr7 dmXWrAt7kn3f7QX3evWKNScZYB63kPK4NS3JgVcLM6gE7E5cq9UnEFJSH6w3POyAHoUc G02M4PwH4FptKDhdUylbxCWQUgrN8Fe6VLME9K1oCSnSjQecGD8soo1VyzptrSkYo0QK vItQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=C7RULRsMH75Zz9g3PaW8FFpZiir+DUOR3lYnYvJ5hxU=; b=g6Lrb7ym6sN+jFsKvz2Ku+VSmvt+glnLQ6wdCPIxBfdjXh9FMt2u4Sd/z6ZBkaKOMy Cu0EBO1nIpIgfJziIFVsbcDKq2nWIWa17HANfxBMeNBGFYaS7Kul4PX9os7epxLEeCRa ubRQ2ebkHHzIEjmSqlHH7n2H3WqnMNRNRu/ZFviSQTZE53MO+4a7fnNk+9xbc5gUWl5e bM2+W2l9bt69Hzp+EkrnY/PcPLqRW+E7JnbZlcsrU+do+nKCIF/5OeoKRZk2itnm5oUf taHjAc1c3O/ks5hq+TrhiUS8n/+WkqmTTjA/yUOayUkRSVqwzyq4o0pyOJNARfPcCBMy 2IYw== X-Gm-Message-State: APjAAAUjlw+piVMVEUgZ+2uE8zLP/W12HuLqk6Ib/h6LOHM+CWlL+07y m3a+se8j4RrItoSnXgZs+O8= X-Google-Smtp-Source: APXvYqwtfrj/4riWtT0Kxq74B16n+3SfUW00oWnc2ODFraNRs/58u0V9uWTexywK/gxpOi+ek4BhnQ== X-Received: by 2002:a5d:460b:: with SMTP id t11mr17091598wrq.185.1574415347385; Fri, 22 Nov 2019 01:35:47 -0800 (PST) Received: from lolita.yourcompany.com ([2001:818:d820:9500:1ebb:afd8:ab26:f0f6]) by smtp.gmail.com with ESMTPSA id s8sm6591623wrt.57.2019.11.22.01.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 01:35:45 -0800 (PST) From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= To: Damien Cassou Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> <87lfs8thwv.fsf@cassou.me> Date: Fri, 22 Nov 2019 09:35:38 +0000 In-Reply-To: <87lfs8thwv.fsf@cassou.me> (Damien Cassou's message of "Fri, 22 Nov 2019 09:49:20 +0100") Message-ID: <87lfs8b6dx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: 38284@debbugs.gnu.org, Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Damien Cassou writes: > Jo=C3=A3o T=C3=A1vora writes: >>> can you please rename "d" to "domain"? >> >> ok. I do call your attention that it was already the >> single letter n there > > yes I saw. This should never have been merged like that. Thank you for > improving the code. I think the single letter idiom is fine there. It was just the wrong letter. By the way, I've left the p for the port, because calling it "port", while it would work, would seriously confuse a reader. >>> Can you please add a unit test covering this new use-case? >> >> No. This is too much work for such a trivial change > > I care a lot about the automated testing of the code I write. Certainly, I care a lot, too. I don't write tests for these changes out of principle, not out of lazyness. Most, if not all, the projects I manage have automated tests. > I won't try to convince you though. Can you please merge the attached > patch with yours? No, but you can do that, because it's your work (I can push it for you though). Anyway, now I read the test you wrote, I agree it's a good test. You are testing auth-source-pass-match-entry-p, much higher up than auth-source-pass--generate-entry-suffixes, the function I changed. Of course, only someone who was involved in the design would be able to confidently place the tests at that correct level, the finding of which is the most difficult part. My advice and personal opinion is to later use this and more such tests to perhaps redesign/cleanup the auth-source-pass.el library, which seems needlessly complicated in the little stuff like the function I touched. (to be fair it wasn't much helped by the style of the auth-source.el parent library.) Jo=C3=A3o From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 19:32:35 2019 Received: (at control) by debbugs.gnu.org; 23 Nov 2019 00:32:35 +0000 Received: from localhost ([127.0.0.1]:55716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYJLm-0000iz-WD for submit@debbugs.gnu.org; Fri, 22 Nov 2019 19:32:35 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:42959) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iYJLj-0000ik-65 for control@debbugs.gnu.org; Fri, 22 Nov 2019 19:32:32 -0500 Received: by mail-wr1-f42.google.com with SMTP id a15so10711223wrf.9 for ; Fri, 22 Nov 2019 16:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject:mime-version :content-transfer-encoding; bh=egBk+c5Iosdsf/xNyamM1xgesPlQBJkMr5N/vwKqHsQ=; b=Vld4wUA/qUlVDy5qTs3TScNUbFrd5YY3EqcFdIpWwEpR1o3lcFWs8nEJQwAteJbBhW AepNYA8UxPsL2/bqtfCvDHAm05/hj46xn6SGZAoYhk+vYbX8lngj0S2VQmigG8HWDILl OoF8bhRu4TxU122INwskrdoFwcI6FQ7DdWq+FCgD8AbQ6k0Wzg06rh7b+/34XCOcTDJJ EM7nbqAOVKANacfnW0/4CXn6tZisSo8lhNB0471yfszOdNuKbqFj2xrYXHjSa28PV44e QdsAsRZXMCJHcWPfY57YESTtz/K8V7iyEI8Rt4bKYVhj6hqwg9KnRD+3pZBr9MFm6aGE xi4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject:mime-version :content-transfer-encoding; bh=egBk+c5Iosdsf/xNyamM1xgesPlQBJkMr5N/vwKqHsQ=; b=Hvb18hrCmeISYax94IwzuUy/G4Xvqx6qGpNibJWgF5AAvthTZsHFJHbFV+RtPFdflf KiHDUr3LkIymBLOphk+3PAhSeCs1Dfe2a59C0gRDYhAw25g7Z9QKqJRH1Xghl+PXjuvE 8k1dWkR9yCh6gX5s0sL4YPIZAgucLm16paFG0GsEprgorK2Oof0/T1CnRUVaAY1UZRwZ BRfPtNPkHwBuDQH4FR6AioMde+WJEE3uYJ+79D+qvUosSDIk4N5byAbkMO2hXUWrugOd 4u2I/U+HZn6RXkX5NgistDgMNJbwMlZJzvu7uXliPvJapJHfsyeZdGLaGb79NhJ55a4f JJfw== X-Gm-Message-State: APjAAAWtQW3+q9Erio6K9MKEHBs9F8XFxKfttWzt8pFoJQ232zCJxYeD W6WTXbVin3h0P9vnuBtfCzr2DTGBWfc= X-Google-Smtp-Source: APXvYqypLeslg6lVQXk8lAiYmnTUbkLRhtGvX0Fk7wLA0NGHsDCUXcTpjGdB8Y+wyimibJDdDFg70g== X-Received: by 2002:adf:e3c6:: with SMTP id k6mr4756935wrm.135.1574469144688; Fri, 22 Nov 2019 16:32:24 -0800 (PST) Received: from lolita.yourcompany.com ([2001:818:d820:9500:1ebb:afd8:ab26:f0f6]) by smtp.gmail.com with ESMTPSA id b63sm12023wmb.40.2019.11.22.16.32.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 16:32:23 -0800 (PST) Date: Sat, 23 Nov 2019 00:32:17 +0000 Message-Id: <87zhgna0vi.fsf@gmail.com> To: control@debbugs.gnu.org From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: control message for bug #38284 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: fixed 38284 27.1 quit Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (joaotavora[at]gmail.com) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.42 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.42 listed in list.dnswl.org] 1.1 MALFORMED_FREEMAIL Bad headers on message from free email service X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) fixed 38284 27.1 quit From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 20 13:54:17 2020 Received: (at 38284) by debbugs.gnu.org; 20 Jan 2020 18:54:17 +0000 Received: from localhost ([127.0.0.1]:46048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itcBk-0006cU-SC for submit@debbugs.gnu.org; Mon, 20 Jan 2020 13:54:17 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:34608) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itcBi-0006cE-UI for 38284@debbugs.gnu.org; Mon, 20 Jan 2020 13:54:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=1nY9ghOmaHH5eBNS6RIl7S67NLKImAaT1UZd9/kjdv0=; b=eoNfWF+J2+6EAvyPxSlFDBmEAm Q4ugDgHEPCPdI0uEqJ5YljBYWcXKUNkWxw39pYTCstP6YM3OB67270zYLHgbkkTvSA7vBHnnOmmIw tPQu5AoixUCFDM0qIq+By3B4X6QWpRefR4tEdfLZXkSm+fUc5pp/TwcBs2gPs2rmi/0hPP16+vO56 1j9L9vx1+VliNVWKVZyIVdSZKx7AlWlcXuMrrXKvu8d9MWgW9fFgRuBUTNrxUrHynsGZsoo6sNzt1 D5VhpKIiv6Nh+S0rz36zU6vk2m/HZBQq8ml6kKjlC6WsQzxi/wUHWF09Ulwp1YvBGrkT3NAyjkEWe hGRSKAPw==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:33338 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1itcBa-001nFl-87; Mon, 20 Jan 2020 13:54:06 -0500 From: Stefan Kangas To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists In-Reply-To: <87lfs8b6dx.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Fri, 22 Nov 2019 09:35:38 +0000") References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> <87lfs8thwv.fsf@cassou.me> <87lfs8b6dx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Mon, 20 Jan 2020 19:54:01 +0100 Message-ID: <874kwqt0vq.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: Damien Cassou , 38284@debbugs.gnu.org, Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Jo=C3=A3o T=C3=A1vora writes: > Damien Cassou writes: > >> Can you please merge the attached patch with yours? > > No, but you can do that, because it's your work (I can push it for you > though). Anyway, now I read the test you wrote, I agree it's a good > test. You are testing auth-source-pass-match-entry-p, much higher up > than auth-source-pass--generate-entry-suffixes, the function I changed. > > Of course, only someone who was involved in the design would be able to > confidently place the tests at that correct level, the finding of which > is the most difficult part. If the test is good, I think it should be installed. Unfortunately, it seems like it doesn't apply cleanly to current master. Damien, could you please re-send the patch formatted by "git format-patch -1"? Please also include a commit message with a ChangeLog entry as described in the CONTRIBUTE file. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 21 14:25:21 2020 Received: (at 38284) by debbugs.gnu.org; 21 Jan 2020 19:25:21 +0000 Received: from localhost ([127.0.0.1]:48514 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itz9N-0006HQ-5x for submit@debbugs.gnu.org; Tue, 21 Jan 2020 14:25:21 -0500 Received: from mail.choca.pics ([80.67.172.235]:51552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itz9I-0006HA-Ak for 38284@debbugs.gnu.org; Tue, 21 Jan 2020 14:25:19 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id AB725181B8185; Tue, 21 Jan 2020 20:25:13 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id dEa9loix987j; Tue, 21 Jan 2020 20:25:10 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 3F6FF181B817F; Tue, 21 Jan 2020 20:25:10 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id fGJfDqlm2nDY; Tue, 21 Jan 2020 20:25:10 +0100 (CET) Received: from luz4 (57.139.120.78.rev.sfr.net [78.120.139.57]) by mail.choca.pics (Postfix) with ESMTPSA id DC0201819578D; Tue, 21 Jan 2020 20:25:09 +0100 (CET) From: Damien Cassou To: Stefan Kangas , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists In-Reply-To: <874kwqt0vq.fsf@marxist.se> References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> <87lfs8thwv.fsf@cassou.me> <87lfs8b6dx.fsf@gmail.com> <874kwqt0vq.fsf@marxist.se> Date: Tue, 21 Jan 2020 20:25:08 +0100 Message-ID: <874kwo6297.fsf@cassou.me> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284 Cc: 38284@debbugs.gnu.org, Nicolas Petton X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Stefan Kangas writes: > If the test is good, I think it should be installed. Unfortunately, > it seems like it doesn't apply cleanly to current master. > > Damien, could you please re-send the patch formatted by "git > format-patch -1"? Please also include a commit message with a > ChangeLog entry as described in the CONTRIBUTE file. The patch was only meant to be added to Jo=C3=A3o's own patch. Here is a standalone one. --=20 Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-test-lisp-auth-source-pass-tests.el-Test-for-multipl.patch >From 7e4c1aaa934f155e3aa3c69ba0a3460c1b6b90f3 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 21 Jan 2020 20:13:54 +0100 Subject: [PATCH] * test/lisp/auth-source-pass-tests.el: Test for multiple ports. --- test/lisp/auth-source-pass-tests.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el index 10ed9c39fb..677abb33cc 100644 --- a/test/lisp/auth-source-pass-tests.el +++ b/test/lisp/auth-source-pass-tests.el @@ -353,6 +353,10 @@ auth-source-pass--matching-entries-find-entries-with-a-port (auth-source-pass--with-store '(("bar.com:8080")) (should (auth-source-pass-match-entry-p "bar.com:8080" "bar.com" nil "8080")))) +(ert-deftest auth-source-pass--matching-entries-find-entries-with-a-port-when-passed-multiple-ports () + (auth-source-pass--with-store '(("bar.com:8080")) + (should (auth-source-pass-match-entry-p "bar.com:8080" "bar.com" nil '("http" "https" "80" "8080"))))) + (ert-deftest auth-source-pass--matching-entries-find-entries-with-slash () ;; match if entry filename matches user (auth-source-pass--with-store '(("foo.com/user")) -- 2.24.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 22 03:02:57 2020 Received: (at 38284-done) by debbugs.gnu.org; 22 Jan 2020 08:02:57 +0000 Received: from localhost ([127.0.0.1]:48925 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuAyW-0007ss-Ty for submit@debbugs.gnu.org; Wed, 22 Jan 2020 03:02:57 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:41632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuAyU-0007sc-RO for 38284-done@debbugs.gnu.org; Wed, 22 Jan 2020 03:02:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=bD4Pb2PwRhggDSgb/bYXjpxhU7p1GtL9GeGJ8Csy/n0=; b=D4tyhUFjs9J/EXR0hFDqgyNvVx 8sqlTbLMCShMJQmaFvtj5bi7T0FR2HrqGG3PUnun3ZEw+N8LS0PGBaI7P+g4PO1CbPN0GghM5jLXX XK/j4xglrU1YoBFQKR65YSbDSWKtD5jy2i1EpBV/UoxEhYhBYsHEaBNf3unhcFifjv4mvd3X3Md5Q L2ZHMUtZ9h7foPRyw8Doxe53s23dKSbgGP1gEL5YbnUPx5vM1BY6hu5JxvYqdAeoRPtK+bdoekraH bypg5Qz7FwOGOx/HPdiHhZEpS70AydgNO1Z53nuCqeAoKR4+qj7CIwIt1P6HOo15jq7cT6q5JNiwk qzdhrIjQ==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:43376 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iuAyN-000JfY-A1; Wed, 22 Jan 2020 03:02:47 -0500 From: Stefan Kangas To: Damien Cassou Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists In-Reply-To: <874kwo6297.fsf@cassou.me> (Damien Cassou's message of "Tue, 21 Jan 2020 20:25:08 +0100") References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> <87lfs8thwv.fsf@cassou.me> <87lfs8b6dx.fsf@gmail.com> <874kwqt0vq.fsf@marxist.se> <874kwo6297.fsf@cassou.me> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Wed, 22 Jan 2020 09:02:45 +0100 Message-ID: <8736c7lxzu.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284-done Cc: 38284-done@debbugs.gnu.org, Nicolas Petton , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Damien Cassou writes: >> Damien, could you please re-send the patch formatted by "git >> format-patch -1"? Please also include a commit message with a >> ChangeLog entry as described in the CONTRIBUTE file. > > The patch was only meant to be added to Jo=C3=A3o's own patch. Understood. > Here is a standalone one. Thanks, it seems to be working fine (the test passes), so I have now pushed this to master as commit abb2515b0c. I don't see anything more to do here, so I'm also closing this bug. Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 22 04:22:15 2020 Received: (at 38284-done) by debbugs.gnu.org; 22 Jan 2020 09:22:15 +0000 Received: from localhost ([127.0.0.1]:48992 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuCDH-0001Ry-06 for submit@debbugs.gnu.org; Wed, 22 Jan 2020 04:22:15 -0500 Received: from mail.choca.pics ([80.67.172.235]:34468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iuCDF-0001Rp-Hn for 38284-done@debbugs.gnu.org; Wed, 22 Jan 2020 04:22:14 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id D47EE181A5067; Wed, 22 Jan 2020 10:22:10 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id beENNJ-Uu8LC; Wed, 22 Jan 2020 10:22:10 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 60DEB181A5073; Wed, 22 Jan 2020 10:22:10 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id oiHFHJGFnmEo; Wed, 22 Jan 2020 10:22:10 +0100 (CET) Received: from luz4 (unknown [86.215.185.132]) by mail.choca.pics (Postfix) with ESMTPSA id 24328181A5067; Wed, 22 Jan 2020 10:22:10 +0100 (CET) From: Damien Cassou To: Stefan Kangas Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists In-Reply-To: <8736c7lxzu.fsf@marxist.se> References: <87ftijz9df.fsf@gmail.com> <874kyxt78p.fsf@cassou.me> <87lfs8thwv.fsf@cassou.me> <87lfs8b6dx.fsf@gmail.com> <874kwqt0vq.fsf@marxist.se> <874kwo6297.fsf@cassou.me> <8736c7lxzu.fsf@marxist.se> Date: Wed, 22 Jan 2020 10:22:08 +0100 Message-ID: <87y2tz4zi7.fsf@cassou.me> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38284-done Cc: 38284-done@debbugs.gnu.org, Nicolas Petton , =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > I don't see anything more to do here, so I'm also closing this bug. thank you -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill From unknown Fri Jun 13 10:57:51 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Feb 2020 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator