New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 732746 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 729553
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

transport_security_state_generator fails with unclear error message if pins file has CRLF line endings

Project Member Reported by brat...@opera.com, Jun 13 2017

Issue description

If transport_security_state_generator.exe encounters a pins file with CRLF endings you get

FAILED: gen/net/http/transport_security_state_static.h
c:/Program Files/Python27/python.exe ../../build/gn_run_binary.py transport_security_state_generator.exe ../../net/http/transport_security_state_static.json ../../net/http/transport_security_state_static.pins ../../net/http/transport_security_state_static.template gen/net/http/transport_security_state_static.h
[0613/115148.604:ERROR:input_file_parsers.cc(193)] Invalid name in pins file:
[0613/115148.605:ERROR:transport_security_state_generator.cc(213)] Error while parsing the input files.
transport_security_state_generator.exe failed with exit code 1

This can happen if you edit the pins file locally or checkout the Chromium source code with a git that isn't configured to convert all line endings to LF.

I think the program should be robust to variations in line endings, or if that is impossible, give a better error message and force LF line endings with a .gitattributes file.

Thanks to http://magpcss.org/ceforum/viewtopic.php?f=6&t=15201 for explaining what was wrong.


 

Comment 1 by brat...@opera.com, Jun 13 2017

Components: Internals>Network

Comment 2 by mart...@martijnc.be, Jun 13 2017

I filed  issue 729553  for this after someone pointed this out to me last week.

Fixing this is a fairly simple change (https://codereview.chromium.org/2924583002/) but rsleevi preferred to keep old parsing because Chromium source files aren't supposed to use CRLF. I also prefer to keep the parsing as strict as possible but if a lot of people run into this it might be worth allowing CRLF.

The depot_tools auto-configure git to not convert line-endings but this gets override on some systems.

We could add a check for CRLF and output a more specific error explaining the files should use Unix style line-endings. The build would still fail in this case though.

Comment 3 by est...@chromium.org, Jun 13 2017

Cc: est...@chromium.org
Mergedinto: 729553
Owner: ----
Status: Duplicate (was: Unconfirmed)
Sounds like this is a dupe, please let me know if I've misunderstood.

Sign in to add a comment