NetBSD Problem Report #49249

From www@NetBSD.org  Wed Oct  1 02:48:16 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3FE3EA65B9
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Oct 2014 02:48:16 +0000 (UTC)
Message-Id: <20141001024814.EB8EAA65BD@mollari.NetBSD.org>
Date: Wed,  1 Oct 2014 02:48:14 +0000 (UTC)
From: yaneurabeya@gmail.com
Reply-To: yaneurabeya@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Inconsistent line endings in some of the files under src/tests; makes svn whine
X-Send-Pr-Version: www-1.0

>Number:         49249
>Category:       misc
>Synopsis:       Inconsistent line endings in some of the files under src/tests; makes svn whine
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 01 02:50:00 +0000 2014
>Last-Modified:  Mon Oct 13 19:30:00 +0000 2014
>Originator:     Garrett Cooper
>Release:        HEAD
>Organization:
EMC / Isilon Storage Division
>Environment:
n/a
>Description:
I'm not particularly worried about the sort output, but the t_tcpip.sh file seems like it should be fixed:

svn: E200009: File '/home/ngie/freebsd-vendor/NetBSD/tests/dist/lib/librumphijack/t_tcpip.sh' has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E135000: Additional errors:
svn: E200009: File '/home/ngie/freebsd-vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_dflag_out.txt' has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E135000: Additional errors:
svn: E200009: File '/home/ngie/freebsd-vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_fflag_out.txt' has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E135000: Additional errors:
svn: E200009: File '/home/ngie/freebsd-vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_iflag_out.txt' has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E135000: Additional errors:
svn: E200009: File '/home/ngie/freebsd-vendor/NetBSD/tests/dist/usr.bin/sort/d_any_char_in.txt' has inconsistent newlines
svn: E135000: Inconsistent line ending style
svn: E135000: Additional errors:
>How-To-Repeat:

>Fix:

>Audit-Trail:
From: "Alan Barrett" <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49249 CVS commit: src/tests/lib/librumphijack
Date: Thu, 9 Oct 2014 06:52:37 +0000

 Module Name:	src
 Committed By:	apb
 Date:		Thu Oct  9 06:52:37 UTC 2014

 Modified Files:
 	src/tests/lib/librumphijack: t_tcpip.sh

 Log Message:
 Avoid literal <CR> in sed regular expression.
 Instead, use printf(1) to save the regexp in a shell variable,
 taking advantage of the fact that printf understands "\r".

 This should fix a complaint from subversion, reported in PR 49249.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.14 src/tests/lib/librumphijack/t_tcpip.sh

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Alan Barrett <apb@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: misc/49249: Inconsistent line endings in some of the files under
 src/tests; makes svn whine
Date: Thu, 9 Oct 2014 08:54:30 +0200

 On Wed, 01 Oct 2014, yaneurabeya@gmail.com wrote:
 >>Synopsis:       Inconsistent line endings in some of the files under src/tests; makes svn whine

 I searched for files with embedded <CR> characters:

     grep -l -R -e "$(printf '\r')" src/tests

 and it found these:

     src/tests/lib/libcurses/check_files/box_standout.chk
     src/tests/lib/libcurses/check_files/background4.chk
     src/tests/lib/libcurses/check_files/background5.chk
     src/tests/lib/libcurses/check_files/color_blue_back.chk
     src/tests/lib/libcurses/check_files/clear10.chk
     src/tests/lib/libcurses/check_files/clear5.chk
     src/tests/lib/libcurses/check_files/clear8.chk
     src/tests/lib/libcurses/check_files/clear9.chk
     src/tests/lib/libcurses/check_files/color_blank_draw.chk
     src/tests/lib/libcurses/check_files/color_default.chk
     src/tests/lib/libcurses/check_files/color_red_fore.chk
     src/tests/lib/libcurses/check_files/copywin11.chk
     src/tests/lib/libcurses/check_files/copywin12.chk
     src/tests/lib/libcurses/check_files/copywin2.chk
     src/tests/lib/libcurses/check_files/copywin4.chk
     src/tests/lib/libcurses/check_files/copywin6.chk
     src/tests/lib/libcurses/check_files/copywin7.chk
     src/tests/lib/libcurses/check_files/copywin8.chk
     src/tests/lib/libcurses/check_files/fill.chk
     src/tests/lib/libcurses/check_files/wborder.chk
     src/tests/lib/libcurses/check_files/wgetstr_refresh.chk
     src/tests/lib/librumphijack/t_tcpip.sh
     src/tests/usr.bin/sort/d_any_char_dflag_out.txt
     src/tests/usr.bin/sort/d_any_char_fflag_out.txt
     src/tests/usr.bin/sort/d_any_char_iflag_out.txt
     src/tests/usr.bin/sort/d_any_char_in.txt

 In every case, the use of <CR> is deliberate:

 * In the libcurses *.chk files, they are there to match the output
 from a program that uses curses(3).

 * In src/tests/lib/librumphijack/t_tcpip.sh, there's one <CR>, and it's
 used in a regular expression passed to sed.  The <CR> is not at the end
 of a line, so svn is wrong to complain about "inconsistent newlines".
 This is the only <CR> that I found that could easily be replaced by
 something else, and I changed it in CVS revision 1.13.

 * In the sort *.txt files, the <CR> characters are used as input or
 expected output for testing the sort(1) program.

 --apb (Alan Barrett)

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, yaneurabeya@gmail.com
Subject: Re: misc/49249: Inconsistent line endings in some of the files under src/tests; makes svn whine
Date: Thu, 9 Oct 2014 09:04:41 +0200

 When importing these files into svn, they should be marked with some binary
 mime type (svn tries to guess mime types if not specified, and in this
 case, it is hard to guess right).

 Martin

From: NGie Cooper <yaneurabeya@gmail.com>
To: Martin Husemann <martin@duskware.de>
Cc: "gnats-bugs@NetBSD.org" <gnats-bugs@netbsd.org>, misc-bug-people@netbsd.org, 
	"gnats-admin@netbsd.org" <gnats-admin@netbsd.org>, "netbsd-bugs@netbsd.org" <netbsd-bugs@netbsd.org>
Subject: Re: misc/49249: Inconsistent line endings in some of the files under
 src/tests; makes svn whine
Date: Mon, 13 Oct 2014 12:25:50 -0700

 On Thu, Oct 9, 2014 at 12:04 AM, Martin Husemann <martin@duskware.de> wrote:
 > When importing these files into svn, they should be marked with some binary
 > mime type (svn tries to guess mime types if not specified, and in this
 > case, it is hard to guess right).

 Hi Alan and Martin!
     Could the file extension be renamed to .bin improve mime/file type
 auto detection and make it clearer to end-users that the file is a
 binary file?
 Thanks!
 -Garrett

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.