From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Richard Copley Newsgroups: gmane.emacs.bugs Subject: bug#35739: Bad signature from GNU ELPA Date: Wed, 15 May 2019 07:46:12 +0100 Message-ID: References: <87mujog0ao.fsf@gmail.com> <837easa178.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000fd516b0588e7825a" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="211281"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35739@debbugs.gnu.org, Noam Postavsky To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 15 08:48:41 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQniS-000son-Nr for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 08:48:40 +0200 Original-Received: from localhost ([127.0.0.1]:60499 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQniQ-0001Ri-Ow for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 02:48:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQniH-0001Dk-Aa for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 02:48:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQngy-0005QO-AB for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 02:47:12 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37272) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQngs-00058X-6Z for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 02:47:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hQngr-0007Rz-VI for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 02:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Richard Copley Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 May 2019 06:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35739 X-GNU-PR-Package: emacs Original-Received: via spool by 35739-submit@debbugs.gnu.org id=B35739.155790281328621 (code B ref 35739); Wed, 15 May 2019 06:47:01 +0000 Original-Received: (at 35739) by debbugs.gnu.org; 15 May 2019 06:46:53 +0000 Original-Received: from localhost ([127.0.0.1]:50816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQngi-0007RY-KW for submit@debbugs.gnu.org; Wed, 15 May 2019 02:46:52 -0400 Original-Received: from mail-oi1-f179.google.com ([209.85.167.179]:32815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQngb-0007RG-QU for 35739@debbugs.gnu.org; Wed, 15 May 2019 02:46:50 -0400 Original-Received: by mail-oi1-f179.google.com with SMTP id m204so1042001oib.0 for <35739@debbugs.gnu.org>; Tue, 14 May 2019 23:46:45 -0700 (PDT) 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; bh=dHYN44zpYLShusEHUsbwqKzPxD0qtuX8Xh3vVPWtTCQ=; b=r7opL059qVQhqDnqlqGAKGfO1eySHhs/zOdbDSZo3rA0hyoJTRGzl0Q/VbBENMJZBC zOUe2hmwlGHhAcPjN/UxX2aXhj7k5R3l31l13JnESx5BMV+73QMLzE5omxi7ZW3NhsTk YYoEkbBQ1lvaEgbBAs+QBfi6RYoDW26hbAFz0bvatOH+NCweD1C1KDx2jXkiCv6yEDVQ slW3xTuJncBjCYU4N5JNhmAIgRSNwg8Dyfccd/1w9MTh1/SVYJfm2fkP+5rVc/d6CHBp 8R1sKOHEEznPz7fZ2B0kix4KR8nN3GzuWNeCP4dH658nmIzjdrz/wg8DabA1qlV+e8lg TNDg== 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; bh=dHYN44zpYLShusEHUsbwqKzPxD0qtuX8Xh3vVPWtTCQ=; b=XXAuMM3FwCRg0jlYFV2xqWOFGEMuNHfgeVkr4ctksyO2M2UkvqKQhT6TuNYPkLbULo ANT6R6lA5ightMsDZ+SM5hGwcsupr+2/Z9mHEaFE9m5LaFoaRANRRl6AuQ0jqKu2fIsn OB4qhOIBZxxm9ZRlpUcudeZ06JkPgwEwSvd8W2j7HQHBa7Nt5qQyDbkfIL9rxmEtoFAR 6jpCsau2ciaEBex5fnz6JihAN/exCNCaLNiOeda53iNi+21ik4CRfD0ySDd+/DjaPMEc ZnXndHIwrtZEAgdNMpFaKzurrckAFl0ftE6edBgu1LUFPbhVC937+qXLj79zkzH+qVwB 6AtA== X-Gm-Message-State: APjAAAW7krEUTpqj1EZEMfsaxyyooepDZtzbswUIyEF1QNxGElAlME6e GaFdKuo3szPEduRyvZND1SsZzakGwKJrwbiRyR0= X-Google-Smtp-Source: APXvYqwA0iSvk+b+cTMu/Bds1vEmeZcIsJK3XbpyD5Sa5k2f80xrbIciOu+exSUYz9tR7Td/K0IZ6qragNHhN4qYG30= X-Received: by 2002:aca:b1d4:: with SMTP id a203mr5545035oif.67.1557902800009; Tue, 14 May 2019 23:46:40 -0700 (PDT) In-Reply-To: <837easa178.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159323 Archived-At: --000000000000fd516b0588e7825a Content-Type: text/plain; charset="UTF-8" On Wed, 15 May 2019 at 03:42, Eli Zaretskii wrote: > > From: Richard Copley > > Date: Tue, 14 May 2019 23:26:27 +0100 > > Cc: 35739@debbugs.gnu.org > > > > Thanks, that seems to be it: the attached patch gets rid of the bug (but > obviously isn't TRT). > > > > diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el > > index e35d999e0f..f8af2ce88c 100644 > > --- a/lisp/url/url-handlers.el > > +++ b/lisp/url/url-handlers.el > > @@ -334,11 +334,11 @@ url-insert-buffer-contents > > (when replace > > (delete-region (point-min) start) > > (delete-region (point) (point-max))) > > - (unless (cadr size-and-charset) > > - ;; If the headers don't specify any particular charset, use the > > - ;; usual heuristic/rules that we apply to files. > > - (decode-coding-inserted-region (point-min) (point) url > > - visit beg end replace)) > > + ;; (unless (cadr size-and-charset) > > + ;; ;; If the headers don't specify any particular charset, use > the > > + ;; ;; usual heuristic/rules that we apply to files. > > + ;; (decode-coding-inserted-region (point-min) (point) url > > + ;; visit beg end replace)) > > (let ((inserted (car size-and-charset))) > > (when (fboundp 'after-insert-file-set-coding) > > (let ((insval (after-insert-file-set-coding inserted visit))) > > I don't see how disabling decoding could make sense, can you explain? > Not in detail, it's not an area of expertise of mine. We call (decode-coding-region (point-min) (point-max) 'undecided) on the payload of "https://elpa.gnu.org/packages/archive-contents", which is raw text. The resulting buffer's buffer-file-coding- system is iso-latin-1-dos. > > What does this code do on GNU/Linux? > The same. The resulting coding system is iso-latin-1-unix. --000000000000fd516b0588e7825a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, 15 May 20= 19 at 03:42, Eli Zaretskii <eliz@gnu.org= > wrote:
= > From: Richard Copley <rcopley@gmail.com>
> Date: Tue, 14 May 2019 23:26:27 +0100
> Cc: 35739@d= ebbugs.gnu.org
>
> Thanks, that seems to be it: the attached patch gets rid of the bug (b= ut obviously isn't TRT).
>
> diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
> index e35d999e0f..f8af2ce88c 100644
> --- a/lisp/url/url-handlers.el
> +++ b/lisp/url/url-handlers.el
> @@ -334,11 +334,11 @@ url-insert-buffer-contents
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when replace
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-region (point-min) start) >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (delete-region (point) (point-max)))=
> -=C2=A0 =C2=A0 =C2=A0 (unless (cadr size-and-charset)
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; If the headers don't specify any p= articular charset, use the
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; usual heuristic/rules that we apply to= files.
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 (decode-coding-inserted-region (point-min= ) (point) url
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0visit= beg end replace))
> +=C2=A0 =C2=A0 =C2=A0 ;; (unless (cadr size-and-charset)
> +=C2=A0 =C2=A0 =C2=A0 ;;=C2=A0 =C2=A0;; If the headers don't speci= fy any particular charset, use the
> +=C2=A0 =C2=A0 =C2=A0 ;;=C2=A0 =C2=A0;; usual heuristic/rules that we = apply to files.
> +=C2=A0 =C2=A0 =C2=A0 ;;=C2=A0 =C2=A0(decode-coding-inserted-region (p= oint-min) (point) url
> +=C2=A0 =C2=A0 =C2=A0 ;;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 v= isit beg end replace))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((inserted (car size-and-charset))) >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (fboundp 'after-insert-fil= e-set-coding)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((insval (after-insert-f= ile-set-coding inserted visit)))

I don't see how disabling decoding could make sense, can you explain?

Not in detail, it's not an area of expert= ise of mine. We call
(decode-coding-region (point-min) (point-max) '= undecided) on the
payload of "https://elpa.gnu.org/packages/archive-contents&qu= ot;,
which is raw text. The resulting buffer's buffer-file-coding-system is iso-latin-1-dos.
=C2=A0
What does this code do on GNU/Linux?

Th= e same. The resulting coding system is iso-latin-1-unix.

=
--000000000000fd516b0588e7825a--