Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Issue 2924583002: Handle Windows style line-endings in transport_security_state_static.pins. (Closed)

Created:
3 years, 6 months ago by martijnc
Modified:
3 years, 6 months ago
Reviewers:
Ryan Sleevi
CC:
cbentzel+watch_chromium.org, chromium-reviews, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle Windows style line-endings in transport_security_state_static.pins. The build fails when the pins file uses Windows style line-endings: [0605/151613.923:ERROR:input_file_parsers.cc(193)] Invalid name in pinsfile: [0605/151613.923:ERROR:transport_security_state_generator.cc(213)] Error while parsing the input files. The actual file uses correct Unix style line-endings that get converted to Windows style in some checkouts. This causes the build to fail with a confusing error message. BUG=729553

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M net/tools/transport_security_state_generator/input_file_parsers.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/tools/transport_security_state_generator/input_file_parsers_unittest.cc View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (6 generated)
martijnc
Some Windows users end up with incorrect line-endings in their checkout and the generator fails ...
3 years, 6 months ago (2017-06-05 17:50:06 UTC) #7
Ryan Sleevi
On 2017/06/05 17:50:06, martijnc wrote: > Some Windows users end up with incorrect line-endings in ...
3 years, 6 months ago (2017-06-08 18:59:45 UTC) #8
martijnc
On 2017/06/08 at 18:59:45, rsleevi wrote: > I'm inclined to say no, because as noted, ...
3 years, 6 months ago (2017-06-08 20:15:56 UTC) #9
Daniel Bratell
3 years, 6 months ago (2017-06-13 11:54:57 UTC) #10
Message was sent while issue was closed.
On 2017/06/08 20:15:56, martijnc wrote:
> On 2017/06/08 at 18:59:45, rsleevi wrote:
> > I'm inclined to say no, because as noted, Chrome expects autocrlf to be
false
> as a whole. I think what you're doign is reasonable to address the symptom,
but
> as far as root causes go, making sure all files observe the autocrlf false
> property seems like the better answer - and working with Infra to make sure
> checkouts always observe that is the best solution.
> > 
> > Does that make sense why I'm Not LGTMing this? :)
> 
> I was worried this was a bigger problem when I sent this out as there were
> multiple reports from users building on Windows and the build change was
fairly
> recent. Having had a couple more days to think about it, I think these report
> may have been a coincidence. The generator has been running during the build
for
> over 2 months to generate test data which would have resulted in the same
error.
> So I'm happy keeping the parsing strict - especially given the potential
impact
> of parsing errors in the pins files.
> 
> From the reactions on the bug it appears depot_tools already set the autocrlf
> value to false automatically. The problem occurs when the value is somehow
> overridden.
> 
> If more people run into this it might be worthwhile adding a check to detect
the
> incorrect line-endings and output a more informative error message.

The only thing making autocrlf=false is that the bundled git in depot_tools is
hardcoded to do that. If you use a different git (intentionally or by accident)
then nothing stops the code from being checked out with CRLF line endings.
Normally it doesn't matter because all code is robust.

If it must be LF, then we should add a .gitattributes file to enforce it.

Powered by Google App Engine
This is Rietveld 408576698