From owner-freebsd-hackers@freebsd.org Tue Mar 27 20:27:00 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A6C2F56F0E for ; Tue, 27 Mar 2018 20:27:00 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ABE07E69B for ; Tue, 27 Mar 2018 20:26:59 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1 (FreeBSD)) (envelope-from ) id 1f0uTl-000OT4-Cw; Tue, 27 Mar 2018 12:41:59 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id w2RJfukW094057; Tue, 27 Mar 2018 12:41:56 -0700 (PDT) (envelope-from gonzo@bluezbox.com) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@bluezbox.com using -f Date: Tue, 27 Mar 2018 12:41:55 -0700 From: Oleksandr Tymoshenko To: Stefan Bethke Cc: freebsd-hackers@FreeBSD.org Subject: Re: Bugzilla converts patch to CRLF line endings? Message-ID: <20180327194155.GA93992@bluezbox.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: FreeBSD/11.1-RELEASE-p4 (amd64) User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", 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: Stefan Bethke (stb@lassitu.de) wrote: > Hey, > > I’ve submitted patched for the ports I maintain by copy/pasting the svn diff output into the Bugzilla attachment form for a long time. The committer [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -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-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Mar 2018 20:27:00 -0000 Stefan Bethke (stb@lassitu.de) wrote: > Hey, > > I’ve submitted patched for the ports I maintain by copy/pasting the svn diff output into the Bugzilla attachment form for a long time. The committer working on https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226941 noticed that the patch apparently has CRLF line endings, making it hard(er) to apply it properly. > > Working on a Mac with Terminal and Safari, I have not have noticed any such behaviour. When I copy/paste from Bugzilla into Terminal, everything works just fine, so I can do „cd /usr/ports/cat/port; patch -p0“ then paste and ^D. > > When I download the attachment from the „raw“ attachment link (in my example https://bz-attachments.freebsd.org/attachment.cgi?id=191852) with curl or wget, I do get to see CR-LF. > > Where does that happen? And is that a bug or a feature? I think it's a standard: https://stackoverflow.com/a/14217315 Looks like browser is supposed to convert newlines in input field to CR LF. I just tried it on our test instance \r\n-s are part of a request, not added later. Bugzilla doesn't perfomr any transformation of copy-pasted attachment text and saves it as-is. -- gonzo